如何使用Azure-devops-python的CreateProcessRuleRequest python方法?

问题描述

当我尝试使用def add_process_work_item_type_rule(self,process_rule_create,process_id,wit_ref_name):方法时,需要我传递一个参数

:param :class:`<CreateProcessRuleRequest> <azure.devops.v5_1.work_item_tracking_process.models.CreateProcessRuleRequest>` process_rule_create:

从类驱动。然后我在存储库中搜索了定义。

https://github.com/microsoft/azure-devops-python-api/blob/c798941aeeb7b474558f2d835d20d41f3c0a0bb5/azure-devops/azure/devops/v5_1/work_item_tracking_process/models.py

class CreateProcessRuleRequest(Model):
    """
    Request object/class for creating a rule on a work item type.
    :param actions: List of actions to take when the rule is triggered.
    :type actions: list of :class:`RuleAction <azure.devops.v5_1.work_item_tracking.models.RuleAction>`
    :param conditions: List of conditions when the rule should be triggered.
    :type conditions: list of :class:`RuleCondition <azure.devops.v5_1.work_item_tracking.models.RuleCondition>`
    :param is_disabled: Indicates if the rule is disabled.
    :type is_disabled: bool
    :param name: Name for the rule.
    :type name: str
    """

    _attribute_map = {
        'actions': {'key': 'actions','type': '[RuleAction]'},'conditions': {'key': 'conditions','type': '[RuleCondition]'},'is_disabled': {'key': 'isdisabled','type': 'bool'},'name': {'key': 'name','type': 'str'}
    }

    def __init__(self,actions=None,conditions=None,is_disabled=None,name=None):
        super(CreateProcessRuleRequest,self).__init__()
        self.actions = actions
        self.conditions = conditions
        self.is_disabled = is_disabled
        self.name = name

但是不知道我可以用它来构造对象,以便将值传递给参数process_rule_create

谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)