original_docstring: 
      Updates offense that corresponds to the given offense ID.
      possible arguments:
      - offense_id (Required): Update offense that corresponds to ID given.
      - protected: Whether the offense is protected.
      - follow_up: Whether the offense should be marked for follow up.
      - status: Status of the offense. One of 'OPEN', 'HIDDEN', 'CLOSED'.
      - closing_reason_id: The ID of the reason the offense was closed. full list of closing reason IDs,
                           full list of closing reason IDs can be retrieved by 'qradar-closing-reasons' command.
      - assigned_to: The user whom to assign the offense to.
      - fields: If used, will filter all fields except for the specified ones.
                Use this parameter to specify which fields you would like to get back in the
                response. Fields that are not explicitly named are excluded.
      Args:
          client (Client): QRadar client to perform the API call.
          args (Dict): Demisto args.
  
      Returns:
          CommandResults.
      
docstring: Updates offense that corresponds to the given offense ID.
  possible arguments:
  offense_id (Required): Update offense that corresponds to ID given.
  protected: Whether the offense is protected.
  follow_up: Whether the offense should be marked for follow up.
  status: Status of the offense.
docstring_tokens: Updates offense that corresponds to the given offense ID . possible arguments : offense_id ( Required ) : Update offense that corresponds to ID given . protected : Whether the offense is protected . follow_up : Whether the offense should be marked for follow up . status : Status of the offense .
code: def qradar_offense_update_command(client: Client, args: Dict) -> CommandResults:
      """
      Updates offense that corresponds to the given offense ID.
      possible arguments:
      - offense_id (Required): Update offense that corresponds to ID given.
      - protected: Whether the offense is protected.
      - follow_up: Whether the offense should be marked for follow up.
      - status: Status of the offense. One of 'OPEN', 'HIDDEN', 'CLOSED'.
      - closing_reason_id: The ID of the reason the offense was closed. full list of closing reason IDs,
                           full list of closing reason IDs can be retrieved by 'qradar-closing-reasons' command.
      - assigned_to: The user whom to assign the offense to.
      - fields: If used, will filter all fields except for the specified ones.
                Use this parameter to specify which fields you would like to get back in the
                response. Fields that are not explicitly named are excluded.
      Args:
          client (Client): QRadar client to perform the API call.
          args (Dict): Demisto args.
  
      Returns:
          CommandResults.
      """
      offense_id: int = int(args['offense_id'])
      protected = args.get('protected')
      follow_up = args.get('follow_up')
      closing_reason_name = args.get('closing_reason_name')
  
      status = args.get('status')
      closing_reason_id = args.get('closing_reason_id')
      if status == 'CLOSED' and (not closing_reason_id and not closing_reason_name):
          raise DemistoException(
              '''Closing reason ID must be provided when closing an offense. Available closing reasons can be achieved
               by 'qradar-closing-reasons' command.'''
          )
  
      if closing_reason_name:
          closing_reasons_list = client.closing_reasons_list(include_deleted=True, include_reserved=True)
          for closing_reason in closing_reasons_list:
              if closing_reason.get('text') == closing_reason_name:
                  closing_reason_id = closing_reason.get('id')
          if not closing_reason_id:
              raise DemistoException(f'Could not find closing reason name {closing_reason_name}. Please provide a valid'
                                     ' closing reason name. Closing reasons can be retrieved by running the '
                                     'qradar-closing-reasons command.')
  
      assigned_to = args.get('assigned_to')
      fields = args.get('fields')
      ip_enrich, asset_enrich = get_offense_enrichment(args.get('enrichment', 'None'))
  
      response = client.offense_update(offense_id, protected, follow_up, status, closing_reason_id, assigned_to,
                                       fields)
  
      enriched_outputs = enrich_offenses_result(client, response, ip_enrich, asset_enrich)
      final_outputs = sanitize_outputs(enriched_outputs, OFFENSE_OLD_NEW_NAMES_MAP)
      headers = build_headers(['ID', 'Description', 'OffenseType', 'Status', 'Severity'],
                              set(OFFENSE_OLD_NEW_NAMES_MAP.values()))
  
      return CommandResults(
          readable_output=tableToMarkdown('offense Update', final_outputs, headers, removeNull=True),
          outputs_prefix='QRadar.Offense',
          outputs_key_field='ID',
          outputs=final_outputs,
          raw_response=response
      )
code_tokens: def qradar_offense_update_command ( client : Client , args : Dict ) -> CommandResults : offense_id : int = int ( args [ 'offense_id' ] ) protected = args . get ( 'protected' ) follow_up = args . get ( 'follow_up' ) closing_reason_name = args . get ( 'closing_reason_name' ) status = args . get ( 'status' ) closing_reason_id = args . get ( 'closing_reason_id' ) if status == 'CLOSED' and ( not closing_reason_id and not closing_reason_name ) : raise DemistoException ( '''Closing reason ID must be provided when closing an offense. Available closing reasons can be achieved
               by 'qradar-closing-reasons' command.''' ) if closing_reason_name : closing_reasons_list = client . closing_reasons_list ( include_deleted = True , include_reserved = True ) for closing_reason in closing_reasons_list : if closing_reason . get ( 'text' ) == closing_reason_name : closing_reason_id = closing_reason . get ( 'id' ) if not closing_reason_id : raise DemistoException ( f'Could not find closing reason name {closing_reason_name}. Please provide a valid' ' closing reason name. Closing reasons can be retrieved by running the ' 'qradar-closing-reasons command.' ) assigned_to = args . get ( 'assigned_to' ) fields = args . get ( 'fields' ) ip_enrich , asset_enrich = get_offense_enrichment ( args . get ( 'enrichment' , 'None' ) ) response = client . offense_update ( offense_id , protected , follow_up , status , closing_reason_id , assigned_to , fields ) enriched_outputs = enrich_offenses_result ( client , response , ip_enrich , asset_enrich ) final_outputs = sanitize_outputs ( enriched_outputs , OFFENSE_OLD_NEW_NAMES_MAP ) headers = build_headers ( [ 'ID' , 'Description' , 'OffenseType' , 'Status' , 'Severity' ] , set ( OFFENSE_OLD_NEW_NAMES_MAP . values ( ) ) ) return CommandResults ( readable_output = tableToMarkdown ( 'offense Update' , final_outputs , headers , removeNull = True ) , outputs_prefix = 'QRadar.Offense' , outputs_key_field = 'ID' , outputs = final_outputs , raw_response = response )
short_docstring: Updates offense that corresponds to the given offense ID.
short_docstring_tokens: Updates offense that corresponds to the given offense ID .
comment: """
      Updates offense that corresponds to the given offense ID.
      possible arguments:
      - offense_id (Required): Update offense that corresponds to ID given.
      - protected: Whether the offense is protected.
      - follow_up: Whether the offense should be marked for follow up.
      - status: Status of the offense. One of 'OPEN', 'HIDDEN', 'CLOSED'.
      - closing_reason_id: The ID of the reason the offense was closed. full list of closing reason IDs,
                           full list of closing reason IDs can be retrieved by 'qradar-closing-reasons' command.
      - assigned_to: The user whom to assign the offense to.
      - fields: If used, will filter all fields except for the specified ones.
                Use this parameter to specify which fields you would like to get back in the
                response. Fields that are not explicitly named are excluded.
      Args:
          client (Client): QRadar client to perform the API call.
          args (Dict): Demisto args.
  
      Returns:
          CommandResults.
      """