# coding: utf-8

"""
    Managed Ray 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 openapi_client.configuration import Configuration


class ApplyAutoscalingConfigUpdateModel(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 = {
        'service_version_id': 'str',
        'application_name': 'str',
        'deployment_name': 'str',
        'max_ongoing_requests': 'int',
        'autoscaling_enabled': 'bool',
        'min_replicas': 'int',
        'max_replicas': 'int',
        'target_ongoing_requests': 'int',
        'num_replicas': 'object'
    }

    attribute_map = {
        'service_version_id': 'service_version_id',
        'application_name': 'application_name',
        'deployment_name': 'deployment_name',
        'max_ongoing_requests': 'max_ongoing_requests',
        'autoscaling_enabled': 'autoscaling_enabled',
        'min_replicas': 'min_replicas',
        'max_replicas': 'max_replicas',
        'target_ongoing_requests': 'target_ongoing_requests',
        'num_replicas': 'num_replicas'
    }

    def __init__(self, service_version_id=None, application_name=None, deployment_name=None, max_ongoing_requests=None, autoscaling_enabled=None, min_replicas=None, max_replicas=None, target_ongoing_requests=None, num_replicas=None, local_vars_configuration=None):  # noqa: E501
        """ApplyAutoscalingConfigUpdateModel - 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._service_version_id = None
        self._application_name = None
        self._deployment_name = None
        self._max_ongoing_requests = None
        self._autoscaling_enabled = None
        self._min_replicas = None
        self._max_replicas = None
        self._target_ongoing_requests = None
        self._num_replicas = None
        self.discriminator = None

        self.service_version_id = service_version_id
        self.application_name = application_name
        self.deployment_name = deployment_name
        if max_ongoing_requests is not None:
            self.max_ongoing_requests = max_ongoing_requests
        self.autoscaling_enabled = autoscaling_enabled
        if min_replicas is not None:
            self.min_replicas = min_replicas
        if max_replicas is not None:
            self.max_replicas = max_replicas
        if target_ongoing_requests is not None:
            self.target_ongoing_requests = target_ongoing_requests
        if num_replicas is not None:
            self.num_replicas = num_replicas

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

        Id of the Service Version  # noqa: E501

        :return: The service_version_id of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: str
        """
        return self._service_version_id

    @service_version_id.setter
    def service_version_id(self, service_version_id):
        """Sets the service_version_id of this ApplyAutoscalingConfigUpdateModel.

        Id of the Service Version  # noqa: E501

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

        self._service_version_id = service_version_id

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

        Name of the Application  # noqa: E501

        :return: The application_name of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: str
        """
        return self._application_name

    @application_name.setter
    def application_name(self, application_name):
        """Sets the application_name of this ApplyAutoscalingConfigUpdateModel.

        Name of the Application  # noqa: E501

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

        self._application_name = application_name

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

        Name of the Deployment  # noqa: E501

        :return: The deployment_name of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: str
        """
        return self._deployment_name

    @deployment_name.setter
    def deployment_name(self, deployment_name):
        """Sets the deployment_name of this ApplyAutoscalingConfigUpdateModel.

        Name of the Deployment  # noqa: E501

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

        self._deployment_name = deployment_name

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

        Maximum number of ongoing requests per deployment  # noqa: E501

        :return: The max_ongoing_requests of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: int
        """
        return self._max_ongoing_requests

    @max_ongoing_requests.setter
    def max_ongoing_requests(self, max_ongoing_requests):
        """Sets the max_ongoing_requests of this ApplyAutoscalingConfigUpdateModel.

        Maximum number of ongoing requests per deployment  # noqa: E501

        :param max_ongoing_requests: The max_ongoing_requests of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :type: int
        """

        self._max_ongoing_requests = max_ongoing_requests

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

        Whether the autoscaling is enabled  # noqa: E501

        :return: The autoscaling_enabled of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: bool
        """
        return self._autoscaling_enabled

    @autoscaling_enabled.setter
    def autoscaling_enabled(self, autoscaling_enabled):
        """Sets the autoscaling_enabled of this ApplyAutoscalingConfigUpdateModel.

        Whether the autoscaling is enabled  # noqa: E501

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

        self._autoscaling_enabled = autoscaling_enabled

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

        Minimum number of replicas  # noqa: E501

        :return: The min_replicas of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: int
        """
        return self._min_replicas

    @min_replicas.setter
    def min_replicas(self, min_replicas):
        """Sets the min_replicas of this ApplyAutoscalingConfigUpdateModel.

        Minimum number of replicas  # noqa: E501

        :param min_replicas: The min_replicas of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :type: int
        """

        self._min_replicas = min_replicas

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

        Maximum number of replicas  # noqa: E501

        :return: The max_replicas of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: int
        """
        return self._max_replicas

    @max_replicas.setter
    def max_replicas(self, max_replicas):
        """Sets the max_replicas of this ApplyAutoscalingConfigUpdateModel.

        Maximum number of replicas  # noqa: E501

        :param max_replicas: The max_replicas of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :type: int
        """

        self._max_replicas = max_replicas

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

        Target number of ongoing requests per deployment  # noqa: E501

        :return: The target_ongoing_requests of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: int
        """
        return self._target_ongoing_requests

    @target_ongoing_requests.setter
    def target_ongoing_requests(self, target_ongoing_requests):
        """Sets the target_ongoing_requests of this ApplyAutoscalingConfigUpdateModel.

        Target number of ongoing requests per deployment  # noqa: E501

        :param target_ongoing_requests: The target_ongoing_requests of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :type: int
        """

        self._target_ongoing_requests = target_ongoing_requests

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

        Number of replicas  # noqa: E501

        :return: The num_replicas of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :rtype: object
        """
        return self._num_replicas

    @num_replicas.setter
    def num_replicas(self, num_replicas):
        """Sets the num_replicas of this ApplyAutoscalingConfigUpdateModel.

        Number of replicas  # noqa: E501

        :param num_replicas: The num_replicas of this ApplyAutoscalingConfigUpdateModel.  # noqa: E501
        :type: object
        """

        self._num_replicas = num_replicas

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

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