# coding: utf-8

"""
    Octopus Server API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from octopus_deploy_swagger_client.models.action_template_parameter_resource import ActionTemplateParameterResource  # noqa: F401,E501
from octopus_deploy_swagger_client.models.property_value_resource import PropertyValueResource  # noqa: F401,E501


class CommunityActionTemplateResource(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 = {
        'id': 'str',
        'type': 'str',
        'name': 'str',
        'author': 'str',
        'description': 'str',
        'version': 'int',
        'website': 'str',
        'history_url': 'str',
        'properties': 'dict(str, PropertyValueResource)',
        'parameters': 'list[ActionTemplateParameterResource]',
        'links': 'dict(str, str)'
    }

    attribute_map = {
        'id': 'Id',
        'type': 'Type',
        'name': 'Name',
        'author': 'Author',
        'description': 'Description',
        'version': 'Version',
        'website': 'Website',
        'history_url': 'HistoryUrl',
        'properties': 'Properties',
        'parameters': 'Parameters',
        'links': 'Links'
    }

    def __init__(self, id=None, type=None, name=None, author=None, description=None, version=None, website=None, history_url=None, properties=None, parameters=None, links=None):  # noqa: E501
        """CommunityActionTemplateResource - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._type = None
        self._name = None
        self._author = None
        self._description = None
        self._version = None
        self._website = None
        self._history_url = None
        self._properties = None
        self._parameters = None
        self._links = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if type is not None:
            self.type = type
        if name is not None:
            self.name = name
        if author is not None:
            self.author = author
        if description is not None:
            self.description = description
        if version is not None:
            self.version = version
        if website is not None:
            self.website = website
        if history_url is not None:
            self.history_url = history_url
        if properties is not None:
            self.properties = properties
        if parameters is not None:
            self.parameters = parameters
        if links is not None:
            self.links = links

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


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

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


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

        self._id = id

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


        :return: The type of this CommunityActionTemplateResource.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this CommunityActionTemplateResource.


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

        self._type = type

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


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

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


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

        self._name = name

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


        :return: The author of this CommunityActionTemplateResource.  # noqa: E501
        :rtype: str
        """
        return self._author

    @author.setter
    def author(self, author):
        """Sets the author of this CommunityActionTemplateResource.


        :param author: The author of this CommunityActionTemplateResource.  # noqa: E501
        :type: str
        """

        self._author = author

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


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

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


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

        self._description = description

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


        :return: The version of this CommunityActionTemplateResource.  # noqa: E501
        :rtype: int
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this CommunityActionTemplateResource.


        :param version: The version of this CommunityActionTemplateResource.  # noqa: E501
        :type: int
        """

        self._version = version

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


        :return: The website of this CommunityActionTemplateResource.  # noqa: E501
        :rtype: str
        """
        return self._website

    @website.setter
    def website(self, website):
        """Sets the website of this CommunityActionTemplateResource.


        :param website: The website of this CommunityActionTemplateResource.  # noqa: E501
        :type: str
        """

        self._website = website

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


        :return: The history_url of this CommunityActionTemplateResource.  # noqa: E501
        :rtype: str
        """
        return self._history_url

    @history_url.setter
    def history_url(self, history_url):
        """Sets the history_url of this CommunityActionTemplateResource.


        :param history_url: The history_url of this CommunityActionTemplateResource.  # noqa: E501
        :type: str
        """

        self._history_url = history_url

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


        :return: The properties of this CommunityActionTemplateResource.  # noqa: E501
        :rtype: dict(str, PropertyValueResource)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this CommunityActionTemplateResource.


        :param properties: The properties of this CommunityActionTemplateResource.  # noqa: E501
        :type: dict(str, PropertyValueResource)
        """

        self._properties = properties

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


        :return: The parameters of this CommunityActionTemplateResource.  # noqa: E501
        :rtype: list[ActionTemplateParameterResource]
        """
        return self._parameters

    @parameters.setter
    def parameters(self, parameters):
        """Sets the parameters of this CommunityActionTemplateResource.


        :param parameters: The parameters of this CommunityActionTemplateResource.  # noqa: E501
        :type: list[ActionTemplateParameterResource]
        """

        self._parameters = parameters

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


        :return: The links of this CommunityActionTemplateResource.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._links

    @links.setter
    def links(self, links):
        """Sets the links of this CommunityActionTemplateResource.


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

        self._links = links

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

        return self.__dict__ == other.__dict__

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