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 the sort order, defaulting to 0.
    • before

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

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

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