# coding: utf-8
#
# Copyright (c) 2020-2021 Hopenly srl.
#
# This file is part of Ilyde.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from apis_server.serializers.base_model_ import Model
from apis_server.serializers.workspace_spec_datasets_serializer import WorkspaceSpecDatasetsSerializer
from apis_server import util


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

    Do not edit the class manually.
    """

    def __init__(self, revision=None, ide=None, environment=None, hardware=None, datasets=None):  # noqa: E501
        """WorkspaceSpecSerializer - a model defined in OpenAPI

        :param revision: The revision of this WorkspaceSpecSerializer.  # noqa: E501
        :type revision: str
        :param ide: The ide of this WorkspaceSpecSerializer.  # noqa: E501
        :type ide: str
        :param environment: The environment of this WorkspaceSpecSerializer.  # noqa: E501
        :type environment: str
        :param hardware: The hardware of this WorkspaceSpecSerializer.  # noqa: E501
        :type hardware: str
        :param datasets: The datasets of this WorkspaceSpecSerializer.  # noqa: E501
        :type datasets: List[WorkspaceSpecDatasetsSerializer]
        """
        self.openapi_types = {
            'revision': str,
            'ide': str,
            'environment': str,
            'hardware': str,
            'datasets': List[WorkspaceSpecDatasetsSerializer]
        }

        self.attribute_map = {
            'revision': 'revision',
            'ide': 'ide',
            'environment': 'environment',
            'hardware': 'hardware',
            'datasets': 'datasets'
        }

        self._revision = revision
        self._ide = ide
        self._environment = environment
        self._hardware = hardware
        self._datasets = datasets

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

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

    @property
    def revision(self):
        """Gets the revision of this WorkspaceSpecSerializer.


        :return: The revision of this WorkspaceSpecSerializer.
        :rtype: str
        """
        return self._revision

    @revision.setter
    def revision(self, revision):
        """Sets the revision of this WorkspaceSpecSerializer.


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

        self._revision = revision

    @property
    def ide(self):
        """Gets the ide of this WorkspaceSpecSerializer.


        :return: The ide of this WorkspaceSpecSerializer.
        :rtype: str
        """
        return self._ide

    @ide.setter
    def ide(self, ide):
        """Sets the ide of this WorkspaceSpecSerializer.


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

        self._ide = ide

    @property
    def environment(self):
        """Gets the environment of this WorkspaceSpecSerializer.


        :return: The environment of this WorkspaceSpecSerializer.
        :rtype: str
        """
        return self._environment

    @environment.setter
    def environment(self, environment):
        """Sets the environment of this WorkspaceSpecSerializer.


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

        self._environment = environment

    @property
    def hardware(self):
        """Gets the hardware of this WorkspaceSpecSerializer.


        :return: The hardware of this WorkspaceSpecSerializer.
        :rtype: str
        """
        return self._hardware

    @hardware.setter
    def hardware(self, hardware):
        """Sets the hardware of this WorkspaceSpecSerializer.


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

        self._hardware = hardware

    @property
    def datasets(self):
        """Gets the datasets of this WorkspaceSpecSerializer.


        :return: The datasets of this WorkspaceSpecSerializer.
        :rtype: List[WorkspaceSpecDatasetsSerializer]
        """
        return self._datasets

    @datasets.setter
    def datasets(self, datasets):
        """Sets the datasets of this WorkspaceSpecSerializer.


        :param datasets: The datasets of this WorkspaceSpecSerializer.
        :type datasets: List[WorkspaceSpecDatasetsSerializer]
        """

        self._datasets = datasets
