All Known Implementing Classes:
HandlerPermissionMapper, RequiredMapper

public interface CfnMapper
Provides a plugin infrastructure to hook into the Smithy CloudFormation Resource Schema generation process and map over the result.

The methods of a plugin are invoked by CfnConverter during Resource Schema generation. There is no need to invoke these manually. Implementations may choose to leverage configuration options of the provided context to determine whether or not to enact the plugin.

  • Method Details

    • getOrder

      default byte getOrder()
      Gets the sort order of the plugin from -128 to 127.

      Plugins are applied according to this sort order. Lower values are executed before higher values (for example, -128 comes before 0, comes before 127). Plugins default to 0, which is the middle point between the minimum and maximum order values.

      Returns:
      Returns the sort order, defaulting to 0.
    • before

      default void before(Context context, ResourceSchema.Builder builder)
      Updates an ResourceSchema.Builder before converting the model.
      Parameters:
      context - Conversion context.
      builder - ResourceSchema builder to modify.
    • after

      default ResourceSchema after(Context context, ResourceSchema resourceSchema)
      Updates an ResourceSchema.Builder after converting the model.
      Parameters:
      context - Conversion context.
      resourceSchema - ResourceSchema to modify.
      Returns:
      Returns the updated ResourceSchema object.
    • updateNode

      default ObjectNode updateNode(Context context, ResourceSchema resourceSchema, ObjectNode node)
      Modifies the Node/JSON representation of a ResourceSchema object.
      Parameters:
      context - Conversion context.
      resourceSchema - ResourceSchema being converted to a node.
      node - ResourceSchema object node.
      Returns:
      Returns the updated ObjectNode.