# coding: utf-8

"""
    STACKL

    stackl  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from stackl_client.configuration import Configuration


class InfrastructureBaseDocument(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 = {
        'name': 'str',
        'category': 'str',
        'type': 'str',
        'cloud_provider': 'str',
        'params': 'object',
        'secrets': 'object',
        'outputs': 'object',
        'resources': 'object',
        'policies': 'object',
        'packages': 'list[str]',
        'tags': 'object',
        'agent': 'str',
        'description': 'str'
    }

    attribute_map = {
        'name': 'name',
        'category': 'category',
        'type': 'type',
        'cloud_provider': 'cloud_provider',
        'params': 'params',
        'secrets': 'secrets',
        'outputs': 'outputs',
        'resources': 'resources',
        'policies': 'policies',
        'packages': 'packages',
        'tags': 'tags',
        'agent': 'agent',
        'description': 'description'
    }

    def __init__(self, name=None, category=None, type=None, cloud_provider='', params=None, secrets=None, outputs=None, resources=None, policies=None, packages=[], tags=None, agent='', description='Base Document', local_vars_configuration=None):  # noqa: E501
        """InfrastructureBaseDocument - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._category = None
        self._type = None
        self._cloud_provider = None
        self._params = None
        self._secrets = None
        self._outputs = None
        self._resources = None
        self._policies = None
        self._packages = None
        self._tags = None
        self._agent = None
        self._description = None
        self.discriminator = None

        self.name = name
        self.category = category
        self.type = type
        if cloud_provider is not None:
            self.cloud_provider = cloud_provider
        if params is not None:
            self.params = params
        if secrets is not None:
            self.secrets = secrets
        if outputs is not None:
            self.outputs = outputs
        if resources is not None:
            self.resources = resources
        if policies is not None:
            self.policies = policies
        if packages is not None:
            self.packages = packages
        if tags is not None:
            self.tags = tags
        if agent is not None:
            self.agent = agent
        if description is not None:
            self.description = description

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


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

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


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

        self._name = name

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


        :return: The category of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this InfrastructureBaseDocument.


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

        self._category = category

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


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

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


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

        self._type = type

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


        :return: The cloud_provider of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: str
        """
        return self._cloud_provider

    @cloud_provider.setter
    def cloud_provider(self, cloud_provider):
        """Sets the cloud_provider of this InfrastructureBaseDocument.


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

        self._cloud_provider = cloud_provider

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


        :return: The params of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: object
        """
        return self._params

    @params.setter
    def params(self, params):
        """Sets the params of this InfrastructureBaseDocument.


        :param params: The params of this InfrastructureBaseDocument.  # noqa: E501
        :type params: object
        """

        self._params = params

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


        :return: The secrets of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: object
        """
        return self._secrets

    @secrets.setter
    def secrets(self, secrets):
        """Sets the secrets of this InfrastructureBaseDocument.


        :param secrets: The secrets of this InfrastructureBaseDocument.  # noqa: E501
        :type secrets: object
        """

        self._secrets = secrets

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


        :return: The outputs of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: object
        """
        return self._outputs

    @outputs.setter
    def outputs(self, outputs):
        """Sets the outputs of this InfrastructureBaseDocument.


        :param outputs: The outputs of this InfrastructureBaseDocument.  # noqa: E501
        :type outputs: object
        """

        self._outputs = outputs

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


        :return: The resources of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: object
        """
        return self._resources

    @resources.setter
    def resources(self, resources):
        """Sets the resources of this InfrastructureBaseDocument.


        :param resources: The resources of this InfrastructureBaseDocument.  # noqa: E501
        :type resources: object
        """

        self._resources = resources

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


        :return: The policies of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: object
        """
        return self._policies

    @policies.setter
    def policies(self, policies):
        """Sets the policies of this InfrastructureBaseDocument.


        :param policies: The policies of this InfrastructureBaseDocument.  # noqa: E501
        :type policies: object
        """

        self._policies = policies

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


        :return: The packages of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: list[str]
        """
        return self._packages

    @packages.setter
    def packages(self, packages):
        """Sets the packages of this InfrastructureBaseDocument.


        :param packages: The packages of this InfrastructureBaseDocument.  # noqa: E501
        :type packages: list[str]
        """

        self._packages = packages

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


        :return: The tags of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: object
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this InfrastructureBaseDocument.


        :param tags: The tags of this InfrastructureBaseDocument.  # noqa: E501
        :type tags: object
        """

        self._tags = tags

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


        :return: The agent of this InfrastructureBaseDocument.  # noqa: E501
        :rtype: str
        """
        return self._agent

    @agent.setter
    def agent(self, agent):
        """Sets the agent of this InfrastructureBaseDocument.


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

        self._agent = agent

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


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

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


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

        self._description = description

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}
        for attr, _ in six.iteritems(self.openapi_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] = {item[0]: (item[1].to_dict() if hasattr(item[1], "to_dict") else (
                    [x.to_dict() if hasattr(x, "to_dict") else x for x in item[1]]
                    if isinstance(item[1], list)
                else item[1]) )
                for item in value.items()}
            else:
                result[attr] = 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, InfrastructureBaseDocument):
            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, InfrastructureBaseDocument):
            return True

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