# coding: utf-8

"""
    Kubernetes

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

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


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from kubernetes.client.configuration import Configuration


class V2APIResourceDiscovery(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 = {
        'resource': 'str',
        'response_kind': 'IoK8sApimachineryPkgApisMetaV1GroupVersionKind',
        'scope': 'str',
        'singular_resource': 'str',
        'verbs': 'list[str]',
        'short_names': 'list[str]',
        'categories': 'list[str]',
        'subresources': 'list[V2APISubresourceDiscovery]'
    }

    attribute_map = {
        'resource': 'resource',
        'response_kind': 'responseKind',
        'scope': 'scope',
        'singular_resource': 'singularResource',
        'verbs': 'verbs',
        'short_names': 'shortNames',
        'categories': 'categories',
        'subresources': 'subresources'
    }

    def __init__(self, resource=None, response_kind=None, scope=None, singular_resource=None, verbs=None, short_names=None, categories=None, subresources=None, local_vars_configuration=None):  # noqa: E501
        """V2APIResourceDiscovery - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._resource = None
        self._response_kind = None
        self._scope = None
        self._singular_resource = None
        self._verbs = None
        self._short_names = None
        self._categories = None
        self._subresources = None
        self.discriminator = None

        self.resource = resource
        if response_kind is not None:
            self.response_kind = response_kind
        self.scope = scope
        self.singular_resource = singular_resource
        self.verbs = verbs
        if short_names is not None:
            self.short_names = short_names
        if categories is not None:
            self.categories = categories
        if subresources is not None:
            self.subresources = subresources

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

        resource is the plural name of the resource.  # noqa: E501

        :return: The resource of this V2APIResourceDiscovery.  # noqa: E501
        :rtype: str
        """
        return self._resource

    @resource.setter
    def resource(self, resource):
        """Sets the resource of this V2APIResourceDiscovery.

        resource is the plural name of the resource.  # noqa: E501

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

        self._resource = resource

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


        :return: The response_kind of this V2APIResourceDiscovery.  # noqa: E501
        :rtype: IoK8sApimachineryPkgApisMetaV1GroupVersionKind
        """
        return self._response_kind

    @response_kind.setter
    def response_kind(self, response_kind):
        """Sets the response_kind of this V2APIResourceDiscovery.


        :param response_kind: The response_kind of this V2APIResourceDiscovery.  # noqa: E501
        :type response_kind: IoK8sApimachineryPkgApisMetaV1GroupVersionKind
        """

        self._response_kind = response_kind

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

        scope indicates the scope of a resource, either Cluster or Namespaced  # noqa: E501

        :return: The scope of this V2APIResourceDiscovery.  # noqa: E501
        :rtype: str
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """Sets the scope of this V2APIResourceDiscovery.

        scope indicates the scope of a resource, either Cluster or Namespaced  # noqa: E501

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

        self._scope = scope

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

        singularResource is the singular name of the resource.  # noqa: E501

        :return: The singular_resource of this V2APIResourceDiscovery.  # noqa: E501
        :rtype: str
        """
        return self._singular_resource

    @singular_resource.setter
    def singular_resource(self, singular_resource):
        """Sets the singular_resource of this V2APIResourceDiscovery.

        singularResource is the singular name of the resource.  # noqa: E501

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

        self._singular_resource = singular_resource

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

        verbs is a list of supported API operation types  # noqa: E501

        :return: The verbs of this V2APIResourceDiscovery.  # noqa: E501
        :rtype: list[str]
        """
        return self._verbs

    @verbs.setter
    def verbs(self, verbs):
        """Sets the verbs of this V2APIResourceDiscovery.

        verbs is a list of supported API operation types  # noqa: E501

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

        self._verbs = verbs

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

        shortNames is a list of suggested short names of the resource.  # noqa: E501

        :return: The short_names of this V2APIResourceDiscovery.  # noqa: E501
        :rtype: list[str]
        """
        return self._short_names

    @short_names.setter
    def short_names(self, short_names):
        """Sets the short_names of this V2APIResourceDiscovery.

        shortNames is a list of suggested short names of the resource.  # noqa: E501

        :param short_names: The short_names of this V2APIResourceDiscovery.  # noqa: E501
        :type short_names: list[str]
        """

        self._short_names = short_names

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

        categories is a list of the grouped resources this resource belongs to.  # noqa: E501

        :return: The categories of this V2APIResourceDiscovery.  # noqa: E501
        :rtype: list[str]
        """
        return self._categories

    @categories.setter
    def categories(self, categories):
        """Sets the categories of this V2APIResourceDiscovery.

        categories is a list of the grouped resources this resource belongs to.  # noqa: E501

        :param categories: The categories of this V2APIResourceDiscovery.  # noqa: E501
        :type categories: list[str]
        """

        self._categories = categories

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


        :return: The subresources of this V2APIResourceDiscovery.  # noqa: E501
        :rtype: list[V2APISubresourceDiscovery]
        """
        return self._subresources

    @subresources.setter
    def subresources(self, subresources):
        """Sets the subresources of this V2APIResourceDiscovery.


        :param subresources: The subresources of this V2APIResourceDiscovery.  # noqa: E501
        :type subresources: list[V2APISubresourceDiscovery]
        """

        self._subresources = subresources

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, V2APIResourceDiscovery):
            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, V2APIResourceDiscovery):
            return True

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