# coding: utf-8

"""
    dms20250101

    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 CreateAddressRequest(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_access_config': 'AddressAccessConfigForCreateAddressInput',
        'address_name': 'str',
        'address_type': 'str',
        'protocol_type': 'str'
    }

    attribute_map = {
        'address_access_config': 'AddressAccessConfig',
        'address_name': 'AddressName',
        'address_type': 'AddressType',
        'protocol_type': 'ProtocolType'
    }

    def __init__(self, address_access_config=None, address_name=None, address_type=None, protocol_type=None, _configuration=None):  # noqa: E501
        """CreateAddressRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._address_access_config = None
        self._address_name = None
        self._address_type = None
        self._protocol_type = None
        self.discriminator = None

        if address_access_config is not None:
            self.address_access_config = address_access_config
        self.address_name = address_name
        self.address_type = address_type
        self.protocol_type = protocol_type

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


        :return: The address_access_config of this CreateAddressRequest.  # noqa: E501
        :rtype: AddressAccessConfigForCreateAddressInput
        """
        return self._address_access_config

    @address_access_config.setter
    def address_access_config(self, address_access_config):
        """Sets the address_access_config of this CreateAddressRequest.


        :param address_access_config: The address_access_config of this CreateAddressRequest.  # noqa: E501
        :type: AddressAccessConfigForCreateAddressInput
        """

        self._address_access_config = address_access_config

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


        :return: The address_name of this CreateAddressRequest.  # noqa: E501
        :rtype: str
        """
        return self._address_name

    @address_name.setter
    def address_name(self, address_name):
        """Sets the address_name of this CreateAddressRequest.


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

        self._address_name = address_name

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


        :return: The address_type of this CreateAddressRequest.  # noqa: E501
        :rtype: str
        """
        return self._address_type

    @address_type.setter
    def address_type(self, address_type):
        """Sets the address_type of this CreateAddressRequest.


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

        self._address_type = address_type

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


        :return: The protocol_type of this CreateAddressRequest.  # noqa: E501
        :rtype: str
        """
        return self._protocol_type

    @protocol_type.setter
    def protocol_type(self, protocol_type):
        """Sets the protocol_type of this CreateAddressRequest.


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

        self._protocol_type = protocol_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(CreateAddressRequest, 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, CreateAddressRequest):
            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, CreateAddressRequest):
            return True

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