use super::AdminDescribeTopicPartition;
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AdminDescribeTopicPartitionsTopic {
pub(super) error_code: i16,
pub(super) name: String,
pub(super) topic_id: [u8; 16],
pub(super) internal: bool,
pub(super) partitions: Vec<AdminDescribeTopicPartition>,
pub(super) authorized_operations: i32,
}
impl AdminDescribeTopicPartitionsTopic {
pub const fn error_code(&self) -> i16 {
self.error_code
}
pub fn name(&self) -> &str {
&self.name
}
pub const fn topic_id(&self) -> [u8; 16] {
self.topic_id
}
pub const fn internal(&self) -> bool {
self.internal
}
pub fn partitions(&self) -> &[AdminDescribeTopicPartition] {
&self.partitions
}
pub const fn authorized_operations(&self) -> i32 {
self.authorized_operations
}
pub fn into_parts(
self,
) -> (
i16,
String,
[u8; 16],
bool,
Vec<AdminDescribeTopicPartition>,
i32,
) {
(
self.error_code,
self.name,
self.topic_id,
self.internal,
self.partitions,
self.authorized_operations,
)
}
}