#
# Copyright 2021 DataRobot, Inc. and its affiliates.
#
# All rights reserved.
#
# DataRobot, Inc.
#
# This is proprietary source code of DataRobot, Inc. and its
# affiliates.
#
# Released under the terms of DataRobot Tool and Utility Agreement.
"""
Autogenerated DataRobot python client file.  Please don't modify.
"""

import trafaret as t
from datarobot.models.api_object import APIObject
from datarobot.models.full_api.generated.model.approval_policy_intended_action_condition import ApprovalPolicyIntendedActionCondition

class ApprovalPolicyIntendedAction(APIObject):
    """
    Attributes
    ----------
    action:str
         Type of action to trigger on.
    condition:ApprovalPolicyIntendedActionCondition [optional]
         
    """
    _converter = t.Dict(
        {
            t.Key("action"):  t.String(),
            t.Key("condition", optional=True):  t.Any(),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        action,
        condition=None,
    ):
        self.action = action
        self.condition = condition

    def __repr__(self):
        return (
            "ApprovalPolicyIntendedAction("
            "action={0.action}, "
            "condition={0.condition}, "
        ).format(self)
