# coding: utf-8

"""
    Pulp 3 API

    Fetch, Upload, Organize, and Distribute Software Packages  # noqa: E501

    The version of the OpenAPI document: v3
    Contact: pulp-list@redhat.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from pulpcore.client.pulpcore.configuration import Configuration


class UpstreamPulpResponse(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'pulp_href': 'str',
        'pulp_created': 'datetime',
        'name': 'str',
        'base_url': 'str',
        'api_root': 'str',
        'domain': 'str',
        'ca_cert': 'str',
        'client_cert': 'str',
        'tls_validation': 'bool',
        'pulp_last_updated': 'datetime',
        'hidden_fields': 'list[RemoteResponseHiddenFields]',
        'pulp_label_select': 'str'
    }

    attribute_map = {
        'pulp_href': 'pulp_href',
        'pulp_created': 'pulp_created',
        'name': 'name',
        'base_url': 'base_url',
        'api_root': 'api_root',
        'domain': 'domain',
        'ca_cert': 'ca_cert',
        'client_cert': 'client_cert',
        'tls_validation': 'tls_validation',
        'pulp_last_updated': 'pulp_last_updated',
        'hidden_fields': 'hidden_fields',
        'pulp_label_select': 'pulp_label_select'
    }

    def __init__(self, pulp_href=None, pulp_created=None, name=None, base_url=None, api_root=None, domain=None, ca_cert=None, client_cert=None, tls_validation=None, pulp_last_updated=None, hidden_fields=None, pulp_label_select=None, local_vars_configuration=None):  # noqa: E501
        """UpstreamPulpResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._pulp_href = None
        self._pulp_created = None
        self._name = None
        self._base_url = None
        self._api_root = None
        self._domain = None
        self._ca_cert = None
        self._client_cert = None
        self._tls_validation = None
        self._pulp_last_updated = None
        self._hidden_fields = None
        self._pulp_label_select = None
        self.discriminator = None

        if pulp_href is not None:
            self.pulp_href = pulp_href
        if pulp_created is not None:
            self.pulp_created = pulp_created
        self.name = name
        self.base_url = base_url
        self.api_root = api_root
        self.domain = domain
        self.ca_cert = ca_cert
        self.client_cert = client_cert
        if tls_validation is not None:
            self.tls_validation = tls_validation
        if pulp_last_updated is not None:
            self.pulp_last_updated = pulp_last_updated
        if hidden_fields is not None:
            self.hidden_fields = hidden_fields
        self.pulp_label_select = pulp_label_select

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


        :return: The pulp_href of this UpstreamPulpResponse.  # noqa: E501
        :rtype: str
        """
        return self._pulp_href

    @pulp_href.setter
    def pulp_href(self, pulp_href):
        """Sets the pulp_href of this UpstreamPulpResponse.


        :param pulp_href: The pulp_href of this UpstreamPulpResponse.  # noqa: E501
        :type: str
        """

        self._pulp_href = pulp_href

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

        Timestamp of creation.  # noqa: E501

        :return: The pulp_created of this UpstreamPulpResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._pulp_created

    @pulp_created.setter
    def pulp_created(self, pulp_created):
        """Sets the pulp_created of this UpstreamPulpResponse.

        Timestamp of creation.  # noqa: E501

        :param pulp_created: The pulp_created of this UpstreamPulpResponse.  # noqa: E501
        :type: datetime
        """

        self._pulp_created = pulp_created

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

        A unique name for this Pulp server.  # noqa: E501

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

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

        A unique name for this Pulp server.  # noqa: E501

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

        self._name = name

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

        The transport, hostname, and an optional port of the Pulp server. e.g. https://example.com  # noqa: E501

        :return: The base_url of this UpstreamPulpResponse.  # noqa: E501
        :rtype: str
        """
        return self._base_url

    @base_url.setter
    def base_url(self, base_url):
        """Sets the base_url of this UpstreamPulpResponse.

        The transport, hostname, and an optional port of the Pulp server. e.g. https://example.com  # noqa: E501

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

        self._base_url = base_url

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

        The API root. Defaults to '/pulp/'.  # noqa: E501

        :return: The api_root of this UpstreamPulpResponse.  # noqa: E501
        :rtype: str
        """
        return self._api_root

    @api_root.setter
    def api_root(self, api_root):
        """Sets the api_root of this UpstreamPulpResponse.

        The API root. Defaults to '/pulp/'.  # noqa: E501

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

        self._api_root = api_root

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

        The domain of the Pulp server if enabled.  # noqa: E501

        :return: The domain of this UpstreamPulpResponse.  # noqa: E501
        :rtype: str
        """
        return self._domain

    @domain.setter
    def domain(self, domain):
        """Sets the domain of this UpstreamPulpResponse.

        The domain of the Pulp server if enabled.  # noqa: E501

        :param domain: The domain of this UpstreamPulpResponse.  # noqa: E501
        :type: str
        """

        self._domain = domain

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

        A PEM encoded CA certificate used to validate the server certificate presented by the remote server.  # noqa: E501

        :return: The ca_cert of this UpstreamPulpResponse.  # noqa: E501
        :rtype: str
        """
        return self._ca_cert

    @ca_cert.setter
    def ca_cert(self, ca_cert):
        """Sets the ca_cert of this UpstreamPulpResponse.

        A PEM encoded CA certificate used to validate the server certificate presented by the remote server.  # noqa: E501

        :param ca_cert: The ca_cert of this UpstreamPulpResponse.  # noqa: E501
        :type: str
        """

        self._ca_cert = ca_cert

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

        A PEM encoded client certificate used for authentication.  # noqa: E501

        :return: The client_cert of this UpstreamPulpResponse.  # noqa: E501
        :rtype: str
        """
        return self._client_cert

    @client_cert.setter
    def client_cert(self, client_cert):
        """Sets the client_cert of this UpstreamPulpResponse.

        A PEM encoded client certificate used for authentication.  # noqa: E501

        :param client_cert: The client_cert of this UpstreamPulpResponse.  # noqa: E501
        :type: str
        """

        self._client_cert = client_cert

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

        If True, TLS peer validation must be performed.  # noqa: E501

        :return: The tls_validation of this UpstreamPulpResponse.  # noqa: E501
        :rtype: bool
        """
        return self._tls_validation

    @tls_validation.setter
    def tls_validation(self, tls_validation):
        """Sets the tls_validation of this UpstreamPulpResponse.

        If True, TLS peer validation must be performed.  # noqa: E501

        :param tls_validation: The tls_validation of this UpstreamPulpResponse.  # noqa: E501
        :type: bool
        """

        self._tls_validation = tls_validation

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

        Timestamp of the most recent update of the remote.  # noqa: E501

        :return: The pulp_last_updated of this UpstreamPulpResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._pulp_last_updated

    @pulp_last_updated.setter
    def pulp_last_updated(self, pulp_last_updated):
        """Sets the pulp_last_updated of this UpstreamPulpResponse.

        Timestamp of the most recent update of the remote.  # noqa: E501

        :param pulp_last_updated: The pulp_last_updated of this UpstreamPulpResponse.  # noqa: E501
        :type: datetime
        """

        self._pulp_last_updated = pulp_last_updated

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

        List of hidden (write only) fields  # noqa: E501

        :return: The hidden_fields of this UpstreamPulpResponse.  # noqa: E501
        :rtype: list[RemoteResponseHiddenFields]
        """
        return self._hidden_fields

    @hidden_fields.setter
    def hidden_fields(self, hidden_fields):
        """Sets the hidden_fields of this UpstreamPulpResponse.

        List of hidden (write only) fields  # noqa: E501

        :param hidden_fields: The hidden_fields of this UpstreamPulpResponse.  # noqa: E501
        :type: list[RemoteResponseHiddenFields]
        """

        self._hidden_fields = hidden_fields

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

        One or more comma separated labels that will be used to filter distributions on the upstream Pulp. E.g. \"foo=bar,key=val\" or \"foo,key\"  # noqa: E501

        :return: The pulp_label_select of this UpstreamPulpResponse.  # noqa: E501
        :rtype: str
        """
        return self._pulp_label_select

    @pulp_label_select.setter
    def pulp_label_select(self, pulp_label_select):
        """Sets the pulp_label_select of this UpstreamPulpResponse.

        One or more comma separated labels that will be used to filter distributions on the upstream Pulp. E.g. \"foo=bar,key=val\" or \"foo,key\"  # noqa: E501

        :param pulp_label_select: The pulp_label_select of this UpstreamPulpResponse.  # noqa: E501
        :type: str
        """

        self._pulp_label_select = pulp_label_select

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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