text: import ta_linode_declare
  
  import os
  import sys
  import time
  import datetime
  import json
  
  import modinput_wrapper.base_modinput
  from splunklib import modularinput as smi
  
  
  
  import input_module_linode_account_payments as input_module
  
  bin_dir = os.path.basename(__file__)
  
  '''
      Do not edit this file!!!
      This file is generated by Add-on builder automatically.
      Add your modular input logic to file input_module_linode_account_payments.py
  '''
  class ModInputlinode_account_payments(modinput_wrapper.base_modinput.BaseModInput):
  
      def __init__(self):
          if 'use_single_instance_mode' in dir(input_module):
              use_single_instance = input_module.use_single_instance_mode()
          else:
              use_single_instance = False
          super(ModInputlinode_account_payments, self).__init__("ta_linode", "linode_account_payments", use_single_instance)
          self.global_checkbox_fields = None
  
      def get_scheme(self):
          """overloaded splunklib modularinput method"""
          scheme = super(ModInputlinode_account_payments, self).get_scheme()
          scheme.title = ("Linode Account Payments")
          scheme.description = ("Go to the add-on\'s configuration UI and configure modular inputs under the Inputs menu.")
          scheme.use_external_validation = True
          scheme.streaming_mode_xml = True
  
          scheme.add_argument(smi.Argument("name", title="Name",
                                           description="",
                                           required_on_create=True))
  
          """
          For customized inputs, hard code the arguments here to hide argument detail from users.
          For other input types, arguments should be get from input_module. Defining new input types could be easier.
          """
          scheme.add_argument(smi.Argument("linode_api_token", title="Linode API Token",
                                           description="The Linode Personal Access Token associated with the account to collect events from.",
                                           required_on_create=True,
                                           required_on_edit=False))
          scheme.add_argument(smi.Argument("start_date", title="Start Date",
                                           description="If specified, the event collector will collect all events that occurred after the given date.",
                                           required_on_create=False,
                                           required_on_edit=False))
          return scheme
  
      def get_app_name(self):
          return "TA-linode"
  
      def validate_input(self, definition):
          """validate the input stanza"""
          input_module.validate_input(self, definition)
  
      def collect_events(self, ew):
          """write out the events"""
          input_module.collect_events(self, ew)
  
      def get_account_fields(self):
          account_fields = []
          return account_fields
  
      def get_checkbox_fields(self):
          checkbox_fields = []
          return checkbox_fields
  
      def get_global_checkbox_fields(self):
          if self.global_checkbox_fields is None:
              checkbox_name_file = os.path.join(bin_dir, 'global_checkbox_param.json')
              try:
                  if os.path.isfile(checkbox_name_file):
                      with open(checkbox_name_file, 'r') as fp:
                          self.global_checkbox_fields = json.load(fp)
                  else:
                      self.global_checkbox_fields = []
              except Exception as e:
                  self.log_error('Get exception when loading global checkbox parameter names. ' + str(e))
                  self.global_checkbox_fields = []
          return self.global_checkbox_fields
  
  if __name__ == "__main__":
      exitcode = ModInputlinode_account_payments().run(sys.argv)
      sys.exit(exitcode)
  