# coding: utf-8

"""
    RiseML API


    OpenAPI spec version: 1.1.0
    Contact: support@riseml.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from pprint import pformat
from six import iteritems
import re


class Changeset(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, id=None, revision=None, command=None, required_gpus=None, required_cpus=None, required_mem=None, image_name=None):
        """
        Changeset - 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 = {
            'id': 'str',
            'revision': 'str',
            'command': 'str',
            'required_gpus': 'int',
            'required_cpus': 'float',
            'required_mem': 'int',
            'image_name': 'str'
        }

        self.attribute_map = {
            'id': 'id',
            'revision': 'revision',
            'command': 'command',
            'required_gpus': 'required_gpus',
            'required_cpus': 'required_cpus',
            'required_mem': 'required_mem',
            'image_name': 'image_name'
        }

        self._id = id
        self._revision = revision
        self._command = command
        self._required_gpus = required_gpus
        self._required_cpus = required_cpus
        self._required_mem = required_mem
        self._image_name = image_name


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


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

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


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

        self._id = id

    @property
    def revision(self):
        """
        Gets the revision of this Changeset.


        :return: The revision of this Changeset.
        :rtype: str
        """
        return self._revision

    @revision.setter
    def revision(self, revision):
        """
        Sets the revision of this Changeset.


        :param revision: The revision of this Changeset.
        :type: str
        """

        self._revision = revision

    @property
    def command(self):
        """
        Gets the command of this Changeset.


        :return: The command of this Changeset.
        :rtype: str
        """
        return self._command

    @command.setter
    def command(self, command):
        """
        Sets the command of this Changeset.


        :param command: The command of this Changeset.
        :type: str
        """

        self._command = command

    @property
    def required_gpus(self):
        """
        Gets the required_gpus of this Changeset.


        :return: The required_gpus of this Changeset.
        :rtype: int
        """
        return self._required_gpus

    @required_gpus.setter
    def required_gpus(self, required_gpus):
        """
        Sets the required_gpus of this Changeset.


        :param required_gpus: The required_gpus of this Changeset.
        :type: int
        """

        self._required_gpus = required_gpus

    @property
    def required_cpus(self):
        """
        Gets the required_cpus of this Changeset.


        :return: The required_cpus of this Changeset.
        :rtype: float
        """
        return self._required_cpus

    @required_cpus.setter
    def required_cpus(self, required_cpus):
        """
        Sets the required_cpus of this Changeset.


        :param required_cpus: The required_cpus of this Changeset.
        :type: float
        """

        self._required_cpus = required_cpus

    @property
    def required_mem(self):
        """
        Gets the required_mem of this Changeset.


        :return: The required_mem of this Changeset.
        :rtype: int
        """
        return self._required_mem

    @required_mem.setter
    def required_mem(self, required_mem):
        """
        Sets the required_mem of this Changeset.


        :param required_mem: The required_mem of this Changeset.
        :type: int
        """

        self._required_mem = required_mem

    @property
    def image_name(self):
        """
        Gets the image_name of this Changeset.


        :return: The image_name of this Changeset.
        :rtype: str
        """
        return self._image_name

    @image_name.setter
    def image_name(self, image_name):
        """
        Sets the image_name of this Changeset.


        :param image_name: The image_name of this Changeset.
        :type: str
        """

        self._image_name = image_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
        """
        return self.__dict__ == other.__dict__

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