@classmethod
def from_dictionary(cls, json):
    """
        creates Constraints class instance with the json dictionary.
        :param json: json dictionary
        :return instance of Constraints class with the json data
        """
    try:
        c = cls(json['MaxValue'], json['MinValue'], json['MinIndex'], json[
            'MaxIndex'], json['Link'])
    except KeyError:
        c = cls(json['MaxValue'], json['MinValue'])
    return c
