# coding: utf-8

"""
    EPIC API

    REST API for interacting with EPIC (https://epic.zenotech.com) services. <br />                             Please note this API is in BETA and does not yet contain                             all EPIC functionality.  # noqa: E501

    The version of the OpenAPI document: 2.0.0
    Contact: support@zenotech.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from epiccore.configuration import Configuration


class SiteConfigurationSerialiser(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'application_configuration': 'ApplicationConfigurationSerialiser',
        'environment_script': 'Template',
        'env_variables': 'list[EnvironmentVariable]',
        'created': 'datetime',
        'modified': 'datetime',
        'site_mpi_command': 'str'
    }

    attribute_map = {
        'application_configuration': 'application_configuration',
        'environment_script': 'environment_script',
        'env_variables': 'env_variables',
        'created': 'created',
        'modified': 'modified',
        'site_mpi_command': 'site_mpi_command'
    }

    def __init__(self, application_configuration=None, environment_script=None, env_variables=None, created=None, modified=None, site_mpi_command=None, local_vars_configuration=None):  # noqa: E501
        """SiteConfigurationSerialiser - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._application_configuration = None
        self._environment_script = None
        self._env_variables = None
        self._created = None
        self._modified = None
        self._site_mpi_command = None
        self.discriminator = None

        self.application_configuration = application_configuration
        self.environment_script = environment_script
        self.env_variables = env_variables
        if created is not None:
            self.created = created
        if modified is not None:
            self.modified = modified
        self.site_mpi_command = site_mpi_command

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


        :return: The application_configuration of this SiteConfigurationSerialiser.  # noqa: E501
        :rtype: ApplicationConfigurationSerialiser
        """
        return self._application_configuration

    @application_configuration.setter
    def application_configuration(self, application_configuration):
        """Sets the application_configuration of this SiteConfigurationSerialiser.


        :param application_configuration: The application_configuration of this SiteConfigurationSerialiser.  # noqa: E501
        :type application_configuration: ApplicationConfigurationSerialiser
        """
        if self.local_vars_configuration.client_side_validation and application_configuration is None:  # noqa: E501
            raise ValueError("Invalid value for `application_configuration`, must not be `None`")  # noqa: E501

        self._application_configuration = application_configuration

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


        :return: The environment_script of this SiteConfigurationSerialiser.  # noqa: E501
        :rtype: Template
        """
        return self._environment_script

    @environment_script.setter
    def environment_script(self, environment_script):
        """Sets the environment_script of this SiteConfigurationSerialiser.


        :param environment_script: The environment_script of this SiteConfigurationSerialiser.  # noqa: E501
        :type environment_script: Template
        """
        if self.local_vars_configuration.client_side_validation and environment_script is None:  # noqa: E501
            raise ValueError("Invalid value for `environment_script`, must not be `None`")  # noqa: E501

        self._environment_script = environment_script

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


        :return: The env_variables of this SiteConfigurationSerialiser.  # noqa: E501
        :rtype: list[EnvironmentVariable]
        """
        return self._env_variables

    @env_variables.setter
    def env_variables(self, env_variables):
        """Sets the env_variables of this SiteConfigurationSerialiser.


        :param env_variables: The env_variables of this SiteConfigurationSerialiser.  # noqa: E501
        :type env_variables: list[EnvironmentVariable]
        """
        if self.local_vars_configuration.client_side_validation and env_variables is None:  # noqa: E501
            raise ValueError("Invalid value for `env_variables`, must not be `None`")  # noqa: E501

        self._env_variables = env_variables

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


        :return: The created of this SiteConfigurationSerialiser.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this SiteConfigurationSerialiser.


        :param created: The created of this SiteConfigurationSerialiser.  # noqa: E501
        :type created: datetime
        """

        self._created = created

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


        :return: The modified of this SiteConfigurationSerialiser.  # noqa: E501
        :rtype: datetime
        """
        return self._modified

    @modified.setter
    def modified(self, modified):
        """Sets the modified of this SiteConfigurationSerialiser.


        :param modified: The modified of this SiteConfigurationSerialiser.  # noqa: E501
        :type modified: datetime
        """

        self._modified = modified

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


        :return: The site_mpi_command of this SiteConfigurationSerialiser.  # noqa: E501
        :rtype: str
        """
        return self._site_mpi_command

    @site_mpi_command.setter
    def site_mpi_command(self, site_mpi_command):
        """Sets the site_mpi_command of this SiteConfigurationSerialiser.


        :param site_mpi_command: The site_mpi_command of this SiteConfigurationSerialiser.  # noqa: E501
        :type site_mpi_command: str
        """
        if (self.local_vars_configuration.client_side_validation and
                site_mpi_command is not None and len(site_mpi_command) > 300):
            raise ValueError("Invalid value for `site_mpi_command`, length must be less than or equal to `300`")  # noqa: E501

        self._site_mpi_command = site_mpi_command

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

        for attr, _ in six.iteritems(self.openapi_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 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, SiteConfigurationSerialiser):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
