# coding: utf-8

"""
    Agilicus API

    Agilicus API endpoints  # noqa: E501

    The version of the OpenAPI document: 2021.02.12
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class FileUpload(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'org_id': 'str',
        'tag': 'str',
        'label': 'str',
        'region': 'StorageRegion',
        'name': 'str',
        'visibility': 'FileVisibility',
        'md5_hash': 'str',
        'file_zip': 'file'
    }

    attribute_map = {
        'org_id': 'org_id',
        'tag': 'tag',
        'label': 'label',
        'region': 'region',
        'name': 'name',
        'visibility': 'visibility',
        'md5_hash': 'md5_hash',
        'file_zip': 'file_zip'
    }

    def __init__(self, org_id=None, tag=None, label=None, region=None, name=None, visibility=None, md5_hash=None, file_zip=None, local_vars_configuration=None):  # noqa: E501
        """FileUpload - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._org_id = None
        self._tag = None
        self._label = None
        self._region = None
        self._name = None
        self._visibility = None
        self._md5_hash = None
        self._file_zip = None
        self.discriminator = None

        if org_id is not None:
            self.org_id = org_id
        if tag is not None:
            self.tag = tag
        if label is not None:
            self.label = label
        if region is not None:
            self.region = region
        self.name = name
        if visibility is not None:
            self.visibility = visibility
        if md5_hash is not None:
            self.md5_hash = md5_hash
        self.file_zip = file_zip

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

        Unique identifier  # noqa: E501

        :return: The org_id of this FileUpload.  # noqa: E501
        :rtype: str
        """
        return self._org_id

    @org_id.setter
    def org_id(self, org_id):
        """Sets the org_id of this FileUpload.

        Unique identifier  # noqa: E501

        :param org_id: The org_id of this FileUpload.  # noqa: E501
        :type: str
        """

        self._org_id = org_id

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

        A file tag  # noqa: E501

        :return: The tag of this FileUpload.  # noqa: E501
        :rtype: str
        """
        return self._tag

    @tag.setter
    def tag(self, tag):
        """Sets the tag of this FileUpload.

        A file tag  # noqa: E501

        :param tag: The tag of this FileUpload.  # noqa: E501
        :type: str
        """

        self._tag = tag

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

        A file label  # noqa: E501

        :return: The label of this FileUpload.  # noqa: E501
        :rtype: str
        """
        return self._label

    @label.setter
    def label(self, label):
        """Sets the label of this FileUpload.

        A file label  # noqa: E501

        :param label: The label of this FileUpload.  # noqa: E501
        :type: str
        """

        self._label = label

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


        :return: The region of this FileUpload.  # noqa: E501
        :rtype: StorageRegion
        """
        return self._region

    @region.setter
    def region(self, region):
        """Sets the region of this FileUpload.


        :param region: The region of this FileUpload.  # noqa: E501
        :type: StorageRegion
        """

        self._region = region

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

        Name of file  # noqa: E501

        :return: The name of this FileUpload.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this FileUpload.

        Name of file  # noqa: E501

        :param name: The name of this FileUpload.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                name is not None and len(name) > 100):
            raise ValueError("Invalid value for `name`, length must be less than or equal to `100`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                name is not None and len(name) < 1):
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

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


        :return: The visibility of this FileUpload.  # noqa: E501
        :rtype: FileVisibility
        """
        return self._visibility

    @visibility.setter
    def visibility(self, visibility):
        """Sets the visibility of this FileUpload.


        :param visibility: The visibility of this FileUpload.  # noqa: E501
        :type: FileVisibility
        """

        self._visibility = visibility

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

        MD5 Hash of file in base64  # noqa: E501

        :return: The md5_hash of this FileUpload.  # noqa: E501
        :rtype: str
        """
        return self._md5_hash

    @md5_hash.setter
    def md5_hash(self, md5_hash):
        """Sets the md5_hash of this FileUpload.

        MD5 Hash of file in base64  # noqa: E501

        :param md5_hash: The md5_hash of this FileUpload.  # noqa: E501
        :type: str
        """

        self._md5_hash = md5_hash

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

        The contents of the file in binary format  # noqa: E501

        :return: The file_zip of this FileUpload.  # noqa: E501
        :rtype: file
        """
        return self._file_zip

    @file_zip.setter
    def file_zip(self, file_zip):
        """Sets the file_zip of this FileUpload.

        The contents of the file in binary format  # noqa: E501

        :param file_zip: The file_zip of this FileUpload.  # noqa: E501
        :type: file
        """
        if self.local_vars_configuration.client_side_validation and file_zip is None:  # noqa: E501
            raise ValueError("Invalid value for `file_zip`, must not be `None`")  # noqa: E501

        self._file_zip = file_zip

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

        for attr, _ in six.iteritems(self.openapi_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

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

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