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

"""
zypev1

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""


class ZobjectAttributeMetadata(object):

    """Implementation of the 'ZobjectAttributeMetadata' model.

    TODO: type model description here.

    Attributes:
        id (string): ID of the record
        created_at (string): TODO: type description here.
        updated_at (string): TODO: type description here.
        description (string): Description of the Zobject Type custom
            attribute
        field_name (string): Name of the Zobject Type custom attribute
        field_type (string): type of the Zobject Type custom attribute

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": '_id',
        "created_at": 'created_at',
        "updated_at": 'updated_at',
        "description": 'description',
        "field_name": 'field_name',
        "field_type": 'field_type'
    }

    def __init__(self,
                 id=None,
                 created_at=None,
                 updated_at=None,
                 description=None,
                 field_name=None,
                 field_type=None):
        """Constructor for the ZobjectAttributeMetadata class"""

        # Initialize members of the class
        self.id = id
        self.created_at = created_at
        self.updated_at = updated_at
        self.description = description
        self.field_name = field_name
        self.field_type = field_type

    @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
        id = dictionary.get('_id')
        created_at = dictionary.get('created_at')
        updated_at = dictionary.get('updated_at')
        description = dictionary.get('description')
        field_name = dictionary.get('field_name')
        field_type = dictionary.get('field_type')

        # Return an object of this model
        return cls(id,
                   created_at,
                   updated_at,
                   description,
                   field_name,
                   field_type)
