# coding: utf-8

"""
    fwcenter

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

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


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class AddAddressBookRequest(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 = {
        'address_detail_list': 'list[AddressDetailListForAddAddressBookInput]',
        'address_list': 'list[str]',
        'auto_update_type': 'str',
        'cloud_firewall_id': 'str',
        'description': 'str',
        'group_name': 'str',
        'group_type': 'str',
        'instance_type_list': 'list[str]',
        'resource_type': 'str',
        'tag_relation': 'str',
        'tags': 'list[TagForAddAddressBookInput]'
    }

    attribute_map = {
        'address_detail_list': 'AddressDetailList',
        'address_list': 'AddressList',
        'auto_update_type': 'AutoUpdateType',
        'cloud_firewall_id': 'CloudFirewallId',
        'description': 'Description',
        'group_name': 'GroupName',
        'group_type': 'GroupType',
        'instance_type_list': 'InstanceTypeList',
        'resource_type': 'ResourceType',
        'tag_relation': 'TagRelation',
        'tags': 'Tags'
    }

    def __init__(self, address_detail_list=None, address_list=None, auto_update_type=None, cloud_firewall_id=None, description=None, group_name=None, group_type=None, instance_type_list=None, resource_type=None, tag_relation=None, tags=None, _configuration=None):  # noqa: E501
        """AddAddressBookRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._address_detail_list = None
        self._address_list = None
        self._auto_update_type = None
        self._cloud_firewall_id = None
        self._description = None
        self._group_name = None
        self._group_type = None
        self._instance_type_list = None
        self._resource_type = None
        self._tag_relation = None
        self._tags = None
        self.discriminator = None

        if address_detail_list is not None:
            self.address_detail_list = address_detail_list
        if address_list is not None:
            self.address_list = address_list
        if auto_update_type is not None:
            self.auto_update_type = auto_update_type
        if cloud_firewall_id is not None:
            self.cloud_firewall_id = cloud_firewall_id
        if description is not None:
            self.description = description
        self.group_name = group_name
        self.group_type = group_type
        if instance_type_list is not None:
            self.instance_type_list = instance_type_list
        if resource_type is not None:
            self.resource_type = resource_type
        if tag_relation is not None:
            self.tag_relation = tag_relation
        if tags is not None:
            self.tags = tags

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


        :return: The address_detail_list of this AddAddressBookRequest.  # noqa: E501
        :rtype: list[AddressDetailListForAddAddressBookInput]
        """
        return self._address_detail_list

    @address_detail_list.setter
    def address_detail_list(self, address_detail_list):
        """Sets the address_detail_list of this AddAddressBookRequest.


        :param address_detail_list: The address_detail_list of this AddAddressBookRequest.  # noqa: E501
        :type: list[AddressDetailListForAddAddressBookInput]
        """

        self._address_detail_list = address_detail_list

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


        :return: The address_list of this AddAddressBookRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._address_list

    @address_list.setter
    def address_list(self, address_list):
        """Sets the address_list of this AddAddressBookRequest.


        :param address_list: The address_list of this AddAddressBookRequest.  # noqa: E501
        :type: list[str]
        """

        self._address_list = address_list

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


        :return: The auto_update_type of this AddAddressBookRequest.  # noqa: E501
        :rtype: str
        """
        return self._auto_update_type

    @auto_update_type.setter
    def auto_update_type(self, auto_update_type):
        """Sets the auto_update_type of this AddAddressBookRequest.


        :param auto_update_type: The auto_update_type of this AddAddressBookRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["Manual", "Tag"]  # noqa: E501
        if (self._configuration.client_side_validation and
                auto_update_type not in allowed_values):
            raise ValueError(
                "Invalid value for `auto_update_type` ({0}), must be one of {1}"  # noqa: E501
                .format(auto_update_type, allowed_values)
            )

        self._auto_update_type = auto_update_type

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


        :return: The cloud_firewall_id of this AddAddressBookRequest.  # noqa: E501
        :rtype: str
        """
        return self._cloud_firewall_id

    @cloud_firewall_id.setter
    def cloud_firewall_id(self, cloud_firewall_id):
        """Sets the cloud_firewall_id of this AddAddressBookRequest.


        :param cloud_firewall_id: The cloud_firewall_id of this AddAddressBookRequest.  # noqa: E501
        :type: str
        """

        self._cloud_firewall_id = cloud_firewall_id

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


        :return: The description of this AddAddressBookRequest.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this AddAddressBookRequest.


        :param description: The description of this AddAddressBookRequest.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The group_name of this AddAddressBookRequest.  # noqa: E501
        :rtype: str
        """
        return self._group_name

    @group_name.setter
    def group_name(self, group_name):
        """Sets the group_name of this AddAddressBookRequest.


        :param group_name: The group_name of this AddAddressBookRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and group_name is None:
            raise ValueError("Invalid value for `group_name`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                group_name is not None and len(group_name) > 64):
            raise ValueError("Invalid value for `group_name`, length must be less than or equal to `64`")  # noqa: E501

        self._group_name = group_name

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


        :return: The group_type of this AddAddressBookRequest.  # noqa: E501
        :rtype: str
        """
        return self._group_type

    @group_type.setter
    def group_type(self, group_type):
        """Sets the group_type of this AddAddressBookRequest.


        :param group_type: The group_type of this AddAddressBookRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and group_type is None:
            raise ValueError("Invalid value for `group_type`, must not be `None`")  # noqa: E501
        allowed_values = ["ip", "ipv6", "domain", "port"]  # noqa: E501
        if (self._configuration.client_side_validation and
                group_type not in allowed_values):
            raise ValueError(
                "Invalid value for `group_type` ({0}), must be one of {1}"  # noqa: E501
                .format(group_type, allowed_values)
            )

        self._group_type = group_type

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


        :return: The instance_type_list of this AddAddressBookRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._instance_type_list

    @instance_type_list.setter
    def instance_type_list(self, instance_type_list):
        """Sets the instance_type_list of this AddAddressBookRequest.


        :param instance_type_list: The instance_type_list of this AddAddressBookRequest.  # noqa: E501
        :type: list[str]
        """

        self._instance_type_list = instance_type_list

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


        :return: The resource_type of this AddAddressBookRequest.  # noqa: E501
        :rtype: str
        """
        return self._resource_type

    @resource_type.setter
    def resource_type(self, resource_type):
        """Sets the resource_type of this AddAddressBookRequest.


        :param resource_type: The resource_type of this AddAddressBookRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["Eip", "InternetAsset"]  # noqa: E501
        if (self._configuration.client_side_validation and
                resource_type not in allowed_values):
            raise ValueError(
                "Invalid value for `resource_type` ({0}), must be one of {1}"  # noqa: E501
                .format(resource_type, allowed_values)
            )

        self._resource_type = resource_type

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


        :return: The tag_relation of this AddAddressBookRequest.  # noqa: E501
        :rtype: str
        """
        return self._tag_relation

    @tag_relation.setter
    def tag_relation(self, tag_relation):
        """Sets the tag_relation of this AddAddressBookRequest.


        :param tag_relation: The tag_relation of this AddAddressBookRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["And", "Or"]  # noqa: E501
        if (self._configuration.client_side_validation and
                tag_relation not in allowed_values):
            raise ValueError(
                "Invalid value for `tag_relation` ({0}), must be one of {1}"  # noqa: E501
                .format(tag_relation, allowed_values)
            )

        self._tag_relation = tag_relation

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


        :return: The tags of this AddAddressBookRequest.  # noqa: E501
        :rtype: list[TagForAddAddressBookInput]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this AddAddressBookRequest.


        :param tags: The tags of this AddAddressBookRequest.  # noqa: E501
        :type: list[TagForAddAddressBookInput]
        """

        self._tags = tags

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
