Interface TypeRemoveEnumValuesAction

All Superinterfaces:
ResourceUpdateAction<TypeUpdateAction>, TypeUpdateAction

public interface TypeRemoveEnumValuesAction extends TypeUpdateAction

Removes EnumValues from an EnumType FieldDefinition. This update action can be used to update an EnumType FieldDefinition and a SetType FieldDefinition of EnumType.

This update action is always allowed, even if the FieldDefinition is required and even if a resource still has a Custom Field value referencing one of the removed keys. Existing Custom Field values are not updated or removed by this update action, and are returned unchanged until they are explicitly updated. Note that a subsequent update of a single Custom Field on such a resource can fail, because that update revalidates all Custom Field values on the resource.


Example to create an instance using the builder pattern

     TypeRemoveEnumValuesAction typeRemoveEnumValuesAction = TypeRemoveEnumValuesAction.builder()
             .fieldName("{fieldName}")
             .plusKeys(keysBuilder -> keysBuilder)
             .build()
 
  • Field Details

    • REMOVE_ENUM_VALUES

      static final String REMOVE_ENUM_VALUES
      discriminator value for TypeRemoveEnumValuesAction
      See Also:
  • Method Details

    • getFieldName

      @NotNull @NotNull String getFieldName()

      name of the FieldDefinition to update.

      Returns:
      fieldName
    • getKeys

      @NotNull @NotNull List<String> getKeys()

      Keys of the EnumValues to remove. An empty array results in no change.

      Returns:
      keys
    • setFieldName

      void setFieldName(String fieldName)

      name of the FieldDefinition to update.

      Parameters:
      fieldName - value to be set
    • setKeys

      void setKeys(String... keys)

      Keys of the EnumValues to remove. An empty array results in no change.

      Parameters:
      keys - values to be set
    • setKeys

      void setKeys(List<String> keys)

      Keys of the EnumValues to remove. An empty array results in no change.

      Parameters:
      keys - values to be set
    • of

      factory method
      Returns:
      instance of TypeRemoveEnumValuesAction
    • of

      factory method to create a shallow copy TypeRemoveEnumValuesAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      Specified by:
      copyDeep in interface TypeUpdateAction
    • deepCopy

      @Nullable static TypeRemoveEnumValuesAction deepCopy(@Nullable TypeRemoveEnumValuesAction template)
      factory method to create a deep copy of TypeRemoveEnumValuesAction
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for TypeRemoveEnumValuesAction
      Returns:
      builder
    • builder

      create builder for TypeRemoveEnumValuesAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTypeRemoveEnumValuesAction

      default <T> T withTypeRemoveEnumValuesAction(Function<TypeRemoveEnumValuesAction,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<TypeRemoveEnumValuesAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference