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

software.amazon.awscdk.services.appsync.BaseResolverProps Maven / Gradle / Ivy

package software.amazon.awscdk.services.appsync;

/**
 * Basic properties for an AppSync resolver.
 * 

* EXPERIMENTAL */ @javax.annotation.Generated(value = "jsii-pacmak/1.1.0 (build df55f5e)", date = "2020-04-09T11:48:36.972Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.appsync.$Module.class, fqn = "@aws-cdk/aws-appsync.BaseResolverProps") @software.amazon.jsii.Jsii.Proxy(BaseResolverProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface BaseResolverProps extends software.amazon.jsii.JsiiSerializable { /** * name of the GraphQL fiel din the given type this resolver is attached to. *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getFieldName(); /** * name of the GraphQL type this resolver is attached to. *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getTypeName(); /** * configuration of the pipeline resolver. *

* Default: - create a UNIT resolver *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Object getPipelineConfig() { return null; } /** * The request mapping template for this resolver. *

* Default: - No mapping template *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.appsync.MappingTemplate getRequestMappingTemplate() { return null; } /** * The response mapping template for this resolver. *

* Default: - No mapping template *

* EXPERIMENTAL */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.appsync.MappingTemplate getResponseMappingTemplate() { return null; } /** * @return a {@link Builder} of {@link BaseResolverProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link BaseResolverProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder { private java.lang.String fieldName; private java.lang.String typeName; private java.lang.Object pipelineConfig; private software.amazon.awscdk.services.appsync.MappingTemplate requestMappingTemplate; private software.amazon.awscdk.services.appsync.MappingTemplate responseMappingTemplate; /** * Sets the value of {@link BaseResolverProps#getFieldName} * @param fieldName name of the GraphQL fiel din the given type this resolver is attached to. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder fieldName(java.lang.String fieldName) { this.fieldName = fieldName; return this; } /** * Sets the value of {@link BaseResolverProps#getTypeName} * @param typeName name of the GraphQL type this resolver is attached to. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder typeName(java.lang.String typeName) { this.typeName = typeName; return this; } /** * Sets the value of {@link BaseResolverProps#getPipelineConfig} * @param pipelineConfig configuration of the pipeline resolver. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder pipelineConfig(software.amazon.awscdk.core.IResolvable pipelineConfig) { this.pipelineConfig = pipelineConfig; return this; } /** * Sets the value of {@link BaseResolverProps#getPipelineConfig} * @param pipelineConfig configuration of the pipeline resolver. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder pipelineConfig(software.amazon.awscdk.services.appsync.CfnResolver.PipelineConfigProperty pipelineConfig) { this.pipelineConfig = pipelineConfig; return this; } /** * Sets the value of {@link BaseResolverProps#getRequestMappingTemplate} * @param requestMappingTemplate The request mapping template for this resolver. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder requestMappingTemplate(software.amazon.awscdk.services.appsync.MappingTemplate requestMappingTemplate) { this.requestMappingTemplate = requestMappingTemplate; return this; } /** * Sets the value of {@link BaseResolverProps#getResponseMappingTemplate} * @param responseMappingTemplate The response mapping template for this resolver. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder responseMappingTemplate(software.amazon.awscdk.services.appsync.MappingTemplate responseMappingTemplate) { this.responseMappingTemplate = responseMappingTemplate; return this; } /** * Builds the configured instance. * @return a new instance of {@link BaseResolverProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public BaseResolverProps build() { return new Jsii$Proxy(fieldName, typeName, pipelineConfig, requestMappingTemplate, responseMappingTemplate); } } /** * An implementation for {@link BaseResolverProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements BaseResolverProps { private final java.lang.String fieldName; private final java.lang.String typeName; private final java.lang.Object pipelineConfig; private final software.amazon.awscdk.services.appsync.MappingTemplate requestMappingTemplate; private final software.amazon.awscdk.services.appsync.MappingTemplate responseMappingTemplate; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.fieldName = this.jsiiGet("fieldName", java.lang.String.class); this.typeName = this.jsiiGet("typeName", java.lang.String.class); this.pipelineConfig = this.jsiiGet("pipelineConfig", java.lang.Object.class); this.requestMappingTemplate = this.jsiiGet("requestMappingTemplate", software.amazon.awscdk.services.appsync.MappingTemplate.class); this.responseMappingTemplate = this.jsiiGet("responseMappingTemplate", software.amazon.awscdk.services.appsync.MappingTemplate.class); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ private Jsii$Proxy(final java.lang.String fieldName, final java.lang.String typeName, final java.lang.Object pipelineConfig, final software.amazon.awscdk.services.appsync.MappingTemplate requestMappingTemplate, final software.amazon.awscdk.services.appsync.MappingTemplate responseMappingTemplate) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.fieldName = java.util.Objects.requireNonNull(fieldName, "fieldName is required"); this.typeName = java.util.Objects.requireNonNull(typeName, "typeName is required"); this.pipelineConfig = pipelineConfig; this.requestMappingTemplate = requestMappingTemplate; this.responseMappingTemplate = responseMappingTemplate; } @Override public java.lang.String getFieldName() { return this.fieldName; } @Override public java.lang.String getTypeName() { return this.typeName; } @Override public java.lang.Object getPipelineConfig() { return this.pipelineConfig; } @Override public software.amazon.awscdk.services.appsync.MappingTemplate getRequestMappingTemplate() { return this.requestMappingTemplate; } @Override public software.amazon.awscdk.services.appsync.MappingTemplate getResponseMappingTemplate() { return this.responseMappingTemplate; } @Override public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("fieldName", om.valueToTree(this.getFieldName())); data.set("typeName", om.valueToTree(this.getTypeName())); if (this.getPipelineConfig() != null) { data.set("pipelineConfig", om.valueToTree(this.getPipelineConfig())); } if (this.getRequestMappingTemplate() != null) { data.set("requestMappingTemplate", om.valueToTree(this.getRequestMappingTemplate())); } if (this.getResponseMappingTemplate() != null) { data.set("responseMappingTemplate", om.valueToTree(this.getResponseMappingTemplate())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-appsync.BaseResolverProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BaseResolverProps.Jsii$Proxy that = (BaseResolverProps.Jsii$Proxy) o; if (!fieldName.equals(that.fieldName)) return false; if (!typeName.equals(that.typeName)) return false; if (this.pipelineConfig != null ? !this.pipelineConfig.equals(that.pipelineConfig) : that.pipelineConfig != null) return false; if (this.requestMappingTemplate != null ? !this.requestMappingTemplate.equals(that.requestMappingTemplate) : that.requestMappingTemplate != null) return false; return this.responseMappingTemplate != null ? this.responseMappingTemplate.equals(that.responseMappingTemplate) : that.responseMappingTemplate == null; } @Override public int hashCode() { int result = this.fieldName.hashCode(); result = 31 * result + (this.typeName.hashCode()); result = 31 * result + (this.pipelineConfig != null ? this.pipelineConfig.hashCode() : 0); result = 31 * result + (this.requestMappingTemplate != null ? this.requestMappingTemplate.hashCode() : 0); result = 31 * result + (this.responseMappingTemplate != null ? this.responseMappingTemplate.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy