1# coding: utf-8
2"""
3    Kubernetes
4
5    No description provided (generated by Swagger Codegen
6    https://github.com/swagger-api/swagger-codegen)
7
8    OpenAPI spec version: v1.14.4
9
10    Generated by: https://github.com/swagger-api/swagger-codegen.git
11"""
12
13from pprint import pformat
14from six import iteritems
15import re
16
17
18class V1NonResourceRule(object):
19  """
20    NOTE: This class is auto generated by the swagger code generator program.
21    Do not edit the class manually.
22    """
23  """
24    Attributes:
25      swagger_types (dict): The key is attribute name and the value is attribute
26        type.
27      attribute_map (dict): The key is attribute name and the value is json key
28        in definition.
29  """
30  swagger_types = {'non_resource_ur_ls': 'list[str]', 'verbs': 'list[str]'}
31
32  attribute_map = {'non_resource_ur_ls': 'nonResourceURLs', 'verbs': 'verbs'}
33
34  def __init__(self, non_resource_ur_ls=None, verbs=None):
35    """
36        V1NonResourceRule - a model defined in Swagger
37        """
38
39    self._non_resource_ur_ls = None
40    self._verbs = None
41    self.discriminator = None
42
43    if non_resource_ur_ls is not None:
44      self.non_resource_ur_ls = non_resource_ur_ls
45    self.verbs = verbs
46
47  @property
48  def non_resource_ur_ls(self):
49    """
50        Gets the non_resource_ur_ls of this V1NonResourceRule.
51        NonResourceURLs is a set of partial urls that a user should have access
52        to.  *s are allowed, but only as the full, final step in the path.
53        \"*\" means all.
54
55        :return: The non_resource_ur_ls of this V1NonResourceRule.
56        :rtype: list[str]
57        """
58    return self._non_resource_ur_ls
59
60  @non_resource_ur_ls.setter
61  def non_resource_ur_ls(self, non_resource_ur_ls):
62    """
63        Sets the non_resource_ur_ls of this V1NonResourceRule.
64        NonResourceURLs is a set of partial urls that a user should have access
65        to.  *s are allowed, but only as the full, final step in the path.
66        \"*\" means all.
67
68        :param non_resource_ur_ls: The non_resource_ur_ls of this
69        V1NonResourceRule.
70        :type: list[str]
71        """
72
73    self._non_resource_ur_ls = non_resource_ur_ls
74
75  @property
76  def verbs(self):
77    """
78        Gets the verbs of this V1NonResourceRule.
79        Verb is a list of kubernetes non-resource API verbs, like: get, post,
80        put, delete, patch, head, options.  \"*\" means all.
81
82        :return: The verbs of this V1NonResourceRule.
83        :rtype: list[str]
84        """
85    return self._verbs
86
87  @verbs.setter
88  def verbs(self, verbs):
89    """
90        Sets the verbs of this V1NonResourceRule.
91        Verb is a list of kubernetes non-resource API verbs, like: get, post,
92        put, delete, patch, head, options.  \"*\" means all.
93
94        :param verbs: The verbs of this V1NonResourceRule.
95        :type: list[str]
96        """
97    if verbs is None:
98      raise ValueError('Invalid value for `verbs`, must not be `None`')
99
100    self._verbs = verbs
101
102  def to_dict(self):
103    """
104        Returns the model properties as a dict
105        """
106    result = {}
107
108    for attr, _ in iteritems(self.swagger_types):
109      value = getattr(self, attr)
110      if isinstance(value, list):
111        result[attr] = list(
112            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
113      elif hasattr(value, 'to_dict'):
114        result[attr] = value.to_dict()
115      elif isinstance(value, dict):
116        result[attr] = dict(
117            map(
118                lambda item: (item[0], item[1].to_dict())
119                if hasattr(item[1], 'to_dict') else item, value.items()))
120      else:
121        result[attr] = value
122
123    return result
124
125  def to_str(self):
126    """
127        Returns the string representation of the model
128        """
129    return pformat(self.to_dict())
130
131  def __repr__(self):
132    """
133        For `print` and `pprint`
134        """
135    return self.to_str()
136
137  def __eq__(self, other):
138    """
139        Returns true if both objects are equal
140        """
141    if not isinstance(other, V1NonResourceRule):
142      return False
143
144    return self.__dict__ == other.__dict__
145
146  def __ne__(self, other):
147    """
148        Returns true if both objects are not equal
149        """
150    return not self == other
151