# coding: utf-8

"""
    vefaas

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

    OpenAPI spec version: common-version
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class CreateSandboxRequest(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 = {
        '_async': 'bool',
        'cpu_milli': 'int',
        'envs': 'list[EnvForCreateSandboxInput]',
        'function_id': 'str',
        'instance_image_info': 'InstanceImageInfoForCreateSandboxInput',
        'instance_nas_mount_config': 'InstanceNasMountConfigForCreateSandboxInput',
        'instance_tos_mount_config': 'InstanceTosMountConfigForCreateSandboxInput',
        'max_concurrency': 'int',
        'memory_mb': 'int',
        'metadata': 'dict(str, str)',
        'request_timeout': 'int',
        'session_id': 'str',
        'timeout': 'int',
        'timeout_unit': 'str'
    }

    attribute_map = {
        '_async': 'Async',
        'cpu_milli': 'CpuMilli',
        'envs': 'Envs',
        'function_id': 'FunctionId',
        'instance_image_info': 'InstanceImageInfo',
        'instance_nas_mount_config': 'InstanceNasMountConfig',
        'instance_tos_mount_config': 'InstanceTosMountConfig',
        'max_concurrency': 'MaxConcurrency',
        'memory_mb': 'MemoryMB',
        'metadata': 'Metadata',
        'request_timeout': 'RequestTimeout',
        'session_id': 'SessionId',
        'timeout': 'Timeout',
        'timeout_unit': 'TimeoutUnit'
    }

    def __init__(self, _async=None, cpu_milli=None, envs=None, function_id=None, instance_image_info=None, instance_nas_mount_config=None, instance_tos_mount_config=None, max_concurrency=None, memory_mb=None, metadata=None, request_timeout=None, session_id=None, timeout=None, timeout_unit=None, _configuration=None):  # noqa: E501
        """CreateSandboxRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self.__async = None
        self._cpu_milli = None
        self._envs = None
        self._function_id = None
        self._instance_image_info = None
        self._instance_nas_mount_config = None
        self._instance_tos_mount_config = None
        self._max_concurrency = None
        self._memory_mb = None
        self._metadata = None
        self._request_timeout = None
        self._session_id = None
        self._timeout = None
        self._timeout_unit = None
        self.discriminator = None

        if _async is not None:
            self._async = _async
        if cpu_milli is not None:
            self.cpu_milli = cpu_milli
        if envs is not None:
            self.envs = envs
        self.function_id = function_id
        if instance_image_info is not None:
            self.instance_image_info = instance_image_info
        if instance_nas_mount_config is not None:
            self.instance_nas_mount_config = instance_nas_mount_config
        if instance_tos_mount_config is not None:
            self.instance_tos_mount_config = instance_tos_mount_config
        if max_concurrency is not None:
            self.max_concurrency = max_concurrency
        if memory_mb is not None:
            self.memory_mb = memory_mb
        if metadata is not None:
            self.metadata = metadata
        if request_timeout is not None:
            self.request_timeout = request_timeout
        if session_id is not None:
            self.session_id = session_id
        if timeout is not None:
            self.timeout = timeout
        if timeout_unit is not None:
            self.timeout_unit = timeout_unit

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


        :return: The _async of this CreateSandboxRequest.  # noqa: E501
        :rtype: bool
        """
        return self.__async

    @_async.setter
    def _async(self, _async):
        """Sets the _async of this CreateSandboxRequest.


        :param _async: The _async of this CreateSandboxRequest.  # noqa: E501
        :type: bool
        """

        self.__async = _async

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


        :return: The cpu_milli of this CreateSandboxRequest.  # noqa: E501
        :rtype: int
        """
        return self._cpu_milli

    @cpu_milli.setter
    def cpu_milli(self, cpu_milli):
        """Sets the cpu_milli of this CreateSandboxRequest.


        :param cpu_milli: The cpu_milli of this CreateSandboxRequest.  # noqa: E501
        :type: int
        """

        self._cpu_milli = cpu_milli

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


        :return: The envs of this CreateSandboxRequest.  # noqa: E501
        :rtype: list[EnvForCreateSandboxInput]
        """
        return self._envs

    @envs.setter
    def envs(self, envs):
        """Sets the envs of this CreateSandboxRequest.


        :param envs: The envs of this CreateSandboxRequest.  # noqa: E501
        :type: list[EnvForCreateSandboxInput]
        """

        self._envs = envs

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


        :return: The function_id of this CreateSandboxRequest.  # noqa: E501
        :rtype: str
        """
        return self._function_id

    @function_id.setter
    def function_id(self, function_id):
        """Sets the function_id of this CreateSandboxRequest.


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

        self._function_id = function_id

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


        :return: The instance_image_info of this CreateSandboxRequest.  # noqa: E501
        :rtype: InstanceImageInfoForCreateSandboxInput
        """
        return self._instance_image_info

    @instance_image_info.setter
    def instance_image_info(self, instance_image_info):
        """Sets the instance_image_info of this CreateSandboxRequest.


        :param instance_image_info: The instance_image_info of this CreateSandboxRequest.  # noqa: E501
        :type: InstanceImageInfoForCreateSandboxInput
        """

        self._instance_image_info = instance_image_info

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


        :return: The instance_nas_mount_config of this CreateSandboxRequest.  # noqa: E501
        :rtype: InstanceNasMountConfigForCreateSandboxInput
        """
        return self._instance_nas_mount_config

    @instance_nas_mount_config.setter
    def instance_nas_mount_config(self, instance_nas_mount_config):
        """Sets the instance_nas_mount_config of this CreateSandboxRequest.


        :param instance_nas_mount_config: The instance_nas_mount_config of this CreateSandboxRequest.  # noqa: E501
        :type: InstanceNasMountConfigForCreateSandboxInput
        """

        self._instance_nas_mount_config = instance_nas_mount_config

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


        :return: The instance_tos_mount_config of this CreateSandboxRequest.  # noqa: E501
        :rtype: InstanceTosMountConfigForCreateSandboxInput
        """
        return self._instance_tos_mount_config

    @instance_tos_mount_config.setter
    def instance_tos_mount_config(self, instance_tos_mount_config):
        """Sets the instance_tos_mount_config of this CreateSandboxRequest.


        :param instance_tos_mount_config: The instance_tos_mount_config of this CreateSandboxRequest.  # noqa: E501
        :type: InstanceTosMountConfigForCreateSandboxInput
        """

        self._instance_tos_mount_config = instance_tos_mount_config

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


        :return: The max_concurrency of this CreateSandboxRequest.  # noqa: E501
        :rtype: int
        """
        return self._max_concurrency

    @max_concurrency.setter
    def max_concurrency(self, max_concurrency):
        """Sets the max_concurrency of this CreateSandboxRequest.


        :param max_concurrency: The max_concurrency of this CreateSandboxRequest.  # noqa: E501
        :type: int
        """

        self._max_concurrency = max_concurrency

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


        :return: The memory_mb of this CreateSandboxRequest.  # noqa: E501
        :rtype: int
        """
        return self._memory_mb

    @memory_mb.setter
    def memory_mb(self, memory_mb):
        """Sets the memory_mb of this CreateSandboxRequest.


        :param memory_mb: The memory_mb of this CreateSandboxRequest.  # noqa: E501
        :type: int
        """

        self._memory_mb = memory_mb

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


        :return: The metadata of this CreateSandboxRequest.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this CreateSandboxRequest.


        :param metadata: The metadata of this CreateSandboxRequest.  # noqa: E501
        :type: dict(str, str)
        """

        self._metadata = metadata

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


        :return: The request_timeout of this CreateSandboxRequest.  # noqa: E501
        :rtype: int
        """
        return self._request_timeout

    @request_timeout.setter
    def request_timeout(self, request_timeout):
        """Sets the request_timeout of this CreateSandboxRequest.


        :param request_timeout: The request_timeout of this CreateSandboxRequest.  # noqa: E501
        :type: int
        """

        self._request_timeout = request_timeout

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


        :return: The session_id of this CreateSandboxRequest.  # noqa: E501
        :rtype: str
        """
        return self._session_id

    @session_id.setter
    def session_id(self, session_id):
        """Sets the session_id of this CreateSandboxRequest.


        :param session_id: The session_id of this CreateSandboxRequest.  # noqa: E501
        :type: str
        """

        self._session_id = session_id

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


        :return: The timeout of this CreateSandboxRequest.  # noqa: E501
        :rtype: int
        """
        return self._timeout

    @timeout.setter
    def timeout(self, timeout):
        """Sets the timeout of this CreateSandboxRequest.


        :param timeout: The timeout of this CreateSandboxRequest.  # noqa: E501
        :type: int
        """

        self._timeout = timeout

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


        :return: The timeout_unit of this CreateSandboxRequest.  # noqa: E501
        :rtype: str
        """
        return self._timeout_unit

    @timeout_unit.setter
    def timeout_unit(self, timeout_unit):
        """Sets the timeout_unit of this CreateSandboxRequest.


        :param timeout_unit: The timeout_unit of this CreateSandboxRequest.  # noqa: E501
        :type: str
        """

        self._timeout_unit = timeout_unit

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

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