def __init__(self, apply_pattern, action):
    """Creates a rule for handling duplicate jar entries.

    :param string apply_pattern: A regular expression that matches duplicate jar entries this rule
      applies to.
    :param action: An action to take to handle one or more duplicate entries.  Must be one of:
      ``Duplicate.SKIP``, ``Duplicate.REPLACE``, ``Duplicate.CONCAT``, ``Duplicate.CONCAT_TEXT``,
      or ``Duplicate.FAIL``.
    """
    payload = Payload()
    payload.add_fields({
      'action': PrimitiveField(self.validate_action(action)),
    })
    super(Duplicate, self).__init__(apply_pattern, payload=payload)
def __init__ ( self , apply_pattern , action ) : payload = Payload ( ) payload . add_fields ( { 'action' : PrimitiveField ( self . validate_action ( action ) ) , } ) super ( Duplicate , self ) . __init__ ( apply_pattern , payload = payload )
Creates a rule for handling duplicate jar entries.

    :param string apply_pattern: A regular expression that matches duplicate jar entries this rule
      applies to.
    :param action: An action to take to handle one or more duplicate entries.  Must be one of:
      ``Duplicate.SKIP``, ``Duplicate.REPLACE``, ``Duplicate.CONCAT``, ``Duplicate.CONCAT_TEXT``,
      or ``Duplicate.FAIL``.