# 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

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

class V1LightningworkSpec(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 = {
        'build_spec': 'V1BuildSpec',
        'cloud_space_id': 'str',
        'cluster_driver': 'V1LightningworkClusterDriver',
        'cluster_id': 'str',
        'compute_config': 'V1ComputeConfig',
        'data_connection_mounts': 'list[V1DataConnectionMount]',
        'data_connections': 'list[V1DataConnection]',
        'desired_state': 'V1LightningworkState',
        'drives': 'list[V1LightningworkDrives]',
        'env': 'list[V1EnvVar]',
        'lightningapp_instance_id': 'str',
        'network_config': 'list[V1NetworkConfig]',
        'pause_automation': 'bool',
        'restart_policy': 'V1LightningappRestartPolicy',
        'user_id': 'str',
        'user_requested_compute_config': 'V1UserRequestedComputeConfig'
    }

    attribute_map = {
        'build_spec': 'buildSpec',
        'cloud_space_id': 'cloudSpaceId',
        'cluster_driver': 'clusterDriver',
        'cluster_id': 'clusterId',
        'compute_config': 'computeConfig',
        'data_connection_mounts': 'dataConnectionMounts',
        'data_connections': 'dataConnections',
        'desired_state': 'desiredState',
        'drives': 'drives',
        'env': 'env',
        'lightningapp_instance_id': 'lightningappInstanceId',
        'network_config': 'networkConfig',
        'pause_automation': 'pauseAutomation',
        'restart_policy': 'restartPolicy',
        'user_id': 'userId',
        'user_requested_compute_config': 'userRequestedComputeConfig'
    }

    def __init__(self, build_spec: 'V1BuildSpec' =None, cloud_space_id: 'str' =None, cluster_driver: 'V1LightningworkClusterDriver' =None, cluster_id: 'str' =None, compute_config: 'V1ComputeConfig' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, data_connections: 'list[V1DataConnection]' =None, desired_state: 'V1LightningworkState' =None, drives: 'list[V1LightningworkDrives]' =None, env: 'list[V1EnvVar]' =None, lightningapp_instance_id: 'str' =None, network_config: 'list[V1NetworkConfig]' =None, pause_automation: 'bool' =None, restart_policy: 'V1LightningappRestartPolicy' =None, user_id: 'str' =None, user_requested_compute_config: 'V1UserRequestedComputeConfig' =None):  # noqa: E501
        """V1LightningworkSpec - a model defined in Swagger"""  # noqa: E501
        self._build_spec = None
        self._cloud_space_id = None
        self._cluster_driver = None
        self._cluster_id = None
        self._compute_config = None
        self._data_connection_mounts = None
        self._data_connections = None
        self._desired_state = None
        self._drives = None
        self._env = None
        self._lightningapp_instance_id = None
        self._network_config = None
        self._pause_automation = None
        self._restart_policy = None
        self._user_id = None
        self._user_requested_compute_config = None
        self.discriminator = None
        if build_spec is not None:
            self.build_spec = build_spec
        if cloud_space_id is not None:
            self.cloud_space_id = cloud_space_id
        if cluster_driver is not None:
            self.cluster_driver = cluster_driver
        if cluster_id is not None:
            self.cluster_id = cluster_id
        if compute_config is not None:
            self.compute_config = compute_config
        if data_connection_mounts is not None:
            self.data_connection_mounts = data_connection_mounts
        if data_connections is not None:
            self.data_connections = data_connections
        if desired_state is not None:
            self.desired_state = desired_state
        if drives is not None:
            self.drives = drives
        if env is not None:
            self.env = env
        if lightningapp_instance_id is not None:
            self.lightningapp_instance_id = lightningapp_instance_id
        if network_config is not None:
            self.network_config = network_config
        if pause_automation is not None:
            self.pause_automation = pause_automation
        if restart_policy is not None:
            self.restart_policy = restart_policy
        if user_id is not None:
            self.user_id = user_id
        if user_requested_compute_config is not None:
            self.user_requested_compute_config = user_requested_compute_config

    @property
    def build_spec(self) -> 'V1BuildSpec':
        """Gets the build_spec of this V1LightningworkSpec.  # noqa: E501


        :return: The build_spec of this V1LightningworkSpec.  # noqa: E501
        :rtype: V1BuildSpec
        """
        return self._build_spec

    @build_spec.setter
    def build_spec(self, build_spec: 'V1BuildSpec'):
        """Sets the build_spec of this V1LightningworkSpec.


        :param build_spec: The build_spec of this V1LightningworkSpec.  # noqa: E501
        :type: V1BuildSpec
        """

        self._build_spec = build_spec

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


        :return: The cloud_space_id of this V1LightningworkSpec.  # noqa: E501
        :rtype: str
        """
        return self._cloud_space_id

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


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

        self._cloud_space_id = cloud_space_id

    @property
    def cluster_driver(self) -> 'V1LightningworkClusterDriver':
        """Gets the cluster_driver of this V1LightningworkSpec.  # noqa: E501


        :return: The cluster_driver of this V1LightningworkSpec.  # noqa: E501
        :rtype: V1LightningworkClusterDriver
        """
        return self._cluster_driver

    @cluster_driver.setter
    def cluster_driver(self, cluster_driver: 'V1LightningworkClusterDriver'):
        """Sets the cluster_driver of this V1LightningworkSpec.


        :param cluster_driver: The cluster_driver of this V1LightningworkSpec.  # noqa: E501
        :type: V1LightningworkClusterDriver
        """

        self._cluster_driver = cluster_driver

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


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

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


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

        self._cluster_id = cluster_id

    @property
    def compute_config(self) -> 'V1ComputeConfig':
        """Gets the compute_config of this V1LightningworkSpec.  # noqa: E501


        :return: The compute_config of this V1LightningworkSpec.  # noqa: E501
        :rtype: V1ComputeConfig
        """
        return self._compute_config

    @compute_config.setter
    def compute_config(self, compute_config: 'V1ComputeConfig'):
        """Sets the compute_config of this V1LightningworkSpec.


        :param compute_config: The compute_config of this V1LightningworkSpec.  # noqa: E501
        :type: V1ComputeConfig
        """

        self._compute_config = compute_config

    @property
    def data_connection_mounts(self) -> 'list[V1DataConnectionMount]':
        """Gets the data_connection_mounts of this V1LightningworkSpec.  # noqa: E501


        :return: The data_connection_mounts of this V1LightningworkSpec.  # noqa: E501
        :rtype: list[V1DataConnectionMount]
        """
        return self._data_connection_mounts

    @data_connection_mounts.setter
    def data_connection_mounts(self, data_connection_mounts: 'list[V1DataConnectionMount]'):
        """Sets the data_connection_mounts of this V1LightningworkSpec.


        :param data_connection_mounts: The data_connection_mounts of this V1LightningworkSpec.  # noqa: E501
        :type: list[V1DataConnectionMount]
        """

        self._data_connection_mounts = data_connection_mounts

    @property
    def data_connections(self) -> 'list[V1DataConnection]':
        """Gets the data_connections of this V1LightningworkSpec.  # noqa: E501


        :return: The data_connections of this V1LightningworkSpec.  # noqa: E501
        :rtype: list[V1DataConnection]
        """
        return self._data_connections

    @data_connections.setter
    def data_connections(self, data_connections: 'list[V1DataConnection]'):
        """Sets the data_connections of this V1LightningworkSpec.


        :param data_connections: The data_connections of this V1LightningworkSpec.  # noqa: E501
        :type: list[V1DataConnection]
        """

        self._data_connections = data_connections

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


        :return: The desired_state of this V1LightningworkSpec.  # noqa: E501
        :rtype: V1LightningworkState
        """
        return self._desired_state

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


        :param desired_state: The desired_state of this V1LightningworkSpec.  # noqa: E501
        :type: V1LightningworkState
        """

        self._desired_state = desired_state

    @property
    def drives(self) -> 'list[V1LightningworkDrives]':
        """Gets the drives of this V1LightningworkSpec.  # noqa: E501


        :return: The drives of this V1LightningworkSpec.  # noqa: E501
        :rtype: list[V1LightningworkDrives]
        """
        return self._drives

    @drives.setter
    def drives(self, drives: 'list[V1LightningworkDrives]'):
        """Sets the drives of this V1LightningworkSpec.


        :param drives: The drives of this V1LightningworkSpec.  # noqa: E501
        :type: list[V1LightningworkDrives]
        """

        self._drives = drives

    @property
    def env(self) -> 'list[V1EnvVar]':
        """Gets the env of this V1LightningworkSpec.  # noqa: E501


        :return: The env of this V1LightningworkSpec.  # noqa: E501
        :rtype: list[V1EnvVar]
        """
        return self._env

    @env.setter
    def env(self, env: 'list[V1EnvVar]'):
        """Sets the env of this V1LightningworkSpec.


        :param env: The env of this V1LightningworkSpec.  # noqa: E501
        :type: list[V1EnvVar]
        """

        self._env = env

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


        :return: The lightningapp_instance_id of this V1LightningworkSpec.  # noqa: E501
        :rtype: str
        """
        return self._lightningapp_instance_id

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


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

        self._lightningapp_instance_id = lightningapp_instance_id

    @property
    def network_config(self) -> 'list[V1NetworkConfig]':
        """Gets the network_config of this V1LightningworkSpec.  # noqa: E501


        :return: The network_config of this V1LightningworkSpec.  # noqa: E501
        :rtype: list[V1NetworkConfig]
        """
        return self._network_config

    @network_config.setter
    def network_config(self, network_config: 'list[V1NetworkConfig]'):
        """Sets the network_config of this V1LightningworkSpec.


        :param network_config: The network_config of this V1LightningworkSpec.  # noqa: E501
        :type: list[V1NetworkConfig]
        """

        self._network_config = network_config

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


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

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


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

        self._pause_automation = pause_automation

    @property
    def restart_policy(self) -> 'V1LightningappRestartPolicy':
        """Gets the restart_policy of this V1LightningworkSpec.  # noqa: E501


        :return: The restart_policy of this V1LightningworkSpec.  # noqa: E501
        :rtype: V1LightningappRestartPolicy
        """
        return self._restart_policy

    @restart_policy.setter
    def restart_policy(self, restart_policy: 'V1LightningappRestartPolicy'):
        """Sets the restart_policy of this V1LightningworkSpec.


        :param restart_policy: The restart_policy of this V1LightningworkSpec.  # noqa: E501
        :type: V1LightningappRestartPolicy
        """

        self._restart_policy = restart_policy

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


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

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


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

        self._user_id = user_id

    @property
    def user_requested_compute_config(self) -> 'V1UserRequestedComputeConfig':
        """Gets the user_requested_compute_config of this V1LightningworkSpec.  # noqa: E501


        :return: The user_requested_compute_config of this V1LightningworkSpec.  # noqa: E501
        :rtype: V1UserRequestedComputeConfig
        """
        return self._user_requested_compute_config

    @user_requested_compute_config.setter
    def user_requested_compute_config(self, user_requested_compute_config: 'V1UserRequestedComputeConfig'):
        """Sets the user_requested_compute_config of this V1LightningworkSpec.


        :param user_requested_compute_config: The user_requested_compute_config of this V1LightningworkSpec.  # noqa: E501
        :type: V1UserRequestedComputeConfig
        """

        self._user_requested_compute_config = user_requested_compute_config

    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(V1LightningworkSpec, 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: 'V1LightningworkSpec') -> bool:
        """Returns true if both objects are equal"""
        if not isinstance(other, V1LightningworkSpec):
            return False

        return self.__dict__ == other.__dict__

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