Setting config values via code

• Hardware Platform (Jetson / GPU) RTX 2080
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.1.1
• NVIDIA GPU Driver Version (valid for GPU only) 460
• Issue Type( questions, new requirements, bugs) Question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I want to set all the properties of deepstream-config file via code in C++.

I am trying to use g_object_set() on following properties but I am getting following error
GLib-GObject-WARNING **: 15:22:33.780: g_object_set_is_valid_property: object class ‘GstNvInfer’ has no property named ‘net-scale-factor’

The properties I am trying to set are
config-file_path: /yolov5_pgie_config.txt
gpu-id: 0
net-scale-factor: 0.0039215697906911373
model-color-format: 0
model-engine-file: models/yolov5s.engine
num-detected-classes: 80
interval: 0
gie-unique-id: 1
process-mode: 1
network-type: 0
cluster-mode: 2
maintain-aspect-ratio: 1

How can I achieve that?

You can check supported property by: gst–inspect–1.0 nvinfer