title: Data class for API response structure?
body: <p>I am using wikipedia API whose response structure is as</p>
  <pre><code>{
  &quot;batchcomplete&quot;: &quot;&quot;,
  &quot;continue&quot;: {
  &quot;gpsoffset&quot;: 10,
  &quot;continue&quot;: &quot;gpsoffset||&quot;
    },
    &quot;query&quot;: {
  &quot;pages&quot;: {
    &quot;27667&quot;: {
      &quot;pageid&quot;: 27667,
      &quot;ns&quot;: 0,
      &quot;title&quot;: &quot;Space&quot;,
      &quot;index&quot;: 1,
      &quot;thumbnail&quot;: {
        &quot;source&quot;: &quot;https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/3D_coordinate_system.svg/200px-3D_coordinate_system.svg.png&quot;,
        &quot;width&quot;: 200,
        &quot;height&quot;: 200
      }
    },
    &quot;28189&quot;: {
      &quot;pageid&quot;: 28189,
      &quot;ns&quot;: 0,
      &quot;title&quot;: &quot;Space Shuttle&quot;,
      &quot;index&quot;: 8,
      &quot;thumbnail&quot;: {
        &quot;source&quot;: &quot;https://upload.wikimedia.org/wikipedia/commons/thumb/d/d6/STS120LaunchHiRes-edit1.jpg/128px-STS120LaunchHiRes-edit1.jpg&quot;,
        &quot;width&quot;: 128,
        &quot;height&quot;: 200
      }
    },
    &quot;28758&quot;: {
      &quot;pageid&quot;: 28758,
      &quot;ns&quot;: 0,
      &quot;title&quot;: &quot;Spacetime&quot;,
      &quot;index&quot;: 5,
      &quot;thumbnail&quot;: {
        &quot;source&quot;: &quot;https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/GPB_circling_earth.jpg/200px-GPB_circling_earth.jpg&quot;,
        &quot;width&quot;: 200,
        &quot;height&quot;: 150
      }
    }
  }
    }
  }
  </code></pre>
  <p>I am confused on how to use the pages object
  I currently have as</p>
  <pre><code>data class APIResult(
  @SerializedName(&quot;query&quot;)
  val query: Query
  )
  
  data class Query(
  @SerializedName(&quot;pages&quot;)
  val pages: Pages
  )
  
  data class Pages(
  @SerializedName(&quot;thumbnail&quot;)
  val thumbnail: Thumbnail
  )
  
  data class Thumbnail(
  @SerializedName(&quot;source&quot;)
  val source: String
  )
  </code></pre>
  <p>Any suggestions?</p>