# coding: utf-8
"""
    external/v1/auth_service.proto

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

    OpenAPI spec version: version not set

    Generated by: https://github.com/swagger-api/swagger-codegen.git

    NOTE
    ----
    standard swagger-codegen-cli for this python client has been modified
    by custom templates. The purpose of these templates is to include
    typing information in the API and Model code. Please refer to the
    main grid repository for more info
"""

import pprint
import re  # noqa: F401
from typing import TYPE_CHECKING

import six

from cricket_cookie.openapi.configuration import Configuration

if TYPE_CHECKING:
    from datetime import datetime
    from cricket_cookie.openapi.models import *


class V1LightningappSpec(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 = {
        'app_entrypoint_file': 'str',
        'cluster_id': 'str',
        'desired_state': 'V1LightningappState',
        'enable_app_server': 'bool',
        'flow_servers': 'list[V1Flowserver]',
        'image_spec': 'Gridv1ImageSpec',
        'pause_automation': 'bool',
        'source_code_url': 'str',
        'user_id': 'str',
        'works': 'list[V1Work]'
    }

    attribute_map = {
        'app_entrypoint_file': 'appEntrypointFile',
        'cluster_id': 'clusterId',
        'desired_state': 'desiredState',
        'enable_app_server': 'enableAppServer',
        'flow_servers': 'flowServers',
        'image_spec': 'imageSpec',
        'pause_automation': 'pauseAutomation',
        'source_code_url': 'sourceCodeUrl',
        'user_id': 'userId',
        'works': 'works'
    }

    def __init__(self,
                 app_entrypoint_file: 'str' = None,
                 cluster_id: 'str' = None,
                 desired_state: 'V1LightningappState' = None,
                 enable_app_server: 'bool' = None,
                 flow_servers: 'list[V1Flowserver]' = None,
                 image_spec: 'Gridv1ImageSpec' = None,
                 pause_automation: 'bool' = None,
                 source_code_url: 'str' = None,
                 user_id: 'str' = None,
                 works: 'list[V1Work]' = None,
                 _configuration=None):  # noqa: E501
        """V1LightningappSpec - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._app_entrypoint_file = None
        self._cluster_id = None
        self._desired_state = None
        self._enable_app_server = None
        self._flow_servers = None
        self._image_spec = None
        self._pause_automation = None
        self._source_code_url = None
        self._user_id = None
        self._works = None
        self.discriminator = None

        if app_entrypoint_file is not None:
            self.app_entrypoint_file = app_entrypoint_file
        if cluster_id is not None:
            self.cluster_id = cluster_id
        if desired_state is not None:
            self.desired_state = desired_state
        if enable_app_server is not None:
            self.enable_app_server = enable_app_server
        if flow_servers is not None:
            self.flow_servers = flow_servers
        if image_spec is not None:
            self.image_spec = image_spec
        if pause_automation is not None:
            self.pause_automation = pause_automation
        if source_code_url is not None:
            self.source_code_url = source_code_url
        if user_id is not None:
            self.user_id = user_id
        if works is not None:
            self.works = works

    @property
    def app_entrypoint_file(self) -> 'str':
        """Gets the app_entrypoint_file of this V1LightningappSpec.  # noqa: E501


        :return: The app_entrypoint_file of this V1LightningappSpec.  # noqa: E501
        :rtype: str
        """
        return self._app_entrypoint_file

    @app_entrypoint_file.setter
    def app_entrypoint_file(self, app_entrypoint_file: 'str'):
        """Sets the app_entrypoint_file of this V1LightningappSpec.


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

        self._app_entrypoint_file = app_entrypoint_file

    @property
    def cluster_id(self) -> 'str':
        """Gets the cluster_id of this V1LightningappSpec.  # noqa: E501


        :return: The cluster_id of this V1LightningappSpec.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id: 'str'):
        """Sets the cluster_id of this V1LightningappSpec.


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

        self._cluster_id = cluster_id

    @property
    def desired_state(self) -> 'V1LightningappState':
        """Gets the desired_state of this V1LightningappSpec.  # noqa: E501


        :return: The desired_state of this V1LightningappSpec.  # noqa: E501
        :rtype: V1LightningappState
        """
        return self._desired_state

    @desired_state.setter
    def desired_state(self, desired_state: 'V1LightningappState'):
        """Sets the desired_state of this V1LightningappSpec.


        :param desired_state: The desired_state of this V1LightningappSpec.  # noqa: E501
        :type: V1LightningappState
        """

        self._desired_state = desired_state

    @property
    def enable_app_server(self) -> 'bool':
        """Gets the enable_app_server of this V1LightningappSpec.  # noqa: E501


        :return: The enable_app_server of this V1LightningappSpec.  # noqa: E501
        :rtype: bool
        """
        return self._enable_app_server

    @enable_app_server.setter
    def enable_app_server(self, enable_app_server: 'bool'):
        """Sets the enable_app_server of this V1LightningappSpec.


        :param enable_app_server: The enable_app_server of this V1LightningappSpec.  # noqa: E501
        :type: bool
        """

        self._enable_app_server = enable_app_server

    @property
    def flow_servers(self) -> 'list[V1Flowserver]':
        """Gets the flow_servers of this V1LightningappSpec.  # noqa: E501


        :return: The flow_servers of this V1LightningappSpec.  # noqa: E501
        :rtype: list[V1Flowserver]
        """
        return self._flow_servers

    @flow_servers.setter
    def flow_servers(self, flow_servers: 'list[V1Flowserver]'):
        """Sets the flow_servers of this V1LightningappSpec.


        :param flow_servers: The flow_servers of this V1LightningappSpec.  # noqa: E501
        :type: list[V1Flowserver]
        """

        self._flow_servers = flow_servers

    @property
    def image_spec(self) -> 'Gridv1ImageSpec':
        """Gets the image_spec of this V1LightningappSpec.  # noqa: E501


        :return: The image_spec of this V1LightningappSpec.  # noqa: E501
        :rtype: Gridv1ImageSpec
        """
        return self._image_spec

    @image_spec.setter
    def image_spec(self, image_spec: 'Gridv1ImageSpec'):
        """Sets the image_spec of this V1LightningappSpec.


        :param image_spec: The image_spec of this V1LightningappSpec.  # noqa: E501
        :type: Gridv1ImageSpec
        """

        self._image_spec = image_spec

    @property
    def pause_automation(self) -> 'bool':
        """Gets the pause_automation of this V1LightningappSpec.  # noqa: E501


        :return: The pause_automation of this V1LightningappSpec.  # noqa: E501
        :rtype: bool
        """
        return self._pause_automation

    @pause_automation.setter
    def pause_automation(self, pause_automation: 'bool'):
        """Sets the pause_automation of this V1LightningappSpec.


        :param pause_automation: The pause_automation of this V1LightningappSpec.  # noqa: E501
        :type: bool
        """

        self._pause_automation = pause_automation

    @property
    def source_code_url(self) -> 'str':
        """Gets the source_code_url of this V1LightningappSpec.  # noqa: E501


        :return: The source_code_url of this V1LightningappSpec.  # noqa: E501
        :rtype: str
        """
        return self._source_code_url

    @source_code_url.setter
    def source_code_url(self, source_code_url: 'str'):
        """Sets the source_code_url of this V1LightningappSpec.


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

        self._source_code_url = source_code_url

    @property
    def user_id(self) -> 'str':
        """Gets the user_id of this V1LightningappSpec.  # noqa: E501


        :return: The user_id of this V1LightningappSpec.  # noqa: E501
        :rtype: str
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id: 'str'):
        """Sets the user_id of this V1LightningappSpec.


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

        self._user_id = user_id

    @property
    def works(self) -> 'list[V1Work]':
        """Gets the works of this V1LightningappSpec.  # noqa: E501


        :return: The works of this V1LightningappSpec.  # noqa: E501
        :rtype: list[V1Work]
        """
        return self._works

    @works.setter
    def works(self, works: 'list[V1Work]'):
        """Sets the works of this V1LightningappSpec.


        :param works: The works of this V1LightningappSpec.  # noqa: E501
        :type: list[V1Work]
        """

        self._works = works

    def to_dict(self) -> dict:
        """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(V1LightningappSpec, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self) -> str:
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self) -> str:
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other: 'V1LightningappSpec') -> bool:
        """Returns true if both objects are equal"""
        if not isinstance(other, V1LightningappSpec):
            return False

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

    def __ne__(self, other: 'V1LightningappSpec') -> bool:
        """Returns true if both objects are not equal"""
        if not isinstance(other, V1LightningappSpec):
            return True

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