# Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Factories that create entities."""
# pylint: disable=too-many-arguments
# pylint: disable=invalid-name
# pylint: disable=redefined-builtin


import copy
import random

import re
from lib.constants import element, objects, roles, url as const_url
from lib.constants.element import AdminWidgetCustomAttrs
from lib.entities import entity
from lib.utils import string_utils
from lib.utils.string_utils import (random_list_strings, random_string,
                                    random_uuid)


class EntitiesFactory(object):
  """Common factory class for entities."""
  # pylint: disable=too-few-public-methods
  obj_person = objects.get_singular(objects.PEOPLE)
  obj_program = objects.get_singular(objects.PROGRAMS)
  obj_control = objects.get_singular(objects.CONTROLS)
  obj_audit = objects.get_singular(objects.AUDITS)
  obj_asmt_tmpl = objects.get_singular(objects.ASSESSMENT_TEMPLATES)
  obj_asmt = objects.get_singular(objects.ASSESSMENTS)
  obj_issue = objects.get_singular(objects.ISSUES)

  all_objs_attrs_names = tuple(entity.Entity().attrs_names_all_entities())

  @classmethod