Skip to content
Snippets Groups Projects
Select Git revision
  • 2b277baa1148a56712edde99a3a79ca43bdd8d97
  • master default protected
  • dev
  • gh-pages
4 results

container_dto.py

Blame
  • Martin Weise's avatar
    Martin Weise authored
    2b277baa
    History
    container_dto.py 9.29 KiB
    # coding: utf-8
    
    """
        Database Repository Authentication Service API
    
        Service that manages the authentication  # noqa: E501
    
        OpenAPI spec version: 1.1.0-alpha
        Contact: andreas.rauber@tuwien.ac.at
        Generated by: https://github.com/swagger-api/swagger-codegen.git
    """
    
    import pprint
    import re  # noqa: F401
    
    import six
    
    class ContainerDto(object):
        """NOTE: This class is auto generated by the swagger code generator program.
    
        Do not edit the class manually.
        """
        """
        Attributes:
          swagger_types (dict): The key is attribute name
                                and the value is attribute type.
          attribute_map (dict): The key is attribute name
                                and the value is json key in definition.
        """
        swagger_types = {
            'id': 'int',
            'hash': 'str',
            'name': 'str',
            'state': 'str',
            'databases': 'list[DatabaseDto]',
            'image': 'ImageBriefDto',
            'port': 'int',
            'created': 'datetime',
            'internal_name': 'str',
            'ip_address': 'str'
        }
    
        attribute_map = {
            'id': 'id',
            'hash': 'hash',
            'name': 'name',
            'state': 'state',
            'databases': 'databases',
            'image': 'image',
            'port': 'port',
            'created': 'created',
            'internal_name': 'internal_name',
            'ip_address': 'ip_address'
        }
    
        def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None):  # noqa: E501
            """ContainerDto - a model defined in Swagger"""  # noqa: E501
            self._id = None
            self._hash = None
            self._name = None
            self._state = None
            self._databases = None
            self._image = None
            self._port = None
            self._created = None
            self._internal_name = None
            self._ip_address = None
            self.discriminator = None
            self.id = id
            self.hash = hash
            self.name = name
            if state is not None:
                self.state = state
            if databases is not None:
                self.databases = databases
            if image is not None:
                self.image = image
            if port is not None:
                self.port = port
            self.created = created
            self.internal_name = internal_name
            if ip_address is not None:
                self.ip_address = ip_address
    
        @property
        def id(self):
            """Gets the id of this ContainerDto.  # noqa: E501
    
    
            :return: The id of this ContainerDto.  # noqa: E501
            :rtype: int
            """
            return self._id
    
        @id.setter
        def id(self, id):
            """Sets the id of this ContainerDto.
    
    
            :param id: The id of this ContainerDto.  # noqa: E501
            :type: int
            """
            if id is None:
                raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501
    
            self._id = id
    
        @property
        def hash(self):
            """Gets the hash of this ContainerDto.  # noqa: E501
    
    
            :return: The hash of this ContainerDto.  # noqa: E501
            :rtype: str
            """
            return self._hash
    
        @hash.setter
        def hash(self, hash):
            """Sets the hash of this ContainerDto.
    
    
            :param hash: The hash of this ContainerDto.  # noqa: E501
            :type: str
            """
            if hash is None:
                raise ValueError("Invalid value for `hash`, must not be `None`")  # noqa: E501
    
            self._hash = hash
    
        @property
        def name(self):
            """Gets the name of this ContainerDto.  # noqa: E501
    
    
            :return: The name of this ContainerDto.  # noqa: E501
            :rtype: str
            """
            return self._name
    
        @name.setter
        def name(self, name):
            """Sets the name of this ContainerDto.
    
    
            :param name: The name of this ContainerDto.  # noqa: E501
            :type: str
            """
            if name is None:
                raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
    
            self._name = name
    
        @property
        def state(self):
            """Gets the state of this ContainerDto.  # noqa: E501
    
    
            :return: The state of this ContainerDto.  # noqa: E501
            :rtype: str
            """
            return self._state
    
        @state.setter
        def state(self, state):
            """Sets the state of this ContainerDto.
    
    
            :param state: The state of this ContainerDto.  # noqa: E501
            :type: str
            """
            allowed_values = ["created", "restarting", "running", "paused", "exited", "dead"]  # noqa: E501
            if state not in allowed_values:
                raise ValueError(
                    "Invalid value for `state` ({0}), must be one of {1}"  # noqa: E501
                    .format(state, allowed_values)
                )
    
            self._state = state
    
        @property
        def databases(self):
            """Gets the databases of this ContainerDto.  # noqa: E501
    
    
            :return: The databases of this ContainerDto.  # noqa: E501
            :rtype: list[DatabaseDto]
            """
            return self._databases
    
        @databases.setter
        def databases(self, databases):
            """Sets the databases of this ContainerDto.
    
    
            :param databases: The databases of this ContainerDto.  # noqa: E501
            :type: list[DatabaseDto]
            """
    
            self._databases = databases
    
        @property
        def image(self):
            """Gets the image of this ContainerDto.  # noqa: E501
    
    
            :return: The image of this ContainerDto.  # noqa: E501
            :rtype: ImageBriefDto
            """
            return self._image
    
        @image.setter
        def image(self, image):
            """Sets the image of this ContainerDto.
    
    
            :param image: The image of this ContainerDto.  # noqa: E501
            :type: ImageBriefDto
            """
    
            self._image = image
    
        @property
        def port(self):
            """Gets the port of this ContainerDto.  # noqa: E501
    
    
            :return: The port of this ContainerDto.  # noqa: E501
            :rtype: int
            """
            return self._port
    
        @port.setter
        def port(self, port):
            """Sets the port of this ContainerDto.
    
    
            :param port: The port of this ContainerDto.  # noqa: E501
            :type: int
            """
    
            self._port = port
    
        @property
        def created(self):
            """Gets the created of this ContainerDto.  # noqa: E501
    
    
            :return: The created of this ContainerDto.  # noqa: E501
            :rtype: datetime
            """
            return self._created
    
        @created.setter
        def created(self, created):
            """Sets the created of this ContainerDto.
    
    
            :param created: The created of this ContainerDto.  # noqa: E501
            :type: datetime
            """
            if created is None:
                raise ValueError("Invalid value for `created`, must not be `None`")  # noqa: E501
    
            self._created = created
    
        @property
        def internal_name(self):
            """Gets the internal_name of this ContainerDto.  # noqa: E501
    
    
            :return: The internal_name of this ContainerDto.  # noqa: E501
            :rtype: str
            """
            return self._internal_name
    
        @internal_name.setter
        def internal_name(self, internal_name):
            """Sets the internal_name of this ContainerDto.
    
    
            :param internal_name: The internal_name of this ContainerDto.  # noqa: E501
            :type: str
            """
            if internal_name is None:
                raise ValueError("Invalid value for `internal_name`, must not be `None`")  # noqa: E501
    
            self._internal_name = internal_name
    
        @property
        def ip_address(self):
            """Gets the ip_address of this ContainerDto.  # noqa: E501
    
    
            :return: The ip_address of this ContainerDto.  # noqa: E501
            :rtype: str
            """
            return self._ip_address
    
        @ip_address.setter
        def ip_address(self, ip_address):
            """Sets the ip_address of this ContainerDto.
    
    
            :param ip_address: The ip_address of this ContainerDto.  # noqa: E501
            :type: str
            """
    
            self._ip_address = ip_address
    
        def to_dict(self):
            """Returns the model properties as a dict"""
            result = {}
    
            for attr, _ in six.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
            if issubclass(ContainerDto, dict):
                for key, value in self.items():
                    result[key] = value
    
            return result
    
        def to_str(self):
            """Returns the string representation of the model"""
            return pprint.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, ContainerDto):
                return False
    
            return self.__dict__ == other.__dict__
    
        def __ne__(self, other):
            """Returns true if both objects are not equal"""
            return not self == other