# coding: utf-8

"""
    apig

    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 UpstreamForGetUpstreamOutput(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 = {
        'backend_target_list': 'list[BackendTargetListForGetUpstreamOutput]',
        'circuit_breaking_settings': 'CircuitBreakingSettingsForGetUpstreamOutput',
        'comments': 'str',
        'connection_pool_settings': 'ConnectionPoolSettingsForGetUpstreamOutput',
        'create_time': 'str',
        'gateway_id': 'str',
        'id': 'str',
        'load_balancer_settings': 'LoadBalancerSettingsForGetUpstreamOutput',
        'name': 'str',
        'protocol': 'str',
        'source_type': 'str',
        'tls_settings': 'TlsSettingsForGetUpstreamOutput',
        'update_time': 'str',
        'upstream_spec': 'UpstreamSpecForGetUpstreamOutput',
        'version_details': 'list[VersionDetailForGetUpstreamOutput]'
    }

    attribute_map = {
        'backend_target_list': 'BackendTargetList',
        'circuit_breaking_settings': 'CircuitBreakingSettings',
        'comments': 'Comments',
        'connection_pool_settings': 'ConnectionPoolSettings',
        'create_time': 'CreateTime',
        'gateway_id': 'GatewayId',
        'id': 'Id',
        'load_balancer_settings': 'LoadBalancerSettings',
        'name': 'Name',
        'protocol': 'Protocol',
        'source_type': 'SourceType',
        'tls_settings': 'TlsSettings',
        'update_time': 'UpdateTime',
        'upstream_spec': 'UpstreamSpec',
        'version_details': 'VersionDetails'
    }

    def __init__(self, backend_target_list=None, circuit_breaking_settings=None, comments=None, connection_pool_settings=None, create_time=None, gateway_id=None, id=None, load_balancer_settings=None, name=None, protocol=None, source_type=None, tls_settings=None, update_time=None, upstream_spec=None, version_details=None, _configuration=None):  # noqa: E501
        """UpstreamForGetUpstreamOutput - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._backend_target_list = None
        self._circuit_breaking_settings = None
        self._comments = None
        self._connection_pool_settings = None
        self._create_time = None
        self._gateway_id = None
        self._id = None
        self._load_balancer_settings = None
        self._name = None
        self._protocol = None
        self._source_type = None
        self._tls_settings = None
        self._update_time = None
        self._upstream_spec = None
        self._version_details = None
        self.discriminator = None

        if backend_target_list is not None:
            self.backend_target_list = backend_target_list
        if circuit_breaking_settings is not None:
            self.circuit_breaking_settings = circuit_breaking_settings
        if comments is not None:
            self.comments = comments
        if connection_pool_settings is not None:
            self.connection_pool_settings = connection_pool_settings
        if create_time is not None:
            self.create_time = create_time
        if gateway_id is not None:
            self.gateway_id = gateway_id
        if id is not None:
            self.id = id
        if load_balancer_settings is not None:
            self.load_balancer_settings = load_balancer_settings
        if name is not None:
            self.name = name
        if protocol is not None:
            self.protocol = protocol
        if source_type is not None:
            self.source_type = source_type
        if tls_settings is not None:
            self.tls_settings = tls_settings
        if update_time is not None:
            self.update_time = update_time
        if upstream_spec is not None:
            self.upstream_spec = upstream_spec
        if version_details is not None:
            self.version_details = version_details

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


        :return: The backend_target_list of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: list[BackendTargetListForGetUpstreamOutput]
        """
        return self._backend_target_list

    @backend_target_list.setter
    def backend_target_list(self, backend_target_list):
        """Sets the backend_target_list of this UpstreamForGetUpstreamOutput.


        :param backend_target_list: The backend_target_list of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: list[BackendTargetListForGetUpstreamOutput]
        """

        self._backend_target_list = backend_target_list

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


        :return: The circuit_breaking_settings of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: CircuitBreakingSettingsForGetUpstreamOutput
        """
        return self._circuit_breaking_settings

    @circuit_breaking_settings.setter
    def circuit_breaking_settings(self, circuit_breaking_settings):
        """Sets the circuit_breaking_settings of this UpstreamForGetUpstreamOutput.


        :param circuit_breaking_settings: The circuit_breaking_settings of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: CircuitBreakingSettingsForGetUpstreamOutput
        """

        self._circuit_breaking_settings = circuit_breaking_settings

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


        :return: The comments of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: str
        """
        return self._comments

    @comments.setter
    def comments(self, comments):
        """Sets the comments of this UpstreamForGetUpstreamOutput.


        :param comments: The comments of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: str
        """

        self._comments = comments

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


        :return: The connection_pool_settings of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: ConnectionPoolSettingsForGetUpstreamOutput
        """
        return self._connection_pool_settings

    @connection_pool_settings.setter
    def connection_pool_settings(self, connection_pool_settings):
        """Sets the connection_pool_settings of this UpstreamForGetUpstreamOutput.


        :param connection_pool_settings: The connection_pool_settings of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: ConnectionPoolSettingsForGetUpstreamOutput
        """

        self._connection_pool_settings = connection_pool_settings

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


        :return: The create_time of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: str
        """
        return self._create_time

    @create_time.setter
    def create_time(self, create_time):
        """Sets the create_time of this UpstreamForGetUpstreamOutput.


        :param create_time: The create_time of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: str
        """

        self._create_time = create_time

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


        :return: The gateway_id of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: str
        """
        return self._gateway_id

    @gateway_id.setter
    def gateway_id(self, gateway_id):
        """Sets the gateway_id of this UpstreamForGetUpstreamOutput.


        :param gateway_id: The gateway_id of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: str
        """

        self._gateway_id = gateway_id

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


        :return: The id of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this UpstreamForGetUpstreamOutput.


        :param id: The id of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The load_balancer_settings of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: LoadBalancerSettingsForGetUpstreamOutput
        """
        return self._load_balancer_settings

    @load_balancer_settings.setter
    def load_balancer_settings(self, load_balancer_settings):
        """Sets the load_balancer_settings of this UpstreamForGetUpstreamOutput.


        :param load_balancer_settings: The load_balancer_settings of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: LoadBalancerSettingsForGetUpstreamOutput
        """

        self._load_balancer_settings = load_balancer_settings

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


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

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


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

        self._name = name

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


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

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


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

        self._protocol = protocol

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


        :return: The source_type of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: str
        """
        return self._source_type

    @source_type.setter
    def source_type(self, source_type):
        """Sets the source_type of this UpstreamForGetUpstreamOutput.


        :param source_type: The source_type of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: str
        """

        self._source_type = source_type

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


        :return: The tls_settings of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: TlsSettingsForGetUpstreamOutput
        """
        return self._tls_settings

    @tls_settings.setter
    def tls_settings(self, tls_settings):
        """Sets the tls_settings of this UpstreamForGetUpstreamOutput.


        :param tls_settings: The tls_settings of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: TlsSettingsForGetUpstreamOutput
        """

        self._tls_settings = tls_settings

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


        :return: The update_time of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: str
        """
        return self._update_time

    @update_time.setter
    def update_time(self, update_time):
        """Sets the update_time of this UpstreamForGetUpstreamOutput.


        :param update_time: The update_time of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: str
        """

        self._update_time = update_time

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


        :return: The upstream_spec of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: UpstreamSpecForGetUpstreamOutput
        """
        return self._upstream_spec

    @upstream_spec.setter
    def upstream_spec(self, upstream_spec):
        """Sets the upstream_spec of this UpstreamForGetUpstreamOutput.


        :param upstream_spec: The upstream_spec of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: UpstreamSpecForGetUpstreamOutput
        """

        self._upstream_spec = upstream_spec

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


        :return: The version_details of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :rtype: list[VersionDetailForGetUpstreamOutput]
        """
        return self._version_details

    @version_details.setter
    def version_details(self, version_details):
        """Sets the version_details of this UpstreamForGetUpstreamOutput.


        :param version_details: The version_details of this UpstreamForGetUpstreamOutput.  # noqa: E501
        :type: list[VersionDetailForGetUpstreamOutput]
        """

        self._version_details = version_details

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

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