class_docstr: Cleanup behaviour for externalized checkpoints when the job is cancelled.
  
  :data:`DELETE_ON_CANCELLATION`:
  
  Delete externalized checkpoints on job cancellation.
  
  All checkpoint state will be deleted when you cancel the owning
  job, both the meta data and actual program state. Therefore, you
  cannot resume from externalized checkpoints after the job has been
  cancelled.
  
  Note that checkpoint state is always kept if the job terminates
  with state ``FAILED``.
  
  :data:`RETAIN_ON_CANCELLATION`:
  
  Retain externalized checkpoints on job cancellation.
  
  All checkpoint state is kept when you cancel the owning job. You
  have to manually delete both the checkpoint meta data and actual
  program state after cancelling the job.
  
  Note that checkpoint state is always kept if the job terminates
  with state ``FAILED``.
  
  :data:`NO_EXTERNALIZED_CHECKPOINTS`:
  
  Externalized checkpoints are disabled completely.
class_docstr_tok: ["Cleanup","behaviour","for","externalized","checkpoints","when","the","job","is","cancelled",".",":","data",":","`","DELETE_ON_CANCELLATION","`",":","Delete","externalized","checkpoints","on","job","cancellation",".","All","checkpoint","state","will","be","deleted","when","you","cancel","the","owning","job",",","both","the","meta","data","and","actual","program","state",".","Therefore",",","you","can","not","resume","from","externalized","checkpoints","after","the","job","has","been","cancelled",".","Note","that","checkpoint","state","is","always","kept","if","the","job","terminates","with","state","``","FAILED","``",".",":","data",":","`","RETAIN_ON_CANCELLATION","`",":","Retain","externalized","checkpoints","on","job","cancellation",".","All","checkpoint","state","is","kept","when","you","cancel","the","owning","job",".","You","have","to","manually","delete","both","the","checkpoint","meta","data","and","actual","program","state","after","cancelling","the","job",".","Note","that","checkpoint","state","is","always","kept","if","the","job","terminates","with","state","``","FAILED","``",".",":","data",":","`","NO_EXTERNALIZED_CHECKPOINTS","`",":","Externalized","checkpoints","are","disabled","completely","."]
code: def _from_j_externalized_checkpoint_cleanup(
      j_cleanup_mode,
  ) -> "ExternalizedCheckpointCleanup":
      return ExternalizedCheckpointCleanup[j_cleanup_mode.name()]
  
imports: import warnings
  from enum import Enum
  from typing import Optional
  from pyflink.common import Duration
  from pyflink.datastream.checkpoint_storage import CheckpointStorage, _from_j_checkpoint_storage
  from pyflink.datastream.checkpointing_mode import CheckpointingMode
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 1 for calling the ExternalizedCheckpointCleanup obj's underlying member method code with example usage: obj._from_j_externalized_checkpoint_cleanup(j_cleanup_mode) and returns: ExternalizedCheckpointCleanup