Class AwsClientNullableIndex

java.lang.Object
software.amazon.smithy.model.knowledge.NullableIndex
software.amazon.smithy.aws.traits.AwsClientNullableIndex
All Implemented Interfaces:
software.amazon.smithy.model.knowledge.KnowledgeIndex

public final class AwsClientNullableIndex extends software.amazon.smithy.model.knowledge.NullableIndex
Checks if a member is nullable by taking into account the ClientOptionalTrait and base logic of NullableIndex.

This index extends from NullableIndex so that code generators that need to conditionally honor the ClientOptionalTrait can choose which specific NullableIndex they use during codegen.

  • Constructor Summary

    Constructors
    Constructor
    Description
    AwsClientNullableIndex(software.amazon.smithy.model.Model model)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isMemberOptional(software.amazon.smithy.model.shapes.MemberShape member)
    Checks if the given member should be generated as optional by an AWS client that respects the ClientOptionalTrait and the base rules of Smithy's NullableIndex.
    of(software.amazon.smithy.model.Model model)
     

    Methods inherited from class software.amazon.smithy.model.knowledge.NullableIndex

    isNullable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AwsClientNullableIndex

      public AwsClientNullableIndex(software.amazon.smithy.model.Model model)
  • Method Details

    • of

      public static AwsClientNullableIndex of(software.amazon.smithy.model.Model model)
    • isMemberOptional

      public boolean isMemberOptional(software.amazon.smithy.model.shapes.MemberShape member)
      Checks if the given member should be generated as optional by an AWS client that respects the ClientOptionalTrait and the base rules of Smithy's NullableIndex.
      Overrides:
      isMemberOptional in class software.amazon.smithy.model.knowledge.NullableIndex
      Parameters:
      member - Member to check.
      Returns:
      Returns true if the shape should be optional in generated clients.