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

software.amazon.awssdk.services.appsync.model.GraphqlApi 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.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
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.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.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes a GraphQL API. *

*/ @Generated("software.amazon.awssdk:codegen") public final class GraphqlApi implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name") .getter(getter(GraphqlApi::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build(); private static final SdkField API_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("apiId") .getter(getter(GraphqlApi::apiId)).setter(setter(Builder::apiId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("apiId").build()).build(); private static final SdkField AUTHENTICATION_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("authenticationType").getter(getter(GraphqlApi::authenticationTypeAsString)) .setter(setter(Builder::authenticationType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("authenticationType").build()) .build(); private static final SdkField LOG_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("logConfig").getter(getter(GraphqlApi::logConfig)).setter(setter(Builder::logConfig)) .constructor(LogConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logConfig").build()).build(); private static final SdkField USER_POOL_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("userPoolConfig") .getter(getter(GraphqlApi::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(GraphqlApi::openIDConnectConfig)).setter(setter(Builder::openIDConnectConfig)) .constructor(OpenIDConnectConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("openIDConnectConfig").build()) .build(); private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn") .getter(getter(GraphqlApi::arn)).setter(setter(Builder::arn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build(); private static final SdkField> URIS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("uris") .getter(getter(GraphqlApi::uris)) .setter(setter(Builder::uris)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("uris").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("tags") .getter(getter(GraphqlApi::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField> ADDITIONAL_AUTHENTICATION_PROVIDERS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("additionalAuthenticationProviders") .getter(getter(GraphqlApi::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(GraphqlApi::xrayEnabled)).setter(setter(Builder::xrayEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("xrayEnabled").build()).build(); private static final SdkField WAF_WEB_ACL_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("wafWebAclArn").getter(getter(GraphqlApi::wafWebAclArn)).setter(setter(Builder::wafWebAclArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("wafWebAclArn").build()).build(); private static final SdkField LAMBDA_AUTHORIZER_CONFIG_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("lambdaAuthorizerConfig") .getter(getter(GraphqlApi::lambdaAuthorizerConfig)).setter(setter(Builder::lambdaAuthorizerConfig)) .constructor(LambdaAuthorizerConfig::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("lambdaAuthorizerConfig").build()) .build(); private static final SdkField> DNS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("dns") .getter(getter(GraphqlApi::dns)) .setter(setter(Builder::dns)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dns").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField VISIBILITY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("visibility").getter(getter(GraphqlApi::visibilityAsString)).setter(setter(Builder::visibility)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("visibility").build()).build(); private static final SdkField API_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("apiType").getter(getter(GraphqlApi::apiTypeAsString)).setter(setter(Builder::apiType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("apiType").build()).build(); private static final SdkField MERGED_API_EXECUTION_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("mergedApiExecutionRoleArn").getter(getter(GraphqlApi::mergedApiExecutionRoleArn)) .setter(setter(Builder::mergedApiExecutionRoleArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("mergedApiExecutionRoleArn").build()) .build(); private static final SdkField OWNER_FIELD = SdkField. builder(MarshallingType.STRING).memberName("owner") .getter(getter(GraphqlApi::owner)).setter(setter(Builder::owner)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("owner").build()).build(); private static final SdkField OWNER_CONTACT_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ownerContact").getter(getter(GraphqlApi::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(GraphqlApi::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(GraphqlApi::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(GraphqlApi::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(GraphqlApi::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(NAME_FIELD, API_ID_FIELD, AUTHENTICATION_TYPE_FIELD, LOG_CONFIG_FIELD, USER_POOL_CONFIG_FIELD, OPEN_ID_CONNECT_CONFIG_FIELD, ARN_FIELD, URIS_FIELD, TAGS_FIELD, ADDITIONAL_AUTHENTICATION_PROVIDERS_FIELD, XRAY_ENABLED_FIELD, WAF_WEB_ACL_ARN_FIELD, LAMBDA_AUTHORIZER_CONFIG_FIELD, DNS_FIELD, VISIBILITY_FIELD, API_TYPE_FIELD, MERGED_API_EXECUTION_ROLE_ARN_FIELD, OWNER_FIELD, OWNER_CONTACT_FIELD, INTROSPECTION_CONFIG_FIELD, QUERY_DEPTH_LIMIT_FIELD, RESOLVER_COUNT_LIMIT_FIELD, ENHANCED_METRICS_CONFIG_FIELD)); private static final long serialVersionUID = 1L; private final String name; private final String apiId; private final String authenticationType; private final LogConfig logConfig; private final UserPoolConfig userPoolConfig; private final OpenIDConnectConfig openIDConnectConfig; private final String arn; private final Map uris; private final Map tags; private final List additionalAuthenticationProviders; private final Boolean xrayEnabled; private final String wafWebAclArn; private final LambdaAuthorizerConfig lambdaAuthorizerConfig; private final Map dns; private final String visibility; private final String apiType; private final String mergedApiExecutionRoleArn; private final String owner; private final String ownerContact; private final String introspectionConfig; private final Integer queryDepthLimit; private final Integer resolverCountLimit; private final EnhancedMetricsConfig enhancedMetricsConfig; private GraphqlApi(BuilderImpl builder) { this.name = builder.name; this.apiId = builder.apiId; this.authenticationType = builder.authenticationType; this.logConfig = builder.logConfig; this.userPoolConfig = builder.userPoolConfig; this.openIDConnectConfig = builder.openIDConnectConfig; this.arn = builder.arn; this.uris = builder.uris; this.tags = builder.tags; this.additionalAuthenticationProviders = builder.additionalAuthenticationProviders; this.xrayEnabled = builder.xrayEnabled; this.wafWebAclArn = builder.wafWebAclArn; this.lambdaAuthorizerConfig = builder.lambdaAuthorizerConfig; this.dns = builder.dns; this.visibility = builder.visibility; this.apiType = builder.apiType; this.mergedApiExecutionRoleArn = builder.mergedApiExecutionRoleArn; this.owner = builder.owner; this.ownerContact = builder.ownerContact; this.introspectionConfig = builder.introspectionConfig; this.queryDepthLimit = builder.queryDepthLimit; this.resolverCountLimit = builder.resolverCountLimit; this.enhancedMetricsConfig = builder.enhancedMetricsConfig; } /** *

* The API name. *

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

* The API ID. *

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

* The authentication type. *

*

* 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 authentication type. * @see AuthenticationType */ public final AuthenticationType authenticationType() { return AuthenticationType.fromValue(authenticationType); } /** *

* The authentication type. *

*

* 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 authentication type. * @see AuthenticationType */ public final String authenticationTypeAsString() { return authenticationType; } /** *

* The Amazon CloudWatch Logs configuration. *

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

* The Amazon Cognito user pool configuration. *

* * @return The Amazon Cognito user pool configuration. */ public final UserPoolConfig userPoolConfig() { return userPoolConfig; } /** *

* The OpenID Connect configuration. *

* * @return The OpenID Connect configuration. */ public final OpenIDConnectConfig openIDConnectConfig() { return openIDConnectConfig; } /** *

* The Amazon Resource Name (ARN). *

* * @return The Amazon Resource Name (ARN). */ public final String arn() { return arn; } /** * For responses, this returns true if the service returned a value for the Uris 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 hasUris() { return uris != null && !(uris instanceof SdkAutoConstructMap); } /** *

* The URIs. *

*

* 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 #hasUris} method. *

* * @return The URIs. */ public final Map uris() { return uris; } /** * For responses, this returns true if the service returned a value for the Tags 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 hasTags() { return tags != null && !(tags instanceof SdkAutoConstructMap); } /** *

* The tags. *

*

* 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 #hasTags} method. *

* * @return The tags. */ public final Map tags() { return tags; } /** * 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 this GraphqlApi. *

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

* The ARN of the WAF access control list (ACL) associated with this GraphqlApi, if one exists. *

* * @return The ARN of the WAF access control list (ACL) associated with this GraphqlApi, if one exists. */ public final String wafWebAclArn() { return wafWebAclArn; } /** *

* Configuration for Lambda function authorization. *

* * @return Configuration for Lambda function authorization. */ public final LambdaAuthorizerConfig lambdaAuthorizerConfig() { return lambdaAuthorizerConfig; } /** * For responses, this returns true if the service returned a value for the Dns 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 hasDns() { return dns != null && !(dns instanceof SdkAutoConstructMap); } /** *

* The DNS records for the 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 #hasDns} method. *

* * @return The DNS records for the API. */ public final Map dns() { return dns; } /** *

* Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no value * is provided, the visibility will be set to GLOBAL by default. This value cannot be changed once the * API has been created. *

*

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

* * @return Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If * no value is provided, the visibility will be set to GLOBAL by default. This value cannot be * changed once the API has been created. * @see GraphQLApiVisibility */ public final GraphQLApiVisibility visibility() { return GraphQLApiVisibility.fromValue(visibility); } /** *

* Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no value * is provided, the visibility will be set to GLOBAL by default. This value cannot be changed once the * API has been created. *

*

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

* * @return Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If * no value is provided, the visibility will be set to GLOBAL by default. This value cannot be * changed once the API has been created. * @see GraphQLApiVisibility */ public final String visibilityAsString() { return visibility; } /** *

* The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API ( * MERGED). *

*

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

* * @return The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API ( * MERGED). * @see GraphQLApiType */ public final GraphQLApiType apiType() { return GraphQLApiType.fromValue(apiType); } /** *

* The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API ( * MERGED). *

*

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

* * @return The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API ( * MERGED). * @see GraphQLApiType */ public final String apiTypeAsString() { return apiType; } /** *

* 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 account owner of the GraphQL API. *

* * @return The account owner of the GraphQL API. */ public final String owner() { return owner; } /** *

* 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 + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(apiId()); hashCode = 31 * hashCode + Objects.hashCode(authenticationTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(logConfig()); hashCode = 31 * hashCode + Objects.hashCode(userPoolConfig()); hashCode = 31 * hashCode + Objects.hashCode(openIDConnectConfig()); hashCode = 31 * hashCode + Objects.hashCode(arn()); hashCode = 31 * hashCode + Objects.hashCode(hasUris() ? uris() : null); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(hasAdditionalAuthenticationProviders() ? additionalAuthenticationProviders() : null); hashCode = 31 * hashCode + Objects.hashCode(xrayEnabled()); hashCode = 31 * hashCode + Objects.hashCode(wafWebAclArn()); hashCode = 31 * hashCode + Objects.hashCode(lambdaAuthorizerConfig()); hashCode = 31 * hashCode + Objects.hashCode(hasDns() ? dns() : null); hashCode = 31 * hashCode + Objects.hashCode(visibilityAsString()); hashCode = 31 * hashCode + Objects.hashCode(apiTypeAsString()); hashCode = 31 * hashCode + Objects.hashCode(mergedApiExecutionRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(owner()); 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 equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof GraphqlApi)) { return false; } GraphqlApi other = (GraphqlApi) obj; return Objects.equals(name(), other.name()) && Objects.equals(apiId(), other.apiId()) && Objects.equals(authenticationTypeAsString(), other.authenticationTypeAsString()) && Objects.equals(logConfig(), other.logConfig()) && Objects.equals(userPoolConfig(), other.userPoolConfig()) && Objects.equals(openIDConnectConfig(), other.openIDConnectConfig()) && Objects.equals(arn(), other.arn()) && hasUris() == other.hasUris() && Objects.equals(uris(), other.uris()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && hasAdditionalAuthenticationProviders() == other.hasAdditionalAuthenticationProviders() && Objects.equals(additionalAuthenticationProviders(), other.additionalAuthenticationProviders()) && Objects.equals(xrayEnabled(), other.xrayEnabled()) && Objects.equals(wafWebAclArn(), other.wafWebAclArn()) && Objects.equals(lambdaAuthorizerConfig(), other.lambdaAuthorizerConfig()) && hasDns() == other.hasDns() && Objects.equals(dns(), other.dns()) && Objects.equals(visibilityAsString(), other.visibilityAsString()) && Objects.equals(apiTypeAsString(), other.apiTypeAsString()) && Objects.equals(mergedApiExecutionRoleArn(), other.mergedApiExecutionRoleArn()) && Objects.equals(owner(), other.owner()) && 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("GraphqlApi") .add("Name", name()) .add("ApiId", apiId()) .add("AuthenticationType", authenticationTypeAsString()) .add("LogConfig", logConfig()) .add("UserPoolConfig", userPoolConfig()) .add("OpenIDConnectConfig", openIDConnectConfig()) .add("Arn", arn()) .add("Uris", hasUris() ? uris() : null) .add("Tags", hasTags() ? tags() : null) .add("AdditionalAuthenticationProviders", hasAdditionalAuthenticationProviders() ? additionalAuthenticationProviders() : null) .add("XrayEnabled", xrayEnabled()).add("WafWebAclArn", wafWebAclArn()) .add("LambdaAuthorizerConfig", lambdaAuthorizerConfig()).add("Dns", hasDns() ? dns() : null) .add("Visibility", visibilityAsString()).add("ApiType", apiTypeAsString()) .add("MergedApiExecutionRoleArn", mergedApiExecutionRoleArn()).add("Owner", owner()) .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 "name": return Optional.ofNullable(clazz.cast(name())); case "apiId": return Optional.ofNullable(clazz.cast(apiId())); case "authenticationType": return Optional.ofNullable(clazz.cast(authenticationTypeAsString())); case "logConfig": return Optional.ofNullable(clazz.cast(logConfig())); case "userPoolConfig": return Optional.ofNullable(clazz.cast(userPoolConfig())); case "openIDConnectConfig": return Optional.ofNullable(clazz.cast(openIDConnectConfig())); case "arn": return Optional.ofNullable(clazz.cast(arn())); case "uris": return Optional.ofNullable(clazz.cast(uris())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "additionalAuthenticationProviders": return Optional.ofNullable(clazz.cast(additionalAuthenticationProviders())); case "xrayEnabled": return Optional.ofNullable(clazz.cast(xrayEnabled())); case "wafWebAclArn": return Optional.ofNullable(clazz.cast(wafWebAclArn())); case "lambdaAuthorizerConfig": return Optional.ofNullable(clazz.cast(lambdaAuthorizerConfig())); case "dns": return Optional.ofNullable(clazz.cast(dns())); case "visibility": return Optional.ofNullable(clazz.cast(visibilityAsString())); case "apiType": return Optional.ofNullable(clazz.cast(apiTypeAsString())); case "mergedApiExecutionRoleArn": return Optional.ofNullable(clazz.cast(mergedApiExecutionRoleArn())); case "owner": return Optional.ofNullable(clazz.cast(owner())); 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((GraphqlApi) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The API name. *

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

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

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

* The authentication type. *

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

* The Amazon CloudWatch Logs configuration. *

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

* The Amazon CloudWatch Logs configuration. *

* 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 Amazon Cognito user pool configuration. *

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

* The Amazon Cognito user pool configuration. *

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

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

* The OpenID Connect configuration. *

* 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()); } /** *

* The Amazon Resource Name (ARN). *

* * @param arn * The Amazon Resource Name (ARN). * @return Returns a reference to this object so that method calls can be chained together. */ Builder arn(String arn); /** *

* The URIs. *

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

* The tags. *

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

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

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

* The ARN of the WAF access control list (ACL) associated with this GraphqlApi, if one exists. *

* * @param wafWebAclArn * The ARN of the WAF access control list (ACL) associated with this GraphqlApi, if one * exists. * @return Returns a reference to this object so that method calls can be chained together. */ Builder wafWebAclArn(String wafWebAclArn); /** *

* 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 DNS records for the API. *

* * @param dns * The DNS records for the API. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dns(Map dns); /** *

* Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no * value is provided, the visibility will be set to GLOBAL by default. This value cannot be changed * once the API has been created. *

* * @param visibility * Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). * If no value is provided, the visibility will be set to GLOBAL by default. This value * cannot be changed once the API has been created. * @see GraphQLApiVisibility * @return Returns a reference to this object so that method calls can be chained together. * @see GraphQLApiVisibility */ Builder visibility(String visibility); /** *

* Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). If no * value is provided, the visibility will be set to GLOBAL by default. This value cannot be changed * once the API has been created. *

* * @param visibility * Sets the value of the GraphQL API to public (GLOBAL) or private (PRIVATE). * If no value is provided, the visibility will be set to GLOBAL by default. This value * cannot be changed once the API has been created. * @see GraphQLApiVisibility * @return Returns a reference to this object so that method calls can be chained together. * @see GraphQLApiVisibility */ Builder visibility(GraphQLApiVisibility visibility); /** *

* The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API ( * MERGED). *

* * @param apiType * The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged * API (MERGED). * @see GraphQLApiType * @return Returns a reference to this object so that method calls can be chained together. * @see GraphQLApiType */ Builder apiType(String apiType); /** *

* The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged API ( * MERGED). *

* * @param apiType * The value that indicates whether the GraphQL API is a standard API (GRAPHQL) or merged * API (MERGED). * @see GraphQLApiType * @return Returns a reference to this object so that method calls can be chained together. * @see GraphQLApiType */ Builder apiType(GraphQLApiType apiType); /** *

* 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 account owner of the GraphQL API. *

* * @param owner * The account owner of the GraphQL API. * @return Returns a reference to this object so that method calls can be chained together. */ Builder owner(String owner); /** *

* 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()); } } static final class BuilderImpl implements Builder { private String name; private String apiId; private String authenticationType; private LogConfig logConfig; private UserPoolConfig userPoolConfig; private OpenIDConnectConfig openIDConnectConfig; private String arn; private Map uris = DefaultSdkAutoConstructMap.getInstance(); private Map tags = DefaultSdkAutoConstructMap.getInstance(); private List additionalAuthenticationProviders = DefaultSdkAutoConstructList .getInstance(); private Boolean xrayEnabled; private String wafWebAclArn; private LambdaAuthorizerConfig lambdaAuthorizerConfig; private Map dns = DefaultSdkAutoConstructMap.getInstance(); private String visibility; private String apiType; private String mergedApiExecutionRoleArn; private String owner; private String ownerContact; private String introspectionConfig; private Integer queryDepthLimit; private Integer resolverCountLimit; private EnhancedMetricsConfig enhancedMetricsConfig; private BuilderImpl() { } private BuilderImpl(GraphqlApi model) { name(model.name); apiId(model.apiId); authenticationType(model.authenticationType); logConfig(model.logConfig); userPoolConfig(model.userPoolConfig); openIDConnectConfig(model.openIDConnectConfig); arn(model.arn); uris(model.uris); tags(model.tags); additionalAuthenticationProviders(model.additionalAuthenticationProviders); xrayEnabled(model.xrayEnabled); wafWebAclArn(model.wafWebAclArn); lambdaAuthorizerConfig(model.lambdaAuthorizerConfig); dns(model.dns); visibility(model.visibility); apiType(model.apiType); mergedApiExecutionRoleArn(model.mergedApiExecutionRoleArn); owner(model.owner); ownerContact(model.ownerContact); introspectionConfig(model.introspectionConfig); queryDepthLimit(model.queryDepthLimit); resolverCountLimit(model.resolverCountLimit); enhancedMetricsConfig(model.enhancedMetricsConfig); } 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 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 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 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 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 String getArn() { return arn; } public final void setArn(String arn) { this.arn = arn; } @Override public final Builder arn(String arn) { this.arn = arn; return this; } public final Map getUris() { if (uris instanceof SdkAutoConstructMap) { return null; } return uris; } public final void setUris(Map uris) { this.uris = MapOfStringToStringCopier.copy(uris); } @Override public final Builder uris(Map uris) { this.uris = MapOfStringToStringCopier.copy(uris); return this; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } public final void setTags(Map tags) { this.tags = TagMapCopier.copy(tags); } @Override public final Builder tags(Map tags) { this.tags = TagMapCopier.copy(tags); 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 String getWafWebAclArn() { return wafWebAclArn; } public final void setWafWebAclArn(String wafWebAclArn) { this.wafWebAclArn = wafWebAclArn; } @Override public final Builder wafWebAclArn(String wafWebAclArn) { this.wafWebAclArn = wafWebAclArn; 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 Map getDns() { if (dns instanceof SdkAutoConstructMap) { return null; } return dns; } public final void setDns(Map dns) { this.dns = MapOfStringToStringCopier.copy(dns); } @Override public final Builder dns(Map dns) { this.dns = MapOfStringToStringCopier.copy(dns); return this; } public final String getVisibility() { return visibility; } public final void setVisibility(String visibility) { this.visibility = visibility; } @Override public final Builder visibility(String visibility) { this.visibility = visibility; return this; } @Override public final Builder visibility(GraphQLApiVisibility visibility) { this.visibility(visibility == null ? null : visibility.toString()); return this; } public final String getApiType() { return apiType; } public final void setApiType(String apiType) { this.apiType = apiType; } @Override public final Builder apiType(String apiType) { this.apiType = apiType; return this; } @Override public final Builder apiType(GraphQLApiType apiType) { this.apiType(apiType == null ? null : apiType.toString()); 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 getOwner() { return owner; } public final void setOwner(String owner) { this.owner = owner; } @Override public final Builder owner(String owner) { this.owner = owner; 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 GraphqlApi build() { return new GraphqlApi(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy