# coding: utf-8

"""
    aidap

    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 CreateWorkspaceRequest(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 = {
        'branch_settings': 'BranchSettingsForCreateWorkspaceInput',
        'compute_settings': 'ComputeSettingsForCreateWorkspaceInput',
        'engine_type': 'str',
        'engine_version': 'str',
        'network_settings': 'NetworkSettingsForCreateWorkspaceInput',
        'project_name': 'str',
        'workspace_name': 'str',
        'workspace_settings': 'WorkspaceSettingsForCreateWorkspaceInput',
        'workspace_tags': 'list[WorkspaceTagForCreateWorkspaceInput]'
    }

    attribute_map = {
        'branch_settings': 'BranchSettings',
        'compute_settings': 'ComputeSettings',
        'engine_type': 'EngineType',
        'engine_version': 'EngineVersion',
        'network_settings': 'NetworkSettings',
        'project_name': 'ProjectName',
        'workspace_name': 'WorkspaceName',
        'workspace_settings': 'WorkspaceSettings',
        'workspace_tags': 'WorkspaceTags'
    }

    def __init__(self, branch_settings=None, compute_settings=None, engine_type=None, engine_version=None, network_settings=None, project_name=None, workspace_name=None, workspace_settings=None, workspace_tags=None, _configuration=None):  # noqa: E501
        """CreateWorkspaceRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._branch_settings = None
        self._compute_settings = None
        self._engine_type = None
        self._engine_version = None
        self._network_settings = None
        self._project_name = None
        self._workspace_name = None
        self._workspace_settings = None
        self._workspace_tags = None
        self.discriminator = None

        if branch_settings is not None:
            self.branch_settings = branch_settings
        if compute_settings is not None:
            self.compute_settings = compute_settings
        if engine_type is not None:
            self.engine_type = engine_type
        self.engine_version = engine_version
        if network_settings is not None:
            self.network_settings = network_settings
        if project_name is not None:
            self.project_name = project_name
        if workspace_name is not None:
            self.workspace_name = workspace_name
        if workspace_settings is not None:
            self.workspace_settings = workspace_settings
        if workspace_tags is not None:
            self.workspace_tags = workspace_tags

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


        :return: The branch_settings of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: BranchSettingsForCreateWorkspaceInput
        """
        return self._branch_settings

    @branch_settings.setter
    def branch_settings(self, branch_settings):
        """Sets the branch_settings of this CreateWorkspaceRequest.


        :param branch_settings: The branch_settings of this CreateWorkspaceRequest.  # noqa: E501
        :type: BranchSettingsForCreateWorkspaceInput
        """

        self._branch_settings = branch_settings

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


        :return: The compute_settings of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: ComputeSettingsForCreateWorkspaceInput
        """
        return self._compute_settings

    @compute_settings.setter
    def compute_settings(self, compute_settings):
        """Sets the compute_settings of this CreateWorkspaceRequest.


        :param compute_settings: The compute_settings of this CreateWorkspaceRequest.  # noqa: E501
        :type: ComputeSettingsForCreateWorkspaceInput
        """

        self._compute_settings = compute_settings

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


        :return: The engine_type of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: str
        """
        return self._engine_type

    @engine_type.setter
    def engine_type(self, engine_type):
        """Sets the engine_type of this CreateWorkspaceRequest.


        :param engine_type: The engine_type of this CreateWorkspaceRequest.  # noqa: E501
        :type: str
        """
        allowed_values = ["PostgreSQL", "veDB_MySQL", "Supabase"]  # noqa: E501
        if (self._configuration.client_side_validation and
                engine_type not in allowed_values):
            raise ValueError(
                "Invalid value for `engine_type` ({0}), must be one of {1}"  # noqa: E501
                .format(engine_type, allowed_values)
            )

        self._engine_type = engine_type

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


        :return: The engine_version of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: str
        """
        return self._engine_version

    @engine_version.setter
    def engine_version(self, engine_version):
        """Sets the engine_version of this CreateWorkspaceRequest.


        :param engine_version: The engine_version of this CreateWorkspaceRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and engine_version is None:
            raise ValueError("Invalid value for `engine_version`, must not be `None`")  # noqa: E501
        allowed_values = ["veDB_MySQL_8_0", "PostgreSQL_17", "Supabase_1_24"]  # noqa: E501
        if (self._configuration.client_side_validation and
                engine_version not in allowed_values):
            raise ValueError(
                "Invalid value for `engine_version` ({0}), must be one of {1}"  # noqa: E501
                .format(engine_version, allowed_values)
            )

        self._engine_version = engine_version

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


        :return: The network_settings of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: NetworkSettingsForCreateWorkspaceInput
        """
        return self._network_settings

    @network_settings.setter
    def network_settings(self, network_settings):
        """Sets the network_settings of this CreateWorkspaceRequest.


        :param network_settings: The network_settings of this CreateWorkspaceRequest.  # noqa: E501
        :type: NetworkSettingsForCreateWorkspaceInput
        """

        self._network_settings = network_settings

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


        :return: The project_name of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: str
        """
        return self._project_name

    @project_name.setter
    def project_name(self, project_name):
        """Sets the project_name of this CreateWorkspaceRequest.


        :param project_name: The project_name of this CreateWorkspaceRequest.  # noqa: E501
        :type: str
        """

        self._project_name = project_name

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


        :return: The workspace_name of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: str
        """
        return self._workspace_name

    @workspace_name.setter
    def workspace_name(self, workspace_name):
        """Sets the workspace_name of this CreateWorkspaceRequest.


        :param workspace_name: The workspace_name of this CreateWorkspaceRequest.  # noqa: E501
        :type: str
        """

        self._workspace_name = workspace_name

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


        :return: The workspace_settings of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: WorkspaceSettingsForCreateWorkspaceInput
        """
        return self._workspace_settings

    @workspace_settings.setter
    def workspace_settings(self, workspace_settings):
        """Sets the workspace_settings of this CreateWorkspaceRequest.


        :param workspace_settings: The workspace_settings of this CreateWorkspaceRequest.  # noqa: E501
        :type: WorkspaceSettingsForCreateWorkspaceInput
        """

        self._workspace_settings = workspace_settings

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


        :return: The workspace_tags of this CreateWorkspaceRequest.  # noqa: E501
        :rtype: list[WorkspaceTagForCreateWorkspaceInput]
        """
        return self._workspace_tags

    @workspace_tags.setter
    def workspace_tags(self, workspace_tags):
        """Sets the workspace_tags of this CreateWorkspaceRequest.


        :param workspace_tags: The workspace_tags of this CreateWorkspaceRequest.  # noqa: E501
        :type: list[WorkspaceTagForCreateWorkspaceInput]
        """

        self._workspace_tags = workspace_tags

    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(CreateWorkspaceRequest, 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, CreateWorkspaceRequest):
            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, CreateWorkspaceRequest):
            return True

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