# coding: utf-8

"""
    VPlex REST API

    A defnition for the next-gen VPlex API  # noqa: E501

    OpenAPI spec version: 0.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class DistributedDevicePayload(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 = {
        'name': 'str',
        'primary_leg': 'str',
        'secondary_leg': 'str',
        'rule_set': 'str',
        'sync': 'bool'
    }

    attribute_map = {
        'name': 'name',
        'primary_leg': 'primary_leg',
        'secondary_leg': 'secondary_leg',
        'rule_set': 'rule_set',
        'sync': 'sync'
    }

    def __init__(self, name=None, primary_leg=None, secondary_leg=None, rule_set=None, sync=None):  # noqa: E501
        """DistributedDevicePayload - a model defined in Swagger"""  # noqa: E501

        self._name = None
        self._primary_leg = None
        self._secondary_leg = None
        self._rule_set = None
        self._sync = None
        self.discriminator = None

        self.name = name
        self.primary_leg = primary_leg
        self.secondary_leg = secondary_leg
        if rule_set is not None:
            self.rule_set = rule_set
        if sync is not None:
            self.sync = sync

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


        :return: The name of this DistributedDevicePayload.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this DistributedDevicePayload.


        :param name: The name of this DistributedDevicePayload.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


        :return: The primary_leg of this DistributedDevicePayload.  # noqa: E501
        :rtype: str
        """
        return self._primary_leg

    @primary_leg.setter
    def primary_leg(self, primary_leg):
        """Sets the primary_leg of this DistributedDevicePayload.


        :param primary_leg: The primary_leg of this DistributedDevicePayload.  # noqa: E501
        :type: str
        """
        if primary_leg is None:
            raise ValueError("Invalid value for `primary_leg`, must not be `None`")  # noqa: E501

        self._primary_leg = primary_leg

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


        :return: The secondary_leg of this DistributedDevicePayload.  # noqa: E501
        :rtype: str
        """
        return self._secondary_leg

    @secondary_leg.setter
    def secondary_leg(self, secondary_leg):
        """Sets the secondary_leg of this DistributedDevicePayload.


        :param secondary_leg: The secondary_leg of this DistributedDevicePayload.  # noqa: E501
        :type: str
        """
        if secondary_leg is None:
            raise ValueError("Invalid value for `secondary_leg`, must not be `None`")  # noqa: E501

        self._secondary_leg = secondary_leg

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


        :return: The rule_set of this DistributedDevicePayload.  # noqa: E501
        :rtype: str
        """
        return self._rule_set

    @rule_set.setter
    def rule_set(self, rule_set):
        """Sets the rule_set of this DistributedDevicePayload.


        :param rule_set: The rule_set of this DistributedDevicePayload.  # noqa: E501
        :type: str
        """

        self._rule_set = rule_set

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


        :return: The sync of this DistributedDevicePayload.  # noqa: E501
        :rtype: bool
        """
        return self._sync

    @sync.setter
    def sync(self, sync):
        """Sets the sync of this DistributedDevicePayload.


        :param sync: The sync of this DistributedDevicePayload.  # noqa: E501
        :type: bool
        """

        self._sync = sync

    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

        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, DistributedDevicePayload):
            return False

        return self.__dict__ == other.__dict__

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