code: func createQuery(ctx context.Context, o PfconfigObject) Query {
  	query := Query{}
  
  	query.ns = metadataFromField(ctx, o, "PfconfigNS")
  
  	if metadataFromField(ctx, o, "PfconfigHostnameOverlay") == "yes" && !nsHasOverlayRe.MatchString(query.ns) {
  		query.ns = query.ns + "(" + myHostname + ")"
  	}
  
  	if GetClusterSummary(ctx).ClusterEnabled == 1 {
  		if metadataFromField(ctx, o, "PfconfigClusterNameOverlay") == "yes" && !nsHasOverlayRe.MatchString(query.ns) {
  			clusterName := FindClusterName(ctx)
  			if clusterName == "" {
  				panic("Can't determine cluster name for this host")
  			}
  
  			query.ns = query.ns + "(" + clusterName + ")"
  		}
  	}
  
  	// Make sure the namespace is normalized
  	query.ns = normalizeNamespace(ctx, query.ns)
  
  	query.method = metadataFromField(ctx, o, "PfconfigMethod")
  	if query.method == "hash_element" {
  		query.ns = query.ns + ";" + metadataFromField(ctx, o, "PfconfigHashNS")
  	}
  	query.encoding = "json"
  	return query
  }
docs: // Create a pfconfig query given a PfconfigObject
  // Will extract the query information from the struct and will create the payload accordingly
  // The struct should declare the following fields to be compatible
  //		PfconfigNS - the pfconfig namespace to use (ex: resource::fqdn)
  //		PfconfigMethod - the method to use while calling pfconfig (hash_element is a special case, see below)
  //		PfconfigHashNS - the hash element key when using the hash_element method, this attribute has no effect when using any other method