<filename>epm_client/models/network.py
# coding: utf-8

"""
    EPM REST API

    REST API description of the ElasTest Platform Manager Module.

    OpenAPI spec version: 0.1.2
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class Network(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, cidr=None, id=None, name=None, network_id=None, po_p_name=None):
        """
        Network - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'cidr': 'str',
            'id': 'str',
            'name': 'str',
            'network_id': 'str',
            'po_p_name': 'str'
        }

        self.attribute_map = {
            'cidr': 'cidr',
            'id': 'id',
            'name': 'name',
            'network_id': 'networkId',
            'po_p_name': 'poPName'
        }

        self._cidr = cidr
        self._id = id
        self._name = name
        self._network_id = network_id
        self._po_p_name = po_p_name

    @property
    def cidr(self):
        """
        Gets the cidr of this Network.

        :return: The cidr of this Network.
        :rtype: str
        """
        return self._cidr

    @cidr.setter
    def cidr(self, cidr):
        """
        Sets the cidr of this Network.

        :param cidr: The cidr of this Network.
        :type: str
        """
        if cidr is None:
            raise ValueError("Invalid value for `cidr`, must not be `None`")

        self._cidr = cidr

    @property
    def id(self):
        """
        Gets the id of this Network.

        :return: The id of this Network.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this Network.

        :param id: The id of this Network.
        :type: str
        """

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this Network.

        :return: The name of this Network.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this Network.

        :param name: The name of this Network.
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def network_id(self):
        """
        Gets the network_id of this Network.

        :return: The network_id of this Network.
        :rtype: str
        """
        return self._network_id

    @network_id.setter
    def network_id(self, network_id):
        """
        Sets the network_id of this Network.

        :param network_id: The network_id of this Network.
        :type: str
        """
        if network_id is None:
            raise ValueError("Invalid value for `network_id`, must not be `None`")

        self._network_id = network_id

    @property
    def po_p_name(self):
        """
        Gets the po_p_name of this Network.

        :return: The po_p_name of this Network.
        :rtype: str
        """
        return self._po_p_name

    @po_p_name.setter
    def po_p_name(self, po_p_name):
        """
        Sets the po_p_name of this Network.

        :param po_p_name: The po_p_name of this Network.
        :type: str
        """
        if po_p_name is None:
            raise ValueError("Invalid value for `po_p_name`, must not be `None`")

        self._po_p_name = po_p_name

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if not isinstance(other, Network):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other

<filename>epm_client/models/network.py
# coding: utf-8

"""
    EPM REST API

    REST API description of the ElasTest Platform Manager Module.

    OpenAPI spec version: 0.1.2
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class Network(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, cidr=None, id=None, name=None, network_id=None, po_p_name=None):
        """
        Network - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'cidr': 'str',
            'id': 'str',
            'name': 'str',
            'network_id': 'str',
            'po_p_name': 'str'
        }

        self.attribute_map = {
            'cidr': 'cidr',
            'id': 'id',
            'name': 'name',
            'network_id': 'networkId',
            'po_p_name': 'poPName'
        }

        self._cidr = cidr
        self._id = id
        self._name = name
        self._network_id = network_id
        self._po_p_name = po_p_name

    @property
    def cidr(self):
        """
        Gets the cidr of this Network.

        :return: The cidr of this Network.
        :rtype: str
        """
        return self._cidr

    @cidr.setter
    def cidr(self, cidr):
        """
        Sets the cidr of this Network.

        :param cidr: The cidr of this Network.
        :type: str
        """
        if cidr is None:
            raise ValueError("Invalid value for `cidr`, must not be `None`")

        self._cidr = cidr

    @property
    def id(self):
        """
        Gets the id of this Network.

        :return: The id of this Network.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this Network.

        :param id: The id of this Network.
        :type: str
        """

        self._id = id

    @property
    def name(self):
        """
        Gets the name of this Network.

        :return: The name of this Network.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this Network.

        :param name: The name of this Network.
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")

        self._name = name

    @property
    def network_id(self):
        """
        Gets the network_id of this Network.

        :return: The network_id of this Network.
        :rtype: str
        """
        return self._network_id

    @network_id.setter
    def network_id(self, network_id):
        """
        Sets the network_id of this Network.

        :param network_id: The network_id of this Network.
        :type: str
        """
        if network_id is None:
            raise ValueError("Invalid value for `network_id`, must not be `None`")

        self._network_id = network_id

    @property
    def po_p_name(self):
        """
        Gets the po_p_name of this Network.

        :return: The po_p_name of this Network.
        :rtype: str
        """
        return self._po_p_name

    @po_p_name.setter
    def po_p_name(self, po_p_name):
        """
        Sets the po_p_name of this Network.

        :param po_p_name: The po_p_name of this Network.
        :type: str
        """
        if po_p_name is None:
            raise ValueError("Invalid value for `po_p_name`, must not be `None`")

        self._po_p_name = po_p_name

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if not isinstance(other, Network):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other

# coding: utf-8 EPM REST API      REST API description of the ElasTest Platform Manager Module.      OpenAPI spec version: 0.1.2          Generated by: https://github.com/swagger-api/swagger-codegen.git NOTE: This class is auto generated by the swagger code generator program.     Do not edit the class manually. Network - a model defined in Swagger          :param dict swaggerTypes: The key is attribute name                                   and the value is attribute type.         :param dict attributeMap: The key is attribute name                                   and the value is json key in definition. Gets the cidr of this Network.          :return: The cidr of this Network.         :rtype: str Sets the cidr of this Network.          :param cidr: The cidr of this Network.         :type: str Gets the id of this Network.          :return: The id of this Network.         :rtype: str Sets the id of this Network.          :param id: The id of this Network.         :type: str Gets the name of this Network.          :return: The name of this Network.         :rtype: str Sets the name of this Network.          :param name: The name of this Network.         :type: str Gets the network_id of this Network.          :return: The network_id of this Network.         :rtype: str Sets the network_id of this Network.          :param network_id: The network_id of this Network.         :type: str Gets the po_p_name of this Network.          :return: The po_p_name of this Network.         :rtype: str Sets the po_p_name of this Network.          :param po_p_name: The po_p_name of this Network.         :type: str Returns the model properties as a dict Returns the string representation of the model For `print` and `pprint` Returns true if both objects are equal Returns true if both objects are not equal