# -*- coding: utf-8 -*-

"""
pqapiv2

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from pqapiv2.models.haetos_relationship import HaetosRelationship


class HaetosParams(object):

    """Implementation of the '_haetosParams' model.

    Hypermedia as the Engine of Application State (HAETOS) parameters used in
    a query.

    Attributes:
        params (HaetosRelationship): Indicates the HATEOS relationship between
            the target and current resources.
        href (string): URL for resource described by the relationship.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "params": 'params',
        "href": 'href'
    }

    def __init__(self,
                 params=None,
                 href=None):
        """Constructor for the HaetosParams class"""

        # Initialize members of the class
        self.params = params
        self.href = href

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary
        params = HaetosRelationship.from_dictionary(dictionary.get('params')) if dictionary.get('params') else None
        href = dictionary.get('href')

        # Return an object of this model
        return cls(params,
                   href)
