Which out of Get, GetOk, GetOkExists with boolean?

I am using “flag_presence” attribute as TypeBool

			"flag_presence": {
				Type:        schema.TypeBool,
				Optional:    true,
				Computed:    true,
				Description: "Indicates whether attribute is present",

Now when I am doing this

d.Get(“flag_presence”) gives false

d.GetOk(“flag_presence”) gives false and false

d.GetOkExists(“flag_presence”) gives false and true

My logic is to check if the attribute is present, if present then set it to the options prototype.

if flagPresenceOk, ok := d.GetOkExists("flag_presence"); ok {
		flagPresence := flagPresenceOk.(bool)
		if flagPresence {
			options.FlagPresence = &flagPresence

GetOkExists works for me for now but I am getting this warning

Deprecated: usage is discouraged due to undefined behaviors and may be
// removed in a future version of the SDK

Please suggest.

I don’t believe I have permissions to merge this topic into another one yet, but this appears to be a duplicate of Terraform sdk usage, which out of Get, GetOk, GetOkExists with boolean?, so we can focus any discussions there. :+1: