def set_num_instances(instances, server=None, version=None):
 if (not isinstance(instances, (long, int))):
  raise TypeError("'instances' arg must be of type long or int.")
 req = servers_service_pb.SetNumInstancesRequest()
 req.set_instances(instances)
 if server:
  req.set_server(server)
 if version:
  req.set_version(version)
 resp = servers_service_pb.SetNumInstancesResponse()
 try:
  apiproxy_stub_map.MakeSyncCall('servers', 'SetNumInstances', req, resp)
 except apiproxy_errors.ApplicationError as e:
  if (e.application_error == servers_service_pb.ServersServiceError.INVALID_VERSION):
   raise InvalidVersionError()
  elif (e.application_error == servers_service_pb.ServersServiceError.TRANSIENT_ERROR):
   raise TransientError()
  else:
   raise Error()

def set_num_instances ( instances , server = None , version = None ) : if ( not isinstance ( instances , ( long , int ) ) ) : raise TypeError ( "'instances' arg must be of type long or int." ) req = servers_service_pb . SetNumInstancesRequest ( ) req . set_instances ( instances ) if server : req . set_server ( server ) if version : req . set_version ( version ) resp = servers_service_pb . SetNumInstancesResponse ( ) try : apiproxy_stub_map . MakeSyncCall ( 'servers' , 'SetNumInstances' , req , resp ) except apiproxy_errors . ApplicationError as e : if ( e . application_error == servers_service_pb . ServersServiceError . INVALID_VERSION ) : raise InvalidVersionError ( ) elif ( e . application_error == servers_service_pb . ServersServiceError . TRANSIENT_ERROR ) : raise TransientError ( ) else : raise Error ( )
sets the number of instances on the server and version .