# -*- coding: utf-8 -*-

"""
ctddocumentation

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from ctddocumentation.api_helper import APIHelper


class Site(object):

    """Implementation of the 'Site' model.

    TODO: type model description here.

    Attributes:
        address (string): TODO: type description here.
        assets_count (int): TODO: type description here.
        auto_transition_to_operational (bool): TODO: type description here.
        description (string): TODO: type description here.
        id (int): TODO: type description here.
        image_url (string): TODO: type description here.
        installed_date (string): TODO: type description here.
        integrity_alerts_severity_number (int): TODO: type description here.
        integrity_alerts_severity_name (string): TODO: type description here.
        is_connected (bool): TODO: type description here.
        name (string): TODO: type description here.
        score (int): TODO: type description here.
        security_alerts_severity_number (int): TODO: type description here.
        security_alerts_severity_name (string): TODO: type description here.
        training_mode (bool): TODO: type description here.
        unresolved_integrity_alerts_count (int): TODO: type description here.
        unresolved_security_alerts_count (int): TODO: type description here.
        version (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "address": 'address',
        "assets_count": 'assets_count',
        "auto_transition_to_operational": 'auto_transition_to_operational',
        "description": 'description',
        "id": 'id',
        "image_url": 'image_url',
        "installed_date": 'installed_date',
        "integrity_alerts_severity_number": 'integrity_alerts_severity_number',
        "integrity_alerts_severity_name": 'integrity_alerts_severity_name',
        "is_connected": 'is_connected',
        "name": 'name',
        "score": 'score',
        "security_alerts_severity_number": 'security_alerts_severity_number',
        "security_alerts_severity_name": 'security_alerts_severity_name',
        "training_mode": 'training_mode',
        "unresolved_integrity_alerts_count": 'unresolved_integrity_alerts_count',
        "unresolved_security_alerts_count": 'unresolved_security_alerts_count',
        "version": 'version'
    }

    _optionals = [
        'address',
        'assets_count',
        'auto_transition_to_operational',
        'description',
        'id',
        'image_url',
        'installed_date',
        'integrity_alerts_severity_number',
        'integrity_alerts_severity_name',
        'is_connected',
        'name',
        'score',
        'security_alerts_severity_number',
        'security_alerts_severity_name',
        'training_mode',
        'unresolved_integrity_alerts_count',
        'unresolved_security_alerts_count',
        'version',
    ]

    def __init__(self,
                 address=APIHelper.SKIP,
                 assets_count=APIHelper.SKIP,
                 auto_transition_to_operational=APIHelper.SKIP,
                 description=APIHelper.SKIP,
                 id=APIHelper.SKIP,
                 image_url=APIHelper.SKIP,
                 installed_date=APIHelper.SKIP,
                 integrity_alerts_severity_number=APIHelper.SKIP,
                 integrity_alerts_severity_name=APIHelper.SKIP,
                 is_connected=APIHelper.SKIP,
                 name=APIHelper.SKIP,
                 score=APIHelper.SKIP,
                 security_alerts_severity_number=APIHelper.SKIP,
                 security_alerts_severity_name=APIHelper.SKIP,
                 training_mode=APIHelper.SKIP,
                 unresolved_integrity_alerts_count=APIHelper.SKIP,
                 unresolved_security_alerts_count=APIHelper.SKIP,
                 version=APIHelper.SKIP):
        """Constructor for the Site class"""

        # Initialize members of the class
        if address is not APIHelper.SKIP:
            self.address = address 
        if assets_count is not APIHelper.SKIP:
            self.assets_count = assets_count 
        if auto_transition_to_operational is not APIHelper.SKIP:
            self.auto_transition_to_operational = auto_transition_to_operational 
        if description is not APIHelper.SKIP:
            self.description = description 
        if id is not APIHelper.SKIP:
            self.id = id 
        if image_url is not APIHelper.SKIP:
            self.image_url = image_url 
        if installed_date is not APIHelper.SKIP:
            self.installed_date = installed_date 
        if integrity_alerts_severity_number is not APIHelper.SKIP:
            self.integrity_alerts_severity_number = integrity_alerts_severity_number 
        if integrity_alerts_severity_name is not APIHelper.SKIP:
            self.integrity_alerts_severity_name = integrity_alerts_severity_name 
        if is_connected is not APIHelper.SKIP:
            self.is_connected = is_connected 
        if name is not APIHelper.SKIP:
            self.name = name 
        if score is not APIHelper.SKIP:
            self.score = score 
        if security_alerts_severity_number is not APIHelper.SKIP:
            self.security_alerts_severity_number = security_alerts_severity_number 
        if security_alerts_severity_name is not APIHelper.SKIP:
            self.security_alerts_severity_name = security_alerts_severity_name 
        if training_mode is not APIHelper.SKIP:
            self.training_mode = training_mode 
        if unresolved_integrity_alerts_count is not APIHelper.SKIP:
            self.unresolved_integrity_alerts_count = unresolved_integrity_alerts_count 
        if unresolved_security_alerts_count is not APIHelper.SKIP:
            self.unresolved_security_alerts_count = unresolved_security_alerts_count 
        if version is not APIHelper.SKIP:
            self.version = version 

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary

        address = dictionary.get("address") if dictionary.get("address") else APIHelper.SKIP
        assets_count = dictionary.get("assets_count") if dictionary.get("assets_count") else APIHelper.SKIP
        auto_transition_to_operational = dictionary.get("auto_transition_to_operational") if "auto_transition_to_operational" in dictionary.keys() else APIHelper.SKIP
        description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP
        id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP
        image_url = dictionary.get("image_url") if dictionary.get("image_url") else APIHelper.SKIP
        installed_date = dictionary.get("installed_date") if dictionary.get("installed_date") else APIHelper.SKIP
        integrity_alerts_severity_number = dictionary.get("integrity_alerts_severity_number") if dictionary.get("integrity_alerts_severity_number") else APIHelper.SKIP
        integrity_alerts_severity_name = dictionary.get("integrity_alerts_severity_name") if dictionary.get("integrity_alerts_severity_name") else APIHelper.SKIP
        is_connected = dictionary.get("is_connected") if "is_connected" in dictionary.keys() else APIHelper.SKIP
        name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP
        score = dictionary.get("score") if dictionary.get("score") else APIHelper.SKIP
        security_alerts_severity_number = dictionary.get("security_alerts_severity_number") if dictionary.get("security_alerts_severity_number") else APIHelper.SKIP
        security_alerts_severity_name = dictionary.get("security_alerts_severity_name") if dictionary.get("security_alerts_severity_name") else APIHelper.SKIP
        training_mode = dictionary.get("training_mode") if "training_mode" in dictionary.keys() else APIHelper.SKIP
        unresolved_integrity_alerts_count = dictionary.get("unresolved_integrity_alerts_count") if dictionary.get("unresolved_integrity_alerts_count") else APIHelper.SKIP
        unresolved_security_alerts_count = dictionary.get("unresolved_security_alerts_count") if dictionary.get("unresolved_security_alerts_count") else APIHelper.SKIP
        version = dictionary.get("version") if dictionary.get("version") else APIHelper.SKIP
        # Return an object of this model
        return cls(address,
                   assets_count,
                   auto_transition_to_operational,
                   description,
                   id,
                   image_url,
                   installed_date,
                   integrity_alerts_severity_number,
                   integrity_alerts_severity_name,
                   is_connected,
                   name,
                   score,
                   security_alerts_severity_number,
                   security_alerts_severity_name,
                   training_mode,
                   unresolved_integrity_alerts_count,
                   unresolved_security_alerts_count,
                   version)
