# 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 V1ModelServiceRevisionSpec(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 = {
        'autoscaling': 'V1Autoscaling',
        'command': 'list[V1Command]',
        'env_vars': 'dict[str, V1EnvVar]',
        'expose': 'int',
        'monitoring': 'list[V1PortPath]',
        'node_ids': 'list[int]',
        'openapi': 'V1OpenAPIForm',
        'ports': 'list[V1Port]',
        'pre_created_service_account_name': 'str',
        'readiness_probe': 'V1ReadinessProbe',
        'runner_type': 'str',
        'service_account': 'V1ServiceAccount',
        'volume_claim_mounts': 'dict[str, V1VolumeClaimMount]',
        'volume_v2_mounts': 'list[V1VolumeV2Mount]'
    }

    attribute_map = {
        'autoscaling': 'autoscaling',
        'command': 'command',
        'env_vars': 'env_vars',
        'expose': 'expose',
        'monitoring': 'monitoring',
        'node_ids': 'node_ids',
        'openapi': 'openapi',
        'ports': 'ports',
        'pre_created_service_account_name': 'pre_created_service_account_name',
        'readiness_probe': 'readiness_probe',
        'runner_type': 'runner_type',
        'service_account': 'service_account',
        'volume_claim_mounts': 'volume_claim_mounts',
        'volume_v2_mounts': 'volume_v2_mounts'
    }

    def __init__(self, autoscaling=None, command=None, env_vars=None, expose=None, monitoring=None, node_ids=None, openapi=None, ports=None, pre_created_service_account_name=None, readiness_probe=None, runner_type=None, service_account=None, volume_claim_mounts=None, volume_v2_mounts=None, local_vars_configuration=None):  # noqa: E501
        """V1ModelServiceRevisionSpec - 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._autoscaling = None
        self._command = None
        self._env_vars = None
        self._expose = None
        self._monitoring = None
        self._node_ids = None
        self._openapi = None
        self._ports = None
        self._pre_created_service_account_name = None
        self._readiness_probe = None
        self._runner_type = None
        self._service_account = None
        self._volume_claim_mounts = None
        self._volume_v2_mounts = None
        self.discriminator = None

        if autoscaling is not None:
            self.autoscaling = autoscaling
        if command is not None:
            self.command = command
        if env_vars is not None:
            self.env_vars = env_vars
        if expose is not None:
            self.expose = expose
        if monitoring is not None:
            self.monitoring = monitoring
        if node_ids is not None:
            self.node_ids = node_ids
        if openapi is not None:
            self.openapi = openapi
        if ports is not None:
            self.ports = ports
        self.pre_created_service_account_name = pre_created_service_account_name
        if readiness_probe is not None:
            self.readiness_probe = readiness_probe
        self.runner_type = runner_type
        if service_account is not None:
            self.service_account = service_account
        if volume_claim_mounts is not None:
            self.volume_claim_mounts = volume_claim_mounts
        if volume_v2_mounts is not None:
            self.volume_v2_mounts = volume_v2_mounts

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


        :return: The autoscaling of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: V1Autoscaling
        """
        return self._autoscaling

    @autoscaling.setter
    def autoscaling(self, autoscaling):
        """Sets the autoscaling of this V1ModelServiceRevisionSpec.


        :param autoscaling: The autoscaling of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type autoscaling: V1Autoscaling
        """

        self._autoscaling = autoscaling

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


        :return: The command of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: list[V1Command]
        """
        return self._command

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


        :param command: The command of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type command: list[V1Command]
        """

        self._command = command

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


        :return: The env_vars of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: dict[str, V1EnvVar]
        """
        return self._env_vars

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


        :param env_vars: The env_vars of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type env_vars: dict[str, V1EnvVar]
        """

        self._env_vars = env_vars

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


        :return: The expose of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: int
        """
        return self._expose

    @expose.setter
    def expose(self, expose):
        """Sets the expose of this V1ModelServiceRevisionSpec.


        :param expose: The expose of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type expose: int
        """

        self._expose = expose

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


        :return: The monitoring of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: list[V1PortPath]
        """
        return self._monitoring

    @monitoring.setter
    def monitoring(self, monitoring):
        """Sets the monitoring of this V1ModelServiceRevisionSpec.


        :param monitoring: The monitoring of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type monitoring: list[V1PortPath]
        """

        self._monitoring = monitoring

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


        :return: The node_ids of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: list[int]
        """
        return self._node_ids

    @node_ids.setter
    def node_ids(self, node_ids):
        """Sets the node_ids of this V1ModelServiceRevisionSpec.


        :param node_ids: The node_ids of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type node_ids: list[int]
        """

        self._node_ids = node_ids

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


        :return: The openapi of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: V1OpenAPIForm
        """
        return self._openapi

    @openapi.setter
    def openapi(self, openapi):
        """Sets the openapi of this V1ModelServiceRevisionSpec.


        :param openapi: The openapi of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type openapi: V1OpenAPIForm
        """

        self._openapi = openapi

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


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

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


        :param ports: The ports of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type ports: list[V1Port]
        """

        self._ports = ports

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


        :return: The pre_created_service_account_name of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: str
        """
        return self._pre_created_service_account_name

    @pre_created_service_account_name.setter
    def pre_created_service_account_name(self, pre_created_service_account_name):
        """Sets the pre_created_service_account_name of this V1ModelServiceRevisionSpec.


        :param pre_created_service_account_name: The pre_created_service_account_name of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type pre_created_service_account_name: str
        """

        self._pre_created_service_account_name = pre_created_service_account_name

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


        :return: The readiness_probe of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: V1ReadinessProbe
        """
        return self._readiness_probe

    @readiness_probe.setter
    def readiness_probe(self, readiness_probe):
        """Sets the readiness_probe of this V1ModelServiceRevisionSpec.


        :param readiness_probe: The readiness_probe of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type readiness_probe: V1ReadinessProbe
        """

        self._readiness_probe = readiness_probe

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


        :return: The runner_type of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: str
        """
        return self._runner_type

    @runner_type.setter
    def runner_type(self, runner_type):
        """Sets the runner_type of this V1ModelServiceRevisionSpec.


        :param runner_type: The runner_type of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type runner_type: str
        """

        self._runner_type = runner_type

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


        :return: The service_account of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: V1ServiceAccount
        """
        return self._service_account

    @service_account.setter
    def service_account(self, service_account):
        """Sets the service_account of this V1ModelServiceRevisionSpec.


        :param service_account: The service_account of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type service_account: V1ServiceAccount
        """

        self._service_account = service_account

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


        :return: The volume_claim_mounts of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: dict[str, V1VolumeClaimMount]
        """
        return self._volume_claim_mounts

    @volume_claim_mounts.setter
    def volume_claim_mounts(self, volume_claim_mounts):
        """Sets the volume_claim_mounts of this V1ModelServiceRevisionSpec.


        :param volume_claim_mounts: The volume_claim_mounts of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type volume_claim_mounts: dict[str, V1VolumeClaimMount]
        """

        self._volume_claim_mounts = volume_claim_mounts

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


        :return: The volume_v2_mounts of this V1ModelServiceRevisionSpec.  # noqa: E501
        :rtype: list[V1VolumeV2Mount]
        """
        return self._volume_v2_mounts

    @volume_v2_mounts.setter
    def volume_v2_mounts(self, volume_v2_mounts):
        """Sets the volume_v2_mounts of this V1ModelServiceRevisionSpec.


        :param volume_v2_mounts: The volume_v2_mounts of this V1ModelServiceRevisionSpec.  # noqa: E501
        :type volume_v2_mounts: list[V1VolumeV2Mount]
        """

        self._volume_v2_mounts = volume_v2_mounts

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

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