Class LongPollTrait

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.model.traits.LongPollTrait
All Implemented Interfaces:
FromSourceLocation, ToNode, ToShapeId, Trait, ToSmithyBuilder<LongPollTrait>

public final class LongPollTrait extends AbstractTrait implements ToSmithyBuilder<LongPollTrait>
Indicates that the service may not respond immediately to requests for the targeted operation, allowing services more time to prepare responses or hold the request open while waiting for information to become available.
  • Field Details

    • ID

      public static final ShapeId ID
  • Method Details

    • getTimeoutMillis

      public int getTimeoutMillis()
      Gets the timeout in milliseconds that a client should wait for a response.
      Returns:
      Returns the optional timeout in milliseconds.
    • toBuilder

      public LongPollTrait.Builder toBuilder()
      Description copied from interface: ToSmithyBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<LongPollTrait>
      Returns:
      a builder for type T
    • createNode

      protected Node createNode()
      Description copied from class: AbstractTrait
      The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.
      Specified by:
      createNode in class AbstractTrait
      Returns:
      Returns the trait as a node.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class AbstractTrait
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractTrait
    • builder

      public static LongPollTrait.Builder builder()
      Creates a builder for a LongPollTrait.
      Returns:
      Returns the created builder.