# coding: utf-8

"""
    STACKL

    stackl  # noqa: E501

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


from __future__ import absolute_import

import unittest
import datetime

import stackl_client
from stackl_client.models.stack_instance import StackInstance  # noqa: E501
from stackl_client.rest import ApiException

class TestStackInstance(unittest.TestCase):
    """StackInstance unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test StackInstance
            include_option is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # model = stackl_client.models.stack_instance.StackInstance()  # noqa: E501
        if include_optional :
            return StackInstance(
                name = '0', 
                deleted = True, 
                groups = {
                    'key' : [
                        stackl_client.models.host_target.HostTarget(
                            host = '0', 
                            target = '0', )
                        ]
                    }, 
                instance_params = stackl_client.models.instance_params.Instance Params(), 
                service_params = {
                    'key' : None
                    }, 
                instance_secrets = stackl_client.models.instance_secrets.Instance Secrets(), 
                services = {
                    'key' : [
                        stackl_client.models.stack_instance_service.StackInstanceService(
                            infrastructure_target = '0', 
                            provisioning_parameters = stackl_client.models.provisioning_parameters.Provisioning Parameters(), 
                            cloud_provider = 'generic', 
                            secrets = stackl_client.models.secrets.Secrets(), 
                            hosts = [
                                '0'
                                ], 
                            resources = {
                                'key' : '0'
                                }, 
                            service = '0', 
                            agent = '0', 
                            opa_outputs = stackl_client.models.opa_outputs.Opa Outputs(), 
                            outputs = stackl_client.models.outputs.Outputs(), 
                            packages = [
                                '0'
                                ], 
                            tags = {
                                'key' : '0'
                                }, )
                        ]
                    }, 
                stack_infrastructure_template = '0', 
                stack_application_template = '0', 
                status = [
                    stackl_client.models.stack_instance_status.StackInstanceStatus(
                        functional_requirement = '0', 
                        infrastructure_target = '0', 
                        service = '0', 
                        status = '0', 
                        error_message = '0', )
                    ], 
                type = 'stack_instance', 
                category = 'items'
            )
        else :
            return StackInstance(
                name = '0',
                stack_infrastructure_template = '0',
                stack_application_template = '0',
        )

    def testStackInstance(self):
        """Test StackInstance"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)


if __name__ == '__main__':
    unittest.main()
