What are the legal elements required for an activity to be regarded as gambling?

As an introductory note, gambling and betting activities are, since the enactment of Decree-Law No. 9,215 in 1946, which enforced article 50 of Decree-Law No. 3,688/1941 (the Law of Misdemeanours), considered criminal contraventions and therefore are prohibited in Brazil. Nonetheless, in recent years, the debate over the legislation regarding this matter has resurfaced.