# 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 ModelServiceRevisionLaunchAPIInput(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 = {
        'abort_ongoing_rollouts': 'bool',
        'force': 'bool',
        'replace': 'bool',
        'replace_strategy': 'str'
    }

    attribute_map = {
        'abort_ongoing_rollouts': 'abort_ongoing_rollouts',
        'force': 'force',
        'replace': 'replace',
        'replace_strategy': 'replace_strategy'
    }

    def __init__(self, abort_ongoing_rollouts=None, force=None, replace=None, replace_strategy=None, local_vars_configuration=None):  # noqa: E501
        """ModelServiceRevisionLaunchAPIInput - 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._abort_ongoing_rollouts = None
        self._force = None
        self._replace = None
        self._replace_strategy = None
        self.discriminator = None

        if abort_ongoing_rollouts is not None:
            self.abort_ongoing_rollouts = abort_ongoing_rollouts
        self.force = force
        if replace is not None:
            self.replace = replace
        if replace_strategy is not None:
            self.replace_strategy = replace_strategy

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


        :return: The abort_ongoing_rollouts of this ModelServiceRevisionLaunchAPIInput.  # noqa: E501
        :rtype: bool
        """
        return self._abort_ongoing_rollouts

    @abort_ongoing_rollouts.setter
    def abort_ongoing_rollouts(self, abort_ongoing_rollouts):
        """Sets the abort_ongoing_rollouts of this ModelServiceRevisionLaunchAPIInput.


        :param abort_ongoing_rollouts: The abort_ongoing_rollouts of this ModelServiceRevisionLaunchAPIInput.  # noqa: E501
        :type abort_ongoing_rollouts: bool
        """

        self._abort_ongoing_rollouts = abort_ongoing_rollouts

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


        :return: The force of this ModelServiceRevisionLaunchAPIInput.  # noqa: E501
        :rtype: bool
        """
        return self._force

    @force.setter
    def force(self, force):
        """Sets the force of this ModelServiceRevisionLaunchAPIInput.


        :param force: The force of this ModelServiceRevisionLaunchAPIInput.  # noqa: E501
        :type force: bool
        """

        self._force = force

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


        :return: The replace of this ModelServiceRevisionLaunchAPIInput.  # noqa: E501
        :rtype: bool
        """
        return self._replace

    @replace.setter
    def replace(self, replace):
        """Sets the replace of this ModelServiceRevisionLaunchAPIInput.


        :param replace: The replace of this ModelServiceRevisionLaunchAPIInput.  # noqa: E501
        :type replace: bool
        """

        self._replace = replace

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


        :return: The replace_strategy of this ModelServiceRevisionLaunchAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._replace_strategy

    @replace_strategy.setter
    def replace_strategy(self, replace_strategy):
        """Sets the replace_strategy of this ModelServiceRevisionLaunchAPIInput.


        :param replace_strategy: The replace_strategy of this ModelServiceRevisionLaunchAPIInput.  # noqa: E501
        :type replace_strategy: str
        """
        allowed_values = ["", "blue-green", "clean-launch"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and replace_strategy not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `replace_strategy` ({0}), must be one of {1}"  # noqa: E501
                .format(replace_strategy, allowed_values)
            )

        self._replace_strategy = replace_strategy

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

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