Adds a tag to a Indicator/Group/Victim/Security Label
         Args:
             params:
             action:
             name: The name of the tag
488234
def tag(self, name, action='ADD', params=None):
        
        if not name:
            self._tcex.handle_error(925, ['name', 'tag', 'name', 'name', name])

        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        if action in ['GET', 'ADD', 'DELETE']:
            return self.tc_requests.tag(
                self.api_type,
                self.api_sub_type,
                self.unique_id,
                name,
                action=action,
                owner=self.owner,
                params=params,
            )
        self._tcex.handle_error(925, ['action', 'tag', 'action', 'action', action])
        return None
269251
def _modifyItemTag(self, item_id, action, tag):
        
        return self.httpPost(ReaderUrl.EDIT_TAG_URL,
                             {'i': item_id, action: tag, 'ac': 'edit-tags'})
517668
def tag(context, name, message=''):
    ""
    # If a tag was provided on the command-line, then add a Git tag and push it to origin
    if name:
        context.run('git tag -a {} -m {!r}'.format(name, message))
        context.run('git push origin {}'.format(name))
619293
def set_parameter(self, name, values, group_id=None):
        
        if not isinstance(values, list):
            values = [values]
        if group_id is None:
            self.params.append({'name': name, 'values': values})
        else:
            self.params.append({'name': name, 'groupId': group_id, 'values': values})
130059
public void addNamedParam(final String name, final ParamInfo paramInfo) {
        check(!named.containsKey(name),
                "Duplicate parameter %s declaration at position %s", name, paramInfo.position);
        named.put(name, paramInfo);
    }
627461
def add_action_view(self, name, url, actions, **kwargs):
        
        view = ActionsView(name, url=url, self_var=self, **kwargs)
        if isinstance(actions, dict):
            for group, actions in actions.iteritems():
                view.actions.extend(load_actions(actions, group=group or None))
        else:
            view.actions.extend(load_actions(actions))
        self.add_view(view)
        return view
105456
def rule_action(label=None, params=None):
    
    def wrapper(func):
        params_ = params
        if isinstance(params, dict):
            params_ = [dict(label=fn_name_to_pretty_label(name),
                           name=name,
                           fieldType=field_type) \
                      for name, field_type in params.items()]
        _validate_action_parameters(func, params_)
        func.is_rule_action = True
        func.label = label \
                or fn_name_to_pretty_label(func.__name__)
        func.params = params_
        return func
    return wrapper
220840
def action(name, altname=nil, &block) 
      Runner.instance.add_action name, altname, &block
    end
407585
def handler_tag(slug=SecureRandom.uuid, name=slug, &block)
      tag = case slug
            when String, Symbol
              vm.HandlerTag.new(slug: slug.to_sym, name: name.to_s, plugin: self)
            when vm.HandlerTag
              slug
            else
              raise Pluggaloid::TypeError, "Argument `slug' must be instance of Symbol, String or Pluggaloid::HandlerTag, but given #{slug.class}."
            end
      if block
        handlers = @events + @filters
        block.(tag)
        (@events + @filters - handlers).each do |handler|
          handler.add_tag(tag)
        end
      else
        tag
      end
    end
1272299
def _set_data(self, action):
        
        if action == 'labels':
            self._set_labels()

        if action == 'wikidata':
            self._set_wikidata()
            self.get_labels(show=False)
1263017
def tag(self, name: str) -> models.Tag:
        """"""
        return self.Tag.filter_by(name=name).first()
1226408
def attribute_label(self, attribute_id, label, action='GET', params=None):
        
        if params is None:
            params = {}
        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        if action == 'GET':
            return self.tc_requests.get_attribute_label(
                self.api_type,
                self.api_sub_type,
                self.unique_id,
                attribute_id,
                label,
                owner=self.owner,
                params=params,
            )
        if action == 'DELETE':
            return self.tc_requests.delete_attribute_label(
                self.api_type,
                self.api_sub_type,
                self.unique_id,
                attribute_id,
                label,
                owner=self.owner,
            )

        self._tcex.handle_error(925, ['action', 'attribute_label', 'action', 'action', action])
        return None
360325
def add_tag(self, name):
        
        from highton.models.tag import Tag
        created_id = self._post_request(
            endpoint=self.ENDPOINT + '/' + str(self.id) + '/' + Tag.ENDPOINT,
            data=self.element_to_string(
                Tag(name=name).__dict__.get('name').encode()
            )
        ).headers.get('Location').replace('.xml', '').split('/')[-1]
        return Tag.get(created_id)
1273157
def add_tag_command(opts)
      AgentTagManager.instance.add_tags(opts[:tag], opts) do |raw_response|
        reply = @serializer.dump(raw_response) rescue raw_response
        CommandIO.instance.reply(opts[:conn], reply)
      end
    end
511176
def set_action_name(self, name):
        
        if self._open and name is not None:
            self._open[-1].name = name
            self.notify()
814090
def add_tag(tag)
      if @counters[:attributes][:tag] >= Mailgun::Chains::MAX_TAGS
        fail Mailgun::ParameterError, 'Too many tags added to message.', tag
      end
      set_multi_complex('o:tag', tag)
      @counters[:attributes][:tag] += 1
    end
1364362
def prepare_param_tag(name_or_tag, &block) #  :yields: tag
        tag = case name_or_tag
          when WWW::Delicious::Tag
            name_or_tag
          else
            Tag.new(:name => name_or_tag.to_s)
          end

        yield(tag) if block_given?
        # TODO: validate tag with tag.validate!
        raise "Invalid `tag` value supplied" unless tag.api_valid?
        tag
      end