# coding: utf-8

"""
    Argo

    Python client for Argo Workflows  # noqa: E501

    OpenAPI spec version: master
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class V1alpha1Artifact(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 = {
        'archive': 'V1alpha1ArchiveStrategy',
        'artifact_location': 'V1alpha1ArtifactLocation',
        '_from': 'str',
        'global_name': 'str',
        'mode': 'int',
        'name': 'str',
        'optional': 'bool',
        'path': 'str'
    }

    attribute_map = {
        'archive': 'archive',
        'artifact_location': 'artifactLocation',
        '_from': 'from',
        'global_name': 'globalName',
        'mode': 'mode',
        'name': 'name',
        'optional': 'optional',
        'path': 'path'
    }

    def __init__(self, archive=None, artifact_location=None, _from=None, global_name=None, mode=None, name=None, optional=None, path=None):  # noqa: E501
        """V1alpha1Artifact - a model defined in Swagger"""  # noqa: E501

        self._archive = None
        self._artifact_location = None
        self.__from = None
        self._global_name = None
        self._mode = None
        self._name = None
        self._optional = None
        self._path = None
        self.discriminator = None

        if archive is not None:
            self.archive = archive
        if artifact_location is not None:
            self.artifact_location = artifact_location
        if _from is not None:
            self._from = _from
        if global_name is not None:
            self.global_name = global_name
        if mode is not None:
            self.mode = mode
        if name is not None:
            self.name = name
        if optional is not None:
            self.optional = optional
        if path is not None:
            self.path = path

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

        Archive controls how the artifact will be saved to the artifact repository.  # noqa: E501

        :return: The archive of this V1alpha1Artifact.  # noqa: E501
        :rtype: V1alpha1ArchiveStrategy
        """
        return self._archive

    @archive.setter
    def archive(self, archive):
        """Sets the archive of this V1alpha1Artifact.

        Archive controls how the artifact will be saved to the artifact repository.  # noqa: E501

        :param archive: The archive of this V1alpha1Artifact.  # noqa: E501
        :type: V1alpha1ArchiveStrategy
        """

        self._archive = archive

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


        :return: The artifact_location of this V1alpha1Artifact.  # noqa: E501
        :rtype: V1alpha1ArtifactLocation
        """
        return self._artifact_location

    @artifact_location.setter
    def artifact_location(self, artifact_location):
        """Sets the artifact_location of this V1alpha1Artifact.


        :param artifact_location: The artifact_location of this V1alpha1Artifact.  # noqa: E501
        :type: V1alpha1ArtifactLocation
        """

        self._artifact_location = artifact_location

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


        :return: The _from of this V1alpha1Artifact.  # noqa: E501
        :rtype: str
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this V1alpha1Artifact.


        :param _from: The _from of this V1alpha1Artifact.  # noqa: E501
        :type: str
        """

        self.__from = _from

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


        :return: The global_name of this V1alpha1Artifact.  # noqa: E501
        :rtype: str
        """
        return self._global_name

    @global_name.setter
    def global_name(self, global_name):
        """Sets the global_name of this V1alpha1Artifact.


        :param global_name: The global_name of this V1alpha1Artifact.  # noqa: E501
        :type: str
        """

        self._global_name = global_name

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

        mode bits to use on this file, must be a value between 0 and 0777 set when loading input artifacts.  # noqa: E501

        :return: The mode of this V1alpha1Artifact.  # noqa: E501
        :rtype: int
        """
        return self._mode

    @mode.setter
    def mode(self, mode):
        """Sets the mode of this V1alpha1Artifact.

        mode bits to use on this file, must be a value between 0 and 0777 set when loading input artifacts.  # noqa: E501

        :param mode: The mode of this V1alpha1Artifact.  # noqa: E501
        :type: int
        """

        self._mode = mode

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

        name of the artifact. must be unique within a template's inputs/outputs.  # noqa: E501

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

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

        name of the artifact. must be unique within a template's inputs/outputs.  # noqa: E501

        :param name: The name of this V1alpha1Artifact.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The optional of this V1alpha1Artifact.  # noqa: E501
        :rtype: bool
        """
        return self._optional

    @optional.setter
    def optional(self, optional):
        """Sets the optional of this V1alpha1Artifact.


        :param optional: The optional of this V1alpha1Artifact.  # noqa: E501
        :type: bool
        """

        self._optional = optional

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


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

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


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

        self._path = path

    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(V1alpha1Artifact, 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, V1alpha1Artifact):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
