# coding: utf-8

"""
    Aron API

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

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


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from vessl.openapi_client.configuration import Configuration


class OrmModelServiceRevisionDeploymentSpec(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 = {
        'auto_scaler_config': 'OrmAutoscalerConfig',
        'cluster_node_ids': 'list[int]',
        'docker_credentials_id': 'int',
        'env_vars': 'list[OrmEnvVar]',
        'image_url': 'str',
        'ports': 'list[OrmWorkloadPort]',
        'resource_spec': 'OrmKernelResourceSpecField',
        'resource_spec_id': 'int',
        'service_account_name': 'str',
        'start_command': 'str',
        'volume_mount_requests': 'OrmVolumeMountRequests'
    }

    attribute_map = {
        'auto_scaler_config': 'auto_scaler_config',
        'cluster_node_ids': 'cluster_node_ids',
        'docker_credentials_id': 'docker_credentials_id',
        'env_vars': 'env_vars',
        'image_url': 'image_url',
        'ports': 'ports',
        'resource_spec': 'resource_spec',
        'resource_spec_id': 'resource_spec_id',
        'service_account_name': 'service_account_name',
        'start_command': 'start_command',
        'volume_mount_requests': 'volume_mount_requests'
    }

    def __init__(self, auto_scaler_config=None, cluster_node_ids=None, docker_credentials_id=None, env_vars=None, image_url=None, ports=None, resource_spec=None, resource_spec_id=None, service_account_name=None, start_command=None, volume_mount_requests=None, local_vars_configuration=None):  # noqa: E501
        """OrmModelServiceRevisionDeploymentSpec - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._auto_scaler_config = None
        self._cluster_node_ids = None
        self._docker_credentials_id = None
        self._env_vars = None
        self._image_url = None
        self._ports = None
        self._resource_spec = None
        self._resource_spec_id = None
        self._service_account_name = None
        self._start_command = None
        self._volume_mount_requests = None
        self.discriminator = None

        if auto_scaler_config is not None:
            self.auto_scaler_config = auto_scaler_config
        if cluster_node_ids is not None:
            self.cluster_node_ids = cluster_node_ids
        self.docker_credentials_id = docker_credentials_id
        if env_vars is not None:
            self.env_vars = env_vars
        self.image_url = image_url
        if ports is not None:
            self.ports = ports
        if resource_spec is not None:
            self.resource_spec = resource_spec
        self.resource_spec_id = resource_spec_id
        if service_account_name is not None:
            self.service_account_name = service_account_name
        if start_command is not None:
            self.start_command = start_command
        if volume_mount_requests is not None:
            self.volume_mount_requests = volume_mount_requests

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


        :return: The auto_scaler_config of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: OrmAutoscalerConfig
        """
        return self._auto_scaler_config

    @auto_scaler_config.setter
    def auto_scaler_config(self, auto_scaler_config):
        """Sets the auto_scaler_config of this OrmModelServiceRevisionDeploymentSpec.


        :param auto_scaler_config: The auto_scaler_config of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type auto_scaler_config: OrmAutoscalerConfig
        """

        self._auto_scaler_config = auto_scaler_config

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


        :return: The cluster_node_ids of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: list[int]
        """
        return self._cluster_node_ids

    @cluster_node_ids.setter
    def cluster_node_ids(self, cluster_node_ids):
        """Sets the cluster_node_ids of this OrmModelServiceRevisionDeploymentSpec.


        :param cluster_node_ids: The cluster_node_ids of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type cluster_node_ids: list[int]
        """

        self._cluster_node_ids = cluster_node_ids

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


        :return: The docker_credentials_id of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: int
        """
        return self._docker_credentials_id

    @docker_credentials_id.setter
    def docker_credentials_id(self, docker_credentials_id):
        """Sets the docker_credentials_id of this OrmModelServiceRevisionDeploymentSpec.


        :param docker_credentials_id: The docker_credentials_id of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type docker_credentials_id: int
        """

        self._docker_credentials_id = docker_credentials_id

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


        :return: The env_vars of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: list[OrmEnvVar]
        """
        return self._env_vars

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


        :param env_vars: The env_vars of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type env_vars: list[OrmEnvVar]
        """

        self._env_vars = env_vars

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


        :return: The image_url of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: str
        """
        return self._image_url

    @image_url.setter
    def image_url(self, image_url):
        """Sets the image_url of this OrmModelServiceRevisionDeploymentSpec.


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

        self._image_url = image_url

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


        :return: The ports of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: list[OrmWorkloadPort]
        """
        return self._ports

    @ports.setter
    def ports(self, ports):
        """Sets the ports of this OrmModelServiceRevisionDeploymentSpec.


        :param ports: The ports of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type ports: list[OrmWorkloadPort]
        """

        self._ports = ports

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


        :return: The resource_spec of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: OrmKernelResourceSpecField
        """
        return self._resource_spec

    @resource_spec.setter
    def resource_spec(self, resource_spec):
        """Sets the resource_spec of this OrmModelServiceRevisionDeploymentSpec.


        :param resource_spec: The resource_spec of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type resource_spec: OrmKernelResourceSpecField
        """

        self._resource_spec = resource_spec

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


        :return: The resource_spec_id of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: int
        """
        return self._resource_spec_id

    @resource_spec_id.setter
    def resource_spec_id(self, resource_spec_id):
        """Sets the resource_spec_id of this OrmModelServiceRevisionDeploymentSpec.


        :param resource_spec_id: The resource_spec_id of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type resource_spec_id: int
        """

        self._resource_spec_id = resource_spec_id

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


        :return: The service_account_name of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: str
        """
        return self._service_account_name

    @service_account_name.setter
    def service_account_name(self, service_account_name):
        """Sets the service_account_name of this OrmModelServiceRevisionDeploymentSpec.


        :param service_account_name: The service_account_name of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type service_account_name: str
        """

        self._service_account_name = service_account_name

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


        :return: The start_command of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: str
        """
        return self._start_command

    @start_command.setter
    def start_command(self, start_command):
        """Sets the start_command of this OrmModelServiceRevisionDeploymentSpec.


        :param start_command: The start_command of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type start_command: str
        """

        self._start_command = start_command

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


        :return: The volume_mount_requests of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :rtype: OrmVolumeMountRequests
        """
        return self._volume_mount_requests

    @volume_mount_requests.setter
    def volume_mount_requests(self, volume_mount_requests):
        """Sets the volume_mount_requests of this OrmModelServiceRevisionDeploymentSpec.


        :param volume_mount_requests: The volume_mount_requests of this OrmModelServiceRevisionDeploymentSpec.  # noqa: E501
        :type volume_mount_requests: OrmVolumeMountRequests
        """

        self._volume_mount_requests = volume_mount_requests

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, OrmModelServiceRevisionDeploymentSpec):
            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, OrmModelServiceRevisionDeploymentSpec):
            return True

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