class_docstr: The WatermarkStrategy defines how to generate Watermarks in the stream sources. The
  WatermarkStrategy is a builder/factory for the WatermarkGenerator that generates the watermarks
  and the TimestampAssigner which assigns the internal timestamp of a record.
  
  The convenience methods, for example forBoundedOutOfOrderness(Duration), create a
  WatermarkStrategy for common built in strategies.
class_docstr_tok: ["The","WatermarkStrategy","defines","how","to","generate","Watermarks","in","the","stream","sources",".","The","WatermarkStrategy","is","a","builder\/factory","for","the","WatermarkGenerator","that","generates","the","watermarks","and","the","TimestampAssigner","which","assigns","the","internal","timestamp","of","a","record",".","The","convenience","methods",",","for","example","forBoundedOutOfOrderness","(","Duration",")",",","create","a","WatermarkStrategy","for","common","built","in","strategies","."]
docstr: Creates a new enriched WatermarkStrategy that also does idleness detection in the created
  WatermarkGenerator.
  
  Example:
  ::
  
      >>> WatermarkStrategy \
      ...     .for_bounded_out_of_orderness(Duration.of_seconds(20)) \
      ...     .with_idleness(Duration.of_minutes(1))
  
  :param idle_timeout: The idle timeout.
  :return: A new WatermarkStrategy with idle detection configured.
docstr_tok: ["Creates","a","new","enriched","WatermarkStrategy","that","also","does","idleness","detection","in","the","created","WatermarkGenerator",".","Example",":",":",":",">",">",">","WatermarkStrategy","\\","...",".for_bounded_out_of_orderness","(","Duration.of_seconds","(","20",")",")","\\","...",".with_idleness","(","Duration.of_minutes","(","1",")",")",":","param","idle_timeout",":","The","idle","timeout",".",":","return",":","A","new","WatermarkStrategy","with","idle","detection","configured","."]
code: def with_idleness(
      self, idle_timeout: Duration
  ) -> "WatermarkStrategy":
      """
          Creates a new enriched WatermarkStrategy that also does idleness detection in the created
          WatermarkGenerator.
  
          Example:
          ::
  
              >>> WatermarkStrategy \\
              ...     .for_bounded_out_of_orderness(Duration.of_seconds(20)) \\
              ...     .with_idleness(Duration.of_minutes(1))
  
          :param idle_timeout: The idle timeout.
          :return: A new WatermarkStrategy with idle detection configured.
          """
      return WatermarkStrategy(
          self._j_watermark_strategy.withIdleness(
              idle_timeout._j_duration
          )
      )
  
file_path: flink/flink-python/pyflink/common/watermark_strategy.py
imports: import abc
  from typing import Any, Optional
  from pyflink.common.time import Duration
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 3 for calling the WatermarkStrategy obj's underlying member method code with example usage: obj.with_idleness(idle_timeout) and returns: WatermarkStrategy