Onclick list component for custom scripts?

If I want to add some canvas, Button, int or any other “field” for custom scripts I can just put them as public properties

tl;dr;

class Test : MonoBehaviour {
    public string name;
    public int id;
}

Is there any way I could add also this component for as public propery/component for custom script?

I am creating dialog system (It’s +/- finished and on some responses there will be option to add script + method to execute)

the OnClick() that you have a screen shot of only allows for 1 data component.
but you can have multiple OnClick() by clicking the + on the bottom right

let say you want to set a bool when button is clicked. or set a string or set an int

class Test : MonoBehaviour
{
    public string name;
    public int id;
    public bool somebool;

    public void boolClicked(bool fromclick)
    {
        somebool = fromclick;
    }

    public void setString(string fromclick)
    {
        name = fromclick;
    }

    public void intClicked(int fromclick)
    {
        id = fromclick;
    }
}

Maybe I just asked it wrong, but that’s not what I thought.

Btw, got what I needed.

Final code:

using UnityEngine;
using System;
using System.Collections.Generic;
using UnityEngine.Serialization;

[System.Serializable]
public class DialogText
{
    [Serializable]
    public class DialogChoice
    {
        public string text;
        public int triggerID;
        public Boolean closeDialog = false;

        [Serializable]
        public class ButtonClickedEvent : UnityEngine.Events.UnityEvent { }
        [FormerlySerializedAs("onClick")]
        [SerializeField]
        private ButtonClickedEvent m_OnClick = new ButtonClickedEvent();
    }

    public int id;
    public int minRelationship = 0;
    public string messageText;

    public List<DialogChoice> responses = new List<DialogChoice>();
}