kf_protocol_message/kf_code_gen/leave_group.rs
1/// WARNING: CODE GENERATED FILE
2/// * This file is generated by kfspec2code.
3/// * Any changes applied to this file will be lost when a new spec is generated.
4use serde::{Deserialize, Serialize};
5
6use kf_protocol_api::ErrorCode;
7use kf_protocol_api::Request;
8
9use kf_protocol_derive::Decode;
10use kf_protocol_derive::Encode;
11use kf_protocol_derive::KfDefault;
12
13// -----------------------------------
14// KfLeaveGroupRequest
15// -----------------------------------
16
17#[derive(Encode, Decode, Serialize, Deserialize, KfDefault, Debug)]
18pub struct KfLeaveGroupRequest {
19 /// The ID of the group to leave.
20 pub group_id: String,
21
22 /// The member ID to remove from the group.
23 pub member_id: String,
24}
25
26// -----------------------------------
27// KfLeaveGroupResponse
28// -----------------------------------
29
30#[derive(Encode, Decode, Serialize, Deserialize, KfDefault, Debug)]
31pub struct KfLeaveGroupResponse {
32 /// The duration in milliseconds for which the request was throttled due to a quota violation,
33 /// or zero if the request did not violate any quota.
34 #[fluvio_kf(min_version = 1, ignorable)]
35 pub throttle_time_ms: i32,
36
37 /// The error code, or 0 if there was no error.
38 pub error_code: ErrorCode,
39}
40
41// -----------------------------------
42// Implementation - KfLeaveGroupRequest
43// -----------------------------------
44
45impl Request for KfLeaveGroupRequest {
46 const API_KEY: u16 = 13;
47
48 const MIN_API_VERSION: i16 = 0;
49 const MAX_API_VERSION: i16 = 2;
50 const DEFAULT_API_VERSION: i16 = 2;
51
52 type Response = KfLeaveGroupResponse;
53}