#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum DescribeConfigsDeliveryStatus {
NotSent,
PossiblySent,
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DescribeConfigSynonym {
pub(super) name: String,
pub(super) value: Option<String>,
pub(super) source: i8,
}
impl DescribeConfigSynonym {
pub fn into_parts(self) -> (String, Option<String>, i8) {
(self.name, self.value, self.source)
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DescribeConfigEntry {
pub(super) name: String,
pub(super) value: Option<String>,
pub(super) read_only: bool,
pub(super) source: i8,
pub(super) sensitive: bool,
pub(super) synonyms: Vec<DescribeConfigSynonym>,
pub(super) config_type: Option<i8>,
pub(super) documentation: Option<String>,
}
impl DescribeConfigEntry {
pub fn name(&self) -> &str {
&self.name
}
pub fn value(&self) -> Option<&str> {
self.value.as_deref()
}
pub const fn read_only(&self) -> bool {
self.read_only
}
pub const fn source(&self) -> i8 {
self.source
}
pub const fn sensitive(&self) -> bool {
self.sensitive
}
pub fn synonyms(&self) -> &[DescribeConfigSynonym] {
&self.synonyms
}
pub const fn config_type(&self) -> Option<i8> {
self.config_type
}
pub fn documentation(&self) -> Option<&str> {
self.documentation.as_deref()
}
#[allow(clippy::type_complexity)]
pub fn into_parts(
self,
) -> (
String,
Option<String>,
bool,
i8,
bool,
Vec<DescribeConfigSynonym>,
Option<i8>,
Option<String>,
) {
(
self.name,
self.value,
self.read_only,
self.source,
self.sensitive,
self.synonyms,
self.config_type,
self.documentation,
)
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DescribeConfigResourceError {
pub(super) code: i16,
pub(super) message: Option<String>,
pub(super) message_truncated: bool,
}
impl DescribeConfigResourceError {
pub const fn code(&self) -> i16 {
self.code
}
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
pub const fn message_truncated(&self) -> bool {
self.message_truncated
}
pub fn into_parts(self) -> (i16, Option<String>, bool) {
(self.code, self.message, self.message_truncated)
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DescribeConfigResourceResult {
pub(super) resource_type: i8,
pub(super) resource_name: String,
pub(super) result: Result<Vec<DescribeConfigEntry>, DescribeConfigResourceError>,
}
impl DescribeConfigResourceResult {
pub fn into_parts(
self,
) -> (
i8,
String,
Result<Vec<DescribeConfigEntry>, DescribeConfigResourceError>,
) {
(self.resource_type, self.resource_name, self.result)
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct DescribeConfigsBatch {
pub(super) throttle_time_ms: u32,
pub(super) resources: Vec<DescribeConfigResourceResult>,
}
impl DescribeConfigsBatch {
pub const fn throttle_time_ms(&self) -> u32 {
self.throttle_time_ms
}
pub fn into_resources(self) -> Vec<DescribeConfigResourceResult> {
self.resources
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum DescribeConfigsFailureKind {
DeadlineElapsed,
DriverRejected,
Transport,
InvalidResponse,
ResponseTooLarge,
Compatibility,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct DescribeConfigsFailure {
pub(super) kind: DescribeConfigsFailureKind,
pub(super) delivery: DescribeConfigsDeliveryStatus,
}
impl DescribeConfigsFailure {
pub const fn kind(self) -> DescribeConfigsFailureKind {
self.kind
}
pub const fn delivery(self) -> DescribeConfigsDeliveryStatus {
self.delivery
}
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum DescribeConfigsOutcome {
Configs(DescribeConfigsBatch),
Failed(DescribeConfigsFailure),
}