SendNotifications.
        [Preview API] Send Notification
        :param :class:`<NotificationsData> <azure.devops.v5_1.gallery.models.NotificationsData>` notification_data: Denoting the data needed to send notification
972745
def send_notifications(self, notification_data):
        
        content = self._serialize.body(notification_data, 'NotificationsData')
        self._send(http_method='POST',
                   location_id='eab39817-413c-4602-a49f-07ad00844980',
                   version='5.1-preview.1',
                   content=content)
477468
def notify(self, notices):
        
        tmpl_html = get_template('required_tags_notice.html')
        tmpl_text = get_template('required_tags_notice.txt')
        for recipient, data in list(notices.items()):
            body_html = tmpl_html.render(data=data)
            body_text = tmpl_text.render(data=data)

            send_notification(
                subsystem=self.ns,
                recipients=[recipient],
                subject=self.email_subject,
                body_html=body_html,
                body_text=body_text
            )
387357
def notify(self, level, *args, **kwargs):
        

        LOGGER.debug('Handler (%s) %s', self.name, level)

        notify_text = self.get_message(level, *args, **kwargs)
        for chat in self.chats.copy():
            data = {"chat_id": chat, "text": notify_text}
            yield self.client.send_message(data)
238450
def create_notifications(users, notification_model, notification_type, related_object):
    
    # shortcuts for readability
    Notification = notification_model

    # text
    additional = related_object.__dict__ if related_object else ''
    notification_text = TEXTS[notification_type] % additional

    # loop users, notification settings check is done in Notification model
    for user in users:

        n = Notification(
            to_user=user,
            type=notification_type,
            text=notification_text
        )
        # attach related object if present
        if related_object:
            n.related_object = related_object
        # create notification and send according to user settings
        n.save()
490912
private void sendNotification(String errMessage, int errCode, String errType, boolean createNotification) {
        NotificationsDao notifications = storage.getNotificationsDao();
        Notification notification;

        if (errType == "warning") {
            logger.warning(errMessage); // send message to console
            if (createNotification) {
                notification = notification(WARNING_NOTIFICATION, errCode, errMessage);
                notifications.addNotification(notification);
            }
        } else if (errType == "error") {
            logger.error(errMessage); // send message to console
            if (createNotification) {
                notification = notification(ERROR_NOTIFICATION, errCode, errMessage);
                notifications.addNotification(notification);
            }
        } else if (errType == "info") {
            if (logger.isInfoEnabled()) {
                logger.info(errMessage); // send message to console
            }
        }
    }
738143
def handle_notification(self, data):
        """"""
        _LOGGER.debug("Received notification from the device..")

        if data[0] == PROP_INFO_RETURN and data[1] == 1:
            _LOGGER.debug("Got status: %s" % codecs.encode(data, 'hex'))
            status = Status.parse(data)
            _LOGGER.debug("Parsed status: %s", status)

            self._raw_mode = status.mode
            self._valve_state = status.valve
            self._target_temperature = status.target_temp

            if status.mode.BOOST:
                self._mode = Mode.Boost
            elif status.mode.AWAY:
                self._mode = Mode.Away
                self._away_end = status.away
            elif status.mode.MANUAL:
                if status.target_temp == EQ3BT_OFF_TEMP:
                    self._mode = Mode.Closed
                elif status.target_temp == EQ3BT_ON_TEMP:
                    self._mode = Mode.Open
                else:
                    self._mode = Mode.Manual
            else:
                self._mode = Mode.Auto

            _LOGGER.debug("Valve state: %s", self._valve_state)
            _LOGGER.debug("Mode:        %s", self.mode_readable)
            _LOGGER.debug("Target temp: %s", self._target_temperature)
            _LOGGER.debug("Away end:    %s", self._away_end)

        elif data[0] == PROP_SCHEDULE_RETURN:
            parsed = self.parse_schedule(data)
            self._schedule[parsed.day] = parsed

        else:
            _LOGGER.debug("Unknown notification %s (%s)", data[0], codecs.encode(data, 'hex'))
