title: Can list cast correctly in Kotlin?
body: <p>I am new to Kotlin,</p>
  <pre><code>
  data class RewardDetail(
      val name: String
      val isActivated: Boolean
      val amountInCents: Int?
      val Campain: String?
      val expirationDate: Long?
  
  )
  
  class Rewards(Array&lt;Reward&gt;)
  
  class Reward(
      val name: String     
      isActive: Boolean     
      amountInCents: Int
      campaignId: String
      expirationDate: LocalDateTime
  )
  
  
  val details : List&lt;RewardDetail&gt; = blablabla
  val rewards = Rewards(details)
  </code></pre>
  <p>can <code>details</code> cast to <code>rewards</code> successfully?</p>
  <p>Also note <code>campaignId</code> and <code>Campain</code> field name are different in <code>RewardDetail</code> and <code>Reward</code> and some fields can be nullable in <code>RewardsDetail</code></p>
  <p>What is the best way to handle situation like this?</p>