Use this API to update channel resources.
321527
public static base_responses update(nitro_service client, channel resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			channel updateresources[] = new channel[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new channel();
				updateresources[i].id = resources[i].id;
				updateresources[i].state = resources[i].state;
				updateresources[i].mode = resources[i].mode;
				updateresources[i].conndistr = resources[i].conndistr;
				updateresources[i].macdistr = resources[i].macdistr;
				updateresources[i].lamac = resources[i].lamac;
				updateresources[i].speed = resources[i].speed;
				updateresources[i].flowctl = resources[i].flowctl;
				updateresources[i].hamonitor = resources[i].hamonitor;
				updateresources[i].tagall = resources[i].tagall;
				updateresources[i].trunk = resources[i].trunk;
				updateresources[i].ifalias = resources[i].ifalias;
				updateresources[i].throughput = resources[i].throughput;
				updateresources[i].lrminthroughput = resources[i].lrminthroughput;
				updateresources[i].bandwidthhigh = resources[i].bandwidthhigh;
				updateresources[i].bandwidthnormal = resources[i].bandwidthnormal;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
964761
def update(self, **kwargs):
    """"""
    for key, value in kwargs.items():
      setattr(self, key, value)
673996
public static base_responses add(nitro_service client, channel resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			channel addresources[] = new channel[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new channel();
				addresources[i].id = resources[i].id;
				addresources[i].ifnum = resources[i].ifnum;
				addresources[i].state = resources[i].state;
				addresources[i].mode = resources[i].mode;
				addresources[i].conndistr = resources[i].conndistr;
				addresources[i].macdistr = resources[i].macdistr;
				addresources[i].lamac = resources[i].lamac;
				addresources[i].speed = resources[i].speed;
				addresources[i].flowctl = resources[i].flowctl;
				addresources[i].hamonitor = resources[i].hamonitor;
				addresources[i].tagall = resources[i].tagall;
				addresources[i].trunk = resources[i].trunk;
				addresources[i].ifalias = resources[i].ifalias;
				addresources[i].throughput = resources[i].throughput;
				addresources[i].bandwidthhigh = resources[i].bandwidthhigh;
				addresources[i].bandwidthnormal = resources[i].bandwidthnormal;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
656974
def resource_collections_update(self, data, **kwargs):
        ""
        api_path = "/api/v2/resource_collections.json"
        return self.call(api_path, method="PUT", data=data, **kwargs)
745522
def update_resource(self, resource):
        ''''''
        index = self.resources.index(resource)
        data = {
            'resources__{index}'.format(index=index): resource
        }
        self.update(**data)
        self.reload()
        post_save.send(self.__class__, document=self)
349238
def start(self):
        """"""
        super(ResourceValues, self).start()
        self._api.ensure_notifications_thread()
        self._presubs.add(self._sdk_presub_params)
        if self._immediacy == FirstValue.on_value_update:
            self._subscribe_all_matching()
183894
def add(self, resource, replace=False):
        """"""
        uri = resource.uri
        if (uri in self and not replace):
            raise ResourceSetDupeError(
                "Attempt to add resource already in this set")
        self[uri] = resource
87602
@PATCH
    @Timed
    public void updateResource(@Suspended final AsyncResponse response, @Context final Request request,
            @Context final UriInfo uriInfo, @Context final HttpHeaders headers,
            @Context final SecurityContext secContext, final String body) {
        final TrellisRequest req = new TrellisRequest(request, uriInfo, headers, secContext);
        final String urlBase = getBaseUrl(req);
        final IRI identifier = rdf.createIRI(TRELLIS_DATA_PREFIX + req.getPath());
        final PatchHandler patchHandler = new PatchHandler(req, body, trellis, defaultJsonLdProfile, urlBase);

        getParent(identifier).thenCombine(trellis.getResourceService().get(identifier), patchHandler::initialize)
            .thenCompose(patchHandler::updateResource).thenCompose(patchHandler::updateMemento)
            .thenApply(ResponseBuilder::build).exceptionally(this::handleException).thenApply(response::resume);
    }
913638
def _refresh_channel(self):
        '''
        
        '''
        self.channel = salt.transport.client.ReqChannel.factory(self.opts)
        return self.channel
898044
public void update() {
		if (done) {
			return;
		}
		
		int processed = AL10.alGetSourcei(source, AL10.AL_BUFFERS_PROCESSED);
		
		while (processed > 0) {
			unqueued.clear();
			
			AL10.alSourceUnqueueBuffers(source, unqueued);
	        if (stream(unqueued.get(0))) {
	        	AL10.alSourceQueueBuffers(source, unqueued);
	        } else {
	        	remainingBufferCount--;
	        	if (remainingBufferCount == 0) {
	        		done = true;
	        	}
	        }
	        processed--;
		}
		
		int state = AL10.alGetSourcei(source, AL10.AL_SOURCE_STATE);
	    
	    if (state != AL10.AL_PLAYING) {
	    	AL10.alSourcePlay(source);
	    }
	}
633767
public static base_response update(nitro_service client, l4param resource) throws Exception {
		l4param updateresource = new l4param();
		updateresource.l2connmethod = resource.l2connmethod;
		updateresource.l4switch = resource.l4switch;
		return updateresource.update_resource(client);
	}
835180
@Override
    public synchronized ChannelData updateChannelProperty(String channelName, Object propertyKey, Object propertyValue) throws ChannelException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "updateChannelProperty");
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "channelName=" + channelName + "propertyKey=" + propertyKey + ", propertyValue=" + propertyValue);
        }
        if (null == channelName) {
            throw new InvalidChannelNameException("Input channel name is null");
        }
        if (null == propertyKey || null == propertyValue) {
            throw new ChannelException("Null property key or value found.");
        }

        // Find the existing channel config
        ChannelDataImpl channelData = (ChannelDataImpl) channelDataMap.get(channelName);
        if (null == channelData) {
            throw new InvalidChannelNameException("Unable to find input channel, " + channelName);
        }

        // Update the property bag. Note this may throw an exception.
        channelData.setProperty(propertyKey, propertyValue);
        // Update each running channel that is using this parent channel data
        // object.
        updateRunningChannels(channelData);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "updateChannelProperty");
        }
        return channelData;
    }
