# coding: utf-8

"""
    Curia Platform API

    These are the docs for the curia platform API. To test, generate an authorization token first.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Environment(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': 'str',
        'name': 'str',
        'cluster_id': 'str',
        'cluster_status': 'str',
        'config': 'object',
        'type': 'str',
        'terminate_after_idle_minutes': 'float',
        'idle_alarm_name': 'str',
        'concurrency': 'float',
        'organization_id': 'str',
        'model_jobs': 'list[ModelJob]',
        'activity_marker': 'str',
        'activities': 'list[EnvironmentActivity]',
        'created_at': 'datetime',
        'updated_at': 'datetime',
        'version': 'float'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'cluster_id': 'clusterId',
        'cluster_status': 'clusterStatus',
        'config': 'config',
        'type': 'type',
        'terminate_after_idle_minutes': 'terminateAfterIdleMinutes',
        'idle_alarm_name': 'idleAlarmName',
        'concurrency': 'concurrency',
        'organization_id': 'organizationId',
        'model_jobs': 'modelJobs',
        'activity_marker': 'activityMarker',
        'activities': 'activities',
        'created_at': 'createdAt',
        'updated_at': 'updatedAt',
        'version': 'version'
    }

    def __init__(self, id=None, name=None, cluster_id=None, cluster_status=None, config=None, type=None, terminate_after_idle_minutes=120, idle_alarm_name=None, concurrency=1, organization_id=None, model_jobs=None, activity_marker=None, activities=None, created_at=None, updated_at=None, version=None):  # noqa: E501
        """Environment - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._cluster_id = None
        self._cluster_status = None
        self._config = None
        self._type = None
        self._terminate_after_idle_minutes = None
        self._idle_alarm_name = None
        self._concurrency = None
        self._organization_id = None
        self._model_jobs = None
        self._activity_marker = None
        self._activities = None
        self._created_at = None
        self._updated_at = None
        self._version = None
        self.discriminator = None
        if id is not None:
            self.id = id
        self.name = name
        if cluster_id is not None:
            self.cluster_id = cluster_id
        if cluster_status is not None:
            self.cluster_status = cluster_status
        if config is not None:
            self.config = config
        self.type = type
        if terminate_after_idle_minutes is not None:
            self.terminate_after_idle_minutes = terminate_after_idle_minutes
        if idle_alarm_name is not None:
            self.idle_alarm_name = idle_alarm_name
        if concurrency is not None:
            self.concurrency = concurrency
        if organization_id is not None:
            self.organization_id = organization_id
        if model_jobs is not None:
            self.model_jobs = model_jobs
        if activity_marker is not None:
            self.activity_marker = activity_marker
        if activities is not None:
            self.activities = activities
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if version is not None:
            self.version = version

    @property
    def id(self):
        """Gets the id of this Environment.  # noqa: E501


        :return: The id of this Environment.  # noqa: E501
        :rtype: str
        """
        return self._id

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


        :param id: The id of this Environment.  # noqa: E501
        :type: str
        """

        self._id = id

    @property
    def name(self):
        """Gets the name of this Environment.  # noqa: E501


        :return: The name of this Environment.  # noqa: E501
        :rtype: str
        """
        return self._name

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


        :param name: The name of this Environment.  # 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 cluster_id(self):
        """Gets the cluster_id of this Environment.  # noqa: E501


        :return: The cluster_id of this Environment.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id):
        """Sets the cluster_id of this Environment.


        :param cluster_id: The cluster_id of this Environment.  # noqa: E501
        :type: str
        """

        self._cluster_id = cluster_id

    @property
    def cluster_status(self):
        """Gets the cluster_status of this Environment.  # noqa: E501


        :return: The cluster_status of this Environment.  # noqa: E501
        :rtype: str
        """
        return self._cluster_status

    @cluster_status.setter
    def cluster_status(self, cluster_status):
        """Sets the cluster_status of this Environment.


        :param cluster_status: The cluster_status of this Environment.  # noqa: E501
        :type: str
        """

        self._cluster_status = cluster_status

    @property
    def config(self):
        """Gets the config of this Environment.  # noqa: E501


        :return: The config of this Environment.  # noqa: E501
        :rtype: object
        """
        return self._config

    @config.setter
    def config(self, config):
        """Sets the config of this Environment.


        :param config: The config of this Environment.  # noqa: E501
        :type: object
        """

        self._config = config

    @property
    def type(self):
        """Gets the type of this Environment.  # noqa: E501


        :return: The type of this Environment.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this Environment.


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

        self._type = type

    @property
    def terminate_after_idle_minutes(self):
        """Gets the terminate_after_idle_minutes of this Environment.  # noqa: E501


        :return: The terminate_after_idle_minutes of this Environment.  # noqa: E501
        :rtype: float
        """
        return self._terminate_after_idle_minutes

    @terminate_after_idle_minutes.setter
    def terminate_after_idle_minutes(self, terminate_after_idle_minutes):
        """Sets the terminate_after_idle_minutes of this Environment.


        :param terminate_after_idle_minutes: The terminate_after_idle_minutes of this Environment.  # noqa: E501
        :type: float
        """

        self._terminate_after_idle_minutes = terminate_after_idle_minutes

    @property
    def idle_alarm_name(self):
        """Gets the idle_alarm_name of this Environment.  # noqa: E501


        :return: The idle_alarm_name of this Environment.  # noqa: E501
        :rtype: str
        """
        return self._idle_alarm_name

    @idle_alarm_name.setter
    def idle_alarm_name(self, idle_alarm_name):
        """Sets the idle_alarm_name of this Environment.


        :param idle_alarm_name: The idle_alarm_name of this Environment.  # noqa: E501
        :type: str
        """

        self._idle_alarm_name = idle_alarm_name

    @property
    def concurrency(self):
        """Gets the concurrency of this Environment.  # noqa: E501


        :return: The concurrency of this Environment.  # noqa: E501
        :rtype: float
        """
        return self._concurrency

    @concurrency.setter
    def concurrency(self, concurrency):
        """Sets the concurrency of this Environment.


        :param concurrency: The concurrency of this Environment.  # noqa: E501
        :type: float
        """

        self._concurrency = concurrency

    @property
    def organization_id(self):
        """Gets the organization_id of this Environment.  # noqa: E501


        :return: The organization_id of this Environment.  # noqa: E501
        :rtype: str
        """
        return self._organization_id

    @organization_id.setter
    def organization_id(self, organization_id):
        """Sets the organization_id of this Environment.


        :param organization_id: The organization_id of this Environment.  # noqa: E501
        :type: str
        """

        self._organization_id = organization_id

    @property
    def model_jobs(self):
        """Gets the model_jobs of this Environment.  # noqa: E501


        :return: The model_jobs of this Environment.  # noqa: E501
        :rtype: list[ModelJob]
        """
        return self._model_jobs

    @model_jobs.setter
    def model_jobs(self, model_jobs):
        """Sets the model_jobs of this Environment.


        :param model_jobs: The model_jobs of this Environment.  # noqa: E501
        :type: list[ModelJob]
        """

        self._model_jobs = model_jobs

    @property
    def activity_marker(self):
        """Gets the activity_marker of this Environment.  # noqa: E501


        :return: The activity_marker of this Environment.  # noqa: E501
        :rtype: str
        """
        return self._activity_marker

    @activity_marker.setter
    def activity_marker(self, activity_marker):
        """Sets the activity_marker of this Environment.


        :param activity_marker: The activity_marker of this Environment.  # noqa: E501
        :type: str
        """

        self._activity_marker = activity_marker

    @property
    def activities(self):
        """Gets the activities of this Environment.  # noqa: E501


        :return: The activities of this Environment.  # noqa: E501
        :rtype: list[EnvironmentActivity]
        """
        return self._activities

    @activities.setter
    def activities(self, activities):
        """Sets the activities of this Environment.


        :param activities: The activities of this Environment.  # noqa: E501
        :type: list[EnvironmentActivity]
        """

        self._activities = activities

    @property
    def created_at(self):
        """Gets the created_at of this Environment.  # noqa: E501


        :return: The created_at of this Environment.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Environment.


        :param created_at: The created_at of this Environment.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

    @property
    def updated_at(self):
        """Gets the updated_at of this Environment.  # noqa: E501


        :return: The updated_at of this Environment.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this Environment.


        :param updated_at: The updated_at of this Environment.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

    @property
    def version(self):
        """Gets the version of this Environment.  # noqa: E501


        :return: The version of this Environment.  # noqa: E501
        :rtype: float
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this Environment.


        :param version: The version of this Environment.  # noqa: E501
        :type: float
        """

        self._version = version

    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(Environment, 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, Environment):
            return False

        return self.__dict__ == other.__dict__

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