// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn describe_limits_output_output_correct_errors(
    mut builder: crate::operation::describe_limits::builders::DescribeLimitsOutputBuilder,
) -> crate::operation::describe_limits::builders::DescribeLimitsOutputBuilder {
    if builder.shard_limit.is_none() {
        builder.shard_limit = Some(Default::default())
    }
    if builder.open_shard_count.is_none() {
        builder.open_shard_count = Some(Default::default())
    }
    if builder.on_demand_stream_count.is_none() {
        builder.on_demand_stream_count = Some(Default::default())
    }
    if builder.on_demand_stream_count_limit.is_none() {
        builder.on_demand_stream_count_limit = Some(Default::default())
    }
    builder
}

pub(crate) fn describe_stream_output_output_correct_errors(
    mut builder: crate::operation::describe_stream::builders::DescribeStreamOutputBuilder,
) -> crate::operation::describe_stream::builders::DescribeStreamOutputBuilder {
    if builder.stream_description.is_none() {
        builder.stream_description = {
            let builder = crate::types::builders::StreamDescriptionBuilder::default();
            crate::serde_util::stream_description_correct_errors(builder).build().ok()
        }
    }
    builder
}

pub(crate) fn describe_stream_consumer_output_output_correct_errors(
    mut builder: crate::operation::describe_stream_consumer::builders::DescribeStreamConsumerOutputBuilder,
) -> crate::operation::describe_stream_consumer::builders::DescribeStreamConsumerOutputBuilder {
    if builder.consumer_description.is_none() {
        builder.consumer_description = {
            let builder = crate::types::builders::ConsumerDescriptionBuilder::default();
            crate::serde_util::consumer_description_correct_errors(builder).build().ok()
        }
    }
    builder
}

pub(crate) fn describe_stream_summary_output_output_correct_errors(
    mut builder: crate::operation::describe_stream_summary::builders::DescribeStreamSummaryOutputBuilder,
) -> crate::operation::describe_stream_summary::builders::DescribeStreamSummaryOutputBuilder {
    if builder.stream_description_summary.is_none() {
        builder.stream_description_summary = {
            let builder = crate::types::builders::StreamDescriptionSummaryBuilder::default();
            crate::serde_util::stream_description_summary_correct_errors(builder).build().ok()
        }
    }
    builder
}

pub(crate) fn get_records_output_output_correct_errors(
    mut builder: crate::operation::get_records::builders::GetRecordsOutputBuilder,
) -> crate::operation::get_records::builders::GetRecordsOutputBuilder {
    if builder.records.is_none() {
        builder.records = Some(Default::default())
    }
    builder
}

pub(crate) fn get_resource_policy_output_output_correct_errors(
    mut builder: crate::operation::get_resource_policy::builders::GetResourcePolicyOutputBuilder,
) -> crate::operation::get_resource_policy::builders::GetResourcePolicyOutputBuilder {
    if builder.policy.is_none() {
        builder.policy = Some(Default::default())
    }
    builder
}

pub(crate) fn list_streams_output_output_correct_errors(
    mut builder: crate::operation::list_streams::builders::ListStreamsOutputBuilder,
) -> crate::operation::list_streams::builders::ListStreamsOutputBuilder {
    if builder.stream_names.is_none() {
        builder.stream_names = Some(Default::default())
    }
    if builder.has_more_streams.is_none() {
        builder.has_more_streams = Some(Default::default())
    }
    builder
}

pub(crate) fn list_tags_for_stream_output_output_correct_errors(
    mut builder: crate::operation::list_tags_for_stream::builders::ListTagsForStreamOutputBuilder,
) -> crate::operation::list_tags_for_stream::builders::ListTagsForStreamOutputBuilder {
    if builder.tags.is_none() {
        builder.tags = Some(Default::default())
    }
    if builder.has_more_tags.is_none() {
        builder.has_more_tags = Some(Default::default())
    }
    builder
}

pub(crate) fn put_record_output_output_correct_errors(
    mut builder: crate::operation::put_record::builders::PutRecordOutputBuilder,
) -> crate::operation::put_record::builders::PutRecordOutputBuilder {
    if builder.shard_id.is_none() {
        builder.shard_id = Some(Default::default())
    }
    if builder.sequence_number.is_none() {
        builder.sequence_number = Some(Default::default())
    }
    builder
}

