<s> import six <EOL> from . . client import Client <EOL> from . model import Model <EOL> from . . resources . resource import Resource <EOL> from . . resources . serverplan import ServerPlan <EOL> from ... util import Util <EOL> import saklient <EOL> str = six . text_type <EOL> class Model_ServerPlan ( Model ) : <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 _create_resource_impl ( self , obj , wrapped = False ) : <EOL> Util . validate_type ( wrapped , "<STR_LIT:bool>" ) <EOL> return ServerPlan ( self . _client , obj , wrapped ) <EOL> def offset ( self , offset ) : <EOL> Util . validate_type ( offset , "<STR_LIT:int>" ) <EOL> return self . _offset ( offset ) <EOL> def limit ( self , count ) : <EOL> Util . validate_type ( count , "<STR_LIT:int>" ) <EOL> return self . _limit ( count ) <EOL> def filter_by ( self , key , value , multiple = False ) : <EOL> Util . validate_type ( key , "<STR_LIT:str>" ) <EOL> Util . validate_type ( multiple , "<STR_LIT:bool>" ) <EOL> return self . _filter_by ( key , value , multiple ) <EOL> def reset ( self ) : <EOL> return self . _reset ( ) <EOL> def get_by_id ( self , id ) : <EOL> Util . validate_type ( id , "<STR_LIT:str>" ) <EOL> return self . _get_by_id ( id ) <EOL> def find ( self ) : <EOL> return self . _find ( ) <EOL> def __init__ ( self , client ) : <EOL> super ( Model_ServerPlan , self ) . __init__ ( client ) <EOL> Util . validate_type ( client , "<STR_LIT>" ) <EOL> def get_by_spec ( self , cores , memoryGib ) : <EOL> Util . validate_type ( cores , "<STR_LIT:int>" ) <EOL> Util . validate_type ( memoryGib , "<STR_LIT:int>" ) <EOL> self . _filter_by ( "<STR_LIT>" , [ cores ] ) <EOL> self . _filter_by ( "<STR_LIT>" , [ memoryGib * <NUM_LIT> ] ) <EOL> return self . _find_one ( ) </s>
