code: func FetchDecodeSocket(ctx context.Context, o PfconfigObject) error {
  	ptrT := reflect.TypeOf(o)
  	new := reflect.New(ptrT.Elem())
  	newo := new.Interface().(PfconfigObject)
  
  	transferMetadata(ctx, &o, &newo)
  
  	reflect.ValueOf(o).Elem().Set(reflect.ValueOf(newo).Elem())
  
  	query := createQuery(ctx, o)
  
  	jsonResponse := FetchSocket(ctx, query.GetPayload())
  
  	if query.method == "keys" {
  		if cs, ok := o.(PfconfigKeysInt); ok {
  			decodeInterface(ctx, query.encoding, jsonResponse, cs.GetKeys())
  		} else {
  			panic("Wrong struct type for keys. Required PfconfigKeysInt")
  		}
  	} else if metadataFromField(ctx, o, "PfconfigArray") == "yes" || metadataFromField(ctx, o, "PfconfigDecodeInElement") == "yes" {
  		decodeInterface(ctx, query.encoding, jsonResponse, &o)
  	} else {
  		receiver := &PfconfigElementResponse{}
  		decodeInterface(ctx, query.encoding, jsonResponse, receiver)
  		if receiver.Element != nil {
  			b, _ := receiver.Element.MarshalJSON()
  			decodeInterface(ctx, query.encoding, b, &o)
  		} else {
  			return errors.New(fmt.Sprintf("Element in response was invalid. Response was: %s", jsonResponse))
  		}
  	}
  
  	o.SetLoadedAt(time.Now())
  
  	return nil
  }
docs: // Fetch and decode a namespace from pfconfig given a pfconfig compatible struct
  // This will fetch the json representation from pfconfig and decode it into o
  // o must be a pointer to the struct as this should be used by reference