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 V1HostPathVolumeSource(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 = {'path': 'str', 'type': 'str'}
31
32  attribute_map = {'path': 'path', 'type': 'type'}
33
34  def __init__(self, path=None, type=None):
35    """
36        V1HostPathVolumeSource - a model defined in Swagger
37        """
38
39    self._path = None
40    self._type = None
41    self.discriminator = None
42
43    self.path = path
44    if type is not None:
45      self.type = type
46
47  @property
48  def path(self):
49    """
50        Gets the path of this V1HostPathVolumeSource.
51        Path of the directory on the host. If the path is a symlink, it will
52        follow the link to the real path. More info:
53        https://kubernetes.io/docs/concepts/storage/volumes#hostpath
54
55        :return: The path of this V1HostPathVolumeSource.
56        :rtype: str
57        """
58    return self._path
59
60  @path.setter
61  def path(self, path):
62    """
63        Sets the path of this V1HostPathVolumeSource.
64        Path of the directory on the host. If the path is a symlink, it will
65        follow the link to the real path. More info:
66        https://kubernetes.io/docs/concepts/storage/volumes#hostpath
67
68        :param path: The path of this V1HostPathVolumeSource.
69        :type: str
70        """
71    if path is None:
72      raise ValueError('Invalid value for `path`, must not be `None`')
73
74    self._path = path
75
76  @property
77  def type(self):
78    """
79        Gets the type of this V1HostPathVolumeSource.
80        Type for HostPath Volume Defaults to \"\" More info:
81        https://kubernetes.io/docs/concepts/storage/volumes#hostpath
82
83        :return: The type of this V1HostPathVolumeSource.
84        :rtype: str
85        """
86    return self._type
87
88  @type.setter
89  def type(self, type):
90    """
91        Sets the type of this V1HostPathVolumeSource.
92        Type for HostPath Volume Defaults to \"\" More info:
93        https://kubernetes.io/docs/concepts/storage/volumes#hostpath
94
95        :param type: The type of this V1HostPathVolumeSource.
96        :type: str
97        """
98
99    self._type = type
100
101  def to_dict(self):
102    """
103        Returns the model properties as a dict
104        """
105    result = {}
106
107    for attr, _ in iteritems(self.swagger_types):
108      value = getattr(self, attr)
109      if isinstance(value, list):
110        result[attr] = list(
111            map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
112      elif hasattr(value, 'to_dict'):
113        result[attr] = value.to_dict()
114      elif isinstance(value, dict):
115        result[attr] = dict(
116            map(
117                lambda item: (item[0], item[1].to_dict())
118                if hasattr(item[1], 'to_dict') else item, value.items()))
119      else:
120        result[attr] = value
121
122    return result
123
124  def to_str(self):
125    """
126        Returns the string representation of the model
127        """
128    return pformat(self.to_dict())
129
130  def __repr__(self):
131    """
132        For `print` and `pprint`
133        """
134    return self.to_str()
135
136  def __eq__(self, other):
137    """
138        Returns true if both objects are equal
139        """
140    if not isinstance(other, V1HostPathVolumeSource):
141      return False
142
143    return self.__dict__ == other.__dict__
144
145  def __ne__(self, other):
146    """
147        Returns true if both objects are not equal
148        """
149    return not self == other
150