Get an existing (full) trigger definition.

        :param trigger_id: Trigger definition id to be retrieved.
        :param full: Fetch the full definition, default is False.
        :return: Trigger of FullTrigger depending on the full parameter value.
357619
def single(self, trigger_id, full=False):
        
        if full:
            returned_dict = self._get(self._service_url(['triggers', 'trigger', trigger_id]))
            return FullTrigger(returned_dict)
        else:
            returned_dict = self._get(self._service_url(['triggers', trigger_id]))
            return Trigger(returned_dict)
122023
def get_jid(jid):
    '''
    
    '''
    with _get_serv(ret=None, commit=True) as cur:

        sql = '''SELECT id, full_ret FROM salt_returns
                WHERE jid = %s'''

        cur.execute(sql, (jid,))
        data = cur.fetchall()
        ret = {}
        if data:
            for minion, full_ret in data:
                ret[minion] = full_ret
        return ret
80840
@Override
  public TriggerInstance getTriggerInstanceById(final String triggerInstanceId) {
    TriggerInstance triggerInstance = null;
    try {
      final Collection<TriggerInstance> res = this.dbOperator
          .query(SELECT_EXECUTIONS_BY_INSTANCE_ID,
              new TriggerInstanceHandler(SORT_MODE.SORT_ON_START_TIME_ASC),
              triggerInstanceId);
      triggerInstance = !res.isEmpty() ? res.iterator().next() : null;
    } catch (final SQLException ex) {
      handleSQLException(ex);
    }
    populateFlowTriggerProperties(triggerInstance);
    return triggerInstance;
  }
1213724
public static TriggerContext on(Trigger trigger) {
        List<Trigger> addedTriggers = new ArrayList<Trigger>();
        if (trigger != null) {
            addedTriggers.add(trigger);
        }
        return new TriggerContext(addedTriggers);
    }
865465
def triggers(self):
        """"""
        capabilities = self.capabilities
        if not capabilities:
            return None

        for capability in capabilities:
            if not isinstance(capability, dict):
                continue

            triggers = capability.get("Triggers")
            if triggers:
                return triggers

        return None
1261337
def trigger_revision_show(self, trigger_id, revision_id, **kwargs):
        ""
        api_path = "/api/v2/triggers/{trigger_id}/revisions/{revision_id}.json"
        api_path = api_path.format(trigger_id=trigger_id, revision_id=revision_id)
        return self.call(api_path, **kwargs)
805547
public Trigger<? super S> getInsertTrigger() {
        ForInsert<S> forInsert = mForInsert;
        return forInsert.isEmpty() ? null : forInsert;
    }
658895
public function fullById(int $id)
    {
        $all = $this->full($id);

        return $this->checkAndReturnResult($all);
    }
473432
public function get_full($id_option = null, string $type = 'page'): ?array
  {
    if ( $id_option = $this->_get_id_option($id_option, $type) ){
      return $this->pref->full_options($id_option ?: $this->get_current());
    }
    return null;
  }
1190857
def view_user_full_description(id)
      response = connection.get do |req|
        req.url "users/#{id}/full"
      end
      return_error_or_body(response)
    end
684295
def get(self, slide_id, default=None):
        
        slide = self.part.get_slide(slide_id)
        if slide is None:
            return default
        return slide
126256
protected String getTriggerDetails(Trigger trigger, NotificationContext context) {
		if (trigger != null) {
			String triggerString = trigger.toString();
			triggerString = TemplateReplacer.applyTemplateChanges(context, triggerString);

			return triggerString.substring(triggerString.indexOf("{") + 1, triggerString.indexOf("}"));
		} else {
			return "";
		}
	}
1317061
def get_triggers(self):
        
        status, data = self.http_client.get_json(
            TRIGGERS_URI,
            params={'appid': self.API_key},
            headers={'Content-Type': 'application/json'})
        return [self.trigger_parser.parse_dict(item) for item in data]
896903
def get_data(service, cache_data, trigger_id):
        
        if service.startswith('th_'):
            cache = caches['django_th']

            limit = settings.DJANGO_TH.get('publishing_limit', 0)

            # publishing of all the data
            if limit == 0:
                return cache_data
            # or just a set of them
            if cache_data is not None and len(cache_data) > limit:
                for data in cache_data[limit:]:
                    service_str = ''.join((service, '_', str(trigger_id)))
                    # put that data in a version 2 of the cache
                    cache.set(service_str, data, version=2)
                    # delete data from cache version=1
                    # https://niwinz.github.io/django-redis/latest/#_scan_delete_keys_in_bulk
                    cache.delete_pattern(service_str)
                # put in cache unpublished data
                cache_data = cache_data[:limit]
        return cache_data
1236945
def conditions(self, trigger_id):
        
        response = self._get(self._service_url(['triggers', trigger_id, 'conditions']))
        return  Condition.list_to_object_list(response)
1287123
def save_data(trigger_id, data):
    
    status = True
    # consumer - the service which uses the data
    default_provider.load_services()
    service = TriggerService.objects.get(id=trigger_id)

    service_consumer = default_provider.get_service(str(service.consumer.name.name))
    kwargs = {'user': service.user}

    if len(data) > 0:
        getattr(service_consumer, '__init__')(service.consumer.token, **kwargs)
        status = getattr(service_consumer, 'save_data')(service.id, **data)

    return status
825771
def trigger_chain(self):
        

        trigger_stream = self.allocator.attach_stream(self.trigger_stream)
        return (trigger_stream, self.trigger_cond)