Source code for models_v2.view_pinning_config_2

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


[docs]class ViewPinningConfig2(object): """Implementation of the 'ViewPinningConfig2' model. Specifies the pinning config of this view. Attributes: enabled (bool): Specifies if view pinning is enabled. If set to true, view will be pinned to SSD and view data will be stored there. pinned_time_secs (long|int): Specifies the time to pin files after last access. last_updated_timestamp_secs (long|int): Specifies the timestamp when view pinning config is last updated. """ # Create a mapping from Model property names to API property names _names = { "enabled":'enabled', "pinned_time_secs":'pinnedTimeSecs', "last_updated_timestamp_secs":'lastUpdatedTimestampSecs' } def __init__(self, enabled=None, pinned_time_secs=None, last_updated_timestamp_secs=None): """Constructor for the ViewPinningConfig2 class""" # Initialize members of the class self.enabled = enabled self.pinned_time_secs = pinned_time_secs self.last_updated_timestamp_secs = last_updated_timestamp_secs
[docs] @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 enabled = dictionary.get('enabled') pinned_time_secs = dictionary.get('pinnedTimeSecs') last_updated_timestamp_secs = dictionary.get('lastUpdatedTimestampSecs') # Return an object of this model return cls(enabled, pinned_time_secs, last_updated_timestamp_secs)