Sets attributes of this user object.

    :type attr_dict: dict
    :param attr_dict: Parameters to set, with attribute keys.

    :rtype: :class:`.Base`
    :return: The current object.
961719
def set(self, attr_dict):
    
    for key in attr_dict:
      if key == self._id_attribute:
        setattr(self, self._id_attribute, attr_dict[key])
      else:
        setattr(self, u"_" + key, attr_dict[key])
    return self
1345253
def firstAttr(self, *attrs):
        
        for attr in attrs:
            value = self.__dict__.get(attr)
            if value is not None:
                return value
609404
def values(self):
        
        if not hasattr(self, VALUES_ATTR_NAME):
            setattr(self, VALUES_ATTR_NAME, {})
        return getattr(self, VALUES_ATTR_NAME)
763504
def update_attrs(self):
        
        for key, value in self._response_json.items():
            if key != 'results' and type(value) not in (list, dict):
                setattr(self, key, value)
493568
def set_attr(self, key: str, value):
        """"""
        self.attr_setter(self, key, value)
959264
def get_attr(self):
        
        self.values = getattr(self.attrs, self.kind_attr, None)
        self.dtype = getattr(self.attrs, self.dtype_attr, None)
        self.meta = getattr(self.attrs, self.meta_attr, None)
        self.set_kind()
514716
def setAttributesJson(self, attributesJson):
        
        try:
            self._attributes = json.loads(attributesJson)
        except:
            raise exceptions.InvalidJsonException(attributesJson)
        return self
708364
def set_attributes(self, attrs):
        
        if self.true_color() and not self.ansi_colors_only():
            self.write_raw(self._escape_code_cache_true_color[attrs])
        else:
            self.write_raw(self._escape_code_cache[attrs])
374977
def set_attributes(self, attributes):
        
        for k, v in attributes.items():
            self.set_attribute(k, v)
1145348
def set_from_dict(self, data, source=None):
        
        if source:
            self._source = source

        if not data:
            return

        for key, value in data.items():
            key = key.replace("-", "_")
            if not hasattr(self, key):
                LOG.debug("%s is not an attribute of %s", key, self.__class__.__name__)
                continue

            attr = getattr(self, key)
            if attr is not None and not same_type(value, attr):
                source = getattr(self, "_source", None)
                origin = " in %s" % source if source else ""
                LOG.debug("Wrong type '%s' for %s.%s%s, expecting '%s'", type_name(value), type_name(self), key, origin, type_name(attr))
                continue

            setattr(self, key, value)
860290
def _set_attributes(self):
        
        # turn config dict into nested objects
        config = obj(self._config_dict)
        # set the attributes onto instance
        for k, v in self._config_dict.items():
            setattr(self, k, getattr(config, k))
1369904
def attributes(self, params=None):
        
        if params is None:
            params = {}
        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        for a in self.tc_requests.attributes(
            self.api_type, self.api_sub_type, self.unique_id, owner=self.owner, params=params
        ):
            yield a
773213
def _set_attrs_to_values(self, response={}):
        
        for key in response.keys():
            setattr(self, key, response[key])
755827
def set_attributes(self, **kwargs):
        
        if self._subresource_map:
            self.set_subresources(**kwargs)
            for key in self._subresource_map.keys():
                # Don't let these attributes be overridden later
                kwargs.pop(key, None)
        for field, value in kwargs.items():
            if field in self.Meta.attributes:
                setattr(self, field, value)
669970
def assign(self, attrs):
        
        for k, v in attrs.items():
            setattr(self, k, v)
989930
def view_attr(attr_name):
    

    def view_attr(value, context, **_params):
        setattr(context["view"], attr_name, value)
        return _attr()

    return view_attr
726466
def set_attributes(self, **attributes):
        

        auto_set = IxeObject.get_auto_set()
        IxeObject.set_auto_set(False)
        for name, value in attributes.items():
            setattr(self, name, value)
        if auto_set:
            self.ix_set()
        IxeObject.set_auto_set(auto_set)