Class InputType

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appsync.InputType
All Implemented Interfaces:
IIntermediateType, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.520Z") @Stability(Experimental) public class InputType extends software.amazon.jsii.JsiiObject implements IIntermediateType
(experimental) Input Types are abstract types that define complex objects.

They are used in arguments to represent

Example:

 GraphqlApi api;
 InputType review = InputType.Builder.create("Review")
         .definition(Map.of(
                 "stars", GraphqlType.int(BaseTypeOptions.builder().isRequired(true).build()),
                 "commentary", GraphqlType.string()))
         .build();
 api.addType(review);
 
  • Constructor Details

    • InputType

      protected InputType(software.amazon.jsii.JsiiObjectRef objRef)
    • InputType

      protected InputType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • InputType

      @Stability(Experimental) public InputType(@NotNull String name, @NotNull IntermediateTypeOptions props)
      Parameters:
      name - This parameter is required.
      props - This parameter is required.
  • Method Details

    • addField

      @Stability(Experimental) public void addField(@NotNull AddFieldOptions options)
      (experimental) Add a field to this Input Type.

      Input Types must have both fieldName and field options.

      Specified by:
      addField in interface IIntermediateType
      Parameters:
      options - the options to add a field. This parameter is required.
    • attribute

      @Stability(Experimental) @NotNull public GraphqlType attribute(@Nullable BaseTypeOptions options)
      (experimental) Create a GraphQL Type representing this Input Type.

      Specified by:
      attribute in interface IIntermediateType
      Parameters:
      options - the options to configure this attribute.
    • attribute

      @Stability(Experimental) @NotNull public GraphqlType attribute()
      (experimental) Create a GraphQL Type representing this Input Type.
      Specified by:
      attribute in interface IIntermediateType
    • toString

      @Stability(Experimental) @NotNull public String toString()
      (experimental) Generate the string of this input type.
      Specified by:
      toString in interface IIntermediateType
      Overrides:
      toString in class Object
    • getDefinition

      @Stability(Experimental) @NotNull public Map<String,IField> getDefinition()
      (experimental) the attributes of this type.
      Specified by:
      getDefinition in interface IIntermediateType
    • getName

      @Stability(Experimental) @NotNull public String getName()
      (experimental) the name of this type.
      Specified by:
      getName in interface IIntermediateType
    • getModes

      @Stability(Experimental) @Nullable protected List<AuthorizationType> getModes()
      (experimental) the authorization modes for this intermediate type.
    • setModes

      @Stability(Experimental) protected void setModes(@Nullable List<AuthorizationType> value)
      (experimental) the authorization modes for this intermediate type.