Class CreateResolverRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.appsync.model.AppSyncRequest
-
- software.amazon.awssdk.services.appsync.model.CreateResolverRequest
-
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<CreateResolverRequest.Builder,CreateResolverRequest>
@Generated("software.amazon.awssdk:codegen") public final class CreateResolverRequest extends AppSyncRequest implements ToCopyableBuilder<CreateResolverRequest.Builder,CreateResolverRequest>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCreateResolverRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringapiId()The ID for the GraphQL API for which the resolver is being created.static CreateResolverRequest.Builderbuilder()CachingConfigcachingConfig()The caching configuration for the resolver.Stringcode()Theresolvercode that contains the request and response functions.StringdataSourceName()The name of the data source for which the resolver is being created.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)StringfieldName()The name of the field to attach the resolver to.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()ResolverKindkind()The resolver type.StringkindAsString()The resolver type.IntegermaxBatchSize()The maximum batching size for a resolver.ResolverLevelMetricsConfigmetricsConfig()Enables or disables enhanced resolver metrics for specified resolvers.StringmetricsConfigAsString()Enables or disables enhanced resolver metrics for specified resolvers.PipelineConfigpipelineConfig()ThePipelineConfig.StringrequestMappingTemplate()The mapping template to use for requests.StringresponseMappingTemplate()The mapping template to use for responses from the data source.AppSyncRuntimeruntime()Returns the value of the Runtime property for this object.List<SdkField<?>>sdkFields()static Class<? extends CreateResolverRequest.Builder>serializableBuilderClass()SyncConfigsyncConfig()TheSyncConfigfor a resolver attached to a versioned data source.CreateResolverRequest.BuildertoBuilder()StringtoString()Returns a string representation of this object.StringtypeName()The name of theType.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
apiId
public final String apiId()
The ID for the GraphQL API for which the resolver is being created.
- Returns:
- The ID for the GraphQL API for which the resolver is being created.
-
typeName
public final String typeName()
The name of the
Type.- Returns:
- The name of the
Type.
-
fieldName
public final String fieldName()
The name of the field to attach the resolver to.
- Returns:
- The name of the field to attach the resolver to.
-
dataSourceName
public final String dataSourceName()
The name of the data source for which the resolver is being created.
- Returns:
- The name of the data source for which the resolver is being created.
-
requestMappingTemplate
public final String requestMappingTemplate()
The mapping template to use for requests.
A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).
VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.
- Returns:
- The mapping template to use for requests.
A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).
VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.
-
responseMappingTemplate
public final String responseMappingTemplate()
The mapping template to use for responses from the data source.
- Returns:
- The mapping template to use for responses from the data source.
-
kind
public final ResolverKind kind()
The resolver type.
-
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
-
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of
Functionobjects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
If the service returns an enum value that is not available in the current SDK version,
kindwill returnResolverKind.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromkindAsString().- Returns:
- The resolver type.
-
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
-
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of
Functionobjects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
-
- See Also:
ResolverKind
-
-
kindAsString
public final String kindAsString()
The resolver type.
-
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
-
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of
Functionobjects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
If the service returns an enum value that is not available in the current SDK version,
kindwill returnResolverKind.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromkindAsString().- Returns:
- The resolver type.
-
UNIT: A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
-
PIPELINE: A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of
Functionobjects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
-
- See Also:
ResolverKind
-
-
pipelineConfig
public final PipelineConfig pipelineConfig()
The
PipelineConfig.- Returns:
- The
PipelineConfig.
-
syncConfig
public final SyncConfig syncConfig()
The
SyncConfigfor a resolver attached to a versioned data source.- Returns:
- The
SyncConfigfor a resolver attached to a versioned data source.
-
cachingConfig
public final CachingConfig cachingConfig()
The caching configuration for the resolver.
- Returns:
- The caching configuration for the resolver.
-
maxBatchSize
public final Integer maxBatchSize()
The maximum batching size for a resolver.
- Returns:
- The maximum batching size for a resolver.
-
runtime
public final AppSyncRuntime runtime()
Returns the value of the Runtime property for this object.- Returns:
- The value of the Runtime property for this object.
-
code
public final String code()
The
resolvercode that contains the request and response functions. When code is used, theruntimeis required. Theruntimevalue must beAPPSYNC_JS.- Returns:
- The
resolvercode that contains the request and response functions. When code is used, theruntimeis required. Theruntimevalue must beAPPSYNC_JS.
-
metricsConfig
public final ResolverLevelMetricsConfig metricsConfig()
Enables or disables enhanced resolver metrics for specified resolvers. Note that
metricsConfigwon't be used unless theresolverLevelMetricsBehaviorvalue is set toPER_RESOLVER_METRICS. If theresolverLevelMetricsBehavioris set toFULL_REQUEST_RESOLVER_METRICSinstead,metricsConfigwill be ignored. However, you can still set its value.metricsConfigcan beENABLEDorDISABLED.If the service returns an enum value that is not available in the current SDK version,
metricsConfigwill returnResolverLevelMetricsConfig.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frommetricsConfigAsString().- Returns:
- Enables or disables enhanced resolver metrics for specified resolvers. Note that
metricsConfigwon't be used unless theresolverLevelMetricsBehaviorvalue is set toPER_RESOLVER_METRICS. If theresolverLevelMetricsBehavioris set toFULL_REQUEST_RESOLVER_METRICSinstead,metricsConfigwill be ignored. However, you can still set its value.metricsConfigcan beENABLEDorDISABLED. - See Also:
ResolverLevelMetricsConfig
-
metricsConfigAsString
public final String metricsConfigAsString()
Enables or disables enhanced resolver metrics for specified resolvers. Note that
metricsConfigwon't be used unless theresolverLevelMetricsBehaviorvalue is set toPER_RESOLVER_METRICS. If theresolverLevelMetricsBehavioris set toFULL_REQUEST_RESOLVER_METRICSinstead,metricsConfigwill be ignored. However, you can still set its value.metricsConfigcan beENABLEDorDISABLED.If the service returns an enum value that is not available in the current SDK version,
metricsConfigwill returnResolverLevelMetricsConfig.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frommetricsConfigAsString().- Returns:
- Enables or disables enhanced resolver metrics for specified resolvers. Note that
metricsConfigwon't be used unless theresolverLevelMetricsBehaviorvalue is set toPER_RESOLVER_METRICS. If theresolverLevelMetricsBehavioris set toFULL_REQUEST_RESOLVER_METRICSinstead,metricsConfigwill be ignored. However, you can still set its value.metricsConfigcan beENABLEDorDISABLED. - See Also:
ResolverLevelMetricsConfig
-
toBuilder
public CreateResolverRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CreateResolverRequest.Builder,CreateResolverRequest>- Specified by:
toBuilderin classAppSyncRequest
-
builder
public static CreateResolverRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends CreateResolverRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
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.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForFieldin classSdkRequest
-
-