from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from openapi_server.models.base_model import Model
from openapi_server import util


class ExecPythonScriptRequest(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, script=None):  # noqa: E501
        """ExecPythonScriptRequest - a model defined in OpenAPI

        :param script: The script of this ExecPythonScriptRequest.  # noqa: E501
        :type script: str
        """
        self.openapi_types = {
            'script': str
        }

        self.attribute_map = {
            'script': 'script'
        }

        self._script = script

    @classmethod
    def from_dict(cls, dikt) -> 'ExecPythonScriptRequest':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The exec_python_script_request of this ExecPythonScriptRequest.  # noqa: E501
        :rtype: ExecPythonScriptRequest
        """
        return util.deserialize_model(dikt, cls)

    @property
    def script(self) -> str:
        """Gets the script of this ExecPythonScriptRequest.

        e.g., \"op('/project1/text_over_image').outputConnectors[0].connect(op('/project1/out1'))\"  # noqa: E501

        :return: The script of this ExecPythonScriptRequest.
        :rtype: str
        """
        return self._script

    @script.setter
    def script(self, script: str):
        """Sets the script of this ExecPythonScriptRequest.

        e.g., \"op('/project1/text_over_image').outputConnectors[0].connect(op('/project1/out1'))\"  # noqa: E501

        :param script: The script of this ExecPythonScriptRequest.
        :type script: str
        """
        if script is None:
            raise ValueError("Invalid value for `script`, must not be `None`")  # noqa: E501

        self._script = script