795649
@Override
    public void update(ChannelData cc) {
        synchronized (this) {
            // can't do two updates at the same time
            if (this.config.checkAndSetValues(cc)) {
                this.alists = AccessLists.getInstance(this.config);
            }
        }
    }
793393
public static base_response update(nitro_service client, protocolhttpband resource) throws Exception {
		protocolhttpband updateresource = new protocolhttpband();
		updateresource.reqbandsize = resource.reqbandsize;
		updateresource.respbandsize = resource.respbandsize;
		return updateresource.update_resource(client);
	}
892720
def channels_create(self, name, **kwargs):
        """"""
        return self.__call_api_post('channels.create', name=name, kwargs=kwargs)
470536
def update_channels(self):
        
        logging.info("Updating channels")
        with switch_db(StreamDefinitionModel, 'hyperstream'):
            for s in StreamDefinitionModel.objects():
                try:
                    stream_id = StreamId(name=s.stream_id.name, meta_data=s.stream_id.meta_data)
                except AttributeError as e:
                    raise e
                logging.debug("Processing {}".format(stream_id))

                try:
                    # This can fail if a plugin has been defined by a different instantiation of HyperStream on the same
                    # database.
                    channel = self.get_channel(s.channel_id)
                except ChannelNotFoundError as e:
                    logging.warn(e)
                    continue

                # calculated_intervals = TimeIntervals(map(lambda x: (x.start, x.end), s.calculated_intervals))
                last_accessed = utcnow()
                last_updated = s.last_updated if s.last_updated else utcnow()

                if stream_id in channel.streams:
                    if isinstance(channel, (AssetsChannel, AssetsFileChannel)):
                        continue
                    raise StreamAlreadyExistsError(stream_id)

                from . import MemoryChannel, DatabaseChannel
                if isinstance(channel, MemoryChannel):
                    channel.create_stream(stream_id)
                elif isinstance(channel, DatabaseChannel):
                    if channel == self.assets:
                        stream_type = AssetStream
                    else:
                        stream_type = DatabaseStream

                    channel.streams[stream_id] = stream_type(
                        channel=channel,
                        stream_id=stream_id,
                        calculated_intervals=None,  # Not required since it's initialised from mongo_model in __init__
                        last_accessed=last_accessed,
                        last_updated=last_updated,
                        sandbox=s.sandbox,
                        mongo_model=s
                    )
                else:
                    logging.warn("Unable to parse stream {}".format(stream_id))
103364
def set_channels(self, channels):
        
        for key in channels:
            self.set(key, channels[key])