Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_iscsi_volume_source.py404 linesDownload Raw Back to models
1# coding: utf-82 3"""4    Kubernetes5 6    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E5017 8    The version of the OpenAPI document: release-1.359    Generated by: https://openapi-generator.tech10"""11 12 13import pprint14import re  # noqa: F40115 16import six17 18from kubernetes.client.configuration import Configuration19 20 21class V1ISCSIVolumeSource(object):22    """NOTE: This class is auto generated by OpenAPI Generator.23    Ref: https://openapi-generator.tech24 25    Do not edit the class manually.26    """27 28    """29    Attributes:30      openapi_types (dict): The key is attribute name31                            and the value is attribute type.32      attribute_map (dict): The key is attribute name33                            and the value is json key in definition.34    """35    openapi_types = {36        'chap_auth_discovery': 'bool',37        'chap_auth_session': 'bool',38        'fs_type': 'str',39        'initiator_name': 'str',40        'iqn': 'str',41        'iscsi_interface': 'str',42        'lun': 'int',43        'portals': 'list[str]',44        'read_only': 'bool',45        'secret_ref': 'V1LocalObjectReference',46        'target_portal': 'str'47    }48 49    attribute_map = {50        'chap_auth_discovery': 'chapAuthDiscovery',51        'chap_auth_session': 'chapAuthSession',52        'fs_type': 'fsType',53        'initiator_name': 'initiatorName',54        'iqn': 'iqn',55        'iscsi_interface': 'iscsiInterface',56        'lun': 'lun',57        'portals': 'portals',58        'read_only': 'readOnly',59        'secret_ref': 'secretRef',60        'target_portal': 'targetPortal'61    }62 63    def __init__(self, chap_auth_discovery=None, chap_auth_session=None, fs_type=None, initiator_name=None, iqn=None, iscsi_interface=None, lun=None, portals=None, read_only=None, secret_ref=None, target_portal=None, local_vars_configuration=None):  # noqa: E50164        """V1ISCSIVolumeSource - a model defined in OpenAPI"""  # noqa: E50165        if local_vars_configuration is None:66            local_vars_configuration = Configuration()67        self.local_vars_configuration = local_vars_configuration68 69        self._chap_auth_discovery = None70        self._chap_auth_session = None71        self._fs_type = None72        self._initiator_name = None73        self._iqn = None74        self._iscsi_interface = None75        self._lun = None76        self._portals = None77        self._read_only = None78        self._secret_ref = None79        self._target_portal = None80        self.discriminator = None81 82        if chap_auth_discovery is not None:83            self.chap_auth_discovery = chap_auth_discovery84        if chap_auth_session is not None:85            self.chap_auth_session = chap_auth_session86        if fs_type is not None:87            self.fs_type = fs_type88        if initiator_name is not None:89            self.initiator_name = initiator_name90        self.iqn = iqn91        if iscsi_interface is not None:92            self.iscsi_interface = iscsi_interface93        self.lun = lun94        if portals is not None:95            self.portals = portals96        if read_only is not None:97            self.read_only = read_only98        if secret_ref is not None:99            self.secret_ref = secret_ref100        self.target_portal = target_portal101 102    @property103    def chap_auth_discovery(self):104        """Gets the chap_auth_discovery of this V1ISCSIVolumeSource.  # noqa: E501105 106        chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication  # noqa: E501107 108        :return: The chap_auth_discovery of this V1ISCSIVolumeSource.  # noqa: E501109        :rtype: bool110        """111        return self._chap_auth_discovery112 113    @chap_auth_discovery.setter114    def chap_auth_discovery(self, chap_auth_discovery):115        """Sets the chap_auth_discovery of this V1ISCSIVolumeSource.116 117        chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication  # noqa: E501118 119        :param chap_auth_discovery: The chap_auth_discovery of this V1ISCSIVolumeSource.  # noqa: E501120        :type: bool121        """122 123        self._chap_auth_discovery = chap_auth_discovery124 125    @property126    def chap_auth_session(self):127        """Gets the chap_auth_session of this V1ISCSIVolumeSource.  # noqa: E501128 129        chapAuthSession defines whether support iSCSI Session CHAP authentication  # noqa: E501130 131        :return: The chap_auth_session of this V1ISCSIVolumeSource.  # noqa: E501132        :rtype: bool133        """134        return self._chap_auth_session135 136    @chap_auth_session.setter137    def chap_auth_session(self, chap_auth_session):138        """Sets the chap_auth_session of this V1ISCSIVolumeSource.139 140        chapAuthSession defines whether support iSCSI Session CHAP authentication  # noqa: E501141 142        :param chap_auth_session: The chap_auth_session of this V1ISCSIVolumeSource.  # noqa: E501143        :type: bool144        """145 146        self._chap_auth_session = chap_auth_session147 148    @property149    def fs_type(self):150        """Gets the fs_type of this V1ISCSIVolumeSource.  # noqa: E501151 152        fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi  # noqa: E501153 154        :return: The fs_type of this V1ISCSIVolumeSource.  # noqa: E501155        :rtype: str156        """157        return self._fs_type158 159    @fs_type.setter160    def fs_type(self, fs_type):161        """Sets the fs_type of this V1ISCSIVolumeSource.162 163        fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi  # noqa: E501164 165        :param fs_type: The fs_type of this V1ISCSIVolumeSource.  # noqa: E501166        :type: str167        """168 169        self._fs_type = fs_type170 171    @property172    def initiator_name(self):173        """Gets the initiator_name of this V1ISCSIVolumeSource.  # noqa: E501174 175        initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name> will be created for the connection.  # noqa: E501176 177        :return: The initiator_name of this V1ISCSIVolumeSource.  # noqa: E501178        :rtype: str179        """180        return self._initiator_name181 182    @initiator_name.setter183    def initiator_name(self, initiator_name):184        """Sets the initiator_name of this V1ISCSIVolumeSource.185 186        initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface <target portal>:<volume name> will be created for the connection.  # noqa: E501187 188        :param initiator_name: The initiator_name of this V1ISCSIVolumeSource.  # noqa: E501189        :type: str190        """191 192        self._initiator_name = initiator_name193 194    @property195    def iqn(self):196        """Gets the iqn of this V1ISCSIVolumeSource.  # noqa: E501197 198        iqn is the target iSCSI Qualified Name.  # noqa: E501199 200        :return: The iqn of this V1ISCSIVolumeSource.  # noqa: E501201        :rtype: str202        """203        return self._iqn204 205    @iqn.setter206    def iqn(self, iqn):207        """Sets the iqn of this V1ISCSIVolumeSource.208 209        iqn is the target iSCSI Qualified Name.  # noqa: E501210 211        :param iqn: The iqn of this V1ISCSIVolumeSource.  # noqa: E501212        :type: str213        """214        if self.local_vars_configuration.client_side_validation and iqn is None:  # noqa: E501215            raise ValueError("Invalid value for `iqn`, must not be `None`")  # noqa: E501216 217        self._iqn = iqn218 219    @property220    def iscsi_interface(self):221        """Gets the iscsi_interface of this V1ISCSIVolumeSource.  # noqa: E501222 223        iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).  # noqa: E501224 225        :return: The iscsi_interface of this V1ISCSIVolumeSource.  # noqa: E501226        :rtype: str227        """228        return self._iscsi_interface229 230    @iscsi_interface.setter231    def iscsi_interface(self, iscsi_interface):232        """Sets the iscsi_interface of this V1ISCSIVolumeSource.233 234        iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).  # noqa: E501235 236        :param iscsi_interface: The iscsi_interface of this V1ISCSIVolumeSource.  # noqa: E501237        :type: str238        """239 240        self._iscsi_interface = iscsi_interface241 242    @property243    def lun(self):244        """Gets the lun of this V1ISCSIVolumeSource.  # noqa: E501245 246        lun represents iSCSI Target Lun number.  # noqa: E501247 248        :return: The lun of this V1ISCSIVolumeSource.  # noqa: E501249        :rtype: int250        """251        return self._lun252 253    @lun.setter254    def lun(self, lun):255        """Sets the lun of this V1ISCSIVolumeSource.256 257        lun represents iSCSI Target Lun number.  # noqa: E501258 259        :param lun: The lun of this V1ISCSIVolumeSource.  # noqa: E501260        :type: int261        """262        if self.local_vars_configuration.client_side_validation and lun is None:  # noqa: E501263            raise ValueError("Invalid value for `lun`, must not be `None`")  # noqa: E501264 265        self._lun = lun266 267    @property268    def portals(self):269        """Gets the portals of this V1ISCSIVolumeSource.  # noqa: E501270 271        portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).  # noqa: E501272 273        :return: The portals of this V1ISCSIVolumeSource.  # noqa: E501274        :rtype: list[str]275        """276        return self._portals277 278    @portals.setter279    def portals(self, portals):280        """Sets the portals of this V1ISCSIVolumeSource.281 282        portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).  # noqa: E501283 284        :param portals: The portals of this V1ISCSIVolumeSource.  # noqa: E501285        :type: list[str]286        """287 288        self._portals = portals289 290    @property291    def read_only(self):292        """Gets the read_only of this V1ISCSIVolumeSource.  # noqa: E501293 294        readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.  # noqa: E501295 296        :return: The read_only of this V1ISCSIVolumeSource.  # noqa: E501297        :rtype: bool298        """299        return self._read_only300 301    @read_only.setter302    def read_only(self, read_only):303        """Sets the read_only of this V1ISCSIVolumeSource.304 305        readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.  # noqa: E501306 307        :param read_only: The read_only of this V1ISCSIVolumeSource.  # noqa: E501308        :type: bool309        """310 311        self._read_only = read_only312 313    @property314    def secret_ref(self):315        """Gets the secret_ref of this V1ISCSIVolumeSource.  # noqa: E501316 317 318        :return: The secret_ref of this V1ISCSIVolumeSource.  # noqa: E501319        :rtype: V1LocalObjectReference320        """321        return self._secret_ref322 323    @secret_ref.setter324    def secret_ref(self, secret_ref):325        """Sets the secret_ref of this V1ISCSIVolumeSource.326 327 328        :param secret_ref: The secret_ref of this V1ISCSIVolumeSource.  # noqa: E501329        :type: V1LocalObjectReference330        """331 332        self._secret_ref = secret_ref333 334    @property335    def target_portal(self):336        """Gets the target_portal of this V1ISCSIVolumeSource.  # noqa: E501337 338        targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).  # noqa: E501339 340        :return: The target_portal of this V1ISCSIVolumeSource.  # noqa: E501341        :rtype: str342        """343        return self._target_portal344 345    @target_portal.setter346    def target_portal(self, target_portal):347        """Sets the target_portal of this V1ISCSIVolumeSource.348 349        targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).  # noqa: E501350 351        :param target_portal: The target_portal of this V1ISCSIVolumeSource.  # noqa: E501352        :type: str353        """354        if self.local_vars_configuration.client_side_validation and target_portal is None:  # noqa: E501355            raise ValueError("Invalid value for `target_portal`, must not be `None`")  # noqa: E501356 357        self._target_portal = target_portal358 359    def to_dict(self):360        """Returns the model properties as a dict"""361        result = {}362 363        for attr, _ in six.iteritems(self.openapi_types):364            value = getattr(self, attr)365            if isinstance(value, list):366                result[attr] = list(map(367                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,368                    value369                ))370            elif hasattr(value, "to_dict"):371                result[attr] = value.to_dict()372            elif isinstance(value, dict):373                result[attr] = dict(map(374                    lambda item: (item[0], item[1].to_dict())375                    if hasattr(item[1], "to_dict") else item,376                    value.items()377                ))378            else:379                result[attr] = value380 381        return result382 383    def to_str(self):384        """Returns the string representation of the model"""385        return pprint.pformat(self.to_dict())386 387    def __repr__(self):388        """For `print` and `pprint`"""389        return self.to_str()390 391    def __eq__(self, other):392        """Returns true if both objects are equal"""393        if not isinstance(other, V1ISCSIVolumeSource):394            return False395 396        return self.to_dict() == other.to_dict()397 398    def __ne__(self, other):399        """Returns true if both objects are not equal"""400        if not isinstance(other, V1ISCSIVolumeSource):401            return True402 403        return self.to_dict() != other.to_dict()404 
codekingpro/portable-devtools · Team Ai