pub(crate) fn put_records_output_output_correct_errors(
    mut builder: crate::operation::put_records::builders::PutRecordsOutputBuilder,
) -> crate::operation::put_records::builders::PutRecordsOutputBuilder {
    if builder.records.is_none() {
        builder.records = Some(Default::default())
    }
    builder
}

pub(crate) fn register_stream_consumer_output_output_correct_errors(
    mut builder: crate::operation::register_stream_consumer::builders::RegisterStreamConsumerOutputBuilder,
) -> crate::operation::register_stream_consumer::builders::RegisterStreamConsumerOutputBuilder {
    if builder.consumer.is_none() {
        builder.consumer = {
            let builder = crate::types::builders::ConsumerBuilder::default();
            crate::serde_util::consumer_correct_errors(builder).build().ok()
        }
    }
    builder
}

pub(crate) fn stream_description_correct_errors(
    mut builder: crate::types::builders::StreamDescriptionBuilder,
) -> crate::types::builders::StreamDescriptionBuilder {
    if builder.stream_name.is_none() {
        builder.stream_name = Some(Default::default())
    }
    if builder.stream_arn.is_none() {
        builder.stream_arn = Some(Default::default())
    }
    if builder.stream_status.is_none() {
        builder.stream_status = "no value was set".parse::<crate::types::StreamStatus>().ok()
    }
    if builder.shards.is_none() {
        builder.shards = Some(Default::default())
    }
    if builder.has_more_shards.is_none() {
        builder.has_more_shards = Some(Default::default())
    }
    if builder.retention_period_hours.is_none() {
        builder.retention_period_hours = Some(Default::default())
    }
    if builder.stream_creation_timestamp.is_none() {
        builder.stream_creation_timestamp = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
    }
    if builder.enhanced_monitoring.is_none() {
        builder.enhanced_monitoring = Some(Default::default())
    }
    builder
}

pub(crate) fn consumer_description_correct_errors(
    mut builder: crate::types::builders::ConsumerDescriptionBuilder,
) -> crate::types::builders::ConsumerDescriptionBuilder {
    if builder.consumer_name.is_none() {
        builder.consumer_name = Some(Default::default())
    }
    if builder.consumer_arn.is_none() {
        builder.consumer_arn = Some(Default::default())
    }
    if builder.consumer_status.is_none() {
        builder.consumer_status = "no value was set".parse::<crate::types::ConsumerStatus>().ok()
    }
    if builder.consumer_creation_timestamp.is_none() {
        builder.consumer_creation_timestamp = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
    }
    if builder.stream_arn.is_none() {
        builder.stream_arn = Some(Default::default())
    }
    builder
}

pub(crate) fn stream_description_summary_correct_errors(
    mut builder: crate::types::builders::StreamDescriptionSummaryBuilder,
) -> crate::types::builders::StreamDescriptionSummaryBuilder {
    if builder.stream_name.is_none() {
        builder.stream_name = Some(Default::default())
    }
    if builder.stream_arn.is_none() {
        builder.stream_arn = Some(Default::default())
    }
    if builder.stream_status.is_none() {
        builder.stream_status = "no value was set".parse::<crate::types::StreamStatus>().ok()
    }
    if builder.retention_period_hours.is_none() {
        builder.retention_period_hours = Some(Default::default())
    }
    if builder.stream_creation_timestamp.is_none() {
        builder.stream_creation_timestamp = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
    }
    if builder.enhanced_monitoring.is_none() {
        builder.enhanced_monitoring = Some(Default::default())
    }
    if builder.open_shard_count.is_none() {
        builder.open_shard_count = Some(Default::default())
    }
    builder
}

pub(crate) fn consumer_correct_errors(mut builder: crate::types::builders::ConsumerBuilder) -> crate::types::builders::ConsumerBuilder {
    if builder.consumer_name.is_none() {
        builder.consumer_name = Some(Default::default())
    }
    if builder.consumer_arn.is_none() {
        builder.consumer_arn = Some(Default::default())
    }
    if builder.consumer_status.is_none() {
        builder.consumer_status = "no value was set".parse::<crate::types::ConsumerStatus>().ok()
    }
    if builder.consumer_creation_timestamp.is_none() {
        builder.consumer_creation_timestamp = Some(::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64))
    }
    builder
}

pub(crate) fn minimum_throughput_billing_commitment_output_correct_errors(
    mut builder: crate::types::builders::MinimumThroughputBillingCommitmentOutputBuilder,
) -> crate::types::builders::MinimumThroughputBillingCommitmentOutputBuilder {
    if builder.status.is_none() {
        builder.status = "no value was set"
            .parse::<crate::types::MinimumThroughputBillingCommitmentOutputStatus>()
            .ok()
    }
    builder
}

