# coding: utf-8

"""
    ga

    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 UpdateEndpointGroupRequest(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 = {
        'accelerator_id': 'str',
        'endpoint_configurations': 'list[EndpointConfigurationForUpdateEndpointGroupInput]',
        'endpoint_group_id': 'str',
        'endpoint_type': 'str',
        'healthy_config': 'HealthyConfigForUpdateEndpointGroupInput',
        'keep_client_ip': 'bool',
        'keep_client_ip_method': 'str',
        'listener_id': 'str',
        'name': 'str',
        'region': 'str',
        'source_ip': 'list[SourceIPForUpdateEndpointGroupInput]',
        'traffic_percentage': 'int'
    }

    attribute_map = {
        'accelerator_id': 'AcceleratorId',
        'endpoint_configurations': 'EndpointConfigurations',
        'endpoint_group_id': 'EndpointGroupId',
        'endpoint_type': 'EndpointType',
        'healthy_config': 'HealthyConfig',
        'keep_client_ip': 'KeepClientIP',
        'keep_client_ip_method': 'KeepClientIPMethod',
        'listener_id': 'ListenerId',
        'name': 'Name',
        'region': 'Region',
        'source_ip': 'SourceIP',
        'traffic_percentage': 'TrafficPercentage'
    }

    def __init__(self, accelerator_id=None, endpoint_configurations=None, endpoint_group_id=None, endpoint_type=None, healthy_config=None, keep_client_ip=None, keep_client_ip_method=None, listener_id=None, name=None, region=None, source_ip=None, traffic_percentage=None, _configuration=None):  # noqa: E501
        """UpdateEndpointGroupRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._accelerator_id = None
        self._endpoint_configurations = None
        self._endpoint_group_id = None
        self._endpoint_type = None
        self._healthy_config = None
        self._keep_client_ip = None
        self._keep_client_ip_method = None
        self._listener_id = None
        self._name = None
        self._region = None
        self._source_ip = None
        self._traffic_percentage = None
        self.discriminator = None

        self.accelerator_id = accelerator_id
        if endpoint_configurations is not None:
            self.endpoint_configurations = endpoint_configurations
        self.endpoint_group_id = endpoint_group_id
        if endpoint_type is not None:
            self.endpoint_type = endpoint_type
        if healthy_config is not None:
            self.healthy_config = healthy_config
        if keep_client_ip is not None:
            self.keep_client_ip = keep_client_ip
        if keep_client_ip_method is not None:
            self.keep_client_ip_method = keep_client_ip_method
        self.listener_id = listener_id
        if name is not None:
            self.name = name
        if region is not None:
            self.region = region
        if source_ip is not None:
            self.source_ip = source_ip
        if traffic_percentage is not None:
            self.traffic_percentage = traffic_percentage

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


        :return: The accelerator_id of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: str
        """
        return self._accelerator_id

    @accelerator_id.setter
    def accelerator_id(self, accelerator_id):
        """Sets the accelerator_id of this UpdateEndpointGroupRequest.


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

        self._accelerator_id = accelerator_id

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


        :return: The endpoint_configurations of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: list[EndpointConfigurationForUpdateEndpointGroupInput]
        """
        return self._endpoint_configurations

    @endpoint_configurations.setter
    def endpoint_configurations(self, endpoint_configurations):
        """Sets the endpoint_configurations of this UpdateEndpointGroupRequest.


        :param endpoint_configurations: The endpoint_configurations of this UpdateEndpointGroupRequest.  # noqa: E501
        :type: list[EndpointConfigurationForUpdateEndpointGroupInput]
        """

        self._endpoint_configurations = endpoint_configurations

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


        :return: The endpoint_group_id of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: str
        """
        return self._endpoint_group_id

    @endpoint_group_id.setter
    def endpoint_group_id(self, endpoint_group_id):
        """Sets the endpoint_group_id of this UpdateEndpointGroupRequest.


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

        self._endpoint_group_id = endpoint_group_id

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


        :return: The endpoint_type of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: str
        """
        return self._endpoint_type

    @endpoint_type.setter
    def endpoint_type(self, endpoint_type):
        """Sets the endpoint_type of this UpdateEndpointGroupRequest.


        :param endpoint_type: The endpoint_type of this UpdateEndpointGroupRequest.  # noqa: E501
        :type: str
        """

        self._endpoint_type = endpoint_type

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


        :return: The healthy_config of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: HealthyConfigForUpdateEndpointGroupInput
        """
        return self._healthy_config

    @healthy_config.setter
    def healthy_config(self, healthy_config):
        """Sets the healthy_config of this UpdateEndpointGroupRequest.


        :param healthy_config: The healthy_config of this UpdateEndpointGroupRequest.  # noqa: E501
        :type: HealthyConfigForUpdateEndpointGroupInput
        """

        self._healthy_config = healthy_config

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


        :return: The keep_client_ip of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: bool
        """
        return self._keep_client_ip

    @keep_client_ip.setter
    def keep_client_ip(self, keep_client_ip):
        """Sets the keep_client_ip of this UpdateEndpointGroupRequest.


        :param keep_client_ip: The keep_client_ip of this UpdateEndpointGroupRequest.  # noqa: E501
        :type: bool
        """

        self._keep_client_ip = keep_client_ip

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


        :return: The keep_client_ip_method of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: str
        """
        return self._keep_client_ip_method

    @keep_client_ip_method.setter
    def keep_client_ip_method(self, keep_client_ip_method):
        """Sets the keep_client_ip_method of this UpdateEndpointGroupRequest.


        :param keep_client_ip_method: The keep_client_ip_method of this UpdateEndpointGroupRequest.  # noqa: E501
        :type: str
        """

        self._keep_client_ip_method = keep_client_ip_method

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


        :return: The listener_id of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: str
        """
        return self._listener_id

    @listener_id.setter
    def listener_id(self, listener_id):
        """Sets the listener_id of this UpdateEndpointGroupRequest.


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

        self._listener_id = listener_id

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


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

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


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

        self._name = name

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


        :return: The region of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: str
        """
        return self._region

    @region.setter
    def region(self, region):
        """Sets the region of this UpdateEndpointGroupRequest.


        :param region: The region of this UpdateEndpointGroupRequest.  # noqa: E501
        :type: str
        """

        self._region = region

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


        :return: The source_ip of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: list[SourceIPForUpdateEndpointGroupInput]
        """
        return self._source_ip

    @source_ip.setter
    def source_ip(self, source_ip):
        """Sets the source_ip of this UpdateEndpointGroupRequest.


        :param source_ip: The source_ip of this UpdateEndpointGroupRequest.  # noqa: E501
        :type: list[SourceIPForUpdateEndpointGroupInput]
        """

        self._source_ip = source_ip

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


        :return: The traffic_percentage of this UpdateEndpointGroupRequest.  # noqa: E501
        :rtype: int
        """
        return self._traffic_percentage

    @traffic_percentage.setter
    def traffic_percentage(self, traffic_percentage):
        """Sets the traffic_percentage of this UpdateEndpointGroupRequest.


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

        self._traffic_percentage = traffic_percentage

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

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