'check all input params'

def check_params(self):

    if (not get_interface_type(self.interface)):
        self.module.fail_json(msg=('Error:    Interface    name    of    %s    is    error.' % self.interface))
    if self.sampler_interval:
        if (not str(self.sampler_interval).isdigit()):
            self.module.fail_json(msg='Error:    Active    interval    should    be    numerical.')
        if ((int(self.sampler_interval) < 1) or (int(self.sampler_interval) > 65535)):
            self.module.fail_json(msg='Error:    Sampler    interval    should    between    1    -    65535.')
    if self.statistics_record:
        if ((len(self.statistics_record) < 1) or (len(self.statistics_record) > 32)):
            self.module.fail_json(msg='Error:    Statistic    record    length    should    between    1    -    32.')
    if (self.interface == 'all'):
        if (self.statistics_record or self.statistics_direction):
            self.module.fail_json(msg='Error:    Statistic    function    should    be    used    at    interface.')
    if self.statistics_direction:
        if (self.type == 'vxlan'):
            self.module.fail_json(msg='Error:    Vxlan    do    not    support    inbound    or    outbound    statistic.')
    if ((self.sampler_interval and (not self.sampler_direction)) or (self.sampler_direction and (not self.sampler_interval))):
        self.module.fail_json(msg='Error:    Sampler    interval    and    direction    must    be    set    at    the    same    time.')
    if (self.statistics_record and (not self.type)):
        self.module.fail_json(msg='Error:    Statistic    type    and    record    must    be    set    at    the    same    time.')
    self.get_exist_record()
    if self.statistics_record:
        if (self.type == 'ip'):
            if (self.statistics_record not in self.existing['ip_record']):
                self.module.fail_json(msg='Error:    The    statistic    record    is    not    exist.')
        if (self.type == 'vxlan'):
            if (self.statistics_record not in self.existing['vxlan_record']):
                self.module.fail_json(msg='Error:    The    statistic    record    is    not    exist.')
