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

"""
ctddocumentation

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


class SelectionParams1(object):

    """Implementation of the 'SelectionParams1' model.

    TODO: type model description here.

    Attributes:
        excluded (list of string): TODO: type description here.
        filters (object): TODO: type description here.
        select_all (bool): TODO: type description here.
        selected (list of string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "excluded": 'excluded',
        "filters": 'filters',
        "select_all": 'select_all',
        "selected": 'selected'
    }

    _optionals = [
        'excluded',
        'filters',
        'select_all',
        'selected',
    ]

    def __init__(self,
                 excluded=APIHelper.SKIP,
                 filters=APIHelper.SKIP,
                 select_all=False,
                 selected=APIHelper.SKIP):
        """Constructor for the SelectionParams1 class"""

        # Initialize members of the class
        if excluded is not APIHelper.SKIP:
            self.excluded = excluded 
        if filters is not APIHelper.SKIP:
            self.filters = filters 
        self.select_all = select_all 
        if selected is not APIHelper.SKIP:
            self.selected = selected 

    @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

        excluded = dictionary.get("excluded") if dictionary.get("excluded") else APIHelper.SKIP
        filters = Object.from_dictionary(dictionary.get('filters')) if 'filters' in dictionary.keys() else APIHelper.SKIP
        select_all = dictionary.get("select_all") if dictionary.get("select_all") else False
        selected = dictionary.get("selected") if dictionary.get("selected") else APIHelper.SKIP
        # Return an object of this model
        return cls(excluded,
                   filters,
                   select_all,
                   selected)
