#
# 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

class DependencyConstraint(APIObject):
    """
    Attributes
    ----------
    constraint_type:str
         The constraint type to apply to the version.
    version:str
         The version label to use in the constraint.
    """
    _converter = t.Dict(
        {
            t.Key("constraint_type"):  t.String(),
            t.Key("version"):  t.String(),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        constraint_type,
        version,
    ):
        self.constraint_type = constraint_type
        self.version = version

    def __repr__(self):
        return (
            "DependencyConstraint("
            "constraint_type={0.constraint_type}, "
            "version={0.version}, "
        ).format(self)
