def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The TableStyleResult of this TableStyleResult. # noqa: E501 :rtype: TableStyleResult """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The Whitelist of this Whitelist. # noqa: E501 :rtype: Whitelist """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The PolicyBundle of this PolicyBundle. # noqa: E501 :rtype: PolicyBundle """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The ErrorResponse of this ErrorResponse. # noqa: E501 :rtype: ErrorResponse """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The PolicyEvaluationProblem of this PolicyEvaluationProblem. # noqa: E501 :rtype: PolicyEvaluationProblem """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The FeedGroupMetadata of this FeedGroupMetadata. # noqa: E501 :rtype: FeedGroupMetadata """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The LegacyVulnerabilityReport of this LegacyVulnerabilityReport. # noqa: E501 :rtype: LegacyVulnerabilityReport """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The ImagePolicyCheckRequest of this ImagePolicyCheckRequest. # noqa: E501 :rtype: ImagePolicyCheckRequest """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The UpdateEvent of this UpdateEvent. # noqa: E501 :rtype: UpdateEvent """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The DistroMapping of this DistroMapping. # noqa: E501 :rtype: DistroMapping """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The GateSpec of this GateSpec. # noqa: E501 :rtype: GateSpec """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The VulnerabilityListing of this VulnerabilityListing. # noqa: E501 :rtype: VulnerabilityListing """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The ImageSelectionRule of this ImageSelectionRule. # noqa: E501 :rtype: ImageSelectionRule """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The FeedSyncTask of this FeedSyncTask. # noqa: E501 :rtype: FeedSyncTask """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The EventStatus of this EventStatus. # noqa: E501 :rtype: EventStatus """ return util.deserialize_model(dikt, cls)
def from_dict(cls, dikt): """Returns the dict as a model :param dikt: A dict. :type: dict :return: The ImageUpdateNotification of this ImageUpdateNotification. # noqa: E501 :rtype: ImageUpdateNotification """ return util.deserialize_model(dikt, cls)
def test_deserialize_image(): dikt = { 'id': "1", 'digest': "111", 'user_id': "1", 'state': "initializing", 'distro_namespace': "namespace", 'created_at': str(datetime.now()), 'last_modified': str(datetime.now()), 'tags': ["tag1", "tag2"] } result = util.deserialize_model(dikt, Image) assert isinstance(result, Image)
def test_with_params(self): policy_rule_params = [ { 'name': "rule1", 'value': "value1" }, { 'name': "rule2", 'value': "value2" }, ] dikt = { 'id': "1", 'gate': "1", 'trigger': "trigger", 'action': "GO", 'params': policy_rule_params } result = util.deserialize_model(dikt, PolicyRule) assert result.id == "1" assert len(result.params) == 2
def from_dict(cls, dikt): """Returns the dict as a model""" return util.deserialize_model(dikt, cls)