# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from vessl.openapi_client.configuration import Configuration


class PersistentArtifactCreateAPIInput(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 = {
        'artifact_name': 'str',
        'description': 'str',
        'managed_storage_configuration': 'V1ManagedStorageConfiguration',
        'nfs_storage_configuration': 'V1NFSStorageConfiguration',
        'parent_artifact_id': 'int',
        's3_storage_configuration': 'V1S3StorageConfiguration',
        'storage_type': 'str',
        'sub_path': 'str'
    }

    attribute_map = {
        'artifact_name': 'artifact_name',
        'description': 'description',
        'managed_storage_configuration': 'managed_storage_configuration',
        'nfs_storage_configuration': 'nfs_storage_configuration',
        'parent_artifact_id': 'parent_artifact_id',
        's3_storage_configuration': 's3_storage_configuration',
        'storage_type': 'storage_type',
        'sub_path': 'sub_path'
    }

    def __init__(self, artifact_name=None, description=None, managed_storage_configuration=None, nfs_storage_configuration=None, parent_artifact_id=None, s3_storage_configuration=None, storage_type='managed', sub_path=None, local_vars_configuration=None):  # noqa: E501
        """PersistentArtifactCreateAPIInput - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._artifact_name = None
        self._description = None
        self._managed_storage_configuration = None
        self._nfs_storage_configuration = None
        self._parent_artifact_id = None
        self._s3_storage_configuration = None
        self._storage_type = None
        self._sub_path = None
        self.discriminator = None

        self.artifact_name = artifact_name
        self.description = description
        if managed_storage_configuration is not None:
            self.managed_storage_configuration = managed_storage_configuration
        if nfs_storage_configuration is not None:
            self.nfs_storage_configuration = nfs_storage_configuration
        self.parent_artifact_id = parent_artifact_id
        if s3_storage_configuration is not None:
            self.s3_storage_configuration = s3_storage_configuration
        if storage_type is not None:
            self.storage_type = storage_type
        self.sub_path = sub_path

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


        :return: The artifact_name of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._artifact_name

    @artifact_name.setter
    def artifact_name(self, artifact_name):
        """Sets the artifact_name of this PersistentArtifactCreateAPIInput.


        :param artifact_name: The artifact_name of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :type artifact_name: str
        """

        self._artifact_name = artifact_name

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


        :return: The description of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this PersistentArtifactCreateAPIInput.


        :param description: The description of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :type description: str
        """

        self._description = description

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


        :return: The managed_storage_configuration of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :rtype: V1ManagedStorageConfiguration
        """
        return self._managed_storage_configuration

    @managed_storage_configuration.setter
    def managed_storage_configuration(self, managed_storage_configuration):
        """Sets the managed_storage_configuration of this PersistentArtifactCreateAPIInput.


        :param managed_storage_configuration: The managed_storage_configuration of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :type managed_storage_configuration: V1ManagedStorageConfiguration
        """

        self._managed_storage_configuration = managed_storage_configuration

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


        :return: The nfs_storage_configuration of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :rtype: V1NFSStorageConfiguration
        """
        return self._nfs_storage_configuration

    @nfs_storage_configuration.setter
    def nfs_storage_configuration(self, nfs_storage_configuration):
        """Sets the nfs_storage_configuration of this PersistentArtifactCreateAPIInput.


        :param nfs_storage_configuration: The nfs_storage_configuration of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :type nfs_storage_configuration: V1NFSStorageConfiguration
        """

        self._nfs_storage_configuration = nfs_storage_configuration

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


        :return: The parent_artifact_id of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :rtype: int
        """
        return self._parent_artifact_id

    @parent_artifact_id.setter
    def parent_artifact_id(self, parent_artifact_id):
        """Sets the parent_artifact_id of this PersistentArtifactCreateAPIInput.


        :param parent_artifact_id: The parent_artifact_id of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :type parent_artifact_id: int
        """

        self._parent_artifact_id = parent_artifact_id

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


        :return: The s3_storage_configuration of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :rtype: V1S3StorageConfiguration
        """
        return self._s3_storage_configuration

    @s3_storage_configuration.setter
    def s3_storage_configuration(self, s3_storage_configuration):
        """Sets the s3_storage_configuration of this PersistentArtifactCreateAPIInput.


        :param s3_storage_configuration: The s3_storage_configuration of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :type s3_storage_configuration: V1S3StorageConfiguration
        """

        self._s3_storage_configuration = s3_storage_configuration

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


        :return: The storage_type of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._storage_type

    @storage_type.setter
    def storage_type(self, storage_type):
        """Sets the storage_type of this PersistentArtifactCreateAPIInput.


        :param storage_type: The storage_type of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :type storage_type: str
        """
        allowed_values = ["managed", "s3", "nfs"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and storage_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `storage_type` ({0}), must be one of {1}"  # noqa: E501
                .format(storage_type, allowed_values)
            )

        self._storage_type = storage_type

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


        :return: The sub_path of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :rtype: str
        """
        return self._sub_path

    @sub_path.setter
    def sub_path(self, sub_path):
        """Sets the sub_path of this PersistentArtifactCreateAPIInput.


        :param sub_path: The sub_path of this PersistentArtifactCreateAPIInput.  # noqa: E501
        :type sub_path: str
        """

        self._sub_path = sub_path

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, PersistentArtifactCreateAPIInput):
            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, PersistentArtifactCreateAPIInput):
            return True

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