Create all the objects got after the post configuration file initialization

        :param raw_objects:  dict with all object with str values
        :type raw_objects: dict
        :return: None
429279
def create_objects(self, raw_objects):
        
        types_creations = self.__class__.types_creations
        early_created_types = self.__class__.early_created_types

        logger.info("Creating objects...")

        # Before really creating the objects, we add some ghost
        # ones like the bp_rule for correlation
        self.add_self_defined_objects(raw_objects)

        for o_type in sorted(types_creations):
            if o_type not in early_created_types:
                self.create_objects_for_type(raw_objects, o_type)
        logger.info("Done")
594625
def create(self, data, fields=[], models={}):
        '''
        
        '''
        if not fields: fields = self.fields
        if not models and hasattr(self, 'models'): models = self.models
        for field in fields:
            setattr(self,field,None)
        if not data: return None
        for k, v in data.iteritems():
            if type(v) in (str, unicode):
                v = v.strip()
            if models and k in models:
                if type(v) == dict:
                    lists = []
                    for k2, v2 in v.iteritems():
                        if type(v2) == list:
                            for d in v2:
                                model = models[k]()
                                lists.append(model.create(d))
                    if not lists:
                        model = models[k]()
                        v = model.create(v)
                    else:
                        v = lists
                else:
                    model = models[k]()
                    v = model.create(v)
            setattr(self,k,v)
        return self
513259
def _create_raw_data(self):
        
        result = {}
        for section in self.get_sections():
            result[section.get('id')] = 'all'
        return result
458868
def _clone_post_init(self, obj=None, **kwargs):
        
        # Initialize the extra attributes
        if obj is None or obj is self:
            # We must be asrootpy-ing a ROOT object
            # or freshly init-ing a rootpy object
            for attr, value in Plottable.EXTRA_ATTRS.items():
                # Use the default value
                setattr(self, attr, value)
        else:
            for attr, value in Plottable.EXTRA_ATTRS.items():
                setattr(self, attr, getattr(obj, attr))

        # Create aliases from deprecated to current attributes
        for depattr, newattr in Plottable.EXTRA_ATTRS_DEPRECATED.items():
            setattr(Plottable, depattr,
                    property(
                        fget=Plottable._get_attr_depr(depattr, newattr),
                        fset=Plottable._set_attr_depr(depattr, newattr)))

        if obj is None or obj is self:
            # We must be asrootpy-ing a ROOT object
            # or freshly init-ing a rootpy object
            # Initialize style attrs to style of TObject
            if isinstance(self, ROOT.TAttLine):
                self._linecolor = Color(ROOT.TAttLine.GetLineColor(self))
                self._linestyle = LineStyle(ROOT.TAttLine.GetLineStyle(self))
                self._linewidth = ROOT.TAttLine.GetLineWidth(self)
            else:  # HistStack
                self._linecolor = Color(Plottable.DEFAULT_DECOR['linecolor'])
                self._linestyle = LineStyle(Plottable.DEFAULT_DECOR['linestyle'])
                self._linewidth = Plottable.DEFAULT_DECOR['linewidth']

            if isinstance(self, ROOT.TAttFill):
                self._fillcolor = Color(ROOT.TAttFill.GetFillColor(self))
                self._fillstyle = FillStyle(ROOT.TAttFill.GetFillStyle(self))
            else:  # HistStack
                self._fillcolor = Color(Plottable.DEFAULT_DECOR['fillcolor'])
                self._fillstyle = FillStyle(Plottable.DEFAULT_DECOR['fillstyle'])

            if isinstance(self, ROOT.TAttMarker):
                self._markercolor = Color(ROOT.TAttMarker.GetMarkerColor(self))
                self._markerstyle = MarkerStyle(ROOT.TAttMarker.GetMarkerStyle(self))
                self._markersize = ROOT.TAttMarker.GetMarkerSize(self)
            else:  # HistStack
                self._markercolor = Color(Plottable.DEFAULT_DECOR['markercolor'])
                self._markerstyle = MarkerStyle(Plottable.DEFAULT_DECOR['markerstyle'])
                self._markersize = Plottable.DEFAULT_DECOR['markersize']

            if obj is None:
                # Populate defaults if we are not asrootpy-ing existing object
                decor = dict(**Plottable.DEFAULT_DECOR)
                decor.update(Plottable.EXTRA_ATTRS)
                if 'color' in kwargs:
                    decor.pop('linecolor', None)
                    decor.pop('fillcolor', None)
                    decor.pop('markercolor', None)
                decor.update(kwargs)
                self.decorate(**decor)

        else:
            # Initialize style attrs to style of the other object
            if isinstance(obj, ROOT.TAttLine):
                self.SetLineColor(obj.GetLineColor())
                self.SetLineStyle(obj.GetLineStyle())
                self.SetLineWidth(obj.GetLineWidth())
            if isinstance(obj, ROOT.TAttFill):
                self.SetFillColor(obj.GetFillColor())
                self.SetFillStyle(obj.GetFillStyle())
            if isinstance(obj, ROOT.TAttMarker):
                self.SetMarkerColor(obj.GetMarkerColor())
                self.SetMarkerStyle(obj.GetMarkerStyle())
                self.SetMarkerSize(obj.GetMarkerSize())
            if kwargs:
                self.decorate(**kwargs)
