# coding: utf-8

"""
    CloudCheckr API

    CloudCheckr API  # noqa: E501

    OpenAPI spec version: v1
    Contact: support@cloudcheckr.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class GeneralAccountResponseModel(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 = {
        'legacy_account_id': 'str',
        'parent_id': 'str',
        'provider_identifier': 'str',
        'provider_sub_type': 'str',
        'provider_payment_type': 'str',
        'payer_identifier': 'str',
        'friendly_name': 'str',
        'new_parent_assignment': 'ParentAssignment',
        'associated_account_attributes': 'list[AccountAttributeBasicInfo]',
        'type': 'str',
        'provider': 'str',
        'has_pending_change': 'bool',
        'id': 'str',
        'name': 'str'
    }

    attribute_map = {
        'legacy_account_id': 'legacyAccountId',
        'parent_id': 'parentId',
        'provider_identifier': 'providerIdentifier',
        'provider_sub_type': 'providerSubType',
        'provider_payment_type': 'providerPaymentType',
        'payer_identifier': 'payerIdentifier',
        'friendly_name': 'friendlyName',
        'new_parent_assignment': 'newParentAssignment',
        'associated_account_attributes': 'associatedAccountAttributes',
        'type': 'type',
        'provider': 'provider',
        'has_pending_change': 'hasPendingChange',
        'id': 'id',
        'name': 'name'
    }

    def __init__(self, legacy_account_id=None, parent_id=None, provider_identifier=None, provider_sub_type=None, provider_payment_type=None, payer_identifier=None, friendly_name=None, new_parent_assignment=None, associated_account_attributes=None, type=None, provider=None, has_pending_change=None, id=None, name=None):  # noqa: E501
        """GeneralAccountResponseModel - a model defined in Swagger"""  # noqa: E501

        self._legacy_account_id = None
        self._parent_id = None
        self._provider_identifier = None
        self._provider_sub_type = None
        self._provider_payment_type = None
        self._payer_identifier = None
        self._friendly_name = None
        self._new_parent_assignment = None
        self._associated_account_attributes = None
        self._type = None
        self._provider = None
        self._has_pending_change = None
        self._id = None
        self._name = None
        self.discriminator = None

        if legacy_account_id is not None:
            self.legacy_account_id = legacy_account_id
        if parent_id is not None:
            self.parent_id = parent_id
        if provider_identifier is not None:
            self.provider_identifier = provider_identifier
        if provider_sub_type is not None:
            self.provider_sub_type = provider_sub_type
        if provider_payment_type is not None:
            self.provider_payment_type = provider_payment_type
        if payer_identifier is not None:
            self.payer_identifier = payer_identifier
        if friendly_name is not None:
            self.friendly_name = friendly_name
        if new_parent_assignment is not None:
            self.new_parent_assignment = new_parent_assignment
        if associated_account_attributes is not None:
            self.associated_account_attributes = associated_account_attributes
        if type is not None:
            self.type = type
        if provider is not None:
            self.provider = provider
        if has_pending_change is not None:
            self.has_pending_change = has_pending_change
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name

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

        The legacy account's ID.  # noqa: E501

        :return: The legacy_account_id of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._legacy_account_id

    @legacy_account_id.setter
    def legacy_account_id(self, legacy_account_id):
        """Sets the legacy_account_id of this GeneralAccountResponseModel.

        The legacy account's ID.  # noqa: E501

        :param legacy_account_id: The legacy_account_id of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """

        self._legacy_account_id = legacy_account_id

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

        The account's parent.  # noqa: E501

        :return: The parent_id of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._parent_id

    @parent_id.setter
    def parent_id(self, parent_id):
        """Sets the parent_id of this GeneralAccountResponseModel.

        The account's parent.  # noqa: E501

        :param parent_id: The parent_id of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """

        self._parent_id = parent_id

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

        The account's cloud provider identifier.  # noqa: E501

        :return: The provider_identifier of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._provider_identifier

    @provider_identifier.setter
    def provider_identifier(self, provider_identifier):
        """Sets the provider_identifier of this GeneralAccountResponseModel.

        The account's cloud provider identifier.  # noqa: E501

        :param provider_identifier: The provider_identifier of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """

        self._provider_identifier = provider_identifier

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

        The account's cloud provider sub-type.  # noqa: E501

        :return: The provider_sub_type of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._provider_sub_type

    @provider_sub_type.setter
    def provider_sub_type(self, provider_sub_type):
        """Sets the provider_sub_type of this GeneralAccountResponseModel.

        The account's cloud provider sub-type.  # noqa: E501

        :param provider_sub_type: The provider_sub_type of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """

        self._provider_sub_type = provider_sub_type

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

        The account's payment model.  # noqa: E501

        :return: The provider_payment_type of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._provider_payment_type

    @provider_payment_type.setter
    def provider_payment_type(self, provider_payment_type):
        """Sets the provider_payment_type of this GeneralAccountResponseModel.

        The account's payment model.  # noqa: E501

        :param provider_payment_type: The provider_payment_type of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """
        allowed_values = ["Payer", "Payee"]  # noqa: E501
        if provider_payment_type not in allowed_values:
            raise ValueError(
                "Invalid value for `provider_payment_type` ({0}), must be one of {1}"  # noqa: E501
                .format(provider_payment_type, allowed_values)
            )

        self._provider_payment_type = provider_payment_type

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

        The account's payer identifier.  # noqa: E501

        :return: The payer_identifier of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._payer_identifier

    @payer_identifier.setter
    def payer_identifier(self, payer_identifier):
        """Sets the payer_identifier of this GeneralAccountResponseModel.

        The account's payer identifier.  # noqa: E501

        :param payer_identifier: The payer_identifier of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """

        self._payer_identifier = payer_identifier

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

        The account's friendly name.  # noqa: E501

        :return: The friendly_name of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._friendly_name

    @friendly_name.setter
    def friendly_name(self, friendly_name):
        """Sets the friendly_name of this GeneralAccountResponseModel.

        The account's friendly name.  # noqa: E501

        :param friendly_name: The friendly_name of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """

        self._friendly_name = friendly_name

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

        The account group's parent assignment results.  # noqa: E501

        :return: The new_parent_assignment of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: ParentAssignment
        """
        return self._new_parent_assignment

    @new_parent_assignment.setter
    def new_parent_assignment(self, new_parent_assignment):
        """Sets the new_parent_assignment of this GeneralAccountResponseModel.

        The account group's parent assignment results.  # noqa: E501

        :param new_parent_assignment: The new_parent_assignment of this GeneralAccountResponseModel.  # noqa: E501
        :type: ParentAssignment
        """

        self._new_parent_assignment = new_parent_assignment

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

        Associated account attributes.  # noqa: E501

        :return: The associated_account_attributes of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: list[AccountAttributeBasicInfo]
        """
        return self._associated_account_attributes

    @associated_account_attributes.setter
    def associated_account_attributes(self, associated_account_attributes):
        """Sets the associated_account_attributes of this GeneralAccountResponseModel.

        Associated account attributes.  # noqa: E501

        :param associated_account_attributes: The associated_account_attributes of this GeneralAccountResponseModel.  # noqa: E501
        :type: list[AccountAttributeBasicInfo]
        """

        self._associated_account_attributes = associated_account_attributes

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

        The account group's type. Valid types are General, Group, and MAV. This property supports: sorting.  # noqa: E501

        :return: The type of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this GeneralAccountResponseModel.

        The account group's type. Valid types are General, Group, and MAV. This property supports: sorting.  # noqa: E501

        :param type: The type of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """
        allowed_values = ["Group", "General", "MAV"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

        The account's cloud provider.  # noqa: E501

        :return: The provider of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: str
        """
        return self._provider

    @provider.setter
    def provider(self, provider):
        """Sets the provider of this GeneralAccountResponseModel.

        The account's cloud provider.  # noqa: E501

        :param provider: The provider of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """

        self._provider = provider

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

        True if the account has a pending change.  # noqa: E501

        :return: The has_pending_change of this GeneralAccountResponseModel.  # noqa: E501
        :rtype: bool
        """
        return self._has_pending_change

    @has_pending_change.setter
    def has_pending_change(self, has_pending_change):
        """Sets the has_pending_change of this GeneralAccountResponseModel.

        True if the account has a pending change.  # noqa: E501

        :param has_pending_change: The has_pending_change of this GeneralAccountResponseModel.  # noqa: E501
        :type: bool
        """

        self._has_pending_change = has_pending_change

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

        The account's ID.  # noqa: E501

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

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

        The account's ID.  # noqa: E501

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

        self._id = id

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

        The account's name.  # noqa: E501

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

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

        The account's name.  # noqa: E501

        :param name: The name of this GeneralAccountResponseModel.  # noqa: E501
        :type: str
        """

        self._name = name

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

        return self.__dict__ == other.__dict__

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