def _CopyQueryOptionsObjectToProtocolBuffer(query, options, params):
 offset = 0
 web_safe_string = None
 cursor_type = None
 offset = options.offset
 if options.cursor:
  cursor = options.cursor
  if cursor.per_result:
   cursor_type = search_service_pb.SearchParams.PER_RESULT
  else:
   cursor_type = search_service_pb.SearchParams.SINGLE
  if (isinstance(cursor, Cursor) and cursor.web_safe_string):
   web_safe_string = cursor._internal_cursor
 _CopyQueryOptionsToProtocolBuffer(query, offset, options.limit, options.number_found_accuracy, web_safe_string, cursor_type, options.ids_only, options.returned_fields, options.snippeted_fields, options.returned_expressions, options.sort_options, params)

def _CopyQueryOptionsObjectToProtocolBuffer ( query , options , params ) : offset = 0 web_safe_string = None cursor_type = None offset = options . offset if options . cursor : cursor = options . cursor if cursor . per_result : cursor_type = search_service_pb . SearchParams . PER_RESULT else : cursor_type = search_service_pb . SearchParams . SINGLE if ( isinstance ( cursor , Cursor ) and cursor . web_safe_string ) : web_safe_string = cursor . _internal_cursor _CopyQueryOptionsToProtocolBuffer ( query , offset , options . limit , options . number_found_accuracy , web_safe_string , cursor_type , options . ids_only , options . returned_fields , options . snippeted_fields , options . returned_expressions , options . sort_options , params )
copies a queryoptions object to a searchparams proto buff .