1372166
def initialize_attributes(caller, raw)
      # Save the interface and parent
      write_attribute(:parent, caller)
      write_attribute(:interface, raw)

      # Load the attributes from the interface
      load_interface_attributes(interface)

      # Get the relationships setup
      populate_relationship(:network_interfaces, interface)

      # Clear dirty and mark as existing
      clear_dirty!
      existing_record!
    end
281016
def create_persisted_object(self, location: str, logger: Logger) -> PersistedObject:
        
        #print('Checking all files under ' + location)
        logger.debug('Checking all files under [{loc}]'.format(loc=location))
        obj = FileMappingConfiguration.RecursivePersistedObject(location=location, file_mapping_conf=self,
                                                                logger=logger)
        #print('File checks done')
        logger.debug('File checks done')
        return obj
322637
def dump(self):
        
        r = {}
        def _dump_(obj):
            if isinstance(obj, dict):
                ret = {}
                for k, v in six.iteritems(obj):
                    ret[k] = _dump_(v)
                return None if ret == {} else ret
            elif isinstance(obj, list):
                ret = []
                for v in obj:
                    ret.append(_dump_(v))
                return None if ret == [] else ret
            elif isinstance(obj, BaseObj):
                return obj.dump()
            elif isinstance(obj, (six.string_types, six.integer_types)):
                return obj
            elif isinstance(obj, float):
                return obj
            else:
                raise ValueError('Unknown object to dump: {0}'.format(obj.__class__.__name__))

        for name, default in six.iteritems(self.__swagger_fields__):
            # only dump a field when its value is not equal to default value
            v = getattr(self, name)
            if v != default:
                d = _dump_(v)
                if d != None:
                    r[name] = d

        return None if r == {} else r
676228
def _raw(cls, vertices, edges, out_edges, in_edges, head, tail):
        
        self = object.__new__(cls)
        self._out_edges = out_edges
        self._in_edges = in_edges
        self._head = head
        self._tail = tail
        self._vertices = vertices
        self._edges = edges
        return self
1292280
def reconstruct_raw(self, rawdata):
        
        start, end = self._rawdata_bounds
        r = rawdata[start:end]
        delattr(self, '_rawdata_bounds')
        try:
            if self._order_list:
                order = to_numpy_list(self._order_list)
                r = r.get_indexed(order)
                delattr(self, '_order_list')
        except AttributeError:
            pass
        self.set_raw(r)
166853
def create(cls, custom_headers=None):
        

        if custom_headers is None:
            custom_headers = {}

        request_map = {

        }
        request_map_string = converter.class_to_json(request_map)
        request_map_string = cls._remove_field_for_request(request_map_string)

        api_client = client.ApiClient(cls._get_api_context())
        request_bytes = request_map_string.encode()
        endpoint_url = cls._ENDPOINT_URL_CREATE
        response_raw = api_client.post(endpoint_url, request_bytes,
                                       custom_headers)

        return BunqResponseSandboxUser.cast_from_bunq_response(
            cls._from_json(response_raw, cls._OBJECT_TYPE_POST)
        )
