Updates the graderoster resource for the passed restclients.GradeRoster
    model. A new restclients.GradeRoster is returned, representing the
    document returned from the update request.
550410
def update_graderoster(graderoster, requestor):
    
    label = graderoster.graderoster_label()
    url = "{}/{}".format(graderoster_url, encode_section_label(label))
    headers = {"Content-Type": "application/xhtml+xml",
               "Connection": "keep-alive",
               "X-UW-Act-as": requestor.uwnetid}
    body = graderoster.xhtml()

    response = SWS_GradeRoster_DAO().putURL(url, headers, body)

    if response.status != 200:
        root = etree.fromstring(response.data)
        msg = root.find(".//*[@class='status_description']").text.strip()
        raise DataFailureException(url, response.status, msg)

    return GradeRoster(data=etree.fromstring(response.data.strip()),
                       section=graderoster.section,
                       instructor=graderoster.instructor)
725794
def update(self, resource, id_or_uri):
        
        return self._client.update(resource=resource, uri=id_or_uri)
647084
public static base_response update(nitro_service client, scparameter resource) throws Exception {
		scparameter updateresource = new scparameter();
		updateresource.sessionlife = resource.sessionlife;
		updateresource.vsr = resource.vsr;
		return updateresource.update_resource(client);
	}
586872
def update(self, **args):
        
        self_dict = self.to_dict()
        if args:
            self_dict = dict(list(self_dict.items()) + list(args.items()))
        response = self.requester.put(
            '/{endpoint}/{id}', endpoint=self.endpoint,
            id=self.id, payload=self_dict
        )
        obj_json = response.json()
        if 'version' in obj_json:
            self.__dict__['version'] = obj_json['version']
        return self
1222159
def update_resource(id_or_uri, resource, opts = {})
      data, _status_code, _headers = update_resource_with_http_info(id_or_uri, resource, opts)
      return data
    end
780024
def update(self, data):
        
        data = values.of({'Data': serialize.object(data), })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return DocumentInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            sid=self._solution['sid'],
        )
462647
def update(self, request, _id):
        
        _id = deserialize(_id)

        to_update = self.collection.find_one({'_id': _id})
        if to_update:
            document = self.collection(dict(to_update, **request.json))
            document.updated_at = datetime.utcnow()

            updated = document.update()
            return Response(
                response=serialize(updated),
                status=(
                    200 if not all(
                        key in updated for key in [
                            'error_code', 'error_type', 'error_message'
                        ]
                    ) else 400
                )
            )
        else:
            return Response(
                response=serialize(
                    DocumentNotFoundError(self.collection.__name__, _id)
                ),
                status=400
            )
1054473
public static base_response update(nitro_service client, route resource) throws Exception {
		route updateresource = new route();
		updateresource.network = resource.network;
		updateresource.netmask = resource.netmask;
		updateresource.gateway = resource.gateway;
		updateresource.td = resource.td;
		updateresource.distance = resource.distance;
		updateresource.cost1 = resource.cost1;
		updateresource.weight = resource.weight;
		updateresource.advertise = resource.advertise;
		updateresource.protocol = resource.protocol;
		updateresource.msr = resource.msr;
		updateresource.monitor = resource.monitor;
		return updateresource.update_resource(client);
	}
1219323
public static base_response update(nitro_service client, streamselector resource) throws Exception {
		streamselector updateresource = new streamselector();
		updateresource.name = resource.name;
		updateresource.rule = resource.rule;
		return updateresource.update_resource(client);
	}
240019
public static base_response update(nitro_service client, scpolicy resource) throws Exception {
		scpolicy updateresource = new scpolicy();
		updateresource.name = resource.name;
		updateresource.url = resource.url;
		updateresource.rule = resource.rule;
		updateresource.delay = resource.delay;
		updateresource.maxconn = resource.maxconn;
		updateresource.action = resource.action;
		updateresource.altcontentsvcname = resource.altcontentsvcname;
		updateresource.altcontentpath = resource.altcontentpath;
		return updateresource.update_resource(client);
	}
