# coding: utf-8

"""
    DigitalRebar Provision Server

    # An RestFUL API-driven Provisioner and DHCP server  # noqa: E501

    OpenAPI spec version: 4.14.0
    Contact: support@rackn.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from drppy_client.configuration import Configuration


class FileData(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 = {
        'explode': 'bool',
        'path': 'str',
        'sha256_sum': 'str',
        'source': 'str'
    }

    attribute_map = {
        'explode': 'Explode',
        'path': 'Path',
        'sha256_sum': 'Sha256Sum',
        'source': 'Source'
    }

    def __init__(self, explode=None, path=None, sha256_sum=None, source=None, _configuration=None):  # noqa: E501
        """FileData - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._explode = None
        self._path = None
        self._sha256_sum = None
        self._source = None
        self.discriminator = None

        if explode is not None:
            self.explode = explode
        if path is not None:
            self.path = path
        if sha256_sum is not None:
            self.sha256_sum = sha256_sum
        if source is not None:
            self.source = source

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

        Explode indicates if the file should be unzipped or untarred when uploaded.  # noqa: E501

        :return: The explode of this FileData.  # noqa: E501
        :rtype: bool
        """
        return self._explode

    @explode.setter
    def explode(self, explode):
        """Sets the explode of this FileData.

        Explode indicates if the file should be unzipped or untarred when uploaded.  # noqa: E501

        :param explode: The explode of this FileData.  # noqa: E501
        :type: bool
        """

        self._explode = explode

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

        Path is the path to the file.  Including name e.g. files/raid/jjj  # noqa: E501

        :return: The path of this FileData.  # noqa: E501
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """Sets the path of this FileData.

        Path is the path to the file.  Including name e.g. files/raid/jjj  # noqa: E501

        :param path: The path of this FileData.  # noqa: E501
        :type: str
        """

        self._path = path

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

        Sha256Sum of the item  # noqa: E501

        :return: The sha256_sum of this FileData.  # noqa: E501
        :rtype: str
        """
        return self._sha256_sum

    @sha256_sum.setter
    def sha256_sum(self, sha256_sum):
        """Sets the sha256_sum of this FileData.

        Sha256Sum of the item  # noqa: E501

        :param sha256_sum: The sha256_sum of this FileData.  # noqa: E501
        :type: str
        """

        self._sha256_sum = sha256_sum

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

        Source is a URL formatted location to get file from - self://path is on this DRP  # noqa: E501

        :return: The source of this FileData.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this FileData.

        Source is a URL formatted location to get file from - self://path is on this DRP  # noqa: E501

        :param source: The source of this FileData.  # noqa: E501
        :type: str
        """

        self._source = source

    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(FileData, 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, FileData):
            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, FileData):
            return True

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