# coding: utf-8

"""
    Octopus Server API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from octopus_deploy_swagger_client.models.machine_deployment_preview import MachineDeploymentPreview  # noqa: F401,E501
from octopus_deploy_swagger_client.models.reference_data_item import ReferenceDataItem  # noqa: F401,E501


class DeploymentTemplateStep(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'action_id': 'str',
        'action_name': 'str',
        'action_number': 'str',
        'roles': 'list[str]',
        'machine_names': 'list[str]',
        'machines': 'list[MachineDeploymentPreview]',
        'can_be_skipped': 'bool',
        'is_disabled': 'bool',
        'has_no_applicable_machines': 'bool',
        'unavailable_machines': 'list[ReferenceDataItem]',
        'excluded_machines': 'list[ReferenceDataItem]'
    }

    attribute_map = {
        'action_id': 'ActionId',
        'action_name': 'ActionName',
        'action_number': 'ActionNumber',
        'roles': 'Roles',
        'machine_names': 'MachineNames',
        'machines': 'Machines',
        'can_be_skipped': 'CanBeSkipped',
        'is_disabled': 'IsDisabled',
        'has_no_applicable_machines': 'HasNoApplicableMachines',
        'unavailable_machines': 'UnavailableMachines',
        'excluded_machines': 'ExcludedMachines'
    }

    def __init__(self, action_id=None, action_name=None, action_number=None, roles=None, machine_names=None, machines=None, can_be_skipped=None, is_disabled=None, has_no_applicable_machines=None, unavailable_machines=None, excluded_machines=None):  # noqa: E501
        """DeploymentTemplateStep - a model defined in Swagger"""  # noqa: E501

        self._action_id = None
        self._action_name = None
        self._action_number = None
        self._roles = None
        self._machine_names = None
        self._machines = None
        self._can_be_skipped = None
        self._is_disabled = None
        self._has_no_applicable_machines = None
        self._unavailable_machines = None
        self._excluded_machines = None
        self.discriminator = None

        if action_id is not None:
            self.action_id = action_id
        if action_name is not None:
            self.action_name = action_name
        if action_number is not None:
            self.action_number = action_number
        if roles is not None:
            self.roles = roles
        if machine_names is not None:
            self.machine_names = machine_names
        if machines is not None:
            self.machines = machines
        if can_be_skipped is not None:
            self.can_be_skipped = can_be_skipped
        if is_disabled is not None:
            self.is_disabled = is_disabled
        if has_no_applicable_machines is not None:
            self.has_no_applicable_machines = has_no_applicable_machines
        if unavailable_machines is not None:
            self.unavailable_machines = unavailable_machines
        if excluded_machines is not None:
            self.excluded_machines = excluded_machines

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


        :return: The action_id of this DeploymentTemplateStep.  # noqa: E501
        :rtype: str
        """
        return self._action_id

    @action_id.setter
    def action_id(self, action_id):
        """Sets the action_id of this DeploymentTemplateStep.


        :param action_id: The action_id of this DeploymentTemplateStep.  # noqa: E501
        :type: str
        """

        self._action_id = action_id

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


        :return: The action_name of this DeploymentTemplateStep.  # noqa: E501
        :rtype: str
        """
        return self._action_name

    @action_name.setter
    def action_name(self, action_name):
        """Sets the action_name of this DeploymentTemplateStep.


        :param action_name: The action_name of this DeploymentTemplateStep.  # noqa: E501
        :type: str
        """

        self._action_name = action_name

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


        :return: The action_number of this DeploymentTemplateStep.  # noqa: E501
        :rtype: str
        """
        return self._action_number

    @action_number.setter
    def action_number(self, action_number):
        """Sets the action_number of this DeploymentTemplateStep.


        :param action_number: The action_number of this DeploymentTemplateStep.  # noqa: E501
        :type: str
        """

        self._action_number = action_number

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


        :return: The roles of this DeploymentTemplateStep.  # noqa: E501
        :rtype: list[str]
        """
        return self._roles

    @roles.setter
    def roles(self, roles):
        """Sets the roles of this DeploymentTemplateStep.


        :param roles: The roles of this DeploymentTemplateStep.  # noqa: E501
        :type: list[str]
        """

        self._roles = roles

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


        :return: The machine_names of this DeploymentTemplateStep.  # noqa: E501
        :rtype: list[str]
        """
        return self._machine_names

    @machine_names.setter
    def machine_names(self, machine_names):
        """Sets the machine_names of this DeploymentTemplateStep.


        :param machine_names: The machine_names of this DeploymentTemplateStep.  # noqa: E501
        :type: list[str]
        """

        self._machine_names = machine_names

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


        :return: The machines of this DeploymentTemplateStep.  # noqa: E501
        :rtype: list[MachineDeploymentPreview]
        """
        return self._machines

    @machines.setter
    def machines(self, machines):
        """Sets the machines of this DeploymentTemplateStep.


        :param machines: The machines of this DeploymentTemplateStep.  # noqa: E501
        :type: list[MachineDeploymentPreview]
        """

        self._machines = machines

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


        :return: The can_be_skipped of this DeploymentTemplateStep.  # noqa: E501
        :rtype: bool
        """
        return self._can_be_skipped

    @can_be_skipped.setter
    def can_be_skipped(self, can_be_skipped):
        """Sets the can_be_skipped of this DeploymentTemplateStep.


        :param can_be_skipped: The can_be_skipped of this DeploymentTemplateStep.  # noqa: E501
        :type: bool
        """

        self._can_be_skipped = can_be_skipped

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


        :return: The is_disabled of this DeploymentTemplateStep.  # noqa: E501
        :rtype: bool
        """
        return self._is_disabled

    @is_disabled.setter
    def is_disabled(self, is_disabled):
        """Sets the is_disabled of this DeploymentTemplateStep.


        :param is_disabled: The is_disabled of this DeploymentTemplateStep.  # noqa: E501
        :type: bool
        """

        self._is_disabled = is_disabled

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


        :return: The has_no_applicable_machines of this DeploymentTemplateStep.  # noqa: E501
        :rtype: bool
        """
        return self._has_no_applicable_machines

    @has_no_applicable_machines.setter
    def has_no_applicable_machines(self, has_no_applicable_machines):
        """Sets the has_no_applicable_machines of this DeploymentTemplateStep.


        :param has_no_applicable_machines: The has_no_applicable_machines of this DeploymentTemplateStep.  # noqa: E501
        :type: bool
        """

        self._has_no_applicable_machines = has_no_applicable_machines

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


        :return: The unavailable_machines of this DeploymentTemplateStep.  # noqa: E501
        :rtype: list[ReferenceDataItem]
        """
        return self._unavailable_machines

    @unavailable_machines.setter
    def unavailable_machines(self, unavailable_machines):
        """Sets the unavailable_machines of this DeploymentTemplateStep.


        :param unavailable_machines: The unavailable_machines of this DeploymentTemplateStep.  # noqa: E501
        :type: list[ReferenceDataItem]
        """

        self._unavailable_machines = unavailable_machines

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


        :return: The excluded_machines of this DeploymentTemplateStep.  # noqa: E501
        :rtype: list[ReferenceDataItem]
        """
        return self._excluded_machines

    @excluded_machines.setter
    def excluded_machines(self, excluded_machines):
        """Sets the excluded_machines of this DeploymentTemplateStep.


        :param excluded_machines: The excluded_machines of this DeploymentTemplateStep.  # noqa: E501
        :type: list[ReferenceDataItem]
        """

        self._excluded_machines = excluded_machines

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(DeploymentTemplateStep, dict):
            for key, value in self.items():
                result[key] = 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, DeploymentTemplateStep):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
