# 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 ResponseModelServiceRevision(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 = {
        'available_replicas': 'int',
        'created_by': 'ResponseUser',
        'created_dt': 'datetime',
        'id': 'int',
        'kernel_image': 'ResponseKernelImage',
        'kernel_resource_spec': 'ResponseKernelResourceSpec',
        'message': 'str',
        'model_service_name': 'str',
        'number': 'int',
        'resource_spec_name': 'str',
        'revision_spec': 'V1ModelServiceRevisionSpec',
        'service_account': 'V1ServiceAccount',
        'status': 'str',
        'total_replicas': 'int',
        'traffic_weight': 'int',
        'volume_operations': 'list[ResponsePathOperation]',
        'yaml_spec': 'str'
    }

    attribute_map = {
        'available_replicas': 'available_replicas',
        'created_by': 'created_by',
        'created_dt': 'created_dt',
        'id': 'id',
        'kernel_image': 'kernel_image',
        'kernel_resource_spec': 'kernel_resource_spec',
        'message': 'message',
        'model_service_name': 'model_service_name',
        'number': 'number',
        'resource_spec_name': 'resource_spec_name',
        'revision_spec': 'revision_spec',
        'service_account': 'service_account',
        'status': 'status',
        'total_replicas': 'total_replicas',
        'traffic_weight': 'traffic_weight',
        'volume_operations': 'volume_operations',
        'yaml_spec': 'yaml_spec'
    }

    def __init__(self, available_replicas=None, created_by=None, created_dt=None, id=None, kernel_image=None, kernel_resource_spec=None, message=None, model_service_name=None, number=None, resource_spec_name=None, revision_spec=None, service_account=None, status=None, total_replicas=None, traffic_weight=None, volume_operations=None, yaml_spec=None, local_vars_configuration=None):  # noqa: E501
        """ResponseModelServiceRevision - 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._available_replicas = None
        self._created_by = None
        self._created_dt = None
        self._id = None
        self._kernel_image = None
        self._kernel_resource_spec = None
        self._message = None
        self._model_service_name = None
        self._number = None
        self._resource_spec_name = None
        self._revision_spec = None
        self._service_account = None
        self._status = None
        self._total_replicas = None
        self._traffic_weight = None
        self._volume_operations = None
        self._yaml_spec = None
        self.discriminator = None

        self.available_replicas = available_replicas
        self.created_by = created_by
        self.created_dt = created_dt
        self.id = id
        if kernel_image is not None:
            self.kernel_image = kernel_image
        if kernel_resource_spec is not None:
            self.kernel_resource_spec = kernel_resource_spec
        self.message = message
        self.model_service_name = model_service_name
        self.number = number
        self.resource_spec_name = resource_spec_name
        self.revision_spec = revision_spec
        if service_account is not None:
            self.service_account = service_account
        self.status = status
        self.total_replicas = total_replicas
        self.traffic_weight = traffic_weight
        if volume_operations is not None:
            self.volume_operations = volume_operations
        self.yaml_spec = yaml_spec

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


        :return: The available_replicas of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: int
        """
        return self._available_replicas

    @available_replicas.setter
    def available_replicas(self, available_replicas):
        """Sets the available_replicas of this ResponseModelServiceRevision.


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

        self._available_replicas = available_replicas

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


        :return: The created_by of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: ResponseUser
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this ResponseModelServiceRevision.


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

        self._created_by = created_by

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


        :return: The created_dt of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: datetime
        """
        return self._created_dt

    @created_dt.setter
    def created_dt(self, created_dt):
        """Sets the created_dt of this ResponseModelServiceRevision.


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

        self._created_dt = created_dt

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


        :return: The id of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: int
        """
        return self._id

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


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

        self._id = id

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


        :return: The kernel_image of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: ResponseKernelImage
        """
        return self._kernel_image

    @kernel_image.setter
    def kernel_image(self, kernel_image):
        """Sets the kernel_image of this ResponseModelServiceRevision.


        :param kernel_image: The kernel_image of this ResponseModelServiceRevision.  # noqa: E501
        :type kernel_image: ResponseKernelImage
        """

        self._kernel_image = kernel_image

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


        :return: The kernel_resource_spec of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: ResponseKernelResourceSpec
        """
        return self._kernel_resource_spec

    @kernel_resource_spec.setter
    def kernel_resource_spec(self, kernel_resource_spec):
        """Sets the kernel_resource_spec of this ResponseModelServiceRevision.


        :param kernel_resource_spec: The kernel_resource_spec of this ResponseModelServiceRevision.  # noqa: E501
        :type kernel_resource_spec: ResponseKernelResourceSpec
        """

        self._kernel_resource_spec = kernel_resource_spec

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


        :return: The message of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this ResponseModelServiceRevision.


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

        self._message = message

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


        :return: The model_service_name of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: str
        """
        return self._model_service_name

    @model_service_name.setter
    def model_service_name(self, model_service_name):
        """Sets the model_service_name of this ResponseModelServiceRevision.


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

        self._model_service_name = model_service_name

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


        :return: The number of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: int
        """
        return self._number

    @number.setter
    def number(self, number):
        """Sets the number of this ResponseModelServiceRevision.


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

        self._number = number

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


        :return: The resource_spec_name of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: str
        """
        return self._resource_spec_name

    @resource_spec_name.setter
    def resource_spec_name(self, resource_spec_name):
        """Sets the resource_spec_name of this ResponseModelServiceRevision.


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

        self._resource_spec_name = resource_spec_name

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


        :return: The revision_spec of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: V1ModelServiceRevisionSpec
        """
        return self._revision_spec

    @revision_spec.setter
    def revision_spec(self, revision_spec):
        """Sets the revision_spec of this ResponseModelServiceRevision.


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

        self._revision_spec = revision_spec

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


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

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


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

        self._service_account = service_account

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


        :return: The status of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ResponseModelServiceRevision.


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

        self._status = status

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


        :return: The total_replicas of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: int
        """
        return self._total_replicas

    @total_replicas.setter
    def total_replicas(self, total_replicas):
        """Sets the total_replicas of this ResponseModelServiceRevision.


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

        self._total_replicas = total_replicas

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


        :return: The traffic_weight of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: int
        """
        return self._traffic_weight

    @traffic_weight.setter
    def traffic_weight(self, traffic_weight):
        """Sets the traffic_weight of this ResponseModelServiceRevision.


        :param traffic_weight: The traffic_weight of this ResponseModelServiceRevision.  # noqa: E501
        :type traffic_weight: int
        """

        self._traffic_weight = traffic_weight

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


        :return: The volume_operations of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: list[ResponsePathOperation]
        """
        return self._volume_operations

    @volume_operations.setter
    def volume_operations(self, volume_operations):
        """Sets the volume_operations of this ResponseModelServiceRevision.


        :param volume_operations: The volume_operations of this ResponseModelServiceRevision.  # noqa: E501
        :type volume_operations: list[ResponsePathOperation]
        """

        self._volume_operations = volume_operations

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


        :return: The yaml_spec of this ResponseModelServiceRevision.  # noqa: E501
        :rtype: str
        """
        return self._yaml_spec

    @yaml_spec.setter
    def yaml_spec(self, yaml_spec):
        """Sets the yaml_spec of this ResponseModelServiceRevision.


        :param yaml_spec: The yaml_spec of this ResponseModelServiceRevision.  # noqa: E501
        :type yaml_spec: str
        """

        self._yaml_spec = yaml_spec

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

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