pub(crate) fn child_shard_correct_errors(mut builder: crate::types::builders::ChildShardBuilder) -> crate::types::builders::ChildShardBuilder {
    if builder.shard_id.is_none() {
        builder.shard_id = Some(Default::default())
    }
    if builder.parent_shards.is_none() {
        builder.parent_shards = Some(Default::default())
    }
    if builder.hash_key_range.is_none() {
        builder.hash_key_range = {
            let builder = crate::types::builders::HashKeyRangeBuilder::default();
            crate::serde_util::hash_key_range_correct_errors(builder).build().ok()
        }
    }
    builder
}

pub(crate) fn record_correct_errors(mut builder: crate::types::builders::RecordBuilder) -> crate::types::builders::RecordBuilder {
    if builder.sequence_number.is_none() {
        builder.sequence_number = Some(Default::default())
    }
    if builder.data.is_none() {
        builder.data = Some(::aws_smithy_types::Blob::new(""))
    }
    if builder.partition_key.is_none() {
        builder.partition_key = Some(Default::default())
    }
    builder
}

pub(crate) fn shard_correct_errors(mut builder: crate::types::builders::ShardBuilder) -> crate::types::builders::ShardBuilder {
    if builder.shard_id.is_none() {
        builder.shard_id = Some(Default::default())
    }
    if builder.hash_key_range.is_none() {
        builder.hash_key_range = {
            let builder = crate::types::builders::HashKeyRangeBuilder::default();
            crate::serde_util::hash_key_range_correct_errors(builder).build().ok()
        }
    }
    if builder.sequence_number_range.is_none() {
        builder.sequence_number_range = {
            let builder = crate::types::builders::SequenceNumberRangeBuilder::default();
            crate::serde_util::sequence_number_range_correct_errors(builder).build().ok()
        }
    }
    builder
}

pub(crate) fn stream_mode_details_correct_errors(
    mut builder: crate::types::builders::StreamModeDetailsBuilder,
) -> crate::types::builders::StreamModeDetailsBuilder {
    if builder.stream_mode.is_none() {
        builder.stream_mode = "no value was set".parse::<crate::types::StreamMode>().ok()
    }
    builder
}

pub(crate) fn stream_summary_correct_errors(
    mut builder: crate::types::builders::StreamSummaryBuilder,
) -> crate::types::builders::StreamSummaryBuilder {
    if builder.stream_name.is_none() {
        builder.stream_name = Some(Default::default())
    }
    if builder.stream_arn.is_none() {
        builder.stream_arn = Some(Default::default())
    }
    if builder.stream_status.is_none() {
        builder.stream_status = "no value was set".parse::<crate::types::StreamStatus>().ok()
    }
    builder
}

pub(crate) fn tag_correct_errors(mut builder: crate::types::builders::TagBuilder) -> crate::types::builders::TagBuilder {
    if builder.key.is_none() {
        builder.key = Some(Default::default())
    }
    builder
}

pub(crate) fn hash_key_range_correct_errors(mut builder: crate::types::builders::HashKeyRangeBuilder) -> crate::types::builders::HashKeyRangeBuilder {
    if builder.starting_hash_key.is_none() {
        builder.starting_hash_key = Some(Default::default())
    }
    if builder.ending_hash_key.is_none() {
        builder.ending_hash_key = Some(Default::default())
    }
    builder
}

pub(crate) fn sequence_number_range_correct_errors(
    mut builder: crate::types::builders::SequenceNumberRangeBuilder,
) -> crate::types::builders::SequenceNumberRangeBuilder {
    if builder.starting_sequence_number.is_none() {
        builder.starting_sequence_number = Some(Default::default())
    }
    builder
}

pub(crate) fn subscribe_to_shard_event_correct_errors(
    mut builder: crate::types::builders::SubscribeToShardEventBuilder,
) -> crate::types::builders::SubscribeToShardEventBuilder {
    if builder.records.is_none() {
        builder.records = Some(Default::default())
    }
    if builder.continuation_sequence_number.is_none() {
        builder.continuation_sequence_number = Some(Default::default())
    }
    if builder.millis_behind_latest.is_none() {
        builder.millis_behind_latest = Some(Default::default())
    }
    builder
}
