# coding: utf-8

"""
    Pure Storage FlashBlade REST 1.10 Python SDK

    Pure Storage FlashBlade REST 1.10 Python SDK. Compatible with REST API versions 1.0 - 1.10. Developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).

    OpenAPI spec version: 1.10
    Contact: info@purestorage.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


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

    Do not edit the class manually.
    """

#BEGIN_CUSTOM
    # IR-51527: Prevent Pytest from attempting to collect this class based on name.
    __test__ = False
#END_CUSTOM

    """
    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 = {
        'id': 'str',
        'ca_certificate_group': 'FixedReferenceWithId',
        'management_address': 'str',
        'replication_addresses': 'list[str]',
        'status': 'str',
        'encrypted': 'bool',
        'remote': 'FixedReferenceNoResourceType',
        'version': 'str'
    }

    attribute_map = {
        'id': 'id',
        'ca_certificate_group': 'ca_certificate_group',
        'management_address': 'management_address',
        'replication_addresses': 'replication_addresses',
        'status': 'status',
        'encrypted': 'encrypted',
        'remote': 'remote',
        'version': 'version'
    }

    def __init__(self, id=None, ca_certificate_group=None, management_address=None, replication_addresses=None, status=None, encrypted=False, remote=None, version=None):  # noqa: E501
        """ArrayConnection - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._ca_certificate_group = None
        self._management_address = None
        self._replication_addresses = None
        self._status = None
        self._encrypted = None
        self._remote = None
        self._version = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if ca_certificate_group is not None:
            self.ca_certificate_group = ca_certificate_group
        if management_address is not None:
            self.management_address = management_address
        if replication_addresses is not None:
            self.replication_addresses = replication_addresses
        if status is not None:
            self.status = status
        if encrypted is not None:
            self.encrypted = encrypted
        if remote is not None:
            self.remote = remote
        if version is not None:
            self.version = version

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

        A non-modifiable, globally unique ID chosen by the system.  # noqa: E501

        :return: The id of this ArrayConnection.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ArrayConnection.

        A non-modifiable, globally unique ID chosen by the system.  # noqa: E501

        :param id: The id of this ArrayConnection.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The group of CA certificates that can be used, in addition to well-known Certificate Authority certificates, in order to establish a secure connection to the target array. Defaults to a reference to the _default_replication_certs group if secure_connection is true, or null otherwise.  # noqa: E501

        :return: The ca_certificate_group of this ArrayConnection.  # noqa: E501
        :rtype: FixedReferenceWithId
        """
        return self._ca_certificate_group

    @ca_certificate_group.setter
    def ca_certificate_group(self, ca_certificate_group):
        """Sets the ca_certificate_group of this ArrayConnection.

        The group of CA certificates that can be used, in addition to well-known Certificate Authority certificates, in order to establish a secure connection to the target array. Defaults to a reference to the _default_replication_certs group if secure_connection is true, or null otherwise.  # noqa: E501

        :param ca_certificate_group: The ca_certificate_group of this ArrayConnection.  # noqa: E501
        :type: FixedReferenceWithId
        """

        self._ca_certificate_group = ca_certificate_group

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

        Management address of the target array. Settable on POST only. Modifiable only on the source.  # noqa: E501

        :return: The management_address of this ArrayConnection.  # noqa: E501
        :rtype: str
        """
        return self._management_address

    @management_address.setter
    def management_address(self, management_address):
        """Sets the management_address of this ArrayConnection.

        Management address of the target array. Settable on POST only. Modifiable only on the source.  # noqa: E501

        :param management_address: The management_address of this ArrayConnection.  # noqa: E501
        :type: str
        """

        self._management_address = management_address

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

        IP addresses and/or FQDNs of the target arrays. Settable on POST only. If not set on POST, will be set to all the replication addresses available on the target array at the time of the POST.  # noqa: E501

        :return: The replication_addresses of this ArrayConnection.  # noqa: E501
        :rtype: list[str]
        """
        return self._replication_addresses

    @replication_addresses.setter
    def replication_addresses(self, replication_addresses):
        """Sets the replication_addresses of this ArrayConnection.

        IP addresses and/or FQDNs of the target arrays. Settable on POST only. If not set on POST, will be set to all the replication addresses available on the target array at the time of the POST.  # noqa: E501

        :param replication_addresses: The replication_addresses of this ArrayConnection.  # noqa: E501
        :type: list[str]
        """

        self._replication_addresses = replication_addresses

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

        Status of the connection. Valid values are `connected`, `partially_connected`, `connecting`, and `incompatible`. `connected` - The connection is OK. `partially_connected` - Some replication addresses are working, but others are not. `connecting` - No connection exists and the array is trying to reconnect. `incompatible` - The target array is not compatible.  # noqa: E501

        :return: The status of this ArrayConnection.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ArrayConnection.

        Status of the connection. Valid values are `connected`, `partially_connected`, `connecting`, and `incompatible`. `connected` - The connection is OK. `partially_connected` - Some replication addresses are working, but others are not. `connecting` - No connection exists and the array is trying to reconnect. `incompatible` - The target array is not compatible.  # noqa: E501

        :param status: The status of this ArrayConnection.  # noqa: E501
        :type: str
        """

        self._status = status

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

        If this is set to true, then all customer data replicated over the connection will be sent over an encrypted connection using TLS, or will not be sent if a secure connection cannot be established. If this is set to false, then all customer data replicated over the connection will be sent over an unencrypted connection. Defaults to false.  # noqa: E501

        :return: The encrypted of this ArrayConnection.  # noqa: E501
        :rtype: bool
        """
        return self._encrypted

    @encrypted.setter
    def encrypted(self, encrypted):
        """Sets the encrypted of this ArrayConnection.

        If this is set to true, then all customer data replicated over the connection will be sent over an encrypted connection using TLS, or will not be sent if a secure connection cannot be established. If this is set to false, then all customer data replicated over the connection will be sent over an unencrypted connection. Defaults to false.  # noqa: E501

        :param encrypted: The encrypted of this ArrayConnection.  # noqa: E501
        :type: bool
        """

        self._encrypted = encrypted

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

        The remote array.  # noqa: E501

        :return: The remote of this ArrayConnection.  # noqa: E501
        :rtype: FixedReferenceNoResourceType
        """
        return self._remote

    @remote.setter
    def remote(self, remote):
        """Sets the remote of this ArrayConnection.

        The remote array.  # noqa: E501

        :param remote: The remote of this ArrayConnection.  # noqa: E501
        :type: FixedReferenceNoResourceType
        """

        self._remote = remote

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

        The version of the target array.  # noqa: E501

        :return: The version of this ArrayConnection.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this ArrayConnection.

        The version of the target array.  # noqa: E501

        :param version: The version of this ArrayConnection.  # noqa: E501
        :type: str
        """

        self._version = version

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

        return self.__dict__ == other.__dict__

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