# coding: utf-8
# Copyright (c) 2016, 2026, Oracle and/or its affiliates.  All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.

# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20220919


from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel, to_dict, redact_password_field  # noqa: F401
from oci.decorators import init_model_state_from_kwargs


@init_model_state_from_kwargs
class Storage(object):
    """
    Host storage information
    """

    #: A constant which can be used with the nfs_version property of a Storage.
    #: This constant has a value of "AUTO"
    NFS_VERSION_AUTO = "AUTO"

    #: A constant which can be used with the nfs_version property of a Storage.
    #: This constant has a value of "V3"
    NFS_VERSION_V3 = "V3"

    #: A constant which can be used with the nfs_version property of a Storage.
    #: This constant has a value of "V4"
    NFS_VERSION_V4 = "V4"

    #: A constant which can be used with the nfs_version property of a Storage.
    #: This constant has a value of "V4_0"
    NFS_VERSION_V4_0 = "V4_0"

    #: A constant which can be used with the nfs_version property of a Storage.
    #: This constant has a value of "V4_1"
    NFS_VERSION_V4_1 = "V4_1"

    #: A constant which can be used with the nfs_version property of a Storage.
    #: This constant has a value of "V4_2"
    NFS_VERSION_V4_2 = "V4_2"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "CINDER"
    TYPE_CINDER = "CINDER"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "FCP"
    TYPE_FCP = "FCP"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "GLANCE"
    TYPE_GLANCE = "GLANCE"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "GLUSTERFS"
    TYPE_GLUSTERFS = "GLUSTERFS"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "ISCSI"
    TYPE_ISCSI = "ISCSI"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "LOCALFS"
    TYPE_LOCALFS = "LOCALFS"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "MANAGED_BLOCK_STORAGE"
    TYPE_MANAGED_BLOCK_STORAGE = "MANAGED_BLOCK_STORAGE"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "NFS"
    TYPE_NFS = "NFS"

    #: A constant which can be used with the type property of a Storage.
    #: This constant has a value of "POSIXFS"
    TYPE_POSIXFS = "POSIXFS"

    def __init__(self, **kwargs):
        """
        Initializes a new Storage object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param id:
            The value to assign to the id property of this Storage.
        :type id: str

        :param address:
            The value to assign to the address property of this Storage.
        :type address: str

        :param comment:
            The value to assign to the comment property of this Storage.
        :type comment: str

        :param storage_description:
            The value to assign to the storage_description property of this Storage.
        :type storage_description: str

        :param driver_options:
            The value to assign to the driver_options property of this Storage.
        :type driver_options: list[oci.cloud_migrations.models.OlvmProperty]

        :param driver_sensitive_options:
            The value to assign to the driver_sensitive_options property of this Storage.
        :type driver_sensitive_options: list[oci.cloud_migrations.models.OlvmProperty]

        :param logical_units:
            The value to assign to the logical_units property of this Storage.
        :type logical_units: list[oci.cloud_migrations.models.LogicalUnit]

        :param mount_options:
            The value to assign to the mount_options property of this Storage.
        :type mount_options: str

        :param nfs_retrans:
            The value to assign to the nfs_retrans property of this Storage.
        :type nfs_retrans: int

        :param nfs_timeo:
            The value to assign to the nfs_timeo property of this Storage.
        :type nfs_timeo: int

        :param nfs_version:
            The value to assign to the nfs_version property of this Storage.
            Allowed values for this property are: "AUTO", "V3", "V4", "V4_0", "V4_1", "V4_2"
        :type nfs_version: str

        :param is_override_luns:
            The value to assign to the is_override_luns property of this Storage.
        :type is_override_luns: bool

        :param password:
            The value to assign to the password property of this Storage.
        :type password: str

        :param paths:
            The value to assign to the paths property of this Storage.
        :type paths: int

        :param port:
            The value to assign to the port property of this Storage.
        :type port: int

        :param portal:
            The value to assign to the portal property of this Storage.
        :type portal: str

        :param target:
            The value to assign to the target property of this Storage.
        :type target: str

        :param username:
            The value to assign to the username property of this Storage.
        :type username: str

        :param type:
            The value to assign to the type property of this Storage.
            Allowed values for this property are: "CINDER", "FCP", "GLANCE", "GLUSTERFS", "ISCSI", "LOCALFS", "MANAGED_BLOCK_STORAGE", "NFS", "POSIXFS"
        :type type: str

        :param vfs_type:
            The value to assign to the vfs_type property of this Storage.
        :type vfs_type: str

        :param volume_group:
            The value to assign to the volume_group property of this Storage.
        :type volume_group: oci.cloud_migrations.models.VolumeGroup

        """
        self.swagger_types = {
            'id': 'str',
            'address': 'str',
            'comment': 'str',
            'storage_description': 'str',
            'driver_options': 'list[OlvmProperty]',
            'driver_sensitive_options': 'list[OlvmProperty]',
            'logical_units': 'list[LogicalUnit]',
            'mount_options': 'str',
            'nfs_retrans': 'int',
            'nfs_timeo': 'int',
            'nfs_version': 'str',
            'is_override_luns': 'bool',
            'password': 'str',
            'paths': 'int',
            'port': 'int',
            'portal': 'str',
            'target': 'str',
            'username': 'str',
            'type': 'str',
            'vfs_type': 'str',
            'volume_group': 'VolumeGroup'
        }
        self.attribute_map = {
            'id': 'id',
            'address': 'address',
            'comment': 'comment',
            'storage_description': 'storageDescription',
            'driver_options': 'driverOptions',
            'driver_sensitive_options': 'driverSensitiveOptions',
            'logical_units': 'logicalUnits',
            'mount_options': 'mountOptions',
            'nfs_retrans': 'nfsRetrans',
            'nfs_timeo': 'nfsTimeo',
            'nfs_version': 'nfsVersion',
            'is_override_luns': 'isOverrideLuns',
            'password': 'password',
            'paths': 'paths',
            'port': 'port',
            'portal': 'portal',
            'target': 'target',
            'username': 'username',
            'type': 'type',
            'vfs_type': 'vfsType',
            'volume_group': 'volumeGroup'
        }
        self._redacted_field_paths = [
            ['logical_units', '*', 'password'],
            ['password'],
            ['volume_group', 'logical_units', '*', 'password'],
        ]
        self._id = None
        self._address = None
        self._comment = None
        self._storage_description = None
        self._driver_options = None
        self._driver_sensitive_options = None
        self._logical_units = None
        self._mount_options = None
        self._nfs_retrans = None
        self._nfs_timeo = None
        self._nfs_version = None
        self._is_override_luns = None
        self._password = None
        self._paths = None
        self._port = None
        self._portal = None
        self._target = None
        self._username = None
        self._type = None
        self._vfs_type = None
        self._volume_group = None

    @property
    def id(self):
        """
        Gets the id of this Storage.
        A unique identifier.


        :return: The id of this Storage.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this Storage.
        A unique identifier.


        :param id: The id of this Storage.
        :type: str
        """
        self._id = id

    @property
    def address(self):
        """
        Gets the address of this Storage.
        Address of storage domain.


        :return: The address of this Storage.
        :rtype: str
        """
        return self._address

    @address.setter
    def address(self, address):
        """
        Sets the address of this Storage.
        Address of storage domain.


        :param address: The address of this Storage.
        :type: str
        """
        self._address = address

    @property
    def comment(self):
        """
        Gets the comment of this Storage.
        Free text containing comments about this object.


        :return: The comment of this Storage.
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """
        Sets the comment of this Storage.
        Free text containing comments about this object.


        :param comment: The comment of this Storage.
        :type: str
        """
        self._comment = comment

    @property
    def storage_description(self):
        """
        Gets the storage_description of this Storage.
        A human-readable description in plain text.


        :return: The storage_description of this Storage.
        :rtype: str
        """
        return self._storage_description

    @storage_description.setter
    def storage_description(self, storage_description):
        """
        Sets the storage_description of this Storage.
        A human-readable description in plain text.


        :param storage_description: The storage_description of this Storage.
        :type: str
        """
        self._storage_description = storage_description

    @property
    def driver_options(self):
        """
        Gets the driver_options of this Storage.
        The options to be passed when creating a storage domain using a cinder driver.


        :return: The driver_options of this Storage.
        :rtype: list[oci.cloud_migrations.models.OlvmProperty]
        """
        return self._driver_options

    @driver_options.setter
    def driver_options(self, driver_options):
        """
        Sets the driver_options of this Storage.
        The options to be passed when creating a storage domain using a cinder driver.


        :param driver_options: The driver_options of this Storage.
        :type: list[oci.cloud_migrations.models.OlvmProperty]
        """
        self._driver_options = driver_options

    @property
    def driver_sensitive_options(self):
        """
        Gets the driver_sensitive_options of this Storage.
        The options containing sensitive information to be passed when creating a storage domain using a cinder driver.


        :return: The driver_sensitive_options of this Storage.
        :rtype: list[oci.cloud_migrations.models.OlvmProperty]
        """
        return self._driver_sensitive_options

    @driver_sensitive_options.setter
    def driver_sensitive_options(self, driver_sensitive_options):
        """
        Sets the driver_sensitive_options of this Storage.
        The options containing sensitive information to be passed when creating a storage domain using a cinder driver.


        :param driver_sensitive_options: The driver_sensitive_options of this Storage.
        :type: list[oci.cloud_migrations.models.OlvmProperty]
        """
        self._driver_sensitive_options = driver_sensitive_options

    @property
    def logical_units(self):
        """
        Gets the logical_units of this Storage.
        Logical Units of the host storage


        :return: The logical_units of this Storage.
        :rtype: list[oci.cloud_migrations.models.LogicalUnit]
        """
        return self._logical_units

    @logical_units.setter
    def logical_units(self, logical_units):
        """
        Sets the logical_units of this Storage.
        Logical Units of the host storage


        :param logical_units: The logical_units of this Storage.
        :type: list[oci.cloud_migrations.models.LogicalUnit]
        """
        self._logical_units = logical_units

    @property
    def mount_options(self):
        """
        Gets the mount_options of this Storage.
        Mount options


        :return: The mount_options of this Storage.
        :rtype: str
        """
        return self._mount_options

    @mount_options.setter
    def mount_options(self, mount_options):
        """
        Sets the mount_options of this Storage.
        Mount options


        :param mount_options: The mount_options of this Storage.
        :type: str
        """
        self._mount_options = mount_options

    @property
    def nfs_retrans(self):
        """
        Gets the nfs_retrans of this Storage.
        The number of times to retry a request before attempting further recovery actions.


        :return: The nfs_retrans of this Storage.
        :rtype: int
        """
        return self._nfs_retrans

    @nfs_retrans.setter
    def nfs_retrans(self, nfs_retrans):
        """
        Sets the nfs_retrans of this Storage.
        The number of times to retry a request before attempting further recovery actions.


        :param nfs_retrans: The nfs_retrans of this Storage.
        :type: int
        """
        self._nfs_retrans = nfs_retrans

    @property
    def nfs_timeo(self):
        """
        Gets the nfs_timeo of this Storage.
        The time in tenths of a second to wait for a response before retrying NFS requests.


        :return: The nfs_timeo of this Storage.
        :rtype: int
        """
        return self._nfs_timeo

    @nfs_timeo.setter
    def nfs_timeo(self, nfs_timeo):
        """
        Sets the nfs_timeo of this Storage.
        The time in tenths of a second to wait for a response before retrying NFS requests.


        :param nfs_timeo: The nfs_timeo of this Storage.
        :type: int
        """
        self._nfs_timeo = nfs_timeo

    @property
    def nfs_version(self):
        """
        Gets the nfs_version of this Storage.
        Version of NFS used.

        Allowed values for this property are: "AUTO", "V3", "V4", "V4_0", "V4_1", "V4_2"


        :return: The nfs_version of this Storage.
        :rtype: str
        """
        return self._nfs_version

    @nfs_version.setter
    def nfs_version(self, nfs_version):
        """
        Sets the nfs_version of this Storage.
        Version of NFS used.


        :param nfs_version: The nfs_version of this Storage.
        :type: str
        """
        allowed_values = ["AUTO", "V3", "V4", "V4_0", "V4_1", "V4_2"]
        if not value_allowed_none_or_none_sentinel(nfs_version, allowed_values):
            raise ValueError(
                f"Invalid value for `nfs_version`, must be None or one of {allowed_values}"
            )
        self._nfs_version = nfs_version

    @property
    def is_override_luns(self):
        """
        Gets the is_override_luns of this Storage.
        Whether to override LUNs


        :return: The is_override_luns of this Storage.
        :rtype: bool
        """
        return self._is_override_luns

    @is_override_luns.setter
    def is_override_luns(self, is_override_luns):
        """
        Sets the is_override_luns of this Storage.
        Whether to override LUNs


        :param is_override_luns: The is_override_luns of this Storage.
        :type: bool
        """
        self._is_override_luns = is_override_luns

    @property
    def password(self):
        """
        Gets the password of this Storage.
        Password of the host storage.


        :return: The password of this Storage.
        :rtype: str
        """
        return self._password

    @password.setter
    def password(self, password):
        """
        Sets the password of this Storage.
        Password of the host storage.


        :param password: The password of this Storage.
        :type: str
        """
        self._password = password

    @property
    def paths(self):
        """
        Gets the paths of this Storage.
        Paths of the host storage.


        :return: The paths of this Storage.
        :rtype: int
        """
        return self._paths

    @paths.setter
    def paths(self, paths):
        """
        Sets the paths of this Storage.
        Paths of the host storage.


        :param paths: The paths of this Storage.
        :type: int
        """
        self._paths = paths

    @property
    def port(self):
        """
        Gets the port of this Storage.
        Port of the host storage.


        :return: The port of this Storage.
        :rtype: int
        """
        return self._port

    @port.setter
    def port(self, port):
        """
        Sets the port of this Storage.
        Port of the host storage.


        :param port: The port of this Storage.
        :type: int
        """
        self._port = port

    @property
    def portal(self):
        """
        Gets the portal of this Storage.
        Portal of the host storage.


        :return: The portal of this Storage.
        :rtype: str
        """
        return self._portal

    @portal.setter
    def portal(self, portal):
        """
        Sets the portal of this Storage.
        Portal of the host storage.


        :param portal: The portal of this Storage.
        :type: str
        """
        self._portal = portal

    @property
    def target(self):
        """
        Gets the target of this Storage.
        Target of the host storage.


        :return: The target of this Storage.
        :rtype: str
        """
        return self._target

    @target.setter
    def target(self, target):
        """
        Sets the target of this Storage.
        Target of the host storage.


        :param target: The target of this Storage.
        :type: str
        """
        self._target = target

    @property
    def username(self):
        """
        Gets the username of this Storage.
        Username of the host storage.


        :return: The username of this Storage.
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """
        Sets the username of this Storage.
        Username of the host storage.


        :param username: The username of this Storage.
        :type: str
        """
        self._username = username

    @property
    def type(self):
        """
        Gets the type of this Storage.
        Type representing a storage domain type.

        Allowed values for this property are: "CINDER", "FCP", "GLANCE", "GLUSTERFS", "ISCSI", "LOCALFS", "MANAGED_BLOCK_STORAGE", "NFS", "POSIXFS"


        :return: The type of this Storage.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this Storage.
        Type representing a storage domain type.


        :param type: The type of this Storage.
        :type: str
        """
        allowed_values = ["CINDER", "FCP", "GLANCE", "GLUSTERFS", "ISCSI", "LOCALFS", "MANAGED_BLOCK_STORAGE", "NFS", "POSIXFS"]
        if not value_allowed_none_or_none_sentinel(type, allowed_values):
            raise ValueError(
                f"Invalid value for `type`, must be None or one of {allowed_values}"
            )
        self._type = type

    @property
    def vfs_type(self):
        """
        Gets the vfs_type of this Storage.
        Type of VFS


        :return: The vfs_type of this Storage.
        :rtype: str
        """
        return self._vfs_type

    @vfs_type.setter
    def vfs_type(self, vfs_type):
        """
        Sets the vfs_type of this Storage.
        Type of VFS


        :param vfs_type: The vfs_type of this Storage.
        :type: str
        """
        self._vfs_type = vfs_type

    @property
    def volume_group(self):
        """
        Gets the volume_group of this Storage.

        :return: The volume_group of this Storage.
        :rtype: oci.cloud_migrations.models.VolumeGroup
        """
        return self._volume_group

    @volume_group.setter
    def volume_group(self, volume_group):
        """
        Sets the volume_group of this Storage.

        :param volume_group: The volume_group of this Storage.
        :type: oci.cloud_migrations.models.VolumeGroup
        """
        self._volume_group = volume_group

    def __repr__(self):
        as_dict = to_dict(self)
        redact_password_field(as_dict, ['logical_units', '*', 'password'])
        redact_password_field(as_dict, ['password'])
        redact_password_field(as_dict, ['volume_group', 'logical_units', '*', 'password'])
        return formatted_flat_dict(as_dict)

    def __eq__(self, other):
        if other is None:
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not self == other