557986
private void notifyMessageReceived(QueueData queueData)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "notifyMessageReceived", queueData);

      long messageLength = queueData.getMessageLength();
      if (trackBytes)
      {
         bytesReceivedSinceLastRequestForMsgs += messageLength;
      }

      // Update the message arrival time
      queueData.updateArrivalTime(approxTimeThread.getApproxTime());

      messagesReceived++;
      currentBytesOnQueue += messageLength;

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "notifyMessageReceived");
   }
466639
def notify(self, state, notifications):
        '''
        
        '''

        def do_append(desc, notifications):
            for notification in notifications:
                if not isinstance(notification, PendingNotification):
                    raise ValueError("Expected notify() params to be a list "
                                     "of PendingNotification instance, got %r."
                                     % notification)
                key = str(notification.recipient.key)
                if key not in desc.pending_notifications:
                    desc.pending_notifications[key] = list()
                desc.pending_notifications[key].append(notification)

        return state.agent.update_descriptor(do_append, notifications)
439990
def handleNotification(self, handle, raw_data):  # pylint: disable=unused-argument,invalid-name
        
        if raw_data is None:
            return
        data = raw_data.decode("utf-8").strip(' \n\t')
        self._cache = data
        self._check_data()
        if self.cache_available():
            self._last_read = datetime.now()
        else:
            # If a sensor doesn't work, wait 5 minutes before retrying
            self._last_read = datetime.now() - self._cache_timeout + \
                timedelta(seconds=300)
942858
def _send_notification(self, handle, value):
        

        value_len = len(value)
        value = bytes(value)

        payload = struct.pack("<BHB%ds" % value_len, 0xFF, handle, value_len, value)

        response = self._send_command(2, 5, payload)
        result, = unpack("<H", response.payload)
        if result != 0:
            return False, {'reason': 'Error code from BLED112 notifying a value', 'code': result, 'handle': handle, 'value': value}

        return True, None
49405
def notify(callback_method, *data)
    # TODO throw error here ?
    return unless node.persistent?

    msg = Messages::Notification.new :method  => callback_method,
                                     :args    => data,
                                     :headers => @node.message_headers

    # TODO surround w/ begin/rescue block,
    # raise RJR::ConnectionError on socket errors
    @node.send_msg msg.to_s, @connection
  end
1118526
def send_feature_report(self, data):
        
        assert( self.is_opened() )
        #make sure we have c_ubyte array storage
        if not ( isinstance(data, ctypes.Array) and issubclass(data._type_,
                c_ubyte) ):
            raw_data_type = c_ubyte * len(data)
            raw_data = raw_data_type()
            for index in range( len(data) ):
                raw_data[index] = data[index]
        else:
            raw_data = data

        return hid_dll.HidD_SetFeature(int(self.hid_handle), byref(raw_data),
                len(raw_data))
600895
def response
      response = ::RestClient.post( Pxpay::Base.pxpay_request_url,  self.post )
      return ::Pxpay::Notification.new( response )
    end
61686
def send_preview(self): # pragma: no cover
        """"""
        response = self.session.request("method:queuePreview", [ self.data ])
        self.data = response
        return self
911781
def sendMessage(self, data):
        
        opcode = BINARY
        if _check_unicode(data):
            opcode = TEXT
        self._sendMessage(False, opcode, data)
777482
def update_notification(self, notification, details):
        
        if isinstance(notification, CloudMonitorNotification):
            nid = notification.id
            ntyp = notification.type
        else:
            # Supplied an ID
            nfcn = self.get(notification)
            nid = notification
            ntyp = nfcn.type
        uri = "/%s/%s" % (self.uri_base, nid)
        body = {"type": ntyp,
                "details": details}
        resp, resp_body = self.api.method_put(uri, body=body)
251079
public boolean sendSummaryData() {
        if (clearDirty()) {
            //System.out.println("#### sendSummaryData for " + Utils.getClassName(this));

            // we had something that changed, so send the notification of summaryData
            String summaryData = getSummaryData();

            for (SummaryDataListener listener : summaryDataListeners) {
                listener.sendSummaryData(summaryData);
            }

            scheduleSummaryData();
            return true;
        } else {
            //System.out.println("#### sendSummaryData for " + Utils.getClassName(this) + ". Nothing to do.");

        }

        return false;
    }