// LeaveGroupRequest issues a request for a group member to leave the group,
// triggering a group rebalance.
//
// Version 3 changed removed MemberID and added a batch instance+member ID
// way of leaving a group.
LeaveGroupRequest => key 13, max version 5, flexible v4+, group coordinator
  // Group is the group to leave.
  Group: string
  // MemberID is the member that is leaving.
  MemberID: string // v0-v2
  // Members are member and group instance IDs to cause to leave a group.
  Members: [=>] // v3+
    MemberID: string
    InstanceID: nullable-string
    // Reason is an optional reason why this member is leaving the group
    // (KIP-800, Kafka 3.2+).
    Reason: nullable-string // v5+

// LeaveGroupResponse is returned from a LeaveGroupRequest.
LeaveGroupResponse =>
  ThrottleMillis(2) // v1+
  // ErrorCode is the error for the leave group request.
  //
  // GROUP_AUTHORIZATION_FAILED is returned if the client is not authorized
  // to the group (no read perms).
  //
  // INVALID_GROUP_ID is returned in the requested group ID is invalid.
  //
  // COORDINATOR_NOT_AVAILABLE is returned if the coordinator is not available
  // (due to the requested broker shutting down or it has not completed startup).
  //
  // COORDINATOR_LOAD_IN_PROGRESS is returned if the group is loading.
  //
  // NOT_COORDINATOR is returned if the requested broker is not the coordinator
  // for the requested group.
  //
  // UNKNOWN_MEMBER_ID is returned if the member ID is not a part of the group,
  // or if the group is empty or dead.
  ErrorCode: int16
  // Members are the list of members and group instance IDs that left the group.
  Members: [=>] // v3+
    MemberID: string
    InstanceID: nullable-string
    // An individual member's leave error code.
    ErrorCode: int16