1172469
def process_raw_data(cls, raw_data):
        """"""
        properties = raw_data["properties"]

        ip_configurations = []
        raw_settings = properties.get("ipConfigurations", [])
        for raw_configuration in raw_settings:
            raw_configuration["parentResourceID"] = raw_data["resourceId"]
            ip_configuration = IPConfiguration.from_raw_data(raw_configuration)
            ip_configurations.append(ip_configuration)
        properties["ipConfigurations"] = ip_configurations

        raw_settings = properties.get("dnsSettings", {})
        dns_settings = DNSSettings.from_raw_data(raw_settings)
        properties["dnsSettings"] = dns_settings

        raw_settings = properties.get("portSettings", {})
        port_settings = PortSettings.from_raw_data(raw_settings)
        properties["portSettings"] = port_settings

        return super(NetworkInterfaces, cls).process_raw_data(raw_data)
1153930
def objects(self):
        
        data = self._get_raw_objects()

        return PaginatedList.make_paginated_list(data, self._client, TaggedObjectProxy,
                                                 page_url=type(self).api_endpoint.format(**vars(self)))
931041
def __init(self):
        
        params = {
            "f" : "json",
        }
        json_dict = self._get(self._url, params,
                                 securityHandler=self._securityHandler,
                                 proxy_port=self._proxy_port,
                                 proxy_url=self._proxy_url)
        self._json = json.dumps(json_dict)
        self._json_dict = json_dict
        self.loadAttributes(json_dict=json_dict)
807202
def serialize(objects=None):
    

    return serializers.serialize(
        "json",
        objects,
        ensure_ascii=True,
        use_natural_foreign_keys=True,
        use_natural_primary_keys=False,
    )
655618
def _init_data(self, data, obj, files):
        
        data = self.prepare(data)

        # Initialize sub-forms
        for name, subform in self._forms.items():
            obj_value = get_obj_value(obj, name)
            if inspect.isclass(subform):
                fclass = subform
            else:
                fclass = subform.__class__
            subform_prefix = '{prefix}{name}.'.format(
                prefix=self._prefix,
                name=name.lower()
            )
            subform = fclass(
                data,
                obj_value,
                files=files,
                locale=self._locale,
                tz=self._tz,
                prefix=subform_prefix,
                backref=getattr(subform, '_backref', None)
            )

            self._forms[name] = subform
            setattr(self, name, subform)
            self._input_data = self._input_data or subform._input_data

        # Initialize form-sets
        for name, formset in self._sets.items():
            sclass = formset.__class__
            objs = formset._objs or get_obj_value(obj, name)
            formset_name = '{prefix}{name}'.format(
                prefix=self._prefix,
                name=name.lower()
            )
            formset = sclass(
                form_class=formset._form_class,
                name=formset_name,
                data=data,
                objs=objs,
                files=files,
                locale=self._locale,
                tz=self._tz,
                create_new=formset._create_new,
                backref=formset._backref
            )
            self._sets[name] = formset
            setattr(self, name, formset)
            for _form in formset._forms:
                self._input_data = self._input_data or _form._input_data

        # Initialize fields
        for name, field in self._fields.items():
            subdata = data.getlist(self._prefix + name)
            subfiles = files.getlist(self._prefix + name)
            self._input_data = self._input_data or subdata or subfiles
            obj_value = get_obj_value(obj, name)
            was_deleted = self._prefix + name + '__deleted' in data
            if was_deleted:
                subdata = obj_value = subfiles = None
            field.load_data(subdata, obj_value, file_data=subfiles,
                            locale=self._locale, tz=self._tz)
            # delete field data
            if was_deleted:
                field._deleted = True
1080130
def _initialize_from_model(self, model):
        
        for name, value in model.__dict__.items():
            if name in self._properties:
                setattr(self, name, value)
878097
def load_raw(cls, model_fn, schema, *args, **kwargs):
        
        c = cls(*args, **kwargs)
        c.schema = schema.copy(schema_only=True)
        c._model_data = open(model_fn, 'rb').read()
        return c