Class ServiceShape

    • Method Detail

      • accept

        public <R> R accept​(ShapeVisitor<R> cases)
        Description copied from class: Shape
        Dispatches the shape to the appropriate ShapeVisitor method.
        Specified by:
        accept in class Shape
        Type Parameters:
        R - Return type of the accept.
        Parameters:
        cases - NeighborVisitor to use.
        Returns:
        Returns the result.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class EntityShape
      • getVersion

        public java.lang.String getVersion()
        Get the version of the service. An empty string is returned if the version is undefined.
        Returns:
        The version of the service.
      • getRename

        public java.util.Map<ShapeId,​java.lang.String> getRename()
        Returns:
        The rename map of the service.
      • getErrors

        public java.util.List<ShapeId> getErrors()

        Gets a list of the common errors that can be encountered by every operation in the service.

        Each returned ShapeId must resolve to a StructureShape that is targeted by an error trait; however, this is only guaranteed after a model is validated.

        Returns:
        Returns the errors.
      • getContextualName

        public java.lang.String getContextualName​(ToShapeId shape)
        Gets the contextual name of a shape within the closure.

        If there is a rename property entry for the given shape ID, then the renamed shape name is returned. Otherwise, the name part of the given shape ID is returned, regardless of if the shape exists in the closure of the service.

        This is a mirror of ShapeId.getName(ServiceShape) that serves to make this functionality more discoverable.

        Parameters:
        shape - Shape to get the contextual name of.
        Returns:
        Returns the contextual name of the shape within the service.