# coding: utf-8

"""
    Anyscale API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from anyscale_client.configuration import Configuration


class CreateAppConfigConfigurationSchema(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 = {
        'base_image': 'SUPPORTEDBASEIMAGESENUM',
        'base_image_history_reference': 'BASEIMAGESENUM',
        'env_vars': 'object',
        'debian_packages': 'list[str]',
        'python': 'PythonModules',
        'post_build_cmds': 'list[str]'
    }

    attribute_map = {
        'base_image': 'base_image',
        'base_image_history_reference': 'base_image_history_reference',
        'env_vars': 'env_vars',
        'debian_packages': 'debian_packages',
        'python': 'python',
        'post_build_cmds': 'post_build_cmds'
    }

    def __init__(self, base_image=None, base_image_history_reference=None, env_vars=None, debian_packages=None, python=None, post_build_cmds=None, local_vars_configuration=None):  # noqa: E501
        """CreateAppConfigConfigurationSchema - 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._base_image = None
        self._base_image_history_reference = None
        self._env_vars = None
        self._debian_packages = None
        self._python = None
        self._post_build_cmds = None
        self.discriminator = None

        self.base_image = base_image
        if base_image_history_reference is not None:
            self.base_image_history_reference = base_image_history_reference
        if env_vars is not None:
            self.env_vars = env_vars
        if debian_packages is not None:
            self.debian_packages = debian_packages
        if python is not None:
            self.python = python
        if post_build_cmds is not None:
            self.post_build_cmds = post_build_cmds

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

        The base image to use to create a new app config. It needs to be one of the images that we currently support (SupportedBaseImages).  # noqa: E501

        :return: The base_image of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :rtype: SUPPORTEDBASEIMAGESENUM
        """
        return self._base_image

    @base_image.setter
    def base_image(self, base_image):
        """Sets the base_image of this CreateAppConfigConfigurationSchema.

        The base image to use to create a new app config. It needs to be one of the images that we currently support (SupportedBaseImages).  # noqa: E501

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

        self._base_image = base_image

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


        :return: The base_image_history_reference of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :rtype: BASEIMAGESENUM
        """
        return self._base_image_history_reference

    @base_image_history_reference.setter
    def base_image_history_reference(self, base_image_history_reference):
        """Sets the base_image_history_reference of this CreateAppConfigConfigurationSchema.


        :param base_image_history_reference: The base_image_history_reference of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :type: BASEIMAGESENUM
        """

        self._base_image_history_reference = base_image_history_reference

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

        Environment varibles in the docker image that'll be used at runtime.  # noqa: E501

        :return: The env_vars of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :rtype: object
        """
        return self._env_vars

    @env_vars.setter
    def env_vars(self, env_vars):
        """Sets the env_vars of this CreateAppConfigConfigurationSchema.

        Environment varibles in the docker image that'll be used at runtime.  # noqa: E501

        :param env_vars: The env_vars of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :type: object
        """

        self._env_vars = env_vars

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

        List of debian packages that'll be included in the image.  # noqa: E501

        :return: The debian_packages of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :rtype: list[str]
        """
        return self._debian_packages

    @debian_packages.setter
    def debian_packages(self, debian_packages):
        """Sets the debian_packages of this CreateAppConfigConfigurationSchema.

        List of debian packages that'll be included in the image.  # noqa: E501

        :param debian_packages: The debian_packages of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :type: list[str]
        """

        self._debian_packages = debian_packages

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

        Python related dependencies.  # noqa: E501

        :return: The python of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :rtype: PythonModules
        """
        return self._python

    @python.setter
    def python(self, python):
        """Sets the python of this CreateAppConfigConfigurationSchema.

        Python related dependencies.  # noqa: E501

        :param python: The python of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :type: PythonModules
        """

        self._python = python

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

        List of post build commands that'll be included in the image. For multi-line commands, please make sure those are provided as a single string and not split across multiple strings in the list.  # noqa: E501

        :return: The post_build_cmds of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :rtype: list[str]
        """
        return self._post_build_cmds

    @post_build_cmds.setter
    def post_build_cmds(self, post_build_cmds):
        """Sets the post_build_cmds of this CreateAppConfigConfigurationSchema.

        List of post build commands that'll be included in the image. For multi-line commands, please make sure those are provided as a single string and not split across multiple strings in the list.  # noqa: E501

        :param post_build_cmds: The post_build_cmds of this CreateAppConfigConfigurationSchema.  # noqa: E501
        :type: list[str]
        """

        self._post_build_cmds = post_build_cmds

    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, CreateAppConfigConfigurationSchema):
            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, CreateAppConfigConfigurationSchema):
            return True

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