# coding: utf-8

"""
    Tekton

    Python SDK for Tekton Pipeline  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from tekton.models.v1alpha1_pipeline_resource_spec import V1alpha1PipelineResourceSpec  # noqa: F401,E501
from tekton.models.v1beta1_pipeline_resource_ref import V1beta1PipelineResourceRef  # noqa: F401,E501


class V1beta1TaskResourceBinding(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 = {
        'name': 'str',
        'paths': 'list[str]',
        'resource_ref': 'V1beta1PipelineResourceRef',
        'resource_spec': 'V1alpha1PipelineResourceSpec'
    }

    attribute_map = {
        'name': 'name',
        'paths': 'paths',
        'resource_ref': 'resourceRef',
        'resource_spec': 'resourceSpec'
    }

    def __init__(self, name=None, paths=None, resource_ref=None, resource_spec=None):  # noqa: E501
        """V1beta1TaskResourceBinding - a model defined in Swagger"""  # noqa: E501

        self._name = None
        self._paths = None
        self._resource_ref = None
        self._resource_spec = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if paths is not None:
            self.paths = paths
        if resource_ref is not None:
            self.resource_ref = resource_ref
        if resource_spec is not None:
            self.resource_spec = resource_spec

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

        Name is the name of the PipelineResource in the Pipeline's declaration  # noqa: E501

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

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

        Name is the name of the PipelineResource in the Pipeline's declaration  # noqa: E501

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

        self._name = name

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

        Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead. The optional Path field corresponds to a path on disk at which the Resource can be found (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource).  # noqa: E501

        :return: The paths of this V1beta1TaskResourceBinding.  # noqa: E501
        :rtype: list[str]
        """
        return self._paths

    @paths.setter
    def paths(self, paths):
        """Sets the paths of this V1beta1TaskResourceBinding.

        Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead. The optional Path field corresponds to a path on disk at which the Resource can be found (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource).  # noqa: E501

        :param paths: The paths of this V1beta1TaskResourceBinding.  # noqa: E501
        :type: list[str]
        """

        self._paths = paths

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

        ResourceRef is a reference to the instance of the actual PipelineResource that should be used  # noqa: E501

        :return: The resource_ref of this V1beta1TaskResourceBinding.  # noqa: E501
        :rtype: V1beta1PipelineResourceRef
        """
        return self._resource_ref

    @resource_ref.setter
    def resource_ref(self, resource_ref):
        """Sets the resource_ref of this V1beta1TaskResourceBinding.

        ResourceRef is a reference to the instance of the actual PipelineResource that should be used  # noqa: E501

        :param resource_ref: The resource_ref of this V1beta1TaskResourceBinding.  # noqa: E501
        :type: V1beta1PipelineResourceRef
        """

        self._resource_ref = resource_ref

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

        ResourceSpec is specification of a resource that should be created and consumed by the task  # noqa: E501

        :return: The resource_spec of this V1beta1TaskResourceBinding.  # noqa: E501
        :rtype: V1alpha1PipelineResourceSpec
        """
        return self._resource_spec

    @resource_spec.setter
    def resource_spec(self, resource_spec):
        """Sets the resource_spec of this V1beta1TaskResourceBinding.

        ResourceSpec is specification of a resource that should be created and consumed by the task  # noqa: E501

        :param resource_spec: The resource_spec of this V1beta1TaskResourceBinding.  # noqa: E501
        :type: V1alpha1PipelineResourceSpec
        """

        self._resource_spec = resource_spec

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

        return self.__dict__ == other.__dict__

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