# coding: utf-8

"""
    Nexus Repository Manager REST API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 3.20.1-01
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from nexus_api_python_client.configuration import Configuration


class DockerAttributes(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 = {
        'v1_enabled': 'bool',
        'force_basic_auth': 'bool',
        'http_port': 'int',
        'https_port': 'int'
    }

    attribute_map = {
        'v1_enabled': 'v1Enabled',
        'force_basic_auth': 'forceBasicAuth',
        'http_port': 'httpPort',
        'https_port': 'httpsPort'
    }

    def __init__(self, v1_enabled=None, force_basic_auth=None, http_port=None, https_port=None, local_vars_configuration=None):  # noqa: E501
        """DockerAttributes - 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._v1_enabled = None
        self._force_basic_auth = None
        self._http_port = None
        self._https_port = None
        self.discriminator = None

        self.v1_enabled = v1_enabled
        self.force_basic_auth = force_basic_auth
        if http_port is not None:
            self.http_port = http_port
        if https_port is not None:
            self.https_port = https_port

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

        Whether to allow clients to use the V1 API to interact with this repository  # noqa: E501

        :return: The v1_enabled of this DockerAttributes.  # noqa: E501
        :rtype: bool
        """
        return self._v1_enabled

    @v1_enabled.setter
    def v1_enabled(self, v1_enabled):
        """Sets the v1_enabled of this DockerAttributes.

        Whether to allow clients to use the V1 API to interact with this repository  # noqa: E501

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

        self._v1_enabled = v1_enabled

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

        Whether to force authentication (Docker Bearer Token Realm required if false)  # noqa: E501

        :return: The force_basic_auth of this DockerAttributes.  # noqa: E501
        :rtype: bool
        """
        return self._force_basic_auth

    @force_basic_auth.setter
    def force_basic_auth(self, force_basic_auth):
        """Sets the force_basic_auth of this DockerAttributes.

        Whether to force authentication (Docker Bearer Token Realm required if false)  # noqa: E501

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

        self._force_basic_auth = force_basic_auth

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

        Create an HTTP connector at specified port  # noqa: E501

        :return: The http_port of this DockerAttributes.  # noqa: E501
        :rtype: int
        """
        return self._http_port

    @http_port.setter
    def http_port(self, http_port):
        """Sets the http_port of this DockerAttributes.

        Create an HTTP connector at specified port  # noqa: E501

        :param http_port: The http_port of this DockerAttributes.  # noqa: E501
        :type: int
        """

        self._http_port = http_port

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

        Create an HTTPS connector at specified port  # noqa: E501

        :return: The https_port of this DockerAttributes.  # noqa: E501
        :rtype: int
        """
        return self._https_port

    @https_port.setter
    def https_port(self, https_port):
        """Sets the https_port of this DockerAttributes.

        Create an HTTPS connector at specified port  # noqa: E501

        :param https_port: The https_port of this DockerAttributes.  # noqa: E501
        :type: int
        """

        self._https_port = https_port

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

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