Class FilterSuppressions.Config

java.lang.Object
software.amazon.smithy.build.transforms.FilterSuppressions.Config
Enclosing class:
FilterSuppressions

public static final class FilterSuppressions.Config extends Object
filterSuppressions configuration settings.
  • Constructor Details

    • Config

      public Config()
  • Method Details

    • getRemoveUnused

      public boolean getRemoveUnused()
      Gets whether unused suppressions are removed.
      Returns:
      Returns true if unused suppressions are removed.
    • setRemoveUnused

      public void setRemoveUnused(boolean removeUnused)
      Set to true to remove suppressions that have no effect.

      If a validation event ID is never emitted, then suppress traits will be updated to no longer refer to the ID and removed if they no longer refer to any event. Metadata suppressions are also removed if they have no effect.

      Parameters:
      removeUnused - Set to true to remove unused suppressions.
    • getRemoveReasons

      public boolean getRemoveReasons()
      Gets whether suppression reasons are removed.
      Returns:
      Returns true if suppression reasons are removed.
    • setRemoveReasons

      public void setRemoveReasons(boolean removeReasons)
      Set to true to remove the reason property from metadata suppressions.

      The reason for a suppression could reveal internal or sensitive information. Removing the "reason" from metadata suppressions is an extra step teams can take to ensure they do not leak internal information when publishing models outside of their organization.

      Parameters:
      removeReasons - Set to true to remove reasons.
    • getEventIdAllowList

      public Set<String> getEventIdAllowList()
      Gets a list of allowed event IDs.
      Returns:
      Returns the allow list of event IDs.
    • setEventIdAllowList

      public void setEventIdAllowList(Set<String> eventIdAllowList)
      Sets a list of event IDs that can be referred to in suppressions.

      Suppressions that refer to any other event ID will be updated to no longer refer to them, or removed if they no longer refer to any events.

      This setting cannot be used in tandem with eventIdDenyList.

      Parameters:
      eventIdAllowList - IDs to allow.
    • getEventIdDenyList

      public Set<String> getEventIdDenyList()
      Gets a list of denied event IDs.
      Returns:
      Gets the event ID deny list.
    • setEventIdDenyList

      public void setEventIdDenyList(Set<String> eventIdDenyList)
      Sets a list of event IDs that cannot be referred to in suppressions.

      Suppressions that refer to any of these event IDs will be updated to no longer refer to them, or removed if they no longer refer to any events.

      This setting cannot be used in tandem with eventIdAllowList.

      Parameters:
      eventIdDenyList - IDs to deny.
    • getNamespaceAllowList

      public Set<String> getNamespaceAllowList()
      Gets the metadata suppression namespace allow list.
      Returns:
      The metadata suppression namespace allow list.
    • setNamespaceAllowList

      public void setNamespaceAllowList(Set<String> namespaceAllowList)
      Sets a list of namespaces that can be referred to in metadata suppressions.

      Metadata suppressions that refer to namespaces outside of this list, including "*", will be removed.

      This setting cannot be used in tandem with namespaceDenyList.

      Parameters:
      namespaceAllowList - Namespaces to allow.
    • getNamespaceDenyList

      public Set<String> getNamespaceDenyList()
      Gets the metadata suppression namespace deny list.
      Returns:
      The metadata suppression namespace deny list.
    • setNamespaceDenyList

      public void setNamespaceDenyList(Set<String> namespaceDenyList)
      Sets a list of namespaces that cannot be referred to in metadata suppressions.

      Metadata suppressions that refer to namespaces in this list, including "*", will be removed.

      This setting cannot be used in tandem with namespaceAllowList.

      Parameters:
      namespaceDenyList - Namespaces to deny.