Class ResolvableFieldOptions.Builder
java.lang.Object
software.amazon.awscdk.services.appsync.ResolvableFieldOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResolvableFieldOptions>
- Enclosing interface:
- ResolvableFieldOptions
@Stability(Experimental)
public static final class ResolvableFieldOptions.Builder
extends Object
implements software.amazon.jsii.Builder<ResolvableFieldOptions>
A builder for
ResolvableFieldOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionargs
(Map<String, ? extends GraphqlType> args) Sets the value ofFieldOptions.getArgs()
build()
Builds the configured instance.dataSource
(BaseDataSource dataSource) Sets the value ofResolvableFieldOptions.getDataSource()
directives
(List<? extends Directive> directives) Sets the value ofFieldOptions.getDirectives()
pipelineConfig
(List<? extends IAppsyncFunction> pipelineConfig) Sets the value ofResolvableFieldOptions.getPipelineConfig()
requestMappingTemplate
(MappingTemplate requestMappingTemplate) Sets the value ofResolvableFieldOptions.getRequestMappingTemplate()
responseMappingTemplate
(MappingTemplate responseMappingTemplate) Sets the value ofResolvableFieldOptions.getResponseMappingTemplate()
returnType
(GraphqlType returnType) Sets the value ofFieldOptions.getReturnType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dataSource
@Stability(Experimental) public ResolvableFieldOptions.Builder dataSource(BaseDataSource dataSource) Sets the value ofResolvableFieldOptions.getDataSource()
- Parameters:
dataSource
- The data source creating linked to this resolvable field.- Returns:
this
-
pipelineConfig
@Stability(Experimental) public ResolvableFieldOptions.Builder pipelineConfig(List<? extends IAppsyncFunction> pipelineConfig) Sets the value ofResolvableFieldOptions.getPipelineConfig()
- Parameters:
pipelineConfig
- configuration of the pipeline resolver.- Returns:
this
-
requestMappingTemplate
@Stability(Experimental) public ResolvableFieldOptions.Builder requestMappingTemplate(MappingTemplate requestMappingTemplate) Sets the value ofResolvableFieldOptions.getRequestMappingTemplate()
- Parameters:
requestMappingTemplate
- The request mapping template for this resolver.- Returns:
this
-
responseMappingTemplate
@Stability(Experimental) public ResolvableFieldOptions.Builder responseMappingTemplate(MappingTemplate responseMappingTemplate) Sets the value ofResolvableFieldOptions.getResponseMappingTemplate()
- Parameters:
responseMappingTemplate
- The response mapping template for this resolver.- Returns:
this
-
returnType
Sets the value ofFieldOptions.getReturnType()
- Parameters:
returnType
- The return type for this field. This parameter is required.- Returns:
this
-
args
@Stability(Experimental) public ResolvableFieldOptions.Builder args(Map<String, ? extends GraphqlType> args) Sets the value ofFieldOptions.getArgs()
- Parameters:
args
- The arguments for this field. i.e. type Example (first: String second: String) {}- where 'first' and 'second' are key values for args and 'String' is the GraphqlType
- Returns:
this
-
directives
@Stability(Experimental) public ResolvableFieldOptions.Builder directives(List<? extends Directive> directives) Sets the value ofFieldOptions.getDirectives()
- Parameters:
directives
- the directives for this field.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ResolvableFieldOptions>
- Returns:
- a new instance of
ResolvableFieldOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-