# coding: utf-8

"""
    directconnect

    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 CreateDirectConnectTrafficQosRuleRequest(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 = {
        'client_token': 'str',
        'description': 'str',
        'destination_cidr_block': 'str',
        'destination_port_end': 'int',
        'destination_port_start': 'int',
        'direct_connect_traffic_qos_policy_id': 'str',
        'direct_connect_traffic_qos_queue_id': 'str',
        'direct_connect_traffic_qos_rule_name': 'str',
        'match_dscp': 'int',
        'priority': 'str',
        'protocol': 'str',
        'remarking_dscp': 'int',
        'source_cidr_block': 'str',
        'source_port_end': 'int',
        'source_port_start': 'int'
    }

    attribute_map = {
        'client_token': 'ClientToken',
        'description': 'Description',
        'destination_cidr_block': 'DestinationCidrBlock',
        'destination_port_end': 'DestinationPortEnd',
        'destination_port_start': 'DestinationPortStart',
        'direct_connect_traffic_qos_policy_id': 'DirectConnectTrafficQosPolicyId',
        'direct_connect_traffic_qos_queue_id': 'DirectConnectTrafficQosQueueId',
        'direct_connect_traffic_qos_rule_name': 'DirectConnectTrafficQosRuleName',
        'match_dscp': 'MatchDscp',
        'priority': 'Priority',
        'protocol': 'Protocol',
        'remarking_dscp': 'RemarkingDscp',
        'source_cidr_block': 'SourceCidrBlock',
        'source_port_end': 'SourcePortEnd',
        'source_port_start': 'SourcePortStart'
    }

    def __init__(self, client_token=None, description=None, destination_cidr_block=None, destination_port_end=None, destination_port_start=None, direct_connect_traffic_qos_policy_id=None, direct_connect_traffic_qos_queue_id=None, direct_connect_traffic_qos_rule_name=None, match_dscp=None, priority=None, protocol=None, remarking_dscp=None, source_cidr_block=None, source_port_end=None, source_port_start=None, _configuration=None):  # noqa: E501
        """CreateDirectConnectTrafficQosRuleRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._client_token = None
        self._description = None
        self._destination_cidr_block = None
        self._destination_port_end = None
        self._destination_port_start = None
        self._direct_connect_traffic_qos_policy_id = None
        self._direct_connect_traffic_qos_queue_id = None
        self._direct_connect_traffic_qos_rule_name = None
        self._match_dscp = None
        self._priority = None
        self._protocol = None
        self._remarking_dscp = None
        self._source_cidr_block = None
        self._source_port_end = None
        self._source_port_start = None
        self.discriminator = None

        if client_token is not None:
            self.client_token = client_token
        if description is not None:
            self.description = description
        self.destination_cidr_block = destination_cidr_block
        self.destination_port_end = destination_port_end
        self.destination_port_start = destination_port_start
        self.direct_connect_traffic_qos_policy_id = direct_connect_traffic_qos_policy_id
        self.direct_connect_traffic_qos_queue_id = direct_connect_traffic_qos_queue_id
        if direct_connect_traffic_qos_rule_name is not None:
            self.direct_connect_traffic_qos_rule_name = direct_connect_traffic_qos_rule_name
        if match_dscp is not None:
            self.match_dscp = match_dscp
        self.priority = priority
        if protocol is not None:
            self.protocol = protocol
        if remarking_dscp is not None:
            self.remarking_dscp = remarking_dscp
        self.source_cidr_block = source_cidr_block
        self.source_port_end = source_port_end
        self.source_port_start = source_port_start

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


        :return: The client_token of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._client_token

    @client_token.setter
    def client_token(self, client_token):
        """Sets the client_token of this CreateDirectConnectTrafficQosRuleRequest.


        :param client_token: The client_token of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :type: str
        """

        self._client_token = client_token

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


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

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


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

        self._description = description

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


        :return: The destination_cidr_block of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._destination_cidr_block

    @destination_cidr_block.setter
    def destination_cidr_block(self, destination_cidr_block):
        """Sets the destination_cidr_block of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._destination_cidr_block = destination_cidr_block

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


        :return: The destination_port_end of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._destination_port_end

    @destination_port_end.setter
    def destination_port_end(self, destination_port_end):
        """Sets the destination_port_end of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._destination_port_end = destination_port_end

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


        :return: The destination_port_start of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._destination_port_start

    @destination_port_start.setter
    def destination_port_start(self, destination_port_start):
        """Sets the destination_port_start of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._destination_port_start = destination_port_start

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


        :return: The direct_connect_traffic_qos_policy_id of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._direct_connect_traffic_qos_policy_id

    @direct_connect_traffic_qos_policy_id.setter
    def direct_connect_traffic_qos_policy_id(self, direct_connect_traffic_qos_policy_id):
        """Sets the direct_connect_traffic_qos_policy_id of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._direct_connect_traffic_qos_policy_id = direct_connect_traffic_qos_policy_id

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


        :return: The direct_connect_traffic_qos_queue_id of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._direct_connect_traffic_qos_queue_id

    @direct_connect_traffic_qos_queue_id.setter
    def direct_connect_traffic_qos_queue_id(self, direct_connect_traffic_qos_queue_id):
        """Sets the direct_connect_traffic_qos_queue_id of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._direct_connect_traffic_qos_queue_id = direct_connect_traffic_qos_queue_id

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


        :return: The direct_connect_traffic_qos_rule_name of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._direct_connect_traffic_qos_rule_name

    @direct_connect_traffic_qos_rule_name.setter
    def direct_connect_traffic_qos_rule_name(self, direct_connect_traffic_qos_rule_name):
        """Sets the direct_connect_traffic_qos_rule_name of this CreateDirectConnectTrafficQosRuleRequest.


        :param direct_connect_traffic_qos_rule_name: The direct_connect_traffic_qos_rule_name of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :type: str
        """

        self._direct_connect_traffic_qos_rule_name = direct_connect_traffic_qos_rule_name

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


        :return: The match_dscp of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._match_dscp

    @match_dscp.setter
    def match_dscp(self, match_dscp):
        """Sets the match_dscp of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._match_dscp = match_dscp

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


        :return: The priority of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._priority

    @priority.setter
    def priority(self, priority):
        """Sets the priority of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._priority = priority

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


        :return: The protocol of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._protocol

    @protocol.setter
    def protocol(self, protocol):
        """Sets the protocol of this CreateDirectConnectTrafficQosRuleRequest.


        :param protocol: The protocol of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :type: str
        """

        self._protocol = protocol

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


        :return: The remarking_dscp of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._remarking_dscp

    @remarking_dscp.setter
    def remarking_dscp(self, remarking_dscp):
        """Sets the remarking_dscp of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._remarking_dscp = remarking_dscp

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


        :return: The source_cidr_block of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: str
        """
        return self._source_cidr_block

    @source_cidr_block.setter
    def source_cidr_block(self, source_cidr_block):
        """Sets the source_cidr_block of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._source_cidr_block = source_cidr_block

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


        :return: The source_port_end of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._source_port_end

    @source_port_end.setter
    def source_port_end(self, source_port_end):
        """Sets the source_port_end of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._source_port_end = source_port_end

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


        :return: The source_port_start of this CreateDirectConnectTrafficQosRuleRequest.  # noqa: E501
        :rtype: int
        """
        return self._source_port_start

    @source_port_start.setter
    def source_port_start(self, source_port_start):
        """Sets the source_port_start of this CreateDirectConnectTrafficQosRuleRequest.


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

        self._source_port_start = source_port_start

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

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