Chain Builder Class in Gatling

what is the use of ChainBuilder Class in gatling, can someone help me to understand this code, i am new for gatling

class TenantSimulation extends BasicSimulation {

  // Call When Multiple Chains need to connect
  def getChainBuilder: ChainBuilder = {

    exec(getTenants())
      .exec(getTenantInfo())
      .exec(getTenantsConfig())

  }

  private def getTenantInfo(): ChainBuilder = {

    exec(http(GET_TENANT_INFO)
      .get(BASE_PATH + "/ABC" + "/XYZ")
      .check(status.is(HttpURLConnection.HTTP_OK))
      .check(jsonPath("$.tenantName").exists))

  }

  private def getTenantsConfig(): ChainBuilder = {

    exec(http(GET_TENANT_CONFIG)
      .get(BASE_PATH + "/ABC/PQR")
      .check(status.is(HttpURLConnection.HTTP_OK))
      .check(jsonPath("$.authenticators[0].name").exists))

  }

  private def getTenants(): ChainBuilder = {

    exec(http(GET_TENANTS_LIST)
      .get(BASE_PATH)
      .check(status.is(HttpURLConnection.HTTP_OK)))

  }

The Gatling DSL is a series of commands that are all . . . Chained . . . together as a series of calls, each call being made on the return value of the last one. You may have heard of Method Chaining. If not, I suggest you google it.

A ChainBuilder is the basic class out of which the DSL is built. If you have a ChainBuilder object, you can chain additional calls to it like you do normal Gatling DSL, same as you would if you had a .exec( something ) command in your test.

Thanks john for the quick reply, explanation is really helpful for the basic understanding for me.