# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class MeshPolicySpec(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 = {
        'origin_is_optional': 'object',
        'origins': 'object',
        'peer_is_optional': 'object',
        'peers': 'object',
        'principal_binding': 'object',
        'targets': 'object'
    }

    attribute_map = {
        'origin_is_optional': 'originIsOptional',
        'origins': 'origins',
        'peer_is_optional': 'peerIsOptional',
        'peers': 'peers',
        'principal_binding': 'principalBinding',
        'targets': 'targets'
    }

    def __init__(self, origin_is_optional=None, origins=None, peer_is_optional=None, peers=None, principal_binding=None, targets=None):  # noqa: E501
        """MeshPolicySpec - a model defined in Swagger"""  # noqa: E501
        self._origin_is_optional = None
        self._origins = None
        self._peer_is_optional = None
        self._peers = None
        self._principal_binding = None
        self._targets = None
        self.discriminator = None
        if origin_is_optional is not None:
            self.origin_is_optional = origin_is_optional
        if origins is not None:
            self.origins = origins
        if peer_is_optional is not None:
            self.peer_is_optional = peer_is_optional
        if peers is not None:
            self.peers = peers
        if principal_binding is not None:
            self.principal_binding = principal_binding
        if targets is not None:
            self.targets = targets

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


        :return: The origin_is_optional of this MeshPolicySpec.  # noqa: E501
        :rtype: object
        """
        return self._origin_is_optional

    @origin_is_optional.setter
    def origin_is_optional(self, origin_is_optional):
        """Sets the origin_is_optional of this MeshPolicySpec.


        :param origin_is_optional: The origin_is_optional of this MeshPolicySpec.  # noqa: E501
        :type: object
        """

        self._origin_is_optional = origin_is_optional

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


        :return: The origins of this MeshPolicySpec.  # noqa: E501
        :rtype: object
        """
        return self._origins

    @origins.setter
    def origins(self, origins):
        """Sets the origins of this MeshPolicySpec.


        :param origins: The origins of this MeshPolicySpec.  # noqa: E501
        :type: object
        """

        self._origins = origins

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


        :return: The peer_is_optional of this MeshPolicySpec.  # noqa: E501
        :rtype: object
        """
        return self._peer_is_optional

    @peer_is_optional.setter
    def peer_is_optional(self, peer_is_optional):
        """Sets the peer_is_optional of this MeshPolicySpec.


        :param peer_is_optional: The peer_is_optional of this MeshPolicySpec.  # noqa: E501
        :type: object
        """

        self._peer_is_optional = peer_is_optional

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


        :return: The peers of this MeshPolicySpec.  # noqa: E501
        :rtype: object
        """
        return self._peers

    @peers.setter
    def peers(self, peers):
        """Sets the peers of this MeshPolicySpec.


        :param peers: The peers of this MeshPolicySpec.  # noqa: E501
        :type: object
        """

        self._peers = peers

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


        :return: The principal_binding of this MeshPolicySpec.  # noqa: E501
        :rtype: object
        """
        return self._principal_binding

    @principal_binding.setter
    def principal_binding(self, principal_binding):
        """Sets the principal_binding of this MeshPolicySpec.


        :param principal_binding: The principal_binding of this MeshPolicySpec.  # noqa: E501
        :type: object
        """

        self._principal_binding = principal_binding

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


        :return: The targets of this MeshPolicySpec.  # noqa: E501
        :rtype: object
        """
        return self._targets

    @targets.setter
    def targets(self, targets):
        """Sets the targets of this MeshPolicySpec.


        :param targets: The targets of this MeshPolicySpec.  # noqa: E501
        :type: object
        """

        self._targets = targets

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

        return self.__dict__ == other.__dict__

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