259295
def update(self, **kwargs):
        
        return self.__class__(self.resource.update(kwargs),
                              self.client,
                              wallet=self.wallet)
903569
def update(self, instance, **kwargs):
        
        for index in self.model_to_indexes[instance.__class__]:
            if not index._doc_type.ignore_signals:
                index.update(instance, **kwargs)
518282
public static base_responses update(nitro_service client, policyhttpcallout resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			policyhttpcallout updateresources[] = new policyhttpcallout[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new policyhttpcallout();
				updateresources[i].name = resources[i].name;
				updateresources[i].ipaddress = resources[i].ipaddress;
				updateresources[i].port = resources[i].port;
				updateresources[i].vserver = resources[i].vserver;
				updateresources[i].returntype = resources[i].returntype;
				updateresources[i].httpmethod = resources[i].httpmethod;
				updateresources[i].hostexpr = resources[i].hostexpr;
				updateresources[i].urlstemexpr = resources[i].urlstemexpr;
				updateresources[i].headers = resources[i].headers;
				updateresources[i].parameters = resources[i].parameters;
				updateresources[i].bodyexpr = resources[i].bodyexpr;
				updateresources[i].fullreqexpr = resources[i].fullreqexpr;
				updateresources[i].scheme = resources[i].scheme;
				updateresources[i].resultexpr = resources[i].resultexpr;
				updateresources[i].cacheforsecs = resources[i].cacheforsecs;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
157252
public static base_responses update(nitro_service client, responderaction resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			responderaction updateresources[] = new responderaction[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new responderaction();
				updateresources[i].name = resources[i].name;
				updateresources[i].target = resources[i].target;
				updateresources[i].bypasssafetycheck = resources[i].bypasssafetycheck;
				updateresources[i].htmlpage = resources[i].htmlpage;
				updateresources[i].comment = resources[i].comment;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
1347907
public static base_response update(nitro_service client, policyhttpcallout resource) throws Exception {
		policyhttpcallout updateresource = new policyhttpcallout();
		updateresource.name = resource.name;
		updateresource.ipaddress = resource.ipaddress;
		updateresource.port = resource.port;
		updateresource.vserver = resource.vserver;
		updateresource.returntype = resource.returntype;
		updateresource.httpmethod = resource.httpmethod;
		updateresource.hostexpr = resource.hostexpr;
		updateresource.urlstemexpr = resource.urlstemexpr;
		updateresource.headers = resource.headers;
		updateresource.parameters = resource.parameters;
		updateresource.bodyexpr = resource.bodyexpr;
		updateresource.fullreqexpr = resource.fullreqexpr;
		updateresource.scheme = resource.scheme;
		updateresource.resultexpr = resource.resultexpr;
		updateresource.cacheforsecs = resource.cacheforsecs;
		return updateresource.update_resource(client);
	}
361771
def update(cls, spec, updates, upsert=False):
        '''
        
        '''
        if 'key' in spec:
            previous = cls.get(spec['key'])
        else:
            previous = None
        if previous:
            # Update existing data.
            current = cls(**previous.__dict__)
        elif upsert:
            # Create new data.
            current = cls(**spec)
        else:
            current = None
        # XXX Should there be any error thrown if this is a noop?
        if current:
            current.__dict__.update(updates)
            current.save()
        return current
607939
def update(self, **kwargs):
        
        if not self.object_id:
            return False

        url = self.build_url(
            self._endpoints.get('item').format(id=self.object_id))

        data = {self._cc(key): value for key, value in kwargs.items() if
                key in {'name',
                        'description'}}  # convert keys to protocol casing
        if not data:
            return False

        response = self.con.patch(url, data=data)
        if not response:
            return False

        new_data = response.json()

        for key in data:
            value = new_data.get(key, None)
            if value:
                setattr(self, self.protocol.to_api_case(key), value)

        return True