def __init__(self, *args, **kwargs):
    super().__init__(*args, **kwargs)
    self.api = shared_client(self.api_group_name)
    self.label_selector = ','.join(['{}={}'.format(k, v) for (k, v) in self.labels.items()])
    self.field_selector = ','.join(['{}={}'.format(k, v) for (k, v) in self.fields.items()])
    self.first_load_future = asyncio.Future()
    if (not self.list_method_name):
        plural_to_singular = {'endpoints': 'endpoints', 'events': 'event', 'ingresses': 'ingress', 'pods': 'pod', 'services': 'service'}
        if (self.kind in plural_to_singular):
            if self.omit_namespace:
                self.list_method_name = f'list_{plural_to_singular[self.kind]}_for_all_namespaces'
            else:
                self.list_method_name = f'list_namespaced_{plural_to_singular[self.kind]}'
    if (not self.kind):
        raise RuntimeError('Reflector kind must be set!')
    if (not self.list_method_name):
        raise RuntimeError('Reflector list_method_name must be set!')
    self.watch_task = None
def __init__(self, *args, **kwargs):
    super().__init__(*args, **kwargs)
    self.api = shared_client(self.api_group_name)
    self.label_selector = ','.join(['{}={}'.format(k, v) for (k, v) in self.labels.items()])
    self.field_selector = ','.join(['{}={}'.format(k, v) for (k, v) in self.fields.items()])
    self.first_load_future = asyncio.Future()
    if (not self.list_method_name):
        plural_to_singular = {'endpoints': 'endpoints', 'events': 'event', 'ingresses': 'ingress', 'pods': 'pod', 'services': 'service'}
        if (self.kind in plural_to_singular):
            if self.omit_namespace:
                self.list_method_name = f'list_{plural_to_singular[self.kind]}_for_all_namespaces'
            else:
                self.list_method_name = f'list_namespaced_{plural_to_singular[self.kind]}'
    if (not self.kind):
        raise RuntimeError('Reflector kind must be set!')
    if (not self.list_method_name):
        raise RuntimeError('Reflector list_method_name must be set!')
    self.watch_task = None