Update named set of DNS name servers.

        :type value: str
        :param value: (Optional) new title

        :raises: ValueError for invalid value types.
353769
def name_server_set(self, value):
        
        if not isinstance(value, six.string_types) and value is not None:
            raise ValueError("Pass a string, or None")
        self._properties["nameServerSet"] = value
342187
def update(self, value):
        
        key = self.name

        # if it's a variable name (otherwise a constant)
        if isinstance(key, str):
            self.env.swapkey(self.local_name, key, new_value=value)

        self.value = value
720928
def dbname(self, value):
        
        self._dbname = value
        self._connectionXML.set('dbname', value)
856389
def _set_custom_headers(self, value):
        '''
        
        '''
        if value is None:
            setattr(self, '_PMMail__custom_headers', {})
        elif isinstance(value, dict):
            setattr(self, '_PMMail__custom_headers', value)
        else:
            raise TypeError('Custom headers must be a dictionary of key-value pairs')
1109219
def setNsProp(self, ns, name, value):
        
        if ns is None: ns__o = None
        else: ns__o = ns._o
        ret = libxml2mod.xmlSetNsProp(self._o, ns__o, name, value)
        if ret is None:raise treeError('xmlSetNsProp() failed')
        __tmp = xmlAttr(_obj=ret)
        return __tmp
94664
def new_value(self, name, value):
        """"""
        try:
            # We need to enclose values in a list to be able to send
            # them to the kernel in Python 2
            svalue = [cloudpickle.dumps(value, protocol=PICKLE_PROTOCOL)]

            # Needed to prevent memory leaks. See issue 7158
            if len(svalue) < MAX_SERIALIZED_LENGHT:
                self.shellwidget.set_value(name, svalue)
            else:
                QMessageBox.warning(self, _("Warning"),
                                    _("The object you are trying to modify is "
                                      "too big to be sent back to the kernel. "
                                      "Therefore, your modifications won't "
                                      "take place."))
        except TypeError as e:
            QMessageBox.critical(self, _("Error"),
                                 "TypeError: %s" % to_text_string(e))
        self.shellwidget.refresh_namespacebrowser()
395799
def update_index(self, name, value):
        
        kwargs = {}
        kwargs['index.' + name] = value if isinstance(value, basestring) else json.dumps(value)
        return self.post(**kwargs)
935482
def update(target, path, value):
    
    names = path.split(".")
    names_length = len(names)
    node = target
    for index in range(names_length):
        name = names[index]
        if index == names_length - 1:
            last = True
        else:
            last = False
        if isinstance(node, dict):
            if last:
                node[name] = value
                return
            else:
                if not name in node:
                    node[name] = {}
                node = node[name]
        elif isinstance(node, list):
            name = int(name)
            listpad(node, name+1)
            if last:
                node[name] = value
                return
            else:
                node[name] = {}
                node = node[name]
        else:
            if last:
                setattr(node, name, value)
            else:
                setattr(node, name, {})
                node = getattr(node, name)
549829
def _create_dns_list(self, dns):
        
        if not dns:
            return None

        dns_list = []

        if isinstance(dns, six.string_types):
            if is_valid_ip(dns):
                dns_list.append(dns)
            else:
                raise ValueError("dns is required to be a valid ip adress. {0} was passed.".format(dns))
        elif isinstance(dns, list):
            for dns_entry in dns:
                if is_valid_ip(dns_entry):
                    dns_list.append(dns_entry)
            else:
                raise ValueError("dns is required to be a valid ip adress. {0} was passed.".format(dns))

        else:
            raise ValueError("dns and dns search must be a list or string. {0} was passed.".format(dns))

        return dns_list
259488
def rename(self, name):
        
        for node in self.nodes:
            node.rename(name)
        self.update(name=name)
        self.vpn.rename(name)
896416
def setValue(self, value):
        
        if isinstance(value, Text):
            self.value = value
        else:
            self.value = Text(value)
        return self
1221682
def set_status(self, value):
        
        if not self._status == value:
            old = self._status
            self._status = value
            logger.info("{} changing status from {} to {}".format(self, old.name, value.name))
            self._statusChanged(old, value)
96771
def _update_properties(self, name, value):
        
        if self._auto_decode and 'properties' in self._decode_cache:
            self._decode_cache['properties'][name] = value
        self._properties[name] = value
538375
def domain_name(self, domain_name):
        

        if domain_name is None:
            raise ValueError("Invalid value for `domain_name`, must not be `None`")
        if len(domain_name) > 255:
            raise ValueError("Invalid value for `domain_name`, length must be less than `255`")
        if len(domain_name) < 1:
            raise ValueError("Invalid value for `domain_name`, length must be greater than or equal to `1`")

        self._domain_name = domain_name
482902
def next_update(self, value):
        

        if not isinstance(value, datetime):
            raise TypeError(_pretty_message(
                '''
                next_update must be an instance of datetime.datetime, not %s
                ''',
                _type_name(value)
            ))

        self._next_update = value
1335473
public void set(String name, String value)
    {
        HeaderName hn = getHeaderName(name);
        set(hn, value);
    }
22009
def set_header(self, header, value):
        
        # requests>=2.11 only accepts `str` or `bytes` header values
        # raising an exception here, instead of leaving it to `requests` makes
        # it easy to know where we passed a wrong header type in the code.
        if not isinstance(value, (str, bytes)):
            raise TypeError("header values must be str or bytes, but %s value has type %s" % (header, type(value)))
        self._headers[header] = value