def _CopyQueryObjectToProtocolBuffer(query, params):
 _CopyQueryToProtocolBuffer(query.query_string, params)
 for refinement in query.facet_refinements:
  refinement._CopyToProtocolBuffer(params.add_facet_refinement())
 for return_facet in query.return_facets:
  return_facet._CopyToProtocolBuffer(params.add_include_facet())
 options = query.options
 if (query.options is None):
  options = QueryOptions()
 _CopyQueryOptionsObjectToProtocolBuffer(query.query_string, options, params)
 facet_options = query.facet_options
 if (facet_options is None):
  facet_options = FacetOptions(discovery_limit=(10 if query.enable_facet_discovery else None))
 facet_options._CopyToProtocolBuffer(params)

def _CopyQueryObjectToProtocolBuffer ( query , params ) : _CopyQueryToProtocolBuffer ( query . query_string , params ) for refinement in query . facet_refinements : refinement . _CopyToProtocolBuffer ( params . add_facet_refinement ( ) ) for return_facet in query . return_facets : return_facet . _CopyToProtocolBuffer ( params . add_include_facet ( ) ) options = query . options if ( query . options is None ) : options = QueryOptions ( ) _CopyQueryOptionsObjectToProtocolBuffer ( query . query_string , options , params ) facet_options = query . facet_options if ( facet_options is None ) : facet_options = FacetOptions ( discovery_limit = ( 10 if query . enable_facet_discovery else None ) ) facet_options . _CopyToProtocolBuffer ( params )
copy a query object to search_service_pb .