# 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 TemplateInfo(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 = {
        'contents': 'str',
        'end_delimiter': 'str',
        'id': 'str',
        'link': 'str',
        'meta': 'dict(str, str)',
        'name': 'str',
        'path': 'str',
        'start_delimiter': 'str'
    }

    attribute_map = {
        'contents': 'Contents',
        'end_delimiter': 'EndDelimiter',
        'id': 'ID',
        'link': 'Link',
        'meta': 'Meta',
        'name': 'Name',
        'path': 'Path',
        'start_delimiter': 'StartDelimiter'
    }

    def __init__(self, contents=None, end_delimiter=None, id=None, link=None, meta=None, name=None, path=None, start_delimiter=None, _configuration=None):  # noqa: E501
        """TemplateInfo - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._contents = None
        self._end_delimiter = None
        self._id = None
        self._link = None
        self._meta = None
        self._name = None
        self._path = None
        self._start_delimiter = None
        self.discriminator = None

        if contents is not None:
            self.contents = contents
        if end_delimiter is not None:
            self.end_delimiter = end_delimiter
        if id is not None:
            self.id = id
        if link is not None:
            self.link = link
        if meta is not None:
            self.meta = meta
        self.name = name
        self.path = path
        if start_delimiter is not None:
            self.start_delimiter = start_delimiter

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

        Contents that should be used when this template needs to be expanded.  Either this or ID should be set.  # noqa: E501

        :return: The contents of this TemplateInfo.  # noqa: E501
        :rtype: str
        """
        return self._contents

    @contents.setter
    def contents(self, contents):
        """Sets the contents of this TemplateInfo.

        Contents that should be used when this template needs to be expanded.  Either this or ID should be set.  # noqa: E501

        :param contents: The contents of this TemplateInfo.  # noqa: E501
        :type: str
        """

        self._contents = contents

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

        EndDelimiter is an optional end delimiter.  # noqa: E501

        :return: The end_delimiter of this TemplateInfo.  # noqa: E501
        :rtype: str
        """
        return self._end_delimiter

    @end_delimiter.setter
    def end_delimiter(self, end_delimiter):
        """Sets the end_delimiter of this TemplateInfo.

        EndDelimiter is an optional end delimiter.  # noqa: E501

        :param end_delimiter: The end_delimiter of this TemplateInfo.  # noqa: E501
        :type: str
        """

        self._end_delimiter = end_delimiter

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

        ID of the template that should be expanded.  Either this or Contents should be set  # noqa: E501

        :return: The id of this TemplateInfo.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this TemplateInfo.

        ID of the template that should be expanded.  Either this or Contents should be set  # noqa: E501

        :param id: The id of this TemplateInfo.  # noqa: E501
        :type: str
        """

        self._id = id

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

        Link optionally references another file to put at the path location.  # noqa: E501

        :return: The link of this TemplateInfo.  # noqa: E501
        :rtype: str
        """
        return self._link

    @link.setter
    def link(self, link):
        """Sets the link of this TemplateInfo.

        Link optionally references another file to put at the path location.  # noqa: E501

        :param link: The link of this TemplateInfo.  # noqa: E501
        :type: str
        """

        self._link = link

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

        Meta for the TemplateInfo.  This can be used by the job running system and the bootenvs to handle OS, arch, and firmware differences.  # noqa: E501

        :return: The meta of this TemplateInfo.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._meta

    @meta.setter
    def meta(self, meta):
        """Sets the meta of this TemplateInfo.

        Meta for the TemplateInfo.  This can be used by the job running system and the bootenvs to handle OS, arch, and firmware differences.  # noqa: E501

        :param meta: The meta of this TemplateInfo.  # noqa: E501
        :type: dict(str, str)
        """

        self._meta = meta

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

        Name of the template  # noqa: E501

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

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

        Name of the template  # noqa: E501

        :param name: The name of this TemplateInfo.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        A text/template that specifies how to create the final path the template should be written to.  # noqa: E501

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

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

        A text/template that specifies how to create the final path the template should be written to.  # noqa: E501

        :param path: The path of this TemplateInfo.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and path is None:
            raise ValueError("Invalid value for `path`, must not be `None`")  # noqa: E501

        self._path = path

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

        StartDelimiter is an optional start delimiter.  # noqa: E501

        :return: The start_delimiter of this TemplateInfo.  # noqa: E501
        :rtype: str
        """
        return self._start_delimiter

    @start_delimiter.setter
    def start_delimiter(self, start_delimiter):
        """Sets the start_delimiter of this TemplateInfo.

        StartDelimiter is an optional start delimiter.  # noqa: E501

        :param start_delimiter: The start_delimiter of this TemplateInfo.  # noqa: E501
        :type: str
        """

        self._start_delimiter = start_delimiter

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

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