# coding: utf-8

"""
    acep

    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 CreateDNSRuleRequest(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 = {
        'dns_name': 'str',
        'dc': 'str',
        'ip_list': 'list[IPListForCreateDNSRuleInput]',
        'product_id': 'str',
        'type': 'int'
    }

    attribute_map = {
        'dns_name': 'DNSName',
        'dc': 'Dc',
        'ip_list': 'IPList',
        'product_id': 'ProductId',
        'type': 'Type'
    }

    def __init__(self, dns_name=None, dc=None, ip_list=None, product_id=None, type=None, _configuration=None):  # noqa: E501
        """CreateDNSRuleRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._dns_name = None
        self._dc = None
        self._ip_list = None
        self._product_id = None
        self._type = None
        self.discriminator = None

        if dns_name is not None:
            self.dns_name = dns_name
        self.dc = dc
        if ip_list is not None:
            self.ip_list = ip_list
        self.product_id = product_id
        if type is not None:
            self.type = type

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


        :return: The dns_name of this CreateDNSRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._dns_name

    @dns_name.setter
    def dns_name(self, dns_name):
        """Sets the dns_name of this CreateDNSRuleRequest.


        :param dns_name: The dns_name of this CreateDNSRuleRequest.  # noqa: E501
        :type: str
        """

        self._dns_name = dns_name

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


        :return: The dc of this CreateDNSRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._dc

    @dc.setter
    def dc(self, dc):
        """Sets the dc of this CreateDNSRuleRequest.


        :param dc: The dc of this CreateDNSRuleRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and dc is None:
            raise ValueError("Invalid value for `dc`, must not be `None`")  # noqa: E501

        self._dc = dc

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


        :return: The ip_list of this CreateDNSRuleRequest.  # noqa: E501
        :rtype: list[IPListForCreateDNSRuleInput]
        """
        return self._ip_list

    @ip_list.setter
    def ip_list(self, ip_list):
        """Sets the ip_list of this CreateDNSRuleRequest.


        :param ip_list: The ip_list of this CreateDNSRuleRequest.  # noqa: E501
        :type: list[IPListForCreateDNSRuleInput]
        """

        self._ip_list = ip_list

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


        :return: The product_id of this CreateDNSRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._product_id

    @product_id.setter
    def product_id(self, product_id):
        """Sets the product_id of this CreateDNSRuleRequest.


        :param product_id: The product_id of this CreateDNSRuleRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and product_id is None:
            raise ValueError("Invalid value for `product_id`, must not be `None`")  # noqa: E501

        self._product_id = product_id

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


        :return: The type of this CreateDNSRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._type

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


        :param type: The type of this CreateDNSRuleRequest.  # noqa: E501
        :type: int
        """

        self._type = type

    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(CreateDNSRuleRequest, 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, CreateDNSRuleRequest):
            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, CreateDNSRuleRequest):
            return True

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