# 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.model_version_serializer import ModelVersionSerializer
from apis_server import util


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

    Do not edit the class manually.
    """

    def __init__(self, name=None, description=None, tags=None, latest_versions=None, last_updated_timestamp=None, creation_timestamp=None):  # noqa: E501
        """ModelSerializer - a model defined in OpenAPI

        :param name: The name of this ModelSerializer.  # noqa: E501
        :type name: str
        :param description: The description of this ModelSerializer.  # noqa: E501
        :type description: str
        :param tags: The tags of this ModelSerializer.  # noqa: E501
        :type tags: dict
        :param latest_versions: The latest_versions of this ModelSerializer.  # noqa: E501
        :type latest_versions: List[ModelVersionSerializer]
        :param last_updated_timestamp: The last_updated_timestamp of this ModelSerializer.  # noqa: E501
        :type last_updated_timestamp: int
        :param creation_timestamp: The creation_timestamp of this ModelSerializer.  # noqa: E501
        :type creation_timestamp: int
        """
        self.openapi_types = {
            'name': str,
            'description': str,
            'tags': object,
            'latest_versions': List[ModelVersionSerializer],
            'last_updated_timestamp': int,
            'creation_timestamp': int
        }

        self.attribute_map = {
            'name': 'name',
            'description': 'description',
            'tags': 'tags',
            'latest_versions': 'latest_versions',
            'last_updated_timestamp': 'last_updated_timestamp',
            'creation_timestamp': 'creation_timestamp'
        }

        self._name = name
        self._description = description
        self._tags = tags
        self._latest_versions = latest_versions
        self._last_updated_timestamp = last_updated_timestamp
        self._creation_timestamp = creation_timestamp

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

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

    @property
    def name(self):
        """Gets the name of this ModelSerializer.


        :return: The name of this ModelSerializer.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ModelSerializer.


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

        self._name = name

    @property
    def description(self):
        """Gets the description of this ModelSerializer.


        :return: The description of this ModelSerializer.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ModelSerializer.


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

        self._description = description

    @property
    def tags(self):
        """Gets the tags of this ModelSerializer.


        :return: The tags of this ModelSerializer.
        :rtype: dict
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this ModelSerializer.


        :param tags: The tags of this ModelSerializer.
        :type tags: dict
        """

        self._tags = tags

    @property
    def latest_versions(self):
        """Gets the latest_versions of this ModelSerializer.


        :return: The latest_versions of this ModelSerializer.
        :rtype: List[ModelVersionSerializer]
        """
        return self._latest_versions

    @latest_versions.setter
    def latest_versions(self, latest_versions):
        """Sets the latest_versions of this ModelSerializer.


        :param latest_versions: The latest_versions of this ModelSerializer.
        :type latest_versions: List[ModelVersionSerializer]
        """

        self._latest_versions = latest_versions

    @property
    def last_updated_timestamp(self):
        """Gets the last_updated_timestamp of this ModelSerializer.


        :return: The last_updated_timestamp of this ModelSerializer.
        :rtype: int
        """
        return self._last_updated_timestamp

    @last_updated_timestamp.setter
    def last_updated_timestamp(self, last_updated_timestamp):
        """Sets the last_updated_timestamp of this ModelSerializer.


        :param last_updated_timestamp: The last_updated_timestamp of this ModelSerializer.
        :type last_updated_timestamp: int
        """

        self._last_updated_timestamp = last_updated_timestamp

    @property
    def creation_timestamp(self):
        """Gets the creation_timestamp of this ModelSerializer.


        :return: The creation_timestamp of this ModelSerializer.
        :rtype: int
        """
        return self._creation_timestamp

    @creation_timestamp.setter
    def creation_timestamp(self, creation_timestamp):
        """Sets the creation_timestamp of this ModelSerializer.


        :param creation_timestamp: The creation_timestamp of this ModelSerializer.
        :type creation_timestamp: int
        """

        self._creation_timestamp = creation_timestamp
