# coding: utf-8

"""
    KubeVirt API

    This is KubeVirt API an add-on for Kubernetes.  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: kubevirt-dev@googlegroups.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from kubevirt.configuration import Configuration


class V1CloudInitConfigDriveSource(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'network_data': 'str',
        'network_data_base64': 'str',
        'network_data_secret_ref': 'K8sIoApiCoreV1LocalObjectReference',
        'secret_ref': 'K8sIoApiCoreV1LocalObjectReference',
        'user_data': 'str',
        'user_data_base64': 'str'
    }

    attribute_map = {
        'network_data': 'networkData',
        'network_data_base64': 'networkDataBase64',
        'network_data_secret_ref': 'networkDataSecretRef',
        'secret_ref': 'secretRef',
        'user_data': 'userData',
        'user_data_base64': 'userDataBase64'
    }

    def __init__(self, network_data=None, network_data_base64=None, network_data_secret_ref=None, secret_ref=None, user_data=None, user_data_base64=None, _configuration=None):  # noqa: E501
        """V1CloudInitConfigDriveSource - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._network_data = None
        self._network_data_base64 = None
        self._network_data_secret_ref = None
        self._secret_ref = None
        self._user_data = None
        self._user_data_base64 = None
        self.discriminator = None

        if network_data is not None:
            self.network_data = network_data
        if network_data_base64 is not None:
            self.network_data_base64 = network_data_base64
        if network_data_secret_ref is not None:
            self.network_data_secret_ref = network_data_secret_ref
        if secret_ref is not None:
            self.secret_ref = secret_ref
        if user_data is not None:
            self.user_data = user_data
        if user_data_base64 is not None:
            self.user_data_base64 = user_data_base64

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

        NetworkData contains config drive inline cloud-init networkdata.  # noqa: E501

        :return: The network_data of this V1CloudInitConfigDriveSource.  # noqa: E501
        :rtype: str
        """
        return self._network_data

    @network_data.setter
    def network_data(self, network_data):
        """Sets the network_data of this V1CloudInitConfigDriveSource.

        NetworkData contains config drive inline cloud-init networkdata.  # noqa: E501

        :param network_data: The network_data of this V1CloudInitConfigDriveSource.  # noqa: E501
        :type: str
        """

        self._network_data = network_data

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

        NetworkDataBase64 contains config drive cloud-init networkdata as a base64 encoded string.  # noqa: E501

        :return: The network_data_base64 of this V1CloudInitConfigDriveSource.  # noqa: E501
        :rtype: str
        """
        return self._network_data_base64

    @network_data_base64.setter
    def network_data_base64(self, network_data_base64):
        """Sets the network_data_base64 of this V1CloudInitConfigDriveSource.

        NetworkDataBase64 contains config drive cloud-init networkdata as a base64 encoded string.  # noqa: E501

        :param network_data_base64: The network_data_base64 of this V1CloudInitConfigDriveSource.  # noqa: E501
        :type: str
        """

        self._network_data_base64 = network_data_base64

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

        NetworkDataSecretRef references a k8s secret that contains config drive networkdata.  # noqa: E501

        :return: The network_data_secret_ref of this V1CloudInitConfigDriveSource.  # noqa: E501
        :rtype: K8sIoApiCoreV1LocalObjectReference
        """
        return self._network_data_secret_ref

    @network_data_secret_ref.setter
    def network_data_secret_ref(self, network_data_secret_ref):
        """Sets the network_data_secret_ref of this V1CloudInitConfigDriveSource.

        NetworkDataSecretRef references a k8s secret that contains config drive networkdata.  # noqa: E501

        :param network_data_secret_ref: The network_data_secret_ref of this V1CloudInitConfigDriveSource.  # noqa: E501
        :type: K8sIoApiCoreV1LocalObjectReference
        """

        self._network_data_secret_ref = network_data_secret_ref

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

        UserDataSecretRef references a k8s secret that contains config drive userdata.  # noqa: E501

        :return: The secret_ref of this V1CloudInitConfigDriveSource.  # noqa: E501
        :rtype: K8sIoApiCoreV1LocalObjectReference
        """
        return self._secret_ref

    @secret_ref.setter
    def secret_ref(self, secret_ref):
        """Sets the secret_ref of this V1CloudInitConfigDriveSource.

        UserDataSecretRef references a k8s secret that contains config drive userdata.  # noqa: E501

        :param secret_ref: The secret_ref of this V1CloudInitConfigDriveSource.  # noqa: E501
        :type: K8sIoApiCoreV1LocalObjectReference
        """

        self._secret_ref = secret_ref

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

        UserData contains config drive inline cloud-init userdata.  # noqa: E501

        :return: The user_data of this V1CloudInitConfigDriveSource.  # noqa: E501
        :rtype: str
        """
        return self._user_data

    @user_data.setter
    def user_data(self, user_data):
        """Sets the user_data of this V1CloudInitConfigDriveSource.

        UserData contains config drive inline cloud-init userdata.  # noqa: E501

        :param user_data: The user_data of this V1CloudInitConfigDriveSource.  # noqa: E501
        :type: str
        """

        self._user_data = user_data

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

        UserDataBase64 contains config drive cloud-init userdata as a base64 encoded string.  # noqa: E501

        :return: The user_data_base64 of this V1CloudInitConfigDriveSource.  # noqa: E501
        :rtype: str
        """
        return self._user_data_base64

    @user_data_base64.setter
    def user_data_base64(self, user_data_base64):
        """Sets the user_data_base64 of this V1CloudInitConfigDriveSource.

        UserDataBase64 contains config drive cloud-init userdata as a base64 encoded string.  # noqa: E501

        :param user_data_base64: The user_data_base64 of this V1CloudInitConfigDriveSource.  # noqa: E501
        :type: str
        """

        self._user_data_base64 = user_data_base64

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

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(V1CloudInitConfigDriveSource, dict):
            for key, value in self.items():
                result[key] = 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, V1CloudInitConfigDriveSource):
            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, V1CloudInitConfigDriveSource):
            return True

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