1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/// WARNING: CODE GENERATED FILE
/// * This file is generated by kfspec2code.
/// * Any changes applied to this file will be lost when a new spec is generated.
use serde::{Deserialize, Serialize};
use kf_protocol_api::ErrorCode;
use kf_protocol_api::Request;
use kf_protocol_derive::Decode;
use kf_protocol_derive::Encode;
use kf_protocol_derive::KfDefault;
// -----------------------------------
// KfDescribeConfigsRequest
// -----------------------------------
#[derive(Encode, Decode, Serialize, Deserialize, KfDefault, Debug)]
pub struct KfDescribeConfigsRequest {
/// The resources whose configurations we want to describe.
pub resources: Vec<DescribeConfigsResource>,
/// True if we should include all synonyms.
#[fluvio_kf(min_version = 1)]
pub include_synoyms: bool,
}
#[derive(Encode, Decode, Serialize, Deserialize, KfDefault, Debug)]
pub struct DescribeConfigsResource {
/// The resource type.
pub resource_type: i8,
/// The resource name.
pub resource_name: String,
/// The configuration keys to list, or null to list all configuration keys.
pub configuration_keys: Option<Vec<String>>,
}
// -----------------------------------
// KfDescribeConfigsResponse
// -----------------------------------
#[derive(Encode, Decode, Serialize, Deserialize, KfDefault, Debug)]
pub struct KfDescribeConfigsResponse {
/// The duration in milliseconds for which the request was throttled due to a quota violation,
/// or zero if the request did not violate any quota.
pub throttle_time_ms: i32,
/// The results for each resource.
pub results: Vec<DescribeConfigsResult>,
}
#[derive(Encode, Decode, Serialize, Deserialize, KfDefault, Debug)]
pub struct DescribeConfigsResult {
/// The error code, or 0 if we were able to successfully describe the configurations.
pub error_code: ErrorCode,
/// The error message, or null if we were able to successfully describe the configurations.
pub error_message: Option<String>,
/// The resource type.
pub resource_type: i8,
/// The resource name.
pub resource_name: String,
/// Each listed configuration.
pub configs: Vec<DescribeConfigsResourceResult>,
}
#[derive(Encode, Decode, Serialize, Deserialize, KfDefault, Debug)]
pub struct DescribeConfigsResourceResult {
/// The configuration name.
pub name: String,
/// The configuration value.
pub value: Option<String>,
/// True if the configuration is read-only.
pub read_only: bool,
/// The configuration source.
#[fluvio_kf(min_version = 1, ignorable)]
pub config_source: i8,
/// True if this configuration is sensitive.
pub is_sensitive: bool,
/// The synonyms for this configuration key.
#[fluvio_kf(min_version = 1, ignorable)]
pub synonyms: Vec<DescribeConfigsSynonym>,
}
#[derive(Encode, Decode, Serialize, Deserialize, KfDefault, Debug)]
pub struct DescribeConfigsSynonym {
/// The synonym name.
#[fluvio_kf(min_version = 1)]
pub name: String,
/// The synonym value.
#[fluvio_kf(min_version = 1)]
pub value: Option<String>,
/// The synonym source.
#[fluvio_kf(min_version = 1)]
pub source: i8,
}
// -----------------------------------
// Implementation - KfDescribeConfigsRequest
// -----------------------------------
impl Request for KfDescribeConfigsRequest {
const API_KEY: u16 = 32;
const MIN_API_VERSION: i16 = 0;
const MAX_API_VERSION: i16 = 2;
const DEFAULT_API_VERSION: i16 = 2;
type Response = KfDescribeConfigsResponse;
}