<s> import six <EOL> from . . client import Client <EOL> from . resource import Resource <EOL> from . ipv4range import Ipv4Range <EOL> from ... util import Util <EOL> import saklient <EOL> str = six . text_type <EOL> class Ipv4Net ( Resource ) : <EOL> def get_range ( self ) : <EOL> return self . _range <EOL> range = property ( get_range , None , None ) <EOL> def _api_path ( self ) : <EOL> return "<STR_LIT>" <EOL> def _root_key ( self ) : <EOL> return "<STR_LIT>" <EOL> def _root_key_m ( self ) : <EOL> return "<STR_LIT>" <EOL> def _class_name ( self ) : <EOL> return "<STR_LIT>" <EOL> def _id ( self ) : <EOL> return self . get_id ( ) <EOL> def reload ( self ) : <EOL> return self . _reload ( ) <EOL> def __init__ ( self , client , obj , wrapped = False ) : <EOL> super ( Ipv4Net , self ) . __init__ ( client ) <EOL> Util . validate_type ( client , "<STR_LIT>" ) <EOL> Util . validate_type ( wrapped , "<STR_LIT:bool>" ) <EOL> self . api_deserialize ( obj , wrapped ) <EOL> def _on_after_api_deserialize ( self , r , root ) : <EOL> self . _range = None <EOL> addresses = ( r [ "<STR_LIT>" ] if "<STR_LIT>" in r else None ) <EOL> if addresses is not None : <EOL> self . _range = Ipv4Range ( addresses ) <EOL> def get_id ( self ) : <EOL> return self . m_id <EOL> id = property ( get_id , None , None ) <EOL> def get_address ( self ) : <EOL> return self . m_address <EOL> address = property ( get_address , None , None ) <EOL> def get_mask_len ( self ) : <EOL> return self . m_mask_len <EOL> mask_len = property ( get_mask_len , None , None ) <EOL> def get_default_route ( self ) : <EOL> return self . m_default_route <EOL> default_route = property ( get_default_route , None , None ) <EOL> def get_next_hop ( self ) : <EOL> return self . m_next_hop <EOL> next_hop = property ( get_next_hop , None , None ) <EOL> def api_deserialize_impl ( self , r ) : <EOL> self . is_new = r is None <EOL> if self . is_new : <EOL> r = { <EOL> } <EOL> self . is_incomplete = False <EOL> if Util . exists_path ( r , "<STR_LIT>" ) : <EOL> self . m_id = None if Util . get_by_path ( r , "<STR_LIT>" ) is None else str ( Util . get_by_path ( r , "<STR_LIT>" ) ) <EOL> else : <EOL> self . m_id = None <EOL> self . is_incomplete = True <EOL> self . n_id = False <EOL> if Util . exists_path ( r , "<STR_LIT>" ) : <EOL> self . m_address = None if Util . get_by_path ( r , "<STR_LIT>" ) is None else str ( Util . get_by_path ( r , "<STR_LIT>" ) ) <EOL> else : <EOL> self . m_address = None <EOL> self . is_incomplete = True <EOL> self . n_address = False <EOL> if Util . exists_path ( r , "<STR_LIT>" ) : <EOL> self . m_mask_len = None if Util . get_by_path ( r , "<STR_LIT>" ) is None else int ( str ( Util . get_by_path ( r , "<STR_LIT>" ) ) ) <EOL> else : <EOL> self . m_mask_len = None <EOL> self . is_incomplete = True <EOL> self . n_mask_len = False <EOL> if Util . exists_path ( r , "<STR_LIT>" ) : <EOL> self . m_default_route = None if Util . get_by_path ( r , "<STR_LIT>" ) is None else str ( Util . get_by_path ( r , "<STR_LIT>" ) ) <EOL> else : <EOL> self . m_default_route = None <EOL> self . is_incomplete = True <EOL> self . n_default_route = False <EOL> if Util . exists_path ( r , "<STR_LIT>" ) : <EOL> self . m_next_hop = None if Util . get_by_path ( r , "<STR_LIT>" ) is None else str ( Util . get_by_path ( r , "<STR_LIT>" ) ) <EOL> else : <EOL> self . m_next_hop = None <EOL> self . is_incomplete = True <EOL> self . n_next_hop = False <EOL> def api_serialize_impl ( self , withClean = False ) : <EOL> Util . validate_type ( withClean , "<STR_LIT:bool>" ) <EOL> ret = { <EOL> } <EOL> if withClean or self . n_id : <EOL> Util . set_by_path ( ret , "<STR_LIT>" , self . m_id ) <EOL> if withClean or self . n_address : <EOL> Util . set_by_path ( ret , "<STR_LIT>" , self . m_address ) <EOL> if withClean or self . n_mask_len : <EOL> Util . set_by_path ( ret , "<STR_LIT>" , self . m_mask_len ) <EOL> if withClean or self . n_default_route : <EOL> Util . set_by_path ( ret , "<STR_LIT>" , self . m_default_route ) <EOL> if withClean or self . n_next_hop : <EOL> Util . set_by_path ( ret , "<STR_LIT>" , self . m_next_hop ) <EOL> return ret </s>
