Skip to content

Commit

Permalink
Add derive Default to checksum config enums
Browse files Browse the repository at this point in the history
  • Loading branch information
landonxjames committed Jan 11, 2025
1 parent 9b3cf28 commit 048695f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rust-runtime/aws-smithy-types/src/checksum_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ const WHEN_REQUIRED: &str = "when_required";
/// request payloads of operations modeled with the `httpChecksum` trait where
/// `requestChecksumRequired` is `true` or where a requestAlgorithmMember
/// is modeled and supplied.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[non_exhaustive]
pub enum RequestChecksumCalculation {
/// Calculate request checksums when they are supported.
#[default]
WhenSupported,
/// Caulculate request checksums only when they are required.
WhenRequired,
Expand Down Expand Up @@ -67,10 +68,11 @@ impl FromStr for RequestChecksumCalculation {
/// * [ResponseChecksumValidation::WhenRequired] - When set, checksum validation is not performed on
/// response payloads of operations unless the checksum algorithm is supported and
/// the `requestValidationModeMember` member is set to `ENABLED`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
#[non_exhaustive]
pub enum ResponseChecksumValidation {
/// Validate response checksums when they are supported.
#[default]
WhenSupported,
/// Validate response checksums only when they are required.
WhenRequired,
Expand Down

0 comments on commit 048695f

Please sign in to comment.