'Copies a FacetOptions object to a SearchParams proto buff.'

def _CopyToProtocolBuffer(self, params):

    if (self.discovery_limit is not None):
        params.set_auto_discover_facet_count(self.discovery_limit)
    if (self.discovery_value_limit is not None):
        params.mutable_facet_auto_detect_param().set_value_limit(self.discovery_value_limit)
    if (self.depth is not None):
        params.set_facet_depth(self.depth)
