Class ServiceShape.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public ServiceShape build()
        Description copied from interface: SmithyBuilder
        Creates an immutable object that is created from the properties that have been set on the builder.
        Returns:
        an instance of T
      • errors

        public ServiceShape.Builder errors​(java.util.Collection<ShapeId> errorShapeIds)
        Sets and replaces the errors of the service. Each error is implicitly bound to every operation within the closure of the service.
        Parameters:
        errorShapeIds - Error shape IDs to set.
        Returns:
        Returns the builder.
      • addError

        public ServiceShape.Builder addError​(ToShapeId errorShapeId)
        Adds an error to the service that is implicitly bound to every operation within the closure of the service.
        Parameters:
        errorShapeId - Error shape ID to add.
        Returns:
        Returns the builder.
      • addError

        public ServiceShape.Builder addError​(java.lang.String errorShapeId)
        Adds an error to the service that is implicitly bound to every operation within the closure of the service.
        Parameters:
        errorShapeId - Error shape ID to add.
        Returns:
        Returns the builder.
        Throws:
        ShapeIdSyntaxException - if the shape ID is invalid.
      • addErrors

        public ServiceShape.Builder addErrors​(java.util.List<ShapeId> errorShapeIds)
        Adds errors to the service that are implicitly bound to every operation within the closure of the service.
        Parameters:
        errorShapeIds - Error shape IDs to add.
        Returns:
        Returns the builder.
      • removeError

        public ServiceShape.Builder removeError​(ToShapeId errorShapeId)
        Removes an error by Shape ID.
        Parameters:
        errorShapeId - Error shape ID to remove.
        Returns:
        Returns the builder.
      • clearErrors

        public ServiceShape.Builder clearErrors()
        Removes all errors.
        Returns:
        Returns the builder.