Server Test

Server Test

rev. 3c7b9118917389f0b4c11d5200d8768f0d912d36

Files changed:

tmp-codegen-diff/codegen-server-test/.cargo/config.toml

@@ -1,1 +0,2 @@
    1      1   
[build]
    2         -
rustflags = ["--cfg", "aws_sdk_unstable"]
              \
 No newline at end of file
           2  +
rustflags = ["--deny", "warnings", "--cfg", "aws_sdk_unstable"]

tmp-codegen-diff/codegen-server-test/constraints/rust-server-codegen/src/input.rs

@@ -1257,1257 +1320,1317 @@
 1277   1277   
    }
 1278   1278   
    /// A builder for [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
 1279   1279   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1280   1280   
    pub struct Builder {
 1281   1281   
        pub(crate) length_map:
 1282   1282   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
 1283   1283   
    }
 1284   1284   
    impl Builder {
 1285   1285   
        #[allow(missing_docs)] // documentation missing in model
 1286   1286   
        pub fn length_map(mut self, input: ::std::option::Option<crate::model::ConBMap>) -> Self {
 1287         -
            self.length_map = input.map(
 1288         -
                #[allow(clippy::redundant_closure)]
 1289         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1290         -
            );
        1287  +
            self.length_map = input.map(crate::constrained::MaybeConstrained::Constrained);
 1291   1288   
            self
 1292   1289   
        }
 1293   1290   
        #[allow(missing_docs)] // documentation missing in model
 1294   1291   
        pub(crate) fn set_length_map(
 1295   1292   
            mut self,
 1296   1293   
            input: Option<
 1297   1294   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
 1298   1295   
            >,
 1299   1296   
        ) -> Self {
 1300   1297   
            self.length_map = input.map(|v| v.into());
@@ -2604,2601 +2667,2661 @@
 2624   2621   
    }
 2625   2622   
    /// A builder for [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
 2626   2623   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2627   2624   
    pub struct Builder {
 2628   2625   
        pub(crate) length_map:
 2629   2626   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
 2630   2627   
    }
 2631   2628   
    impl Builder {
 2632   2629   
        #[allow(missing_docs)] // documentation missing in model
 2633   2630   
        pub fn length_map(mut self, input: ::std::option::Option<crate::model::ConBMap>) -> Self {
 2634         -
            self.length_map = input.map(
 2635         -
                #[allow(clippy::redundant_closure)]
 2636         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 2637         -
            );
        2631  +
            self.length_map = input.map(crate::constrained::MaybeConstrained::Constrained);
 2638   2632   
            self
 2639   2633   
        }
 2640   2634   
        #[allow(missing_docs)] // documentation missing in model
 2641   2635   
        pub(crate) fn set_length_map(
 2642   2636   
            mut self,
 2643   2637   
            input: Option<
 2644   2638   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
 2645   2639   
            >,
 2646   2640   
        ) -> Self {
 2647   2641   
            self.length_map = input.map(|v| v.into());
@@ -2742,2736 +2805,2796 @@
 2762   2756   
                crate::constrained::recursive_list_constrained::RecursiveListConstrained,
 2763   2757   
            >,
 2764   2758   
        >,
 2765   2759   
    }
 2766   2760   
    impl Builder {
 2767   2761   
        #[allow(missing_docs)] // documentation missing in model
 2768   2762   
        pub fn nested(
 2769   2763   
            mut self,
 2770   2764   
            input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
 2771   2765   
        ) -> Self {
 2772         -
            self.nested = input.map(
 2773         -
                #[allow(clippy::redundant_closure)]
 2774         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 2775         -
            );
        2766  +
            self.nested = input.map(crate::constrained::MaybeConstrained::Constrained);
 2776   2767   
            self
 2777   2768   
        }
 2778   2769   
        #[allow(missing_docs)] // documentation missing in model
 2779   2770   
        pub(crate) fn set_nested(
 2780   2771   
            mut self,
 2781   2772   
            input: Option<
 2782   2773   
                impl ::std::convert::Into<
 2783   2774   
                    crate::constrained::MaybeConstrained<
 2784   2775   
                        crate::model::RecursiveShapesInputOutputNested1,
 2785   2776   
                    >,
@@ -3414,3405 +3477,3466 @@
 3434   3425   
            input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
 3435   3426   
        ) -> Self {
 3436   3427   
            self.length_string_header_map = Some(input.into());
 3437   3428   
            self
 3438   3429   
        }
 3439   3430   
        #[allow(missing_docs)] // documentation missing in model
 3440   3431   
        pub fn length_string_header(
 3441   3432   
            mut self,
 3442   3433   
            input: ::std::option::Option<crate::model::LengthString>,
 3443   3434   
        ) -> Self {
 3444         -
            self.length_string_header = input.map(
 3445         -
                #[allow(clippy::redundant_closure)]
 3446         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3447         -
            );
        3435  +
            self.length_string_header =
        3436  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3448   3437   
            self
 3449   3438   
        }
 3450   3439   
        #[allow(missing_docs)] // documentation missing in model
 3451   3440   
        pub(crate) fn set_length_string_header(
 3452   3441   
            mut self,
 3453   3442   
            input: Option<
 3454   3443   
                impl ::std::convert::Into<
 3455   3444   
                    crate::constrained::MaybeConstrained<crate::model::LengthString>,
 3456   3445   
                >,
 3457   3446   
            >,
@@ -3499,3488 +3719,3694 @@
 3519   3508   
            >,
 3520   3509   
        ) -> Self {
 3521   3510   
            self.range_byte_header = Some(input.into());
 3522   3511   
            self
 3523   3512   
        }
 3524   3513   
        #[allow(missing_docs)] // documentation missing in model
 3525   3514   
        pub fn length_string_set_header(
 3526   3515   
            mut self,
 3527   3516   
            input: ::std::option::Option<crate::model::SetOfLengthString>,
 3528   3517   
        ) -> Self {
 3529         -
            self.length_string_set_header = input.map(
 3530         -
                #[allow(clippy::redundant_closure)]
 3531         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3532         -
            );
        3518  +
            self.length_string_set_header =
        3519  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3533   3520   
            self
 3534   3521   
        }
 3535   3522   
        #[allow(missing_docs)] // documentation missing in model
 3536   3523   
        pub(crate) fn set_length_string_set_header(
 3537   3524   
            mut self,
 3538   3525   
            input: Option<
 3539   3526   
                impl ::std::convert::Into<
 3540   3527   
                    crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
 3541   3528   
                >,
 3542   3529   
            >,
 3543   3530   
        ) -> Self {
 3544   3531   
            self.length_string_set_header = input.map(|v| v.into());
 3545   3532   
            self
 3546   3533   
        }
 3547   3534   
        #[allow(missing_docs)] // documentation missing in model
 3548   3535   
        pub fn list_length_string_header(
 3549   3536   
            mut self,
 3550   3537   
            input: ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
 3551   3538   
        ) -> Self {
 3552   3539   
            self.list_length_string_header = input.map(
 3553   3540   
                #[allow(clippy::redundant_closure)]
 3554   3541   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 3555   3542   
            );
 3556   3543   
            self
 3557   3544   
        }
 3558   3545   
        #[allow(missing_docs)] // documentation missing in model
 3559   3546   
        pub(crate) fn set_list_length_string_header(
 3560   3547   
            mut self,
 3561   3548   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
 3562   3549   
        ) -> Self {
 3563   3550   
            self.list_length_string_header = input.map(|v| v.into());
 3564   3551   
            self
 3565   3552   
        }
 3566   3553   
        #[allow(missing_docs)] // documentation missing in model
 3567   3554   
        pub fn length_list_pattern_string_header(
 3568   3555   
            mut self,
 3569   3556   
            input: ::std::option::Option<crate::model::LengthListOfPatternString>,
 3570   3557   
        ) -> Self {
 3571         -
            self.length_list_pattern_string_header = input.map(
 3572         -
                #[allow(clippy::redundant_closure)]
 3573         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3574         -
            );
        3558  +
            self.length_list_pattern_string_header =
        3559  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3575   3560   
            self
 3576   3561   
        }
 3577   3562   
        #[allow(missing_docs)] // documentation missing in model
 3578   3563   
        pub(crate) fn set_length_list_pattern_string_header(
 3579   3564   
            mut self,
 3580   3565   
            input: Option<
 3581   3566   
                impl ::std::convert::Into<
 3582   3567   
                    crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
 3583   3568   
                >,
 3584   3569   
            >,
 3585   3570   
        ) -> Self {
 3586   3571   
            self.length_list_pattern_string_header = input.map(|v| v.into());
 3587   3572   
            self
 3588   3573   
        }
 3589   3574   
        #[allow(missing_docs)] // documentation missing in model
 3590   3575   
        pub fn length_set_pattern_string_header(
 3591   3576   
            mut self,
 3592   3577   
            input: ::std::option::Option<crate::model::LengthSetOfPatternString>,
 3593   3578   
        ) -> Self {
 3594         -
            self.length_set_pattern_string_header = input.map(
 3595         -
                #[allow(clippy::redundant_closure)]
 3596         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3597         -
            );
        3579  +
            self.length_set_pattern_string_header =
        3580  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3598   3581   
            self
 3599   3582   
        }
 3600   3583   
        #[allow(missing_docs)] // documentation missing in model
 3601   3584   
        pub(crate) fn set_length_set_pattern_string_header(
 3602   3585   
            mut self,
 3603   3586   
            input: Option<
 3604   3587   
                impl ::std::convert::Into<
 3605   3588   
                    crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>,
 3606   3589   
                >,
 3607   3590   
            >,
 3608   3591   
        ) -> Self {
 3609   3592   
            self.length_set_pattern_string_header = input.map(|v| v.into());
 3610   3593   
            self
 3611   3594   
        }
 3612   3595   
        #[allow(missing_docs)] // documentation missing in model
 3613   3596   
        pub fn range_byte_set_header(
 3614   3597   
            mut self,
 3615   3598   
            input: ::std::option::Option<crate::model::SetOfRangeByte>,
 3616   3599   
        ) -> Self {
 3617         -
            self.range_byte_set_header = input.map(
 3618         -
                #[allow(clippy::redundant_closure)]
 3619         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3620         -
            );
        3600  +
            self.range_byte_set_header =
        3601  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3621   3602   
            self
 3622   3603   
        }
 3623   3604   
        #[allow(missing_docs)] // documentation missing in model
 3624   3605   
        pub(crate) fn set_range_byte_set_header(
 3625   3606   
            mut self,
 3626   3607   
            input: Option<
 3627   3608   
                impl ::std::convert::Into<
 3628   3609   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
 3629   3610   
                >,
 3630   3611   
            >,
 3631   3612   
        ) -> Self {
 3632   3613   
            self.range_byte_set_header = input.map(|v| v.into());
 3633   3614   
            self
 3634   3615   
        }
 3635   3616   
        #[allow(missing_docs)] // documentation missing in model
 3636   3617   
        pub fn range_short_set_header(
 3637   3618   
            mut self,
 3638   3619   
            input: ::std::option::Option<crate::model::SetOfRangeShort>,
 3639   3620   
        ) -> Self {
 3640         -
            self.range_short_set_header = input.map(
 3641         -
                #[allow(clippy::redundant_closure)]
 3642         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3643         -
            );
        3621  +
            self.range_short_set_header =
        3622  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3644   3623   
            self
 3645   3624   
        }
 3646   3625   
        #[allow(missing_docs)] // documentation missing in model
 3647   3626   
        pub(crate) fn set_range_short_set_header(
 3648   3627   
            mut self,
 3649   3628   
            input: Option<
 3650   3629   
                impl ::std::convert::Into<
 3651   3630   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
 3652   3631   
                >,
 3653   3632   
            >,
 3654   3633   
        ) -> Self {
 3655   3634   
            self.range_short_set_header = input.map(|v| v.into());
 3656   3635   
            self
 3657   3636   
        }
 3658   3637   
        #[allow(missing_docs)] // documentation missing in model
 3659   3638   
        pub fn range_integer_set_header(
 3660   3639   
            mut self,
 3661   3640   
            input: ::std::option::Option<crate::model::SetOfRangeInteger>,
 3662   3641   
        ) -> Self {
 3663         -
            self.range_integer_set_header = input.map(
 3664         -
                #[allow(clippy::redundant_closure)]
 3665         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3666         -
            );
        3642  +
            self.range_integer_set_header =
        3643  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3667   3644   
            self
 3668   3645   
        }
 3669   3646   
        #[allow(missing_docs)] // documentation missing in model
 3670   3647   
        pub(crate) fn set_range_integer_set_header(
 3671   3648   
            mut self,
 3672   3649   
            input: Option<
 3673   3650   
                impl ::std::convert::Into<
 3674   3651   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
 3675   3652   
                >,
 3676   3653   
            >,
 3677   3654   
        ) -> Self {
 3678   3655   
            self.range_integer_set_header = input.map(|v| v.into());
 3679   3656   
            self
 3680   3657   
        }
 3681   3658   
        #[allow(missing_docs)] // documentation missing in model
 3682   3659   
        pub fn range_long_set_header(
 3683   3660   
            mut self,
 3684   3661   
            input: ::std::option::Option<crate::model::SetOfRangeLong>,
 3685   3662   
        ) -> Self {
 3686         -
            self.range_long_set_header = input.map(
 3687         -
                #[allow(clippy::redundant_closure)]
 3688         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3689         -
            );
        3663  +
            self.range_long_set_header =
        3664  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3690   3665   
            self
 3691   3666   
        }
 3692   3667   
        #[allow(missing_docs)] // documentation missing in model
 3693   3668   
        pub(crate) fn set_range_long_set_header(
 3694   3669   
            mut self,
 3695   3670   
            input: Option<
 3696   3671   
                impl ::std::convert::Into<
 3697   3672   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
 3698   3673   
                >,
 3699   3674   
            >,
@@ -3755,3730 +3818,3790 @@
 3775   3750   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
 3776   3751   
        ) -> Self {
 3777   3752   
            self.range_long_list_header = input.map(|v| v.into());
 3778   3753   
            self
 3779   3754   
        }
 3780   3755   
        #[allow(missing_docs)] // documentation missing in model
 3781   3756   
        pub fn length_string_query(
 3782   3757   
            mut self,
 3783   3758   
            input: ::std::option::Option<crate::model::LengthString>,
 3784   3759   
        ) -> Self {
 3785         -
            self.length_string_query = input.map(
 3786         -
                #[allow(clippy::redundant_closure)]
 3787         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3788         -
            );
        3760  +
            self.length_string_query = input.map(crate::constrained::MaybeConstrained::Constrained);
 3789   3761   
            self
 3790   3762   
        }
 3791   3763   
        #[allow(missing_docs)] // documentation missing in model
 3792   3764   
        pub(crate) fn set_length_string_query(
 3793   3765   
            mut self,
 3794   3766   
            input: Option<
 3795   3767   
                impl ::std::convert::Into<
 3796   3768   
                    crate::constrained::MaybeConstrained<crate::model::LengthString>,
 3797   3769   
                >,
 3798   3770   
            >,
@@ -3839,3811 +3967,3932 @@
 3859   3831   
            >,
 3860   3832   
        ) -> Self {
 3861   3833   
            self.range_long_query = Some(input.into());
 3862   3834   
            self
 3863   3835   
        }
 3864   3836   
        #[allow(missing_docs)] // documentation missing in model
 3865   3837   
        pub fn enum_string_query(
 3866   3838   
            mut self,
 3867   3839   
            input: ::std::option::Option<crate::model::EnumString>,
 3868   3840   
        ) -> Self {
 3869         -
            self.enum_string_query = input.map(
 3870         -
                #[allow(clippy::redundant_closure)]
 3871         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3872         -
            );
        3841  +
            self.enum_string_query = input.map(crate::constrained::MaybeConstrained::Constrained);
 3873   3842   
            self
 3874   3843   
        }
 3875   3844   
        #[allow(missing_docs)] // documentation missing in model
 3876   3845   
        pub(crate) fn set_enum_string_query(
 3877   3846   
            mut self,
 3878   3847   
            input: Option<
 3879   3848   
                impl ::std::convert::Into<
 3880   3849   
                    crate::constrained::MaybeConstrained<crate::model::EnumString>,
 3881   3850   
                >,
 3882   3851   
            >,
 3883   3852   
        ) -> Self {
 3884   3853   
            self.enum_string_query = input.map(|v| v.into());
 3885   3854   
            self
 3886   3855   
        }
 3887   3856   
        #[allow(missing_docs)] // documentation missing in model
 3888   3857   
        pub fn length_string_list_query(
 3889   3858   
            mut self,
 3890   3859   
            input: ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
 3891   3860   
        ) -> Self {
 3892   3861   
            self.length_string_list_query = input.map(
 3893   3862   
                #[allow(clippy::redundant_closure)]
 3894   3863   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 3895   3864   
            );
 3896   3865   
            self
 3897   3866   
        }
 3898   3867   
        #[allow(missing_docs)] // documentation missing in model
 3899   3868   
        pub(crate) fn set_length_string_list_query(
 3900   3869   
            mut self,
 3901   3870   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
 3902   3871   
        ) -> Self {
 3903   3872   
            self.length_string_list_query = input.map(|v| v.into());
 3904   3873   
            self
 3905   3874   
        }
 3906   3875   
        #[allow(missing_docs)] // documentation missing in model
 3907   3876   
        pub fn length_list_pattern_string_query(
 3908   3877   
            mut self,
 3909   3878   
            input: ::std::option::Option<crate::model::LengthListOfPatternString>,
 3910   3879   
        ) -> Self {
 3911         -
            self.length_list_pattern_string_query = input.map(
 3912         -
                #[allow(clippy::redundant_closure)]
 3913         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3914         -
            );
        3880  +
            self.length_list_pattern_string_query =
        3881  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3915   3882   
            self
 3916   3883   
        }
 3917   3884   
        #[allow(missing_docs)] // documentation missing in model
 3918   3885   
        pub(crate) fn set_length_list_pattern_string_query(
 3919   3886   
            mut self,
 3920   3887   
            input: Option<
 3921   3888   
                impl ::std::convert::Into<
 3922   3889   
                    crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
 3923   3890   
                >,
 3924   3891   
            >,
 3925   3892   
        ) -> Self {
 3926   3893   
            self.length_list_pattern_string_query = input.map(|v| v.into());
 3927   3894   
            self
 3928   3895   
        }
 3929   3896   
        #[allow(missing_docs)] // documentation missing in model
 3930   3897   
        pub fn length_string_set_query(
 3931   3898   
            mut self,
 3932   3899   
            input: ::std::option::Option<crate::model::SetOfLengthString>,
 3933   3900   
        ) -> Self {
 3934         -
            self.length_string_set_query = input.map(
 3935         -
                #[allow(clippy::redundant_closure)]
 3936         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3937         -
            );
        3901  +
            self.length_string_set_query =
        3902  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 3938   3903   
            self
 3939   3904   
        }
 3940   3905   
        #[allow(missing_docs)] // documentation missing in model
 3941   3906   
        pub(crate) fn set_length_string_set_query(
 3942   3907   
            mut self,
 3943   3908   
            input: Option<
 3944   3909   
                impl ::std::convert::Into<
 3945   3910   
                    crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
 3946   3911   
                >,
 3947   3912   
            >,
@@ -4003,3968 +4135,4092 @@
 4023   3988   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
 4024   3989   
        ) -> Self {
 4025   3990   
            self.range_long_list_query = input.map(|v| v.into());
 4026   3991   
            self
 4027   3992   
        }
 4028   3993   
        #[allow(missing_docs)] // documentation missing in model
 4029   3994   
        pub fn range_byte_set_query(
 4030   3995   
            mut self,
 4031   3996   
            input: ::std::option::Option<crate::model::SetOfRangeByte>,
 4032   3997   
        ) -> Self {
 4033         -
            self.range_byte_set_query = input.map(
 4034         -
                #[allow(clippy::redundant_closure)]
 4035         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 4036         -
            );
        3998  +
            self.range_byte_set_query =
        3999  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 4037   4000   
            self
 4038   4001   
        }
 4039   4002   
        #[allow(missing_docs)] // documentation missing in model
 4040   4003   
        pub(crate) fn set_range_byte_set_query(
 4041   4004   
            mut self,
 4042   4005   
            input: Option<
 4043   4006   
                impl ::std::convert::Into<
 4044   4007   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
 4045   4008   
                >,
 4046   4009   
            >,
 4047   4010   
        ) -> Self {
 4048   4011   
            self.range_byte_set_query = input.map(|v| v.into());
 4049   4012   
            self
 4050   4013   
        }
 4051   4014   
        #[allow(missing_docs)] // documentation missing in model
 4052   4015   
        pub fn range_short_set_query(
 4053   4016   
            mut self,
 4054   4017   
            input: ::std::option::Option<crate::model::SetOfRangeShort>,
 4055   4018   
        ) -> Self {
 4056         -
            self.range_short_set_query = input.map(
 4057         -
                #[allow(clippy::redundant_closure)]
 4058         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 4059         -
            );
        4019  +
            self.range_short_set_query =
        4020  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 4060   4021   
            self
 4061   4022   
        }
 4062   4023   
        #[allow(missing_docs)] // documentation missing in model
 4063   4024   
        pub(crate) fn set_range_short_set_query(
 4064   4025   
            mut self,
 4065   4026   
            input: Option<
 4066   4027   
                impl ::std::convert::Into<
 4067   4028   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
 4068   4029   
                >,
 4069   4030   
            >,
 4070   4031   
        ) -> Self {
 4071   4032   
            self.range_short_set_query = input.map(|v| v.into());
 4072   4033   
            self
 4073   4034   
        }
 4074   4035   
        #[allow(missing_docs)] // documentation missing in model
 4075   4036   
        pub fn range_integer_set_query(
 4076   4037   
            mut self,
 4077   4038   
            input: ::std::option::Option<crate::model::SetOfRangeInteger>,
 4078   4039   
        ) -> Self {
 4079         -
            self.range_integer_set_query = input.map(
 4080         -
                #[allow(clippy::redundant_closure)]
 4081         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 4082         -
            );
        4040  +
            self.range_integer_set_query =
        4041  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 4083   4042   
            self
 4084   4043   
        }
 4085   4044   
        #[allow(missing_docs)] // documentation missing in model
 4086   4045   
        pub(crate) fn set_range_integer_set_query(
 4087   4046   
            mut self,
 4088   4047   
            input: Option<
 4089   4048   
                impl ::std::convert::Into<
 4090   4049   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
 4091   4050   
                >,
 4092   4051   
            >,
 4093   4052   
        ) -> Self {
 4094   4053   
            self.range_integer_set_query = input.map(|v| v.into());
 4095   4054   
            self
 4096   4055   
        }
 4097   4056   
        #[allow(missing_docs)] // documentation missing in model
 4098   4057   
        pub fn range_long_set_query(
 4099   4058   
            mut self,
 4100   4059   
            input: ::std::option::Option<crate::model::SetOfRangeLong>,
 4101   4060   
        ) -> Self {
 4102         -
            self.range_long_set_query = input.map(
 4103         -
                #[allow(clippy::redundant_closure)]
 4104         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 4105         -
            );
        4061  +
            self.range_long_set_query =
        4062  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 4106   4063   
            self
 4107   4064   
        }
 4108   4065   
        #[allow(missing_docs)] // documentation missing in model
 4109   4066   
        pub(crate) fn set_range_long_set_query(
 4110   4067   
            mut self,
 4111   4068   
            input: Option<
 4112   4069   
                impl ::std::convert::Into<
 4113   4070   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
 4114   4071   
                >,
 4115   4072   
            >,

tmp-codegen-diff/codegen-server-test/constraints/rust-server-codegen/src/model.rs

@@ -5396,5396 +5459,5456 @@
 5416   5416   
        pub(crate) recursive_member: ::std::option::Option<
 5417   5417   
            crate::constrained::MaybeConstrained<crate::model::RecursiveShapesInputOutputNested1>,
 5418   5418   
        >,
 5419   5419   
    }
 5420   5420   
    impl Builder {
 5421   5421   
        #[allow(missing_docs)] // documentation missing in model
 5422   5422   
        pub fn recursive_member(
 5423   5423   
            mut self,
 5424   5424   
            input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
 5425   5425   
        ) -> Self {
 5426         -
            self.recursive_member = input.map(
 5427         -
                #[allow(clippy::redundant_closure)]
 5428         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 5429         -
            );
        5426  +
            self.recursive_member = input.map(crate::constrained::MaybeConstrained::Constrained);
 5430   5427   
            self
 5431   5428   
        }
 5432   5429   
        #[allow(missing_docs)] // documentation missing in model
 5433   5430   
        pub(crate) fn set_recursive_member(
 5434   5431   
            mut self,
 5435   5432   
            input: Option<
 5436   5433   
                impl ::std::convert::Into<
 5437   5434   
                    crate::constrained::MaybeConstrained<
 5438   5435   
                        crate::model::RecursiveShapesInputOutputNested1,
 5439   5436   
                    >,
@@ -6039,6036 +6284,6254 @@
 6059   6056   
        #[allow(missing_docs)] // documentation missing in model
 6060   6057   
        pub(crate) fn set_con_b(
 6061   6058   
            mut self,
 6062   6059   
            input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConB>>,
 6063   6060   
        ) -> Self {
 6064   6061   
            self.con_b = Some(input.into());
 6065   6062   
            self
 6066   6063   
        }
 6067   6064   
        #[allow(missing_docs)] // documentation missing in model
 6068   6065   
        pub fn opt_con_b(mut self, input: ::std::option::Option<crate::model::ConB>) -> Self {
 6069         -
            self.opt_con_b = input.map(
 6070         -
                #[allow(clippy::redundant_closure)]
 6071         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6072         -
            );
        6066  +
            self.opt_con_b = input.map(crate::constrained::MaybeConstrained::Constrained);
 6073   6067   
            self
 6074   6068   
        }
 6075   6069   
        #[allow(missing_docs)] // documentation missing in model
 6076   6070   
        pub(crate) fn set_opt_con_b(
 6077   6071   
            mut self,
 6078   6072   
            input: Option<
 6079   6073   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConB>>,
 6080   6074   
            >,
 6081   6075   
        ) -> Self {
 6082   6076   
            self.opt_con_b = input.map(|v| v.into());
 6083   6077   
            self
 6084   6078   
        }
 6085   6079   
        #[allow(missing_docs)] // documentation missing in model
 6086   6080   
        pub fn length_string(
 6087   6081   
            mut self,
 6088   6082   
            input: ::std::option::Option<crate::model::LengthString>,
 6089   6083   
        ) -> Self {
 6090         -
            self.length_string = input.map(
 6091         -
                #[allow(clippy::redundant_closure)]
 6092         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6093         -
            );
        6084  +
            self.length_string = input.map(crate::constrained::MaybeConstrained::Constrained);
 6094   6085   
            self
 6095   6086   
        }
 6096   6087   
        #[allow(missing_docs)] // documentation missing in model
 6097   6088   
        pub(crate) fn set_length_string(
 6098   6089   
            mut self,
 6099   6090   
            input: Option<
 6100   6091   
                impl ::std::convert::Into<
 6101   6092   
                    crate::constrained::MaybeConstrained<crate::model::LengthString>,
 6102   6093   
                >,
 6103   6094   
            >,
 6104   6095   
        ) -> Self {
 6105   6096   
            self.length_string = input.map(|v| v.into());
 6106   6097   
            self
 6107   6098   
        }
 6108   6099   
        #[allow(missing_docs)] // documentation missing in model
 6109   6100   
        pub fn min_length_string(
 6110   6101   
            mut self,
 6111   6102   
            input: ::std::option::Option<crate::model::MinLengthString>,
 6112   6103   
        ) -> Self {
 6113         -
            self.min_length_string = input.map(
 6114         -
                #[allow(clippy::redundant_closure)]
 6115         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6116         -
            );
        6104  +
            self.min_length_string = input.map(crate::constrained::MaybeConstrained::Constrained);
 6117   6105   
            self
 6118   6106   
        }
 6119   6107   
        #[allow(missing_docs)] // documentation missing in model
 6120   6108   
        pub(crate) fn set_min_length_string(
 6121   6109   
            mut self,
 6122   6110   
            input: Option<
 6123   6111   
                impl ::std::convert::Into<
 6124   6112   
                    crate::constrained::MaybeConstrained<crate::model::MinLengthString>,
 6125   6113   
                >,
 6126   6114   
            >,
 6127   6115   
        ) -> Self {
 6128   6116   
            self.min_length_string = input.map(|v| v.into());
 6129   6117   
            self
 6130   6118   
        }
 6131   6119   
        #[allow(missing_docs)] // documentation missing in model
 6132   6120   
        pub fn max_length_string(
 6133   6121   
            mut self,
 6134   6122   
            input: ::std::option::Option<crate::model::MaxLengthString>,
 6135   6123   
        ) -> Self {
 6136         -
            self.max_length_string = input.map(
 6137         -
                #[allow(clippy::redundant_closure)]
 6138         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6139         -
            );
        6124  +
            self.max_length_string = input.map(crate::constrained::MaybeConstrained::Constrained);
 6140   6125   
            self
 6141   6126   
        }
 6142   6127   
        #[allow(missing_docs)] // documentation missing in model
 6143   6128   
        pub(crate) fn set_max_length_string(
 6144   6129   
            mut self,
 6145   6130   
            input: Option<
 6146   6131   
                impl ::std::convert::Into<
 6147   6132   
                    crate::constrained::MaybeConstrained<crate::model::MaxLengthString>,
 6148   6133   
                >,
 6149   6134   
            >,
 6150   6135   
        ) -> Self {
 6151   6136   
            self.max_length_string = input.map(|v| v.into());
 6152   6137   
            self
 6153   6138   
        }
 6154   6139   
        #[allow(missing_docs)] // documentation missing in model
 6155   6140   
        pub fn fixed_length_string(
 6156   6141   
            mut self,
 6157   6142   
            input: ::std::option::Option<crate::model::FixedLengthString>,
 6158   6143   
        ) -> Self {
 6159         -
            self.fixed_length_string = input.map(
 6160         -
                #[allow(clippy::redundant_closure)]
 6161         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6162         -
            );
        6144  +
            self.fixed_length_string = input.map(crate::constrained::MaybeConstrained::Constrained);
 6163   6145   
            self
 6164   6146   
        }
 6165   6147   
        #[allow(missing_docs)] // documentation missing in model
 6166   6148   
        pub(crate) fn set_fixed_length_string(
 6167   6149   
            mut self,
 6168   6150   
            input: Option<
 6169   6151   
                impl ::std::convert::Into<
 6170   6152   
                    crate::constrained::MaybeConstrained<crate::model::FixedLengthString>,
 6171   6153   
                >,
 6172   6154   
            >,
 6173   6155   
        ) -> Self {
 6174   6156   
            self.fixed_length_string = input.map(|v| v.into());
 6175   6157   
            self
 6176   6158   
        }
 6177   6159   
        #[allow(missing_docs)] // documentation missing in model
 6178   6160   
        pub fn length_blob(
 6179   6161   
            mut self,
 6180   6162   
            input: ::std::option::Option<crate::model::LengthBlob>,
 6181   6163   
        ) -> Self {
 6182         -
            self.length_blob = input.map(
 6183         -
                #[allow(clippy::redundant_closure)]
 6184         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6185         -
            );
        6164  +
            self.length_blob = input.map(crate::constrained::MaybeConstrained::Constrained);
 6186   6165   
            self
 6187   6166   
        }
 6188   6167   
        #[allow(missing_docs)] // documentation missing in model
 6189   6168   
        pub(crate) fn set_length_blob(
 6190   6169   
            mut self,
 6191   6170   
            input: Option<
 6192   6171   
                impl ::std::convert::Into<
 6193   6172   
                    crate::constrained::MaybeConstrained<crate::model::LengthBlob>,
 6194   6173   
                >,
 6195   6174   
            >,
 6196   6175   
        ) -> Self {
 6197   6176   
            self.length_blob = input.map(|v| v.into());
 6198   6177   
            self
 6199   6178   
        }
 6200   6179   
        #[allow(missing_docs)] // documentation missing in model
 6201   6180   
        pub fn min_length_blob(
 6202   6181   
            mut self,
 6203   6182   
            input: ::std::option::Option<crate::model::MinLengthBlob>,
 6204   6183   
        ) -> Self {
 6205         -
            self.min_length_blob = input.map(
 6206         -
                #[allow(clippy::redundant_closure)]
 6207         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6208         -
            );
        6184  +
            self.min_length_blob = input.map(crate::constrained::MaybeConstrained::Constrained);
 6209   6185   
            self
 6210   6186   
        }
 6211   6187   
        #[allow(missing_docs)] // documentation missing in model
 6212   6188   
        pub(crate) fn set_min_length_blob(
 6213   6189   
            mut self,
 6214   6190   
            input: Option<
 6215   6191   
                impl ::std::convert::Into<
 6216   6192   
                    crate::constrained::MaybeConstrained<crate::model::MinLengthBlob>,
 6217   6193   
                >,
 6218   6194   
            >,
 6219   6195   
        ) -> Self {
 6220   6196   
            self.min_length_blob = input.map(|v| v.into());
 6221   6197   
            self
 6222   6198   
        }
 6223   6199   
        #[allow(missing_docs)] // documentation missing in model
 6224   6200   
        pub fn max_length_blob(
 6225   6201   
            mut self,
 6226   6202   
            input: ::std::option::Option<crate::model::MaxLengthBlob>,
 6227   6203   
        ) -> Self {
 6228         -
            self.max_length_blob = input.map(
 6229         -
                #[allow(clippy::redundant_closure)]
 6230         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6231         -
            );
        6204  +
            self.max_length_blob = input.map(crate::constrained::MaybeConstrained::Constrained);
 6232   6205   
            self
 6233   6206   
        }
 6234   6207   
        #[allow(missing_docs)] // documentation missing in model
 6235   6208   
        pub(crate) fn set_max_length_blob(
 6236   6209   
            mut self,
 6237   6210   
            input: Option<
 6238   6211   
                impl ::std::convert::Into<
 6239   6212   
                    crate::constrained::MaybeConstrained<crate::model::MaxLengthBlob>,
 6240   6213   
                >,
 6241   6214   
            >,
 6242   6215   
        ) -> Self {
 6243   6216   
            self.max_length_blob = input.map(|v| v.into());
 6244   6217   
            self
 6245   6218   
        }
 6246   6219   
        #[allow(missing_docs)] // documentation missing in model
 6247   6220   
        pub fn fixed_length_blob(
 6248   6221   
            mut self,
 6249   6222   
            input: ::std::option::Option<crate::model::FixedLengthBlob>,
 6250   6223   
        ) -> Self {
 6251         -
            self.fixed_length_blob = input.map(
 6252         -
                #[allow(clippy::redundant_closure)]
 6253         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6254         -
            );
        6224  +
            self.fixed_length_blob = input.map(crate::constrained::MaybeConstrained::Constrained);
 6255   6225   
            self
 6256   6226   
        }
 6257   6227   
        #[allow(missing_docs)] // documentation missing in model
 6258   6228   
        pub(crate) fn set_fixed_length_blob(
 6259   6229   
            mut self,
 6260   6230   
            input: Option<
 6261   6231   
                impl ::std::convert::Into<
 6262   6232   
                    crate::constrained::MaybeConstrained<crate::model::FixedLengthBlob>,
 6263   6233   
                >,
 6264   6234   
            >,
@@ -6510,6480 +6652,6608 @@
 6530   6500   
            >,
 6531   6501   
        ) -> Self {
 6532   6502   
            self.con_b_list = input.map(|v| v.into());
 6533   6503   
            self
 6534   6504   
        }
 6535   6505   
        #[allow(missing_docs)] // documentation missing in model
 6536   6506   
        pub fn length_list(
 6537   6507   
            mut self,
 6538   6508   
            input: ::std::option::Option<crate::model::LengthList>,
 6539   6509   
        ) -> Self {
 6540         -
            self.length_list = input.map(
 6541         -
                #[allow(clippy::redundant_closure)]
 6542         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6543         -
            );
        6510  +
            self.length_list = input.map(crate::constrained::MaybeConstrained::Constrained);
 6544   6511   
            self
 6545   6512   
        }
 6546   6513   
        #[allow(missing_docs)] // documentation missing in model
 6547   6514   
        pub(crate) fn set_length_list(
 6548   6515   
            mut self,
 6549   6516   
            input: Option<
 6550   6517   
                impl ::std::convert::Into<
 6551   6518   
                    crate::constrained::MaybeConstrained<crate::model::LengthList>,
 6552   6519   
                >,
 6553   6520   
            >,
 6554   6521   
        ) -> Self {
 6555   6522   
            self.length_list = input.map(|v| v.into());
 6556   6523   
            self
 6557   6524   
        }
 6558   6525   
        #[allow(missing_docs)] // documentation missing in model
 6559   6526   
        pub fn sensitive_length_list(
 6560   6527   
            mut self,
 6561   6528   
            input: ::std::option::Option<crate::model::SensitiveLengthList>,
 6562   6529   
        ) -> Self {
 6563         -
            self.sensitive_length_list = input.map(
 6564         -
                #[allow(clippy::redundant_closure)]
 6565         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6566         -
            );
        6530  +
            self.sensitive_length_list =
        6531  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 6567   6532   
            self
 6568   6533   
        }
 6569   6534   
        #[allow(missing_docs)] // documentation missing in model
 6570   6535   
        pub(crate) fn set_sensitive_length_list(
 6571   6536   
            mut self,
 6572   6537   
            input: Option<
 6573   6538   
                impl ::std::convert::Into<
 6574   6539   
                    crate::constrained::MaybeConstrained<crate::model::SensitiveLengthList>,
 6575   6540   
                >,
 6576   6541   
            >,
 6577   6542   
        ) -> Self {
 6578   6543   
            self.sensitive_length_list = input.map(|v| v.into());
 6579   6544   
            self
 6580   6545   
        }
 6581   6546   
        #[allow(missing_docs)] // documentation missing in model
 6582   6547   
        pub fn con_b_set(mut self, input: ::std::option::Option<crate::model::ConBSet>) -> Self {
 6583         -
            self.con_b_set = input.map(
 6584         -
                #[allow(clippy::redundant_closure)]
 6585         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6586         -
            );
        6548  +
            self.con_b_set = input.map(crate::constrained::MaybeConstrained::Constrained);
 6587   6549   
            self
 6588   6550   
        }
 6589   6551   
        #[allow(missing_docs)] // documentation missing in model
 6590   6552   
        pub(crate) fn set_con_b_set(
 6591   6553   
            mut self,
 6592   6554   
            input: Option<
 6593   6555   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBSet>>,
 6594   6556   
            >,
 6595   6557   
        ) -> Self {
 6596   6558   
            self.con_b_set = input.map(|v| v.into());
 6597   6559   
            self
 6598   6560   
        }
 6599   6561   
        #[allow(missing_docs)] // documentation missing in model
 6600   6562   
        pub fn con_b_map(mut self, input: ::std::option::Option<crate::model::ConBMap>) -> Self {
 6601         -
            self.con_b_map = input.map(
 6602         -
                #[allow(clippy::redundant_closure)]
 6603         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6604         -
            );
        6563  +
            self.con_b_map = input.map(crate::constrained::MaybeConstrained::Constrained);
 6605   6564   
            self
 6606   6565   
        }
 6607   6566   
        #[allow(missing_docs)] // documentation missing in model
 6608   6567   
        pub(crate) fn set_con_b_map(
 6609   6568   
            mut self,
 6610   6569   
            input: Option<
 6611   6570   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
 6612   6571   
            >,
 6613   6572   
        ) -> Self {
 6614   6573   
            self.con_b_map = input.map(|v| v.into());
 6615   6574   
            self
 6616   6575   
        }
 6617   6576   
        #[allow(missing_docs)] // documentation missing in model
 6618   6577   
        pub fn length_map(mut self, input: ::std::option::Option<crate::model::LengthMap>) -> Self {
 6619         -
            self.length_map = input.map(
 6620         -
                #[allow(clippy::redundant_closure)]
 6621         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6622         -
            );
        6578  +
            self.length_map = input.map(crate::constrained::MaybeConstrained::Constrained);
 6623   6579   
            self
 6624   6580   
        }
 6625   6581   
        #[allow(missing_docs)] // documentation missing in model
 6626   6582   
        pub(crate) fn set_length_map(
 6627   6583   
            mut self,
 6628   6584   
            input: Option<
 6629   6585   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::LengthMap>>,
 6630   6586   
            >,
 6631   6587   
        ) -> Self {
 6632   6588   
            self.length_map = input.map(|v| v.into());
@@ -6694,6650 +6868,6810 @@
 6714   6670   
            >,
 6715   6671   
        ) -> Self {
 6716   6672   
            self.sparse_list = input.map(|v| v.into());
 6717   6673   
            self
 6718   6674   
        }
 6719   6675   
        #[allow(missing_docs)] // documentation missing in model
 6720   6676   
        pub fn sparse_length_map(
 6721   6677   
            mut self,
 6722   6678   
            input: ::std::option::Option<crate::model::SparseLengthMap>,
 6723   6679   
        ) -> Self {
 6724         -
            self.sparse_length_map = input.map(
 6725         -
                #[allow(clippy::redundant_closure)]
 6726         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6727         -
            );
        6680  +
            self.sparse_length_map = input.map(crate::constrained::MaybeConstrained::Constrained);
 6728   6681   
            self
 6729   6682   
        }
 6730   6683   
        #[allow(missing_docs)] // documentation missing in model
 6731   6684   
        pub(crate) fn set_sparse_length_map(
 6732   6685   
            mut self,
 6733   6686   
            input: Option<
 6734   6687   
                impl ::std::convert::Into<
 6735   6688   
                    crate::constrained::MaybeConstrained<crate::model::SparseLengthMap>,
 6736   6689   
                >,
 6737   6690   
            >,
 6738   6691   
        ) -> Self {
 6739   6692   
            self.sparse_length_map = input.map(|v| v.into());
 6740   6693   
            self
 6741   6694   
        }
 6742   6695   
        #[allow(missing_docs)] // documentation missing in model
 6743   6696   
        pub fn sparse_length_list(
 6744   6697   
            mut self,
 6745   6698   
            input: ::std::option::Option<crate::model::SparseLengthList>,
 6746   6699   
        ) -> Self {
 6747         -
            self.sparse_length_list = input.map(
 6748         -
                #[allow(clippy::redundant_closure)]
 6749         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6750         -
            );
        6700  +
            self.sparse_length_list = input.map(crate::constrained::MaybeConstrained::Constrained);
 6751   6701   
            self
 6752   6702   
        }
 6753   6703   
        #[allow(missing_docs)] // documentation missing in model
 6754   6704   
        pub(crate) fn set_sparse_length_list(
 6755   6705   
            mut self,
 6756   6706   
            input: Option<
 6757   6707   
                impl ::std::convert::Into<
 6758   6708   
                    crate::constrained::MaybeConstrained<crate::model::SparseLengthList>,
 6759   6709   
                >,
 6760   6710   
            >,
 6761   6711   
        ) -> Self {
 6762   6712   
            self.sparse_length_list = input.map(|v| v.into());
 6763   6713   
            self
 6764   6714   
        }
 6765   6715   
        /// A union with constrained members.
 6766   6716   
        pub fn constrained_union(
 6767   6717   
            mut self,
 6768   6718   
            input: ::std::option::Option<crate::model::ConstrainedUnion>,
 6769   6719   
        ) -> Self {
 6770         -
            self.constrained_union = input.map(
 6771         -
                #[allow(clippy::redundant_closure)]
 6772         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6773         -
            );
        6720  +
            self.constrained_union = input.map(crate::constrained::MaybeConstrained::Constrained);
 6774   6721   
            self
 6775   6722   
        }
 6776   6723   
        /// A union with constrained members.
 6777   6724   
        pub(crate) fn set_constrained_union(
 6778   6725   
            mut self,
 6779   6726   
            input: Option<
 6780   6727   
                impl ::std::convert::Into<
 6781   6728   
                    crate::constrained::MaybeConstrained<crate::model::ConstrainedUnion>,
 6782   6729   
                >,
 6783   6730   
            >,
 6784   6731   
        ) -> Self {
 6785   6732   
            self.constrained_union = input.map(|v| v.into());
 6786   6733   
            self
 6787   6734   
        }
 6788   6735   
        #[allow(missing_docs)] // documentation missing in model
 6789   6736   
        pub fn enum_string(
 6790   6737   
            mut self,
 6791   6738   
            input: ::std::option::Option<crate::model::EnumString>,
 6792   6739   
        ) -> Self {
 6793         -
            self.enum_string = input.map(
 6794         -
                #[allow(clippy::redundant_closure)]
 6795         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6796         -
            );
        6740  +
            self.enum_string = input.map(crate::constrained::MaybeConstrained::Constrained);
 6797   6741   
            self
 6798   6742   
        }
 6799   6743   
        #[allow(missing_docs)] // documentation missing in model
 6800   6744   
        pub(crate) fn set_enum_string(
 6801   6745   
            mut self,
 6802   6746   
            input: Option<
 6803   6747   
                impl ::std::convert::Into<
 6804   6748   
                    crate::constrained::MaybeConstrained<crate::model::EnumString>,
 6805   6749   
                >,
 6806   6750   
            >,
 6807   6751   
        ) -> Self {
 6808   6752   
            self.enum_string = input.map(|v| v.into());
 6809   6753   
            self
 6810   6754   
        }
 6811   6755   
        #[allow(missing_docs)] // documentation missing in model
 6812   6756   
        pub fn list_of_length_string(
 6813   6757   
            mut self,
 6814   6758   
            input: ::std::option::Option<::std::vec::Vec<crate::model::LengthString>>,
 6815   6759   
        ) -> Self {
 6816   6760   
            self.list_of_length_string = input.map(
 6817   6761   
                #[allow(clippy::redundant_closure)]
 6818   6762   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 6819   6763   
            );
 6820   6764   
            self
 6821   6765   
        }
 6822   6766   
        #[allow(missing_docs)] // documentation missing in model
 6823   6767   
        pub(crate) fn set_list_of_length_string(
 6824   6768   
            mut self,
 6825   6769   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
 6826   6770   
        ) -> Self {
 6827   6771   
            self.list_of_length_string = input.map(|v| v.into());
 6828   6772   
            self
 6829   6773   
        }
 6830   6774   
        #[allow(missing_docs)] // documentation missing in model
 6831   6775   
        pub fn set_of_length_string(
 6832   6776   
            mut self,
 6833   6777   
            input: ::std::option::Option<crate::model::SetOfLengthString>,
 6834   6778   
        ) -> Self {
 6835         -
            self.set_of_length_string = input.map(
 6836         -
                #[allow(clippy::redundant_closure)]
 6837         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6838         -
            );
        6779  +
            self.set_of_length_string =
        6780  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 6839   6781   
            self
 6840   6782   
        }
 6841   6783   
        #[allow(missing_docs)] // documentation missing in model
 6842   6784   
        pub(crate) fn set_set_of_length_string(
 6843   6785   
            mut self,
 6844   6786   
            input: Option<
 6845   6787   
                impl ::std::convert::Into<
 6846   6788   
                    crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
 6847   6789   
                >,
 6848   6790   
            >,
@@ -6908,6850 +7220,7148 @@
 6928   6870   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
 6929   6871   
        ) -> Self {
 6930   6872   
            self.list_of_range_integer = input.map(|v| v.into());
 6931   6873   
            self
 6932   6874   
        }
 6933   6875   
        #[allow(missing_docs)] // documentation missing in model
 6934   6876   
        pub fn set_of_range_integer(
 6935   6877   
            mut self,
 6936   6878   
            input: ::std::option::Option<crate::model::SetOfRangeInteger>,
 6937   6879   
        ) -> Self {
 6938         -
            self.set_of_range_integer = input.map(
 6939         -
                #[allow(clippy::redundant_closure)]
 6940         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 6941         -
            );
        6880  +
            self.set_of_range_integer =
        6881  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 6942   6882   
            self
 6943   6883   
        }
 6944   6884   
        #[allow(missing_docs)] // documentation missing in model
 6945   6885   
        pub(crate) fn set_set_of_range_integer(
 6946   6886   
            mut self,
 6947   6887   
            input: Option<
 6948   6888   
                impl ::std::convert::Into<
 6949   6889   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
 6950   6890   
                >,
 6951   6891   
            >,
 6952   6892   
        ) -> Self {
 6953   6893   
            self.set_of_range_integer = input.map(|v| v.into());
 6954   6894   
            self
 6955   6895   
        }
 6956   6896   
        #[allow(missing_docs)] // documentation missing in model
 6957   6897   
        pub fn map_of_range_integer(
 6958   6898   
            mut self,
 6959   6899   
            input: ::std::option::Option<
 6960   6900   
                ::std::collections::HashMap<::std::string::String, crate::model::RangeInteger>,
 6961   6901   
            >,
 6962   6902   
        ) -> Self {
 6963   6903   
            self.map_of_range_integer = input.map(
 6964   6904   
                #[allow(clippy::redundant_closure)]
 6965   6905   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 6966   6906   
            );
 6967   6907   
            self
 6968   6908   
        }
 6969   6909   
        #[allow(missing_docs)] // documentation missing in model
 6970   6910   
        pub(crate) fn set_map_of_range_integer(
 6971   6911   
            mut self,
 6972   6912   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_range_integer_constrained::MapOfRangeIntegerConstrained>>>,
 6973   6913   
        ) -> Self {
 6974   6914   
            self.map_of_range_integer = input.map(|v| v.into());
 6975   6915   
            self
 6976   6916   
        }
 6977   6917   
        #[allow(missing_docs)] // documentation missing in model
 6978   6918   
        pub fn list_of_range_short(
 6979   6919   
            mut self,
 6980   6920   
            input: ::std::option::Option<::std::vec::Vec<crate::model::RangeShort>>,
 6981   6921   
        ) -> Self {
 6982   6922   
            self.list_of_range_short = input.map(
 6983   6923   
                #[allow(clippy::redundant_closure)]
 6984   6924   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 6985   6925   
            );
 6986   6926   
            self
 6987   6927   
        }
 6988   6928   
        #[allow(missing_docs)] // documentation missing in model
 6989   6929   
        pub(crate) fn set_list_of_range_short(
 6990   6930   
            mut self,
 6991   6931   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
 6992   6932   
        ) -> Self {
 6993   6933   
            self.list_of_range_short = input.map(|v| v.into());
 6994   6934   
            self
 6995   6935   
        }
 6996   6936   
        #[allow(missing_docs)] // documentation missing in model
 6997   6937   
        pub fn set_of_range_short(
 6998   6938   
            mut self,
 6999   6939   
            input: ::std::option::Option<crate::model::SetOfRangeShort>,
 7000   6940   
        ) -> Self {
 7001         -
            self.set_of_range_short = input.map(
 7002         -
                #[allow(clippy::redundant_closure)]
 7003         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7004         -
            );
        6941  +
            self.set_of_range_short = input.map(crate::constrained::MaybeConstrained::Constrained);
 7005   6942   
            self
 7006   6943   
        }
 7007   6944   
        #[allow(missing_docs)] // documentation missing in model
 7008   6945   
        pub(crate) fn set_set_of_range_short(
 7009   6946   
            mut self,
 7010   6947   
            input: Option<
 7011   6948   
                impl ::std::convert::Into<
 7012   6949   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
 7013   6950   
                >,
 7014   6951   
            >,
 7015   6952   
        ) -> Self {
 7016   6953   
            self.set_of_range_short = input.map(|v| v.into());
 7017   6954   
            self
 7018   6955   
        }
 7019   6956   
        #[allow(missing_docs)] // documentation missing in model
 7020   6957   
        pub fn map_of_range_short(
 7021   6958   
            mut self,
 7022   6959   
            input: ::std::option::Option<
 7023   6960   
                ::std::collections::HashMap<::std::string::String, crate::model::RangeShort>,
 7024   6961   
            >,
 7025   6962   
        ) -> Self {
 7026   6963   
            self.map_of_range_short = input.map(
 7027   6964   
                #[allow(clippy::redundant_closure)]
 7028   6965   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 7029   6966   
            );
 7030   6967   
            self
 7031   6968   
        }
 7032   6969   
        #[allow(missing_docs)] // documentation missing in model
 7033   6970   
        pub(crate) fn set_map_of_range_short(
 7034   6971   
            mut self,
 7035   6972   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_range_short_constrained::MapOfRangeShortConstrained>>>,
 7036   6973   
        ) -> Self {
 7037   6974   
            self.map_of_range_short = input.map(|v| v.into());
 7038   6975   
            self
 7039   6976   
        }
 7040   6977   
        #[allow(missing_docs)] // documentation missing in model
 7041   6978   
        pub fn list_of_range_long(
 7042   6979   
            mut self,
 7043   6980   
            input: ::std::option::Option<::std::vec::Vec<crate::model::RangeLong>>,
 7044   6981   
        ) -> Self {
 7045   6982   
            self.list_of_range_long = input.map(
 7046   6983   
                #[allow(clippy::redundant_closure)]
 7047   6984   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 7048   6985   
            );
 7049   6986   
            self
 7050   6987   
        }
 7051   6988   
        #[allow(missing_docs)] // documentation missing in model
 7052   6989   
        pub(crate) fn set_list_of_range_long(
 7053   6990   
            mut self,
 7054   6991   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
 7055   6992   
        ) -> Self {
 7056   6993   
            self.list_of_range_long = input.map(|v| v.into());
 7057   6994   
            self
 7058   6995   
        }
 7059   6996   
        #[allow(missing_docs)] // documentation missing in model
 7060   6997   
        pub fn set_of_range_long(
 7061   6998   
            mut self,
 7062   6999   
            input: ::std::option::Option<crate::model::SetOfRangeLong>,
 7063   7000   
        ) -> Self {
 7064         -
            self.set_of_range_long = input.map(
 7065         -
                #[allow(clippy::redundant_closure)]
 7066         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7067         -
            );
        7001  +
            self.set_of_range_long = input.map(crate::constrained::MaybeConstrained::Constrained);
 7068   7002   
            self
 7069   7003   
        }
 7070   7004   
        #[allow(missing_docs)] // documentation missing in model
 7071   7005   
        pub(crate) fn set_set_of_range_long(
 7072   7006   
            mut self,
 7073   7007   
            input: Option<
 7074   7008   
                impl ::std::convert::Into<
 7075   7009   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
 7076   7010   
                >,
 7077   7011   
            >,
 7078   7012   
        ) -> Self {
 7079   7013   
            self.set_of_range_long = input.map(|v| v.into());
 7080   7014   
            self
 7081   7015   
        }
 7082   7016   
        #[allow(missing_docs)] // documentation missing in model
 7083   7017   
        pub fn map_of_range_long(
 7084   7018   
            mut self,
 7085   7019   
            input: ::std::option::Option<
 7086   7020   
                ::std::collections::HashMap<::std::string::String, crate::model::RangeLong>,
 7087   7021   
            >,
 7088   7022   
        ) -> Self {
 7089   7023   
            self.map_of_range_long = input.map(
 7090   7024   
                #[allow(clippy::redundant_closure)]
 7091   7025   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 7092   7026   
            );
 7093   7027   
            self
 7094   7028   
        }
 7095   7029   
        #[allow(missing_docs)] // documentation missing in model
 7096   7030   
        pub(crate) fn set_map_of_range_long(
 7097   7031   
            mut self,
 7098   7032   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_range_long_constrained::MapOfRangeLongConstrained>>>,
 7099   7033   
        ) -> Self {
 7100   7034   
            self.map_of_range_long = input.map(|v| v.into());
 7101   7035   
            self
 7102   7036   
        }
 7103   7037   
        #[allow(missing_docs)] // documentation missing in model
 7104   7038   
        pub fn list_of_range_byte(
 7105   7039   
            mut self,
 7106   7040   
            input: ::std::option::Option<::std::vec::Vec<crate::model::RangeByte>>,
 7107   7041   
        ) -> Self {
 7108   7042   
            self.list_of_range_byte = input.map(
 7109   7043   
                #[allow(clippy::redundant_closure)]
 7110   7044   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 7111   7045   
            );
 7112   7046   
            self
 7113   7047   
        }
 7114   7048   
        #[allow(missing_docs)] // documentation missing in model
 7115   7049   
        pub(crate) fn set_list_of_range_byte(
 7116   7050   
            mut self,
 7117   7051   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
 7118   7052   
        ) -> Self {
 7119   7053   
            self.list_of_range_byte = input.map(|v| v.into());
 7120   7054   
            self
 7121   7055   
        }
 7122   7056   
        #[allow(missing_docs)] // documentation missing in model
 7123   7057   
        pub fn set_of_range_byte(
 7124   7058   
            mut self,
 7125   7059   
            input: ::std::option::Option<crate::model::SetOfRangeByte>,
 7126   7060   
        ) -> Self {
 7127         -
            self.set_of_range_byte = input.map(
 7128         -
                #[allow(clippy::redundant_closure)]
 7129         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7130         -
            );
        7061  +
            self.set_of_range_byte = input.map(crate::constrained::MaybeConstrained::Constrained);
 7131   7062   
            self
 7132   7063   
        }
 7133   7064   
        #[allow(missing_docs)] // documentation missing in model
 7134   7065   
        pub(crate) fn set_set_of_range_byte(
 7135   7066   
            mut self,
 7136   7067   
            input: Option<
 7137   7068   
                impl ::std::convert::Into<
 7138   7069   
                    crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
 7139   7070   
                >,
 7140   7071   
            >,
 7141   7072   
        ) -> Self {
 7142   7073   
            self.set_of_range_byte = input.map(|v| v.into());
 7143   7074   
            self
 7144   7075   
        }
 7145   7076   
        #[allow(missing_docs)] // documentation missing in model
 7146   7077   
        pub fn map_of_range_byte(
 7147   7078   
            mut self,
 7148   7079   
            input: ::std::option::Option<
 7149   7080   
                ::std::collections::HashMap<::std::string::String, crate::model::RangeByte>,
 7150   7081   
            >,
 7151   7082   
        ) -> Self {
 7152   7083   
            self.map_of_range_byte = input.map(
 7153   7084   
                #[allow(clippy::redundant_closure)]
 7154   7085   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 7155   7086   
            );
 7156   7087   
            self
 7157   7088   
        }
 7158   7089   
        #[allow(missing_docs)] // documentation missing in model
 7159   7090   
        pub(crate) fn set_map_of_range_byte(
 7160   7091   
            mut self,
 7161   7092   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_range_byte_constrained::MapOfRangeByteConstrained>>>,
 7162   7093   
        ) -> Self {
 7163   7094   
            self.map_of_range_byte = input.map(|v| v.into());
 7164   7095   
            self
 7165   7096   
        }
 7166   7097   
        #[allow(missing_docs)] // documentation missing in model
 7167   7098   
        pub fn non_streaming_blob(
 7168   7099   
            mut self,
 7169   7100   
            input: ::std::option::Option<::aws_smithy_types::Blob>,
 7170   7101   
        ) -> Self {
 7171   7102   
            self.non_streaming_blob = input;
 7172   7103   
            self
 7173   7104   
        }
 7174   7105   
        #[allow(missing_docs)] // documentation missing in model
 7175   7106   
        pub(crate) fn set_non_streaming_blob(
 7176   7107   
            mut self,
 7177   7108   
            input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
 7178   7109   
        ) -> Self {
 7179   7110   
            self.non_streaming_blob = input.map(|v| v.into());
 7180   7111   
            self
 7181   7112   
        }
 7182   7113   
        #[allow(missing_docs)] // documentation missing in model
 7183   7114   
        pub fn pattern_string(
 7184   7115   
            mut self,
 7185   7116   
            input: ::std::option::Option<crate::model::PatternString>,
 7186   7117   
        ) -> Self {
 7187         -
            self.pattern_string = input.map(
 7188         -
                #[allow(clippy::redundant_closure)]
 7189         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7190         -
            );
        7118  +
            self.pattern_string = input.map(crate::constrained::MaybeConstrained::Constrained);
 7191   7119   
            self
 7192   7120   
        }
 7193   7121   
        #[allow(missing_docs)] // documentation missing in model
 7194   7122   
        pub(crate) fn set_pattern_string(
 7195   7123   
            mut self,
 7196   7124   
            input: Option<
 7197   7125   
                impl ::std::convert::Into<
 7198   7126   
                    crate::constrained::MaybeConstrained<crate::model::PatternString>,
 7199   7127   
                >,
 7200   7128   
            >,
@@ -7223,7151 +7309,7233 @@
 7243   7171   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_pattern_string_constrained::ListOfPatternStringConstrained>>>,
 7244   7172   
        ) -> Self {
 7245   7173   
            self.list_of_pattern_string = input.map(|v| v.into());
 7246   7174   
            self
 7247   7175   
        }
 7248   7176   
        #[allow(missing_docs)] // documentation missing in model
 7249   7177   
        pub fn set_of_pattern_string(
 7250   7178   
            mut self,
 7251   7179   
            input: ::std::option::Option<crate::model::SetOfPatternString>,
 7252   7180   
        ) -> Self {
 7253         -
            self.set_of_pattern_string = input.map(
 7254         -
                #[allow(clippy::redundant_closure)]
 7255         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7256         -
            );
        7181  +
            self.set_of_pattern_string =
        7182  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 7257   7183   
            self
 7258   7184   
        }
 7259   7185   
        #[allow(missing_docs)] // documentation missing in model
 7260   7186   
        pub(crate) fn set_set_of_pattern_string(
 7261   7187   
            mut self,
 7262   7188   
            input: Option<
 7263   7189   
                impl ::std::convert::Into<
 7264   7190   
                    crate::constrained::MaybeConstrained<crate::model::SetOfPatternString>,
 7265   7191   
                >,
 7266   7192   
            >,
 7267   7193   
        ) -> Self {
 7268   7194   
            self.set_of_pattern_string = input.map(|v| v.into());
 7269   7195   
            self
 7270   7196   
        }
 7271   7197   
        #[allow(missing_docs)] // documentation missing in model
 7272   7198   
        pub fn length_length_pattern_string(
 7273   7199   
            mut self,
 7274   7200   
            input: ::std::option::Option<crate::model::LengthPatternString>,
 7275   7201   
        ) -> Self {
 7276         -
            self.length_length_pattern_string = input.map(
 7277         -
                #[allow(clippy::redundant_closure)]
 7278         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7279         -
            );
        7202  +
            self.length_length_pattern_string =
        7203  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 7280   7204   
            self
 7281   7205   
        }
 7282   7206   
        #[allow(missing_docs)] // documentation missing in model
 7283   7207   
        pub(crate) fn set_length_length_pattern_string(
 7284   7208   
            mut self,
 7285   7209   
            input: Option<
 7286   7210   
                impl ::std::convert::Into<
 7287   7211   
                    crate::constrained::MaybeConstrained<crate::model::LengthPatternString>,
 7288   7212   
                >,
 7289   7213   
            >,
@@ -7312,7236 +7421,7339 @@
 7332   7256   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained>>>,
 7333   7257   
        ) -> Self {
 7334   7258   
            self.list_of_length_pattern_string = input.map(|v| v.into());
 7335   7259   
            self
 7336   7260   
        }
 7337   7261   
        #[allow(missing_docs)] // documentation missing in model
 7338   7262   
        pub fn set_of_length_pattern_string(
 7339   7263   
            mut self,
 7340   7264   
            input: ::std::option::Option<crate::model::SetOfLengthPatternString>,
 7341   7265   
        ) -> Self {
 7342         -
            self.set_of_length_pattern_string = input.map(
 7343         -
                #[allow(clippy::redundant_closure)]
 7344         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7345         -
            );
        7266  +
            self.set_of_length_pattern_string =
        7267  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 7346   7268   
            self
 7347   7269   
        }
 7348   7270   
        #[allow(missing_docs)] // documentation missing in model
 7349   7271   
        pub(crate) fn set_set_of_length_pattern_string(
 7350   7272   
            mut self,
 7351   7273   
            input: Option<
 7352   7274   
                impl ::std::convert::Into<
 7353   7275   
                    crate::constrained::MaybeConstrained<crate::model::SetOfLengthPatternString>,
 7354   7276   
                >,
 7355   7277   
            >,
 7356   7278   
        ) -> Self {
 7357   7279   
            self.set_of_length_pattern_string = input.map(|v| v.into());
 7358   7280   
            self
 7359   7281   
        }
 7360   7282   
        #[allow(missing_docs)] // documentation missing in model
 7361   7283   
        pub fn length_list_of_pattern_string(
 7362   7284   
            mut self,
 7363   7285   
            input: ::std::option::Option<crate::model::LengthListOfPatternString>,
 7364   7286   
        ) -> Self {
 7365         -
            self.length_list_of_pattern_string = input.map(
 7366         -
                #[allow(clippy::redundant_closure)]
 7367         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7368         -
            );
        7287  +
            self.length_list_of_pattern_string =
        7288  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 7369   7289   
            self
 7370   7290   
        }
 7371   7291   
        #[allow(missing_docs)] // documentation missing in model
 7372   7292   
        pub(crate) fn set_length_list_of_pattern_string(
 7373   7293   
            mut self,
 7374   7294   
            input: Option<
 7375   7295   
                impl ::std::convert::Into<
 7376   7296   
                    crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
 7377   7297   
                >,
 7378   7298   
            >,
 7379   7299   
        ) -> Self {
 7380   7300   
            self.length_list_of_pattern_string = input.map(|v| v.into());
 7381   7301   
            self
 7382   7302   
        }
 7383   7303   
        #[allow(missing_docs)] // documentation missing in model
 7384   7304   
        pub fn length_set_of_pattern_string(
 7385   7305   
            mut self,
 7386   7306   
            input: ::std::option::Option<crate::model::LengthSetOfPatternString>,
 7387   7307   
        ) -> Self {
 7388         -
            self.length_set_of_pattern_string = input.map(
 7389         -
                #[allow(clippy::redundant_closure)]
 7390         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7391         -
            );
        7308  +
            self.length_set_of_pattern_string =
        7309  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 7392   7310   
            self
 7393   7311   
        }
 7394   7312   
        #[allow(missing_docs)] // documentation missing in model
 7395   7313   
        pub(crate) fn set_length_set_of_pattern_string(
 7396   7314   
            mut self,
 7397   7315   
            input: Option<
 7398   7316   
                impl ::std::convert::Into<
 7399   7317   
                    crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>,
 7400   7318   
                >,
 7401   7319   
            >,

tmp-codegen-diff/codegen-server-test/ebs/rust-server-codegen/src/input.rs

@@ -480,480 +573,567 @@
  500    500   
    impl Builder {
  501    501   
        /// <p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
  502    502   
        /// <ul>
  503    503   
        /// <li>
  504    504   
        /// <p>No blocks are written to the snapshot.</p></li>
  505    505   
        /// <li>
  506    506   
        /// <p>The snapshot is not completed after writing the last block of data.</p></li>
  507    507   
        /// </ul>
  508    508   
        /// <p>If no value is specified, the timeout defaults to <code>60</code> minutes.</p>
  509    509   
        pub fn timeout(mut self, input: ::std::option::Option<crate::model::Timeout>) -> Self {
  510         -
            self.timeout = input.map(
  511         -
                #[allow(clippy::redundant_closure)]
  512         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  513         -
            );
         510  +
            self.timeout = input.map(crate::constrained::MaybeConstrained::Constrained);
  514    511   
            self
  515    512   
        }
  516    513   
        /// <p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
  517    514   
        /// <ul>
  518    515   
        /// <li>
  519    516   
        /// <p>No blocks are written to the snapshot.</p></li>
  520    517   
        /// <li>
  521    518   
        /// <p>The snapshot is not completed after writing the last block of data.</p></li>
  522    519   
        /// </ul>
  523    520   
        /// <p>If no value is specified, the timeout defaults to <code>60</code> minutes.</p>
  524    521   
        pub(crate) fn set_timeout(
  525    522   
            mut self,
  526    523   
            input: Option<
  527    524   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Timeout>>,
  528    525   
            >,
  529    526   
        ) -> Self {
  530    527   
            self.timeout = input.map(|v| v.into());
  531    528   
            self
  532    529   
        }
  533    530   
        /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
  534    531   
        /// <p>If you do not specify a client token, one is automatically generated by the AWS SDK.</p>
  535    532   
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html"> Idempotency for StartSnapshot API</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
  536    533   
        pub fn client_token(
  537    534   
            mut self,
  538    535   
            input: ::std::option::Option<crate::model::IdempotencyToken>,
  539    536   
        ) -> Self {
  540         -
            self.client_token = input.map(
  541         -
                #[allow(clippy::redundant_closure)]
  542         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  543         -
            );
         537  +
            self.client_token = input.map(crate::constrained::MaybeConstrained::Constrained);
  544    538   
            self
  545    539   
        }
  546    540   
        /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
  547    541   
        /// <p>If you do not specify a client token, one is automatically generated by the AWS SDK.</p>
  548    542   
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html"> Idempotency for StartSnapshot API</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
  549    543   
        pub(crate) fn set_client_token(
  550    544   
            mut self,
  551    545   
            input: Option<
  552    546   
                impl ::std::convert::Into<
  553    547   
                    crate::constrained::MaybeConstrained<crate::model::IdempotencyToken>,
@@ -598,592 +709,694 @@
  618    612   
            self.encrypted = input.map(|v| v.into());
  619    613   
            self
  620    614   
        }
  621    615   
        /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
  622    616   
        /// <p>If you specify a <b>ParentSnapshotId</b>, omit this parameter; the snapshot will be encrypted using the same CMK that was used to encrypt the parent snapshot.</p>
  623    617   
        /// <p>If <b>Encrypted</b> is set to <code>true</code>, you must specify a CMK ARN.</p>
  624    618   
        pub fn kms_key_arn(
  625    619   
            mut self,
  626    620   
            input: ::std::option::Option<crate::model::KmsKeyArn>,
  627    621   
        ) -> Self {
  628         -
            self.kms_key_arn = input.map(
  629         -
                #[allow(clippy::redundant_closure)]
  630         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  631         -
            );
         622  +
            self.kms_key_arn = input.map(crate::constrained::MaybeConstrained::Constrained);
  632    623   
            self
  633    624   
        }
  634    625   
        /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
  635    626   
        /// <p>If you specify a <b>ParentSnapshotId</b>, omit this parameter; the snapshot will be encrypted using the same CMK that was used to encrypt the parent snapshot.</p>
  636    627   
        /// <p>If <b>Encrypted</b> is set to <code>true</code>, you must specify a CMK ARN.</p>
  637    628   
        pub(crate) fn set_kms_key_arn(
  638    629   
            mut self,
  639    630   
            input: Option<
  640    631   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::KmsKeyArn>>,
  641    632   
            >,
  642    633   
        ) -> Self {
  643    634   
            self.kms_key_arn = input.map(|v| v.into());
  644    635   
            self
  645    636   
        }
  646    637   
        /// <p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
  647    638   
        /// <p>If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html">CopySnapshot</a>.</p>
  648    639   
        pub fn parent_snapshot_id(
  649    640   
            mut self,
  650    641   
            input: ::std::option::Option<crate::model::SnapshotId>,
  651    642   
        ) -> Self {
  652         -
            self.parent_snapshot_id = input.map(
  653         -
                #[allow(clippy::redundant_closure)]
  654         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  655         -
            );
         643  +
            self.parent_snapshot_id = input.map(crate::constrained::MaybeConstrained::Constrained);
  656    644   
            self
  657    645   
        }
  658    646   
        /// <p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
  659    647   
        /// <p>If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html">CopySnapshot</a>.</p>
  660    648   
        pub(crate) fn set_parent_snapshot_id(
  661    649   
            mut self,
  662    650   
            input: Option<
  663    651   
                impl ::std::convert::Into<
  664    652   
                    crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
  665    653   
                >,
  666    654   
            >,
  667    655   
        ) -> Self {
  668    656   
            self.parent_snapshot_id = input.map(|v| v.into());
  669    657   
            self
  670    658   
        }
  671    659   
        /// <p>A description for the snapshot.</p>
  672    660   
        pub fn description(
  673    661   
            mut self,
  674    662   
            input: ::std::option::Option<crate::model::Description>,
  675    663   
        ) -> Self {
  676         -
            self.description = input.map(
  677         -
                #[allow(clippy::redundant_closure)]
  678         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  679         -
            );
         664  +
            self.description = input.map(crate::constrained::MaybeConstrained::Constrained);
  680    665   
            self
  681    666   
        }
  682    667   
        /// <p>A description for the snapshot.</p>
  683    668   
        pub(crate) fn set_description(
  684    669   
            mut self,
  685    670   
            input: Option<
  686    671   
                impl ::std::convert::Into<
  687    672   
                    crate::constrained::MaybeConstrained<crate::model::Description>,
  688    673   
                >,
  689    674   
            >,
@@ -942,927 +1005,987 @@
  962    947   
            mut self,
  963    948   
            input: impl ::std::convert::Into<
  964    949   
                crate::constrained::MaybeConstrained<crate::model::Checksum>,
  965    950   
            >,
  966    951   
        ) -> Self {
  967    952   
            self.checksum = Some(input.into());
  968    953   
            self
  969    954   
        }
  970    955   
        /// <p>The progress of the write process, as a percentage.</p>
  971    956   
        pub fn progress(mut self, input: ::std::option::Option<crate::model::Progress>) -> Self {
  972         -
            self.progress = input.map(
  973         -
                #[allow(clippy::redundant_closure)]
  974         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  975         -
            );
         957  +
            self.progress = input.map(crate::constrained::MaybeConstrained::Constrained);
  976    958   
            self
  977    959   
        }
  978    960   
        /// <p>The progress of the write process, as a percentage.</p>
  979    961   
        pub(crate) fn set_progress(
  980    962   
            mut self,
  981    963   
            input: Option<
  982    964   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Progress>>,
  983    965   
            >,
  984    966   
        ) -> Self {
  985    967   
            self.progress = input.map(|v| v.into());
@@ -1183,1165 +1289,1263 @@
 1203   1185   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::PageToken>>,
 1204   1186   
        pub(crate) snapshot_id:
 1205   1187   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SnapshotId>>,
 1206   1188   
    }
 1207   1189   
    impl Builder {
 1208   1190   
        /// <p>The number of results to return.</p>
 1209   1191   
        pub fn max_results(
 1210   1192   
            mut self,
 1211   1193   
            input: ::std::option::Option<crate::model::MaxResults>,
 1212   1194   
        ) -> Self {
 1213         -
            self.max_results = input.map(
 1214         -
                #[allow(clippy::redundant_closure)]
 1215         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1216         -
            );
        1195  +
            self.max_results = input.map(crate::constrained::MaybeConstrained::Constrained);
 1217   1196   
            self
 1218   1197   
        }
 1219   1198   
        /// <p>The number of results to return.</p>
 1220   1199   
        pub(crate) fn set_max_results(
 1221   1200   
            mut self,
 1222   1201   
            input: Option<
 1223   1202   
                impl ::std::convert::Into<
 1224   1203   
                    crate::constrained::MaybeConstrained<crate::model::MaxResults>,
 1225   1204   
                >,
 1226   1205   
            >,
 1227   1206   
        ) -> Self {
 1228   1207   
            self.max_results = input.map(|v| v.into());
 1229   1208   
            self
 1230   1209   
        }
 1231   1210   
        /// <p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
 1232   1211   
        pub fn starting_block_index(
 1233   1212   
            mut self,
 1234   1213   
            input: ::std::option::Option<crate::model::BlockIndex>,
 1235   1214   
        ) -> Self {
 1236         -
            self.starting_block_index = input.map(
 1237         -
                #[allow(clippy::redundant_closure)]
 1238         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1239         -
            );
        1215  +
            self.starting_block_index =
        1216  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 1240   1217   
            self
 1241   1218   
        }
 1242   1219   
        /// <p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
 1243   1220   
        pub(crate) fn set_starting_block_index(
 1244   1221   
            mut self,
 1245   1222   
            input: Option<
 1246   1223   
                impl ::std::convert::Into<
 1247   1224   
                    crate::constrained::MaybeConstrained<crate::model::BlockIndex>,
 1248   1225   
                >,
 1249   1226   
            >,
 1250   1227   
        ) -> Self {
 1251   1228   
            self.starting_block_index = input.map(|v| v.into());
 1252   1229   
            self
 1253   1230   
        }
 1254   1231   
        /// <p>The token to request the next page of results.</p>
 1255   1232   
        pub fn next_token(mut self, input: ::std::option::Option<crate::model::PageToken>) -> Self {
 1256         -
            self.next_token = input.map(
 1257         -
                #[allow(clippy::redundant_closure)]
 1258         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1259         -
            );
        1233  +
            self.next_token = input.map(crate::constrained::MaybeConstrained::Constrained);
 1260   1234   
            self
 1261   1235   
        }
 1262   1236   
        /// <p>The token to request the next page of results.</p>
 1263   1237   
        pub(crate) fn set_next_token(
 1264   1238   
            mut self,
 1265   1239   
            input: Option<
 1266   1240   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::PageToken>>,
 1267   1241   
            >,
 1268   1242   
        ) -> Self {
 1269   1243   
            self.next_token = input.map(|v| v.into());
@@ -1438,1412 +1568,1531 @@
 1458   1432   
            self.second_snapshot_id = Some(input.into());
 1459   1433   
            self
 1460   1434   
        }
 1461   1435   
        /// <p>The ID of the first snapshot to use for the comparison.</p><important>
 1462   1436   
        /// <p>The <code>FirstSnapshotID</code> parameter must be specified with a <code>SecondSnapshotId</code> parameter; otherwise, an error occurs.</p>
 1463   1437   
        /// </important>
 1464   1438   
        pub fn first_snapshot_id(
 1465   1439   
            mut self,
 1466   1440   
            input: ::std::option::Option<crate::model::SnapshotId>,
 1467   1441   
        ) -> Self {
 1468         -
            self.first_snapshot_id = input.map(
 1469         -
                #[allow(clippy::redundant_closure)]
 1470         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1471         -
            );
        1442  +
            self.first_snapshot_id = input.map(crate::constrained::MaybeConstrained::Constrained);
 1472   1443   
            self
 1473   1444   
        }
 1474   1445   
        /// <p>The ID of the first snapshot to use for the comparison.</p><important>
 1475   1446   
        /// <p>The <code>FirstSnapshotID</code> parameter must be specified with a <code>SecondSnapshotId</code> parameter; otherwise, an error occurs.</p>
 1476   1447   
        /// </important>
 1477   1448   
        pub(crate) fn set_first_snapshot_id(
 1478   1449   
            mut self,
 1479   1450   
            input: Option<
 1480   1451   
                impl ::std::convert::Into<
 1481   1452   
                    crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
 1482   1453   
                >,
 1483   1454   
            >,
 1484   1455   
        ) -> Self {
 1485   1456   
            self.first_snapshot_id = input.map(|v| v.into());
 1486   1457   
            self
 1487   1458   
        }
 1488   1459   
        /// <p>The token to request the next page of results.</p>
 1489   1460   
        pub fn next_token(mut self, input: ::std::option::Option<crate::model::PageToken>) -> Self {
 1490         -
            self.next_token = input.map(
 1491         -
                #[allow(clippy::redundant_closure)]
 1492         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1493         -
            );
        1461  +
            self.next_token = input.map(crate::constrained::MaybeConstrained::Constrained);
 1494   1462   
            self
 1495   1463   
        }
 1496   1464   
        /// <p>The token to request the next page of results.</p>
 1497   1465   
        pub(crate) fn set_next_token(
 1498   1466   
            mut self,
 1499   1467   
            input: Option<
 1500   1468   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::PageToken>>,
 1501   1469   
            >,
 1502   1470   
        ) -> Self {
 1503   1471   
            self.next_token = input.map(|v| v.into());
 1504   1472   
            self
 1505   1473   
        }
 1506   1474   
        /// <p>The number of results to return.</p>
 1507   1475   
        pub fn max_results(
 1508   1476   
            mut self,
 1509   1477   
            input: ::std::option::Option<crate::model::MaxResults>,
 1510   1478   
        ) -> Self {
 1511         -
            self.max_results = input.map(
 1512         -
                #[allow(clippy::redundant_closure)]
 1513         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1514         -
            );
        1479  +
            self.max_results = input.map(crate::constrained::MaybeConstrained::Constrained);
 1515   1480   
            self
 1516   1481   
        }
 1517   1482   
        /// <p>The number of results to return.</p>
 1518   1483   
        pub(crate) fn set_max_results(
 1519   1484   
            mut self,
 1520   1485   
            input: Option<
 1521   1486   
                impl ::std::convert::Into<
 1522   1487   
                    crate::constrained::MaybeConstrained<crate::model::MaxResults>,
 1523   1488   
                >,
 1524   1489   
            >,
 1525   1490   
        ) -> Self {
 1526   1491   
            self.max_results = input.map(|v| v.into());
 1527   1492   
            self
 1528   1493   
        }
 1529   1494   
        /// <p>The block index from which the comparison should start.</p>
 1530   1495   
        /// <p>The list in the response will start from this block index or the next valid block index in the snapshots.</p>
 1531   1496   
        pub fn starting_block_index(
 1532   1497   
            mut self,
 1533   1498   
            input: ::std::option::Option<crate::model::BlockIndex>,
 1534   1499   
        ) -> Self {
 1535         -
            self.starting_block_index = input.map(
 1536         -
                #[allow(clippy::redundant_closure)]
 1537         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1538         -
            );
        1500  +
            self.starting_block_index =
        1501  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 1539   1502   
            self
 1540   1503   
        }
 1541   1504   
        /// <p>The block index from which the comparison should start.</p>
 1542   1505   
        /// <p>The list in the response will start from this block index or the next valid block index in the snapshots.</p>
 1543   1506   
        pub(crate) fn set_starting_block_index(
 1544   1507   
            mut self,
 1545   1508   
            input: Option<
 1546   1509   
                impl ::std::convert::Into<
 1547   1510   
                    crate::constrained::MaybeConstrained<crate::model::BlockIndex>,
 1548   1511   
                >,
@@ -1914,1877 +2036,1991 @@
 1934   1897   
            >,
 1935   1898   
        ) -> Self {
 1936   1899   
            self.changed_blocks_count = Some(input.into());
 1937   1900   
            self
 1938   1901   
        }
 1939   1902   
        /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
 1940   1903   
        pub fn checksum_aggregation_method(
 1941   1904   
            mut self,
 1942   1905   
            input: ::std::option::Option<crate::model::ChecksumAggregationMethod>,
 1943   1906   
        ) -> Self {
 1944         -
            self.checksum_aggregation_method = input.map(
 1945         -
                #[allow(clippy::redundant_closure)]
 1946         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1947         -
            );
        1907  +
            self.checksum_aggregation_method =
        1908  +
                input.map(crate::constrained::MaybeConstrained::Constrained);
 1948   1909   
            self
 1949   1910   
        }
 1950   1911   
        /// <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
 1951   1912   
        pub(crate) fn set_checksum_aggregation_method(
 1952   1913   
            mut self,
 1953   1914   
            input: Option<
 1954   1915   
                impl ::std::convert::Into<
 1955   1916   
                    crate::constrained::MaybeConstrained<crate::model::ChecksumAggregationMethod>,
 1956   1917   
                >,
 1957   1918   
            >,
 1958   1919   
        ) -> Self {
 1959   1920   
            self.checksum_aggregation_method = input.map(|v| v.into());
 1960   1921   
            self
 1961   1922   
        }
 1962   1923   
        /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
 1963   1924   
        pub fn checksum_algorithm(
 1964   1925   
            mut self,
 1965   1926   
            input: ::std::option::Option<crate::model::ChecksumAlgorithm>,
 1966   1927   
        ) -> Self {
 1967         -
            self.checksum_algorithm = input.map(
 1968         -
                #[allow(clippy::redundant_closure)]
 1969         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1970         -
            );
        1928  +
            self.checksum_algorithm = input.map(crate::constrained::MaybeConstrained::Constrained);
 1971   1929   
            self
 1972   1930   
        }
 1973   1931   
        /// <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
 1974   1932   
        pub(crate) fn set_checksum_algorithm(
 1975   1933   
            mut self,
 1976   1934   
            input: Option<
 1977   1935   
                impl ::std::convert::Into<
 1978   1936   
                    crate::constrained::MaybeConstrained<crate::model::ChecksumAlgorithm>,
 1979   1937   
                >,
 1980   1938   
            >,
 1981   1939   
        ) -> Self {
 1982   1940   
            self.checksum_algorithm = input.map(|v| v.into());
 1983   1941   
            self
 1984   1942   
        }
 1985   1943   
        /// <p>The ID of the snapshot.</p>
 1986   1944   
        pub fn snapshot_id(mut self, input: crate::model::SnapshotId) -> Self {
 1987   1945   
            self.snapshot_id = Some(crate::constrained::MaybeConstrained::Constrained(input));
 1988   1946   
            self
 1989   1947   
        }
 1990   1948   
        /// <p>The ID of the snapshot.</p>
 1991   1949   
        pub(crate) fn set_snapshot_id(
 1992   1950   
            mut self,
 1993   1951   
            input: impl ::std::convert::Into<
 1994   1952   
                crate::constrained::MaybeConstrained<crate::model::SnapshotId>,
 1995   1953   
            >,
 1996   1954   
        ) -> Self {
 1997   1955   
            self.snapshot_id = Some(input.into());
 1998   1956   
            self
 1999   1957   
        }
 2000   1958   
        /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
 2001   1959   
        /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
 2002   1960   
        pub fn checksum(mut self, input: ::std::option::Option<crate::model::Checksum>) -> Self {
 2003         -
            self.checksum = input.map(
 2004         -
                #[allow(clippy::redundant_closure)]
 2005         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 2006         -
            );
        1961  +
            self.checksum = input.map(crate::constrained::MaybeConstrained::Constrained);
 2007   1962   
            self
 2008   1963   
        }
 2009   1964   
        /// <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
 2010   1965   
        /// <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
 2011   1966   
        pub(crate) fn set_checksum(
 2012   1967   
            mut self,
 2013   1968   
            input: Option<
 2014   1969   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Checksum>>,
 2015   1970   
            >,
 2016   1971   
        ) -> Self {

tmp-codegen-diff/codegen-server-test/ebs/rust-server-codegen/src/model.rs

@@ -2757,2757 +2838,2832 @@
 2777   2777   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2778   2778   
    pub struct Builder {
 2779   2779   
        pub(crate) key:
 2780   2780   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TagKey>>,
 2781   2781   
        pub(crate) value:
 2782   2782   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TagValue>>,
 2783   2783   
    }
 2784   2784   
    impl Builder {
 2785   2785   
        /// <p>The key of the tag.</p>
 2786   2786   
        pub fn key(mut self, input: ::std::option::Option<crate::model::TagKey>) -> Self {
 2787         -
            self.key = input.map(
 2788         -
                #[allow(clippy::redundant_closure)]
 2789         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 2790         -
            );
        2787  +
            self.key = input.map(crate::constrained::MaybeConstrained::Constrained);
 2791   2788   
            self
 2792   2789   
        }
 2793   2790   
        /// <p>The key of the tag.</p>
 2794   2791   
        pub(crate) fn set_key(
 2795   2792   
            mut self,
 2796   2793   
            input: Option<
 2797   2794   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::TagKey>>,
 2798   2795   
            >,
 2799   2796   
        ) -> Self {
 2800   2797   
            self.key = input.map(|v| v.into());
 2801   2798   
            self
 2802   2799   
        }
 2803   2800   
        /// <p>The value of the tag.</p>
 2804   2801   
        pub fn value(mut self, input: ::std::option::Option<crate::model::TagValue>) -> Self {
 2805         -
            self.value = input.map(
 2806         -
                #[allow(clippy::redundant_closure)]
 2807         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 2808         -
            );
        2802  +
            self.value = input.map(crate::constrained::MaybeConstrained::Constrained);
 2809   2803   
            self
 2810   2804   
        }
 2811   2805   
        /// <p>The value of the tag.</p>
 2812   2806   
        pub(crate) fn set_value(
 2813   2807   
            mut self,
 2814   2808   
            input: Option<
 2815   2809   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::TagValue>>,
 2816   2810   
            >,
 2817   2811   
        ) -> Self {
 2818   2812   
            self.value = input.map(|v| v.into());

tmp-codegen-diff/codegen-server-test/json_rpc10/rust-server-codegen/src/input.rs

@@ -499,499 +562,559 @@
  519    519   
        pub(crate) defaults:
  520    520   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
  521    521   
        pub(crate) client_optional_defaults:
  522    522   
            ::std::option::Option<crate::model::ClientOptionalDefaults>,
  523    523   
        pub(crate) top_level_default: ::std::option::Option<::std::string::String>,
  524    524   
        pub(crate) other_top_level_default: ::std::option::Option<i32>,
  525    525   
    }
  526    526   
    impl Builder {
  527    527   
        #[allow(missing_docs)] // documentation missing in model
  528    528   
        pub fn defaults(mut self, input: ::std::option::Option<crate::model::Defaults>) -> Self {
  529         -
            self.defaults = input.map(
  530         -
                #[allow(clippy::redundant_closure)]
  531         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  532         -
            );
         529  +
            self.defaults = input.map(crate::constrained::MaybeConstrained::Constrained);
  533    530   
            self
  534    531   
        }
  535    532   
        #[allow(missing_docs)] // documentation missing in model
  536    533   
        pub(crate) fn set_defaults(
  537    534   
            mut self,
  538    535   
            input: Option<
  539    536   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
  540    537   
            >,
  541    538   
        ) -> Self {
  542    539   
            self.defaults = input.map(|v| v.into());
@@ -897,894 +960,954 @@
  917    914   
    }
  918    915   
    /// A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
  919    916   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  920    917   
    pub struct Builder {
  921    918   
        pub(crate) contents:
  922    919   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
  923    920   
    }
  924    921   
    impl Builder {
  925    922   
        /// A union with a representative set of types for members.
  926    923   
        pub fn contents(mut self, input: ::std::option::Option<crate::model::MyUnion>) -> Self {
  927         -
            self.contents = input.map(
  928         -
                #[allow(clippy::redundant_closure)]
  929         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  930         -
            );
         924  +
            self.contents = input.map(crate::constrained::MaybeConstrained::Constrained);
  931    925   
            self
  932    926   
        }
  933    927   
        /// A union with a representative set of types for members.
  934    928   
        pub(crate) fn set_contents(
  935    929   
            mut self,
  936    930   
            input: Option<
  937    931   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
  938    932   
            >,
  939    933   
        ) -> Self {
  940    934   
            self.contents = input.map(|v| v.into());

tmp-codegen-diff/codegen-server-test/json_rpc10/rust-server-codegen/src/model.rs

@@ -1039,1039 +1106,1100 @@
 1059   1059   
        /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
 1060   1060   
        ///
 1061   1061   
        pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
 1062   1062   
            self.build_enforcing_all_constraints()
 1063   1063   
        }
 1064   1064   
        fn build_enforcing_all_constraints(
 1065   1065   
            self,
 1066   1066   
        ) -> Result<crate::model::TopLevel, ConstraintViolation> {
 1067   1067   
            Ok(crate::model::TopLevel {
 1068   1068   
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
 1069         -
                dialog_list: self.dialog_list.unwrap_or_else(
 1070         -
                    #[allow(clippy::redundant_closure)]
 1071         -
                    || ::std::vec::Vec::new(),
 1072         -
                ),
 1073         -
                dialog_map: self.dialog_map.unwrap_or_else(
 1074         -
                    #[allow(clippy::redundant_closure)]
 1075         -
                    || ::std::collections::HashMap::new(),
 1076         -
                ),
        1069  +
                dialog_list: self.dialog_list.unwrap_or_default(),
        1070  +
                dialog_map: self.dialog_map.unwrap_or_default(),
 1077   1071   
            })
 1078   1072   
        }
 1079   1073   
    }
 1080   1074   
}
 1081   1075   
/// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 1082   1076   
pub mod client_optional_defaults {
 1083   1077   
 1084   1078   
    impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
 1085   1079   
        fn from(builder: Builder) -> Self {
 1086   1080   
            builder.build()
@@ -1519,1513 +1616,1604 @@
 1539   1533   
        }
 1540   1534   
        fn build_enforcing_all_constraints(
 1541   1535   
            self,
 1542   1536   
        ) -> Result<crate::model::Defaults, ConstraintViolation> {
 1543   1537   
            Ok(crate::model::Defaults {
 1544   1538   
                default_string: self.default_string.unwrap_or_else(
 1545   1539   
                    #[allow(clippy::redundant_closure)]
 1546   1540   
                    || String::from("hi"),
 1547   1541   
                ),
 1548   1542   
                default_boolean: self.default_boolean.unwrap_or(true),
 1549         -
                default_list: self.default_list.unwrap_or_else(
 1550         -
                    #[allow(clippy::redundant_closure)]
 1551         -
                    || ::std::vec::Vec::new(),
 1552         -
                ),
        1543  +
                default_list: self.default_list.unwrap_or_default(),
 1553   1544   
                default_document_map: self.default_document_map.unwrap_or_else(
 1554   1545   
                    #[allow(clippy::redundant_closure)]
 1555   1546   
                    || ::aws_smithy_types::Document::Object(::std::collections::HashMap::new()),
 1556   1547   
                ),
 1557   1548   
                default_document_string: self.default_document_string.unwrap_or_else(
 1558   1549   
                    #[allow(clippy::redundant_closure)]
 1559   1550   
                    || ::aws_smithy_types::Document::String(::std::string::String::from("hi")),
 1560   1551   
                ),
 1561   1552   
                default_document_boolean: self
 1562   1553   
                    .default_document_boolean
 1563   1554   
                    .unwrap_or(::aws_smithy_types::Document::Bool(true)),
 1564   1555   
                default_document_list: self.default_document_list.unwrap_or_else(
 1565   1556   
                    #[allow(clippy::redundant_closure)]
 1566   1557   
                    || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()),
 1567   1558   
                ),
 1568   1559   
                default_null_document: self.default_null_document,
 1569   1560   
                default_timestamp: self.default_timestamp.unwrap_or_else(
 1570   1561   
                    #[allow(clippy::redundant_closure)]
 1571   1562   
                    || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64),
 1572   1563   
                ),
 1573   1564   
                default_blob: self.default_blob.unwrap_or_else(
 1574   1565   
                    #[allow(clippy::redundant_closure)]
 1575   1566   
                    || ::aws_smithy_types::Blob::new("abc"),
 1576   1567   
                ),
 1577   1568   
                default_byte: self.default_byte.unwrap_or(1i8),
 1578   1569   
                default_short: self.default_short.unwrap_or(1i16),
 1579   1570   
                default_integer: self.default_integer.unwrap_or(10i32),
 1580   1571   
                default_long: self.default_long.unwrap_or(100i64),
 1581   1572   
                default_float: self.default_float.unwrap_or(1.0f32),
 1582   1573   
                default_double: self.default_double.unwrap_or(1.0f64),
 1583         -
                default_map: self.default_map.unwrap_or_else(
 1584         -
                    #[allow(clippy::redundant_closure)]
 1585         -
                    || ::std::collections::HashMap::new(),
 1586         -
                ),
        1574  +
                default_map: self.default_map.unwrap_or_default(),
 1587   1575   
                default_enum: self
 1588   1576   
                    .default_enum
 1589   1577   
                    .map(|v| match v {
 1590   1578   
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
 1591   1579   
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
 1592   1580   
                    })
 1593   1581   
                    .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
 1594   1582   
                    .transpose()?
 1595   1583   
                    .unwrap_or(
 1596   1584   
                        "FOO"

tmp-codegen-diff/codegen-server-test/json_rpc10/rust-server-codegen/src/output.rs

@@ -511,511 +578,572 @@
  531    531   
        ) -> Result<crate::output::OperationWithNestedStructureOutput, ConstraintViolation>
  532    532   
        {
  533    533   
            self.build_enforcing_all_constraints()
  534    534   
        }
  535    535   
        fn build_enforcing_all_constraints(
  536    536   
            self,
  537    537   
        ) -> Result<crate::output::OperationWithNestedStructureOutput, ConstraintViolation>
  538    538   
        {
  539    539   
            Ok(crate::output::OperationWithNestedStructureOutput {
  540    540   
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
  541         -
                dialog_list: self.dialog_list.unwrap_or_else(
  542         -
                    #[allow(clippy::redundant_closure)]
  543         -
                    || ::std::vec::Vec::new(),
  544         -
                ),
  545         -
                dialog_map: self.dialog_map.unwrap_or_else(
  546         -
                    #[allow(clippy::redundant_closure)]
  547         -
                    || ::std::collections::HashMap::new(),
  548         -
                ),
         541  +
                dialog_list: self.dialog_list.unwrap_or_default(),
         542  +
                dialog_map: self.dialog_map.unwrap_or_default(),
  549    543   
            })
  550    544   
        }
  551    545   
    }
  552    546   
}
  553    547   
/// See [`OperationWithRequiredMembersOutput`](crate::output::OperationWithRequiredMembersOutput).
  554    548   
pub mod operation_with_required_members_output {
  555    549   
  556    550   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  557    551   
    /// Holds one variant for each of the ways the builder can fail.
  558    552   
    #[non_exhaustive]
@@ -920,914 +1017,1005 @@
  940    934   
        pub fn build(self) -> crate::output::OperationWithDefaultsOutput {
  941    935   
            self.build_enforcing_all_constraints()
  942    936   
        }
  943    937   
        fn build_enforcing_all_constraints(self) -> crate::output::OperationWithDefaultsOutput {
  944    938   
            crate::output::OperationWithDefaultsOutput {
  945    939   
                default_string: self.default_string.unwrap_or_else(
  946    940   
                    #[allow(clippy::redundant_closure)]
  947    941   
                    || String::from("hi"),
  948    942   
                ),
  949    943   
                default_boolean: self.default_boolean.unwrap_or(true),
  950         -
                default_list: self.default_list.unwrap_or_else(
  951         -
                    #[allow(clippy::redundant_closure)]
  952         -
                    || ::std::vec::Vec::new(),
  953         -
                ),
         944  +
                default_list: self.default_list.unwrap_or_default(),
  954    945   
                default_document_map: self.default_document_map.unwrap_or_else(
  955    946   
                    #[allow(clippy::redundant_closure)]
  956    947   
                    || ::aws_smithy_types::Document::Object(::std::collections::HashMap::new()),
  957    948   
                ),
  958    949   
                default_document_string: self.default_document_string.unwrap_or_else(
  959    950   
                    #[allow(clippy::redundant_closure)]
  960    951   
                    || ::aws_smithy_types::Document::String(::std::string::String::from("hi")),
  961    952   
                ),
  962    953   
                default_document_boolean: self
  963    954   
                    .default_document_boolean
  964    955   
                    .unwrap_or(::aws_smithy_types::Document::Bool(true)),
  965    956   
                default_document_list: self.default_document_list.unwrap_or_else(
  966    957   
                    #[allow(clippy::redundant_closure)]
  967    958   
                    || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()),
  968    959   
                ),
  969    960   
                default_null_document: self.default_null_document,
  970    961   
                default_timestamp: self.default_timestamp.unwrap_or_else(
  971    962   
                    #[allow(clippy::redundant_closure)]
  972    963   
                    || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64),
  973    964   
                ),
  974    965   
                default_blob: self.default_blob.unwrap_or_else(
  975    966   
                    #[allow(clippy::redundant_closure)]
  976    967   
                    || ::aws_smithy_types::Blob::new("abc"),
  977    968   
                ),
  978    969   
                default_byte: self.default_byte.unwrap_or(1i8),
  979    970   
                default_short: self.default_short.unwrap_or(1i16),
  980    971   
                default_integer: self.default_integer.unwrap_or(10i32),
  981    972   
                default_long: self.default_long.unwrap_or(100i64),
  982    973   
                default_float: self.default_float.unwrap_or(1.0f32),
  983    974   
                default_double: self.default_double.unwrap_or(1.0f64),
  984         -
                default_map: self.default_map.unwrap_or_else(
  985         -
                    #[allow(clippy::redundant_closure)]
  986         -
                    || ::std::collections::HashMap::new(),
  987         -
                ),
         975  +
                default_map: self.default_map.unwrap_or_default(),
  988    976   
                default_enum: self.default_enum.unwrap_or(
  989    977   
                    "FOO"
  990    978   
                        .parse::<crate::model::TestEnum>()
  991    979   
                        .expect("static value validated to member"),
  992    980   
                ),
  993    981   
                default_int_enum: self.default_int_enum.unwrap_or(1i32),
  994    982   
                empty_string: self.empty_string.unwrap_or_else(
  995    983   
                    #[allow(clippy::redundant_closure)]
  996    984   
                    || String::from(""),
  997    985   
                ),

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/input.rs

@@ -931,931 +994,991 @@
  951    951   
    }
  952    952   
    /// A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
  953    953   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  954    954   
    pub struct Builder {
  955    955   
        pub(crate) contents:
  956    956   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
  957    957   
    }
  958    958   
    impl Builder {
  959    959   
        /// A union with a representative set of types for members.
  960    960   
        pub fn contents(mut self, input: ::std::option::Option<crate::model::MyUnion>) -> Self {
  961         -
            self.contents = input.map(
  962         -
                #[allow(clippy::redundant_closure)]
  963         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  964         -
            );
         961  +
            self.contents = input.map(crate::constrained::MaybeConstrained::Constrained);
  965    962   
            self
  966    963   
        }
  967    964   
        /// A union with a representative set of types for members.
  968    965   
        pub(crate) fn set_contents(
  969    966   
            mut self,
  970    967   
            input: Option<
  971    968   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
  972    969   
            >,
  973    970   
        ) -> Self {
  974    971   
            self.contents = input.map(|v| v.into());
@@ -1235,1232 +1380,1365 @@
 1255   1252   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnumSet>>,
 1256   1253   
        pub(crate) foo_enum_map: ::std::option::Option<
 1257   1254   
            crate::constrained::MaybeConstrained<
 1258   1255   
                crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
 1259   1256   
            >,
 1260   1257   
        >,
 1261   1258   
    }
 1262   1259   
    impl Builder {
 1263   1260   
        #[allow(missing_docs)] // documentation missing in model
 1264   1261   
        pub fn foo_enum1(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
 1265         -
            self.foo_enum1 = input.map(
 1266         -
                #[allow(clippy::redundant_closure)]
 1267         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1268         -
            );
        1262  +
            self.foo_enum1 = input.map(crate::constrained::MaybeConstrained::Constrained);
 1269   1263   
            self
 1270   1264   
        }
 1271   1265   
        #[allow(missing_docs)] // documentation missing in model
 1272   1266   
        pub(crate) fn set_foo_enum1(
 1273   1267   
            mut self,
 1274   1268   
            input: Option<
 1275   1269   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
 1276   1270   
            >,
 1277   1271   
        ) -> Self {
 1278   1272   
            self.foo_enum1 = input.map(|v| v.into());
 1279   1273   
            self
 1280   1274   
        }
 1281   1275   
        #[allow(missing_docs)] // documentation missing in model
 1282   1276   
        pub fn foo_enum2(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
 1283         -
            self.foo_enum2 = input.map(
 1284         -
                #[allow(clippy::redundant_closure)]
 1285         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1286         -
            );
        1277  +
            self.foo_enum2 = input.map(crate::constrained::MaybeConstrained::Constrained);
 1287   1278   
            self
 1288   1279   
        }
 1289   1280   
        #[allow(missing_docs)] // documentation missing in model
 1290   1281   
        pub(crate) fn set_foo_enum2(
 1291   1282   
            mut self,
 1292   1283   
            input: Option<
 1293   1284   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
 1294   1285   
            >,
 1295   1286   
        ) -> Self {
 1296   1287   
            self.foo_enum2 = input.map(|v| v.into());
 1297   1288   
            self
 1298   1289   
        }
 1299   1290   
        #[allow(missing_docs)] // documentation missing in model
 1300   1291   
        pub fn foo_enum3(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
 1301         -
            self.foo_enum3 = input.map(
 1302         -
                #[allow(clippy::redundant_closure)]
 1303         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1304         -
            );
        1292  +
            self.foo_enum3 = input.map(crate::constrained::MaybeConstrained::Constrained);
 1305   1293   
            self
 1306   1294   
        }
 1307   1295   
        #[allow(missing_docs)] // documentation missing in model
 1308   1296   
        pub(crate) fn set_foo_enum3(
 1309   1297   
            mut self,
 1310   1298   
            input: Option<
 1311   1299   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
 1312   1300   
            >,
 1313   1301   
        ) -> Self {
 1314   1302   
            self.foo_enum3 = input.map(|v| v.into());
 1315   1303   
            self
 1316   1304   
        }
 1317   1305   
        #[allow(missing_docs)] // documentation missing in model
 1318   1306   
        pub fn foo_enum_list(
 1319   1307   
            mut self,
 1320   1308   
            input: ::std::option::Option<::std::vec::Vec<crate::model::FooEnum>>,
 1321   1309   
        ) -> Self {
 1322   1310   
            self.foo_enum_list = input.map(
 1323   1311   
                #[allow(clippy::redundant_closure)]
 1324   1312   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 1325   1313   
            );
 1326   1314   
            self
 1327   1315   
        }
 1328   1316   
        #[allow(missing_docs)] // documentation missing in model
 1329   1317   
        pub(crate) fn set_foo_enum_list(
 1330   1318   
            mut self,
 1331   1319   
            input: Option<
 1332   1320   
                impl ::std::convert::Into<
 1333   1321   
                    crate::constrained::MaybeConstrained<
 1334   1322   
                        crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
 1335   1323   
                    >,
 1336   1324   
                >,
 1337   1325   
            >,
 1338   1326   
        ) -> Self {
 1339   1327   
            self.foo_enum_list = input.map(|v| v.into());
 1340   1328   
            self
 1341   1329   
        }
 1342   1330   
        #[allow(missing_docs)] // documentation missing in model
 1343   1331   
        pub fn foo_enum_set(
 1344   1332   
            mut self,
 1345   1333   
            input: ::std::option::Option<crate::model::FooEnumSet>,
 1346   1334   
        ) -> Self {
 1347         -
            self.foo_enum_set = input.map(
 1348         -
                #[allow(clippy::redundant_closure)]
 1349         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1350         -
            );
        1335  +
            self.foo_enum_set = input.map(crate::constrained::MaybeConstrained::Constrained);
 1351   1336   
            self
 1352   1337   
        }
 1353   1338   
        #[allow(missing_docs)] // documentation missing in model
 1354   1339   
        pub(crate) fn set_foo_enum_set(
 1355   1340   
            mut self,
 1356   1341   
            input: Option<
 1357   1342   
                impl ::std::convert::Into<
 1358   1343   
                    crate::constrained::MaybeConstrained<crate::model::FooEnumSet>,
 1359   1344   
                >,
 1360   1345   
            >,

tmp-codegen-diff/codegen-server-test/misc/rust-server-codegen/src/input.rs

@@ -405,405 +468,465 @@
  425    425   
    }
  426    426   
    /// A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
  427    427   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  428    428   
    pub struct Builder {
  429    429   
        pub(crate) inner:
  430    430   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::InnerShape>>,
  431    431   
    }
  432    432   
    impl Builder {
  433    433   
        #[allow(missing_docs)] // documentation missing in model
  434    434   
        pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
  435         -
            self.inner = input.map(
  436         -
                #[allow(clippy::redundant_closure)]
  437         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  438         -
            );
         435  +
            self.inner = input.map(crate::constrained::MaybeConstrained::Constrained);
  439    436   
            self
  440    437   
        }
  441    438   
        #[allow(missing_docs)] // documentation missing in model
  442    439   
        pub(crate) fn set_inner(
  443    440   
            mut self,
  444    441   
            input: Option<
  445    442   
                impl ::std::convert::Into<
  446    443   
                    crate::constrained::MaybeConstrained<crate::model::InnerShape>,
  447    444   
                >,
  448    445   
            >,

tmp-codegen-diff/codegen-server-test/naming_test_ops/rust-server-codegen/src/input.rs

@@ -386,386 +449,446 @@
  406    406   
        #[allow(missing_docs)] // documentation missing in model
  407    407   
        pub(crate) fn set_async(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
  408    408   
            self.r#async = input.map(|v| v.into());
  409    409   
            self
  410    410   
        }
  411    411   
        #[allow(missing_docs)] // documentation missing in model
  412    412   
        pub fn r#enum(
  413    413   
            mut self,
  414    414   
            input: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
  415    415   
        ) -> Self {
  416         -
            self.r#enum = input.map(
  417         -
                #[allow(clippy::redundant_closure)]
  418         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  419         -
            );
         416  +
            self.r#enum = input.map(crate::constrained::MaybeConstrained::Constrained);
  420    417   
            self
  421    418   
        }
  422    419   
        #[allow(missing_docs)] // documentation missing in model
  423    420   
        pub(crate) fn set_enum(
  424    421   
            mut self,
  425    422   
            input: Option<
  426    423   
                impl ::std::convert::Into<
  427    424   
                    crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
  428    425   
                >,
  429    426   
            >,
@@ -613,610 +676,670 @@
  633    630   
        #[allow(missing_docs)] // documentation missing in model
  634    631   
        pub(crate) fn set_async(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
  635    632   
            self.r#async = input.map(|v| v.into());
  636    633   
            self
  637    634   
        }
  638    635   
        #[allow(missing_docs)] // documentation missing in model
  639    636   
        pub fn r#enum(
  640    637   
            mut self,
  641    638   
            input: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
  642    639   
        ) -> Self {
  643         -
            self.r#enum = input.map(
  644         -
                #[allow(clippy::redundant_closure)]
  645         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  646         -
            );
         640  +
            self.r#enum = input.map(crate::constrained::MaybeConstrained::Constrained);
  647    641   
            self
  648    642   
        }
  649    643   
        #[allow(missing_docs)] // documentation missing in model
  650    644   
        pub(crate) fn set_enum(
  651    645   
            mut self,
  652    646   
            input: Option<
  653    647   
                impl ::std::convert::Into<
  654    648   
                    crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
  655    649   
                >,
  656    650   
            >,
@@ -993,987 +1056,1047 @@
 1013   1007   
        #[allow(missing_docs)] // documentation missing in model
 1014   1008   
        pub(crate) fn set_async(mut self, input: Option<impl ::std::convert::Into<bool>>) -> Self {
 1015   1009   
            self.r#async = input.map(|v| v.into());
 1016   1010   
            self
 1017   1011   
        }
 1018   1012   
        #[allow(missing_docs)] // documentation missing in model
 1019   1013   
        pub fn r#enum(
 1020   1014   
            mut self,
 1021   1015   
            input: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
 1022   1016   
        ) -> Self {
 1023         -
            self.r#enum = input.map(
 1024         -
                #[allow(clippy::redundant_closure)]
 1025         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 1026         -
            );
        1017  +
            self.r#enum = input.map(crate::constrained::MaybeConstrained::Constrained);
 1027   1018   
            self
 1028   1019   
        }
 1029   1020   
        #[allow(missing_docs)] // documentation missing in model
 1030   1021   
        pub(crate) fn set_enum(
 1031   1022   
            mut self,
 1032   1023   
            input: Option<
 1033   1024   
                impl ::std::convert::Into<
 1034   1025   
                    crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
 1035   1026   
                >,
 1036   1027   
            >,

tmp-codegen-diff/codegen-server-test/rest_json/rust-server-codegen/src/input.rs

@@ -3414,3414 +3477,3474 @@
 3434   3434   
        pub(crate) defaults:
 3435   3435   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
 3436   3436   
        pub(crate) client_optional_defaults:
 3437   3437   
            ::std::option::Option<crate::model::ClientOptionalDefaults>,
 3438   3438   
        pub(crate) top_level_default: ::std::option::Option<::std::string::String>,
 3439   3439   
        pub(crate) other_top_level_default: ::std::option::Option<i32>,
 3440   3440   
    }
 3441   3441   
    impl Builder {
 3442   3442   
        #[allow(missing_docs)] // documentation missing in model
 3443   3443   
        pub fn defaults(mut self, input: ::std::option::Option<crate::model::Defaults>) -> Self {
 3444         -
            self.defaults = input.map(
 3445         -
                #[allow(clippy::redundant_closure)]
 3446         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 3447         -
            );
        3444  +
            self.defaults = input.map(crate::constrained::MaybeConstrained::Constrained);
 3448   3445   
            self
 3449   3446   
        }
 3450   3447   
        #[allow(missing_docs)] // documentation missing in model
 3451   3448   
        pub(crate) fn set_defaults(
 3452   3449   
            mut self,
 3453   3450   
            input: Option<
 3454   3451   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
 3455   3452   
            >,
 3456   3453   
        ) -> Self {
 3457   3454   
            self.defaults = input.map(|v| v.into());
@@ -6976,6973 +7039,7033 @@
 6996   6993   
    }
 6997   6994   
    /// A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
 6998   6995   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 6999   6996   
    pub struct Builder {
 7000   6997   
        pub(crate) contents:
 7001   6998   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
 7002   6999   
    }
 7003   7000   
    impl Builder {
 7004   7001   
        /// A union with a representative set of types for members.
 7005   7002   
        pub fn contents(mut self, input: ::std::option::Option<crate::model::MyUnion>) -> Self {
 7006         -
            self.contents = input.map(
 7007         -
                #[allow(clippy::redundant_closure)]
 7008         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7009         -
            );
        7003  +
            self.contents = input.map(crate::constrained::MaybeConstrained::Constrained);
 7010   7004   
            self
 7011   7005   
        }
 7012   7006   
        /// A union with a representative set of types for members.
 7013   7007   
        pub(crate) fn set_contents(
 7014   7008   
            mut self,
 7015   7009   
            input: Option<
 7016   7010   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
 7017   7011   
            >,
 7018   7012   
        ) -> Self {
 7019   7013   
            self.contents = input.map(|v| v.into());
@@ -7855,7849 +7918,7909 @@
 7875   7869   
        #[allow(missing_docs)] // documentation missing in model
 7876   7870   
        pub(crate) fn set_string_list(
 7877   7871   
            mut self,
 7878   7872   
            input: Option<impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>>,
 7879   7873   
        ) -> Self {
 7880   7874   
            self.string_list = input.map(|v| v.into());
 7881   7875   
            self
 7882   7876   
        }
 7883   7877   
        #[allow(missing_docs)] // documentation missing in model
 7884   7878   
        pub fn string_set(mut self, input: ::std::option::Option<crate::model::StringSet>) -> Self {
 7885         -
            self.string_set = input.map(
 7886         -
                #[allow(clippy::redundant_closure)]
 7887         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 7888         -
            );
        7879  +
            self.string_set = input.map(crate::constrained::MaybeConstrained::Constrained);
 7889   7880   
            self
 7890   7881   
        }
 7891   7882   
        #[allow(missing_docs)] // documentation missing in model
 7892   7883   
        pub(crate) fn set_string_set(
 7893   7884   
            mut self,
 7894   7885   
            input: Option<
 7895   7886   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::StringSet>>,
 7896   7887   
            >,
 7897   7888   
        ) -> Self {
 7898   7889   
            self.string_set = input.map(|v| v.into());
@@ -8208,8199 +8271,8259 @@
 8228   8219   
            input: Option<impl ::std::convert::Into<::std::vec::Vec<i32>>>,
 8229   8220   
        ) -> Self {
 8230   8221   
            self.integer_enum_list = input.map(|v| v.into());
 8231   8222   
            self
 8232   8223   
        }
 8233   8224   
        #[allow(missing_docs)] // documentation missing in model
 8234   8225   
        pub fn integer_enum_set(
 8235   8226   
            mut self,
 8236   8227   
            input: ::std::option::Option<crate::model::IntegerEnumSet>,
 8237   8228   
        ) -> Self {
 8238         -
            self.integer_enum_set = input.map(
 8239         -
                #[allow(clippy::redundant_closure)]
 8240         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 8241         -
            );
        8229  +
            self.integer_enum_set = input.map(crate::constrained::MaybeConstrained::Constrained);
 8242   8230   
            self
 8243   8231   
        }
 8244   8232   
        #[allow(missing_docs)] // documentation missing in model
 8245   8233   
        pub(crate) fn set_integer_enum_set(
 8246   8234   
            mut self,
 8247   8235   
            input: Option<
 8248   8236   
                impl ::std::convert::Into<
 8249   8237   
                    crate::constrained::MaybeConstrained<crate::model::IntegerEnumSet>,
 8250   8238   
                >,
 8251   8239   
            >,
@@ -8397,8385 +8542,8518 @@
 8417   8405   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnumSet>>,
 8418   8406   
        pub(crate) foo_enum_map: ::std::option::Option<
 8419   8407   
            crate::constrained::MaybeConstrained<
 8420   8408   
                crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
 8421   8409   
            >,
 8422   8410   
        >,
 8423   8411   
    }
 8424   8412   
    impl Builder {
 8425   8413   
        #[allow(missing_docs)] // documentation missing in model
 8426   8414   
        pub fn foo_enum1(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
 8427         -
            self.foo_enum1 = input.map(
 8428         -
                #[allow(clippy::redundant_closure)]
 8429         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 8430         -
            );
        8415  +
            self.foo_enum1 = input.map(crate::constrained::MaybeConstrained::Constrained);
 8431   8416   
            self
 8432   8417   
        }
 8433   8418   
        #[allow(missing_docs)] // documentation missing in model
 8434   8419   
        pub(crate) fn set_foo_enum1(
 8435   8420   
            mut self,
 8436   8421   
            input: Option<
 8437   8422   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
 8438   8423   
            >,
 8439   8424   
        ) -> Self {
 8440   8425   
            self.foo_enum1 = input.map(|v| v.into());
 8441   8426   
            self
 8442   8427   
        }
 8443   8428   
        #[allow(missing_docs)] // documentation missing in model
 8444   8429   
        pub fn foo_enum2(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
 8445         -
            self.foo_enum2 = input.map(
 8446         -
                #[allow(clippy::redundant_closure)]
 8447         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 8448         -
            );
        8430  +
            self.foo_enum2 = input.map(crate::constrained::MaybeConstrained::Constrained);
 8449   8431   
            self
 8450   8432   
        }
 8451   8433   
        #[allow(missing_docs)] // documentation missing in model
 8452   8434   
        pub(crate) fn set_foo_enum2(
 8453   8435   
            mut self,
 8454   8436   
            input: Option<
 8455   8437   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
 8456   8438   
            >,
 8457   8439   
        ) -> Self {
 8458   8440   
            self.foo_enum2 = input.map(|v| v.into());
 8459   8441   
            self
 8460   8442   
        }
 8461   8443   
        #[allow(missing_docs)] // documentation missing in model
 8462   8444   
        pub fn foo_enum3(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
 8463         -
            self.foo_enum3 = input.map(
 8464         -
                #[allow(clippy::redundant_closure)]
 8465         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 8466         -
            );
        8445  +
            self.foo_enum3 = input.map(crate::constrained::MaybeConstrained::Constrained);
 8467   8446   
            self
 8468   8447   
        }
 8469   8448   
        #[allow(missing_docs)] // documentation missing in model
 8470   8449   
        pub(crate) fn set_foo_enum3(
 8471   8450   
            mut self,
 8472   8451   
            input: Option<
 8473   8452   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
 8474   8453   
            >,
 8475   8454   
        ) -> Self {
 8476   8455   
            self.foo_enum3 = input.map(|v| v.into());
 8477   8456   
            self
 8478   8457   
        }
 8479   8458   
        #[allow(missing_docs)] // documentation missing in model
 8480   8459   
        pub fn foo_enum_list(
 8481   8460   
            mut self,
 8482   8461   
            input: ::std::option::Option<::std::vec::Vec<crate::model::FooEnum>>,
 8483   8462   
        ) -> Self {
 8484   8463   
            self.foo_enum_list = input.map(
 8485   8464   
                #[allow(clippy::redundant_closure)]
 8486   8465   
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
 8487   8466   
            );
 8488   8467   
            self
 8489   8468   
        }
 8490   8469   
        #[allow(missing_docs)] // documentation missing in model
 8491   8470   
        pub(crate) fn set_foo_enum_list(
 8492   8471   
            mut self,
 8493   8472   
            input: Option<
 8494   8473   
                impl ::std::convert::Into<
 8495   8474   
                    crate::constrained::MaybeConstrained<
 8496   8475   
                        crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
 8497   8476   
                    >,
 8498   8477   
                >,
 8499   8478   
            >,
 8500   8479   
        ) -> Self {
 8501   8480   
            self.foo_enum_list = input.map(|v| v.into());
 8502   8481   
            self
 8503   8482   
        }
 8504   8483   
        #[allow(missing_docs)] // documentation missing in model
 8505   8484   
        pub fn foo_enum_set(
 8506   8485   
            mut self,
 8507   8486   
            input: ::std::option::Option<crate::model::FooEnumSet>,
 8508   8487   
        ) -> Self {
 8509         -
            self.foo_enum_set = input.map(
 8510         -
                #[allow(clippy::redundant_closure)]
 8511         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 8512         -
            );
        8488  +
            self.foo_enum_set = input.map(crate::constrained::MaybeConstrained::Constrained);
 8513   8489   
            self
 8514   8490   
        }
 8515   8491   
        #[allow(missing_docs)] // documentation missing in model
 8516   8492   
        pub(crate) fn set_foo_enum_set(
 8517   8493   
            mut self,
 8518   8494   
            input: Option<
 8519   8495   
                impl ::std::convert::Into<
 8520   8496   
                    crate::constrained::MaybeConstrained<crate::model::FooEnumSet>,
 8521   8497   
                >,
 8522   8498   
            >,
@@ -9271,9247 +9334,9307 @@
 9291   9267   
    }
 9292   9268   
    /// A builder for [`HttpEnumPayloadInput`](crate::input::HttpEnumPayloadInput).
 9293   9269   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 9294   9270   
    pub struct Builder {
 9295   9271   
        pub(crate) payload:
 9296   9272   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::StringEnum>>,
 9297   9273   
    }
 9298   9274   
    impl Builder {
 9299   9275   
        #[allow(missing_docs)] // documentation missing in model
 9300   9276   
        pub fn payload(mut self, input: ::std::option::Option<crate::model::StringEnum>) -> Self {
 9301         -
            self.payload = input.map(
 9302         -
                #[allow(clippy::redundant_closure)]
 9303         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 9304         -
            );
        9277  +
            self.payload = input.map(crate::constrained::MaybeConstrained::Constrained);
 9305   9278   
            self
 9306   9279   
        }
 9307   9280   
        #[allow(missing_docs)] // documentation missing in model
 9308   9281   
        pub(crate) fn set_payload(
 9309   9282   
            mut self,
 9310   9283   
            input: Option<
 9311   9284   
                impl ::std::convert::Into<
 9312   9285   
                    crate::constrained::MaybeConstrained<crate::model::StringEnum>,
 9313   9286   
                >,
 9314   9287   
            >,
@@ -10348,10321 +10411,10381 @@
10368  10341   
            input: Option<impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>>,
10369  10342   
        ) -> Self {
10370  10343   
            self.query_string_list = input.map(|v| v.into());
10371  10344   
            self
10372  10345   
        }
10373  10346   
        #[allow(missing_docs)] // documentation missing in model
10374  10347   
        pub fn query_string_set(
10375  10348   
            mut self,
10376  10349   
            input: ::std::option::Option<crate::model::StringSet>,
10377  10350   
        ) -> Self {
10378         -
            self.query_string_set = input.map(
10379         -
                #[allow(clippy::redundant_closure)]
10380         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
10381         -
            );
       10351  +
            self.query_string_set = input.map(crate::constrained::MaybeConstrained::Constrained);
10382  10352   
            self
10383  10353   
        }
10384  10354   
        #[allow(missing_docs)] // documentation missing in model
10385  10355   
        pub(crate) fn set_query_string_set(
10386  10356   
            mut self,
10387  10357   
            input: Option<
10388  10358   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::StringSet>>,
10389  10359   
            >,
10390  10360   
        ) -> Self {
10391  10361   
            self.query_string_set = input.map(|v| v.into());
@@ -10424,10394 +10487,10454 @@
10444  10414   
            input: Option<impl ::std::convert::Into<::std::vec::Vec<i32>>>,
10445  10415   
        ) -> Self {
10446  10416   
            self.query_integer_list = input.map(|v| v.into());
10447  10417   
            self
10448  10418   
        }
10449  10419   
        #[allow(missing_docs)] // documentation missing in model
10450  10420   
        pub fn query_integer_set(
10451  10421   
            mut self,
10452  10422   
            input: ::std::option::Option<crate::model::IntegerSet>,
10453  10423   
        ) -> Self {
10454         -
            self.query_integer_set = input.map(
10455         -
                #[allow(clippy::redundant_closure)]
10456         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
10457         -
            );
       10424  +
            self.query_integer_set = input.map(crate::constrained::MaybeConstrained::Constrained);
10458  10425   
            self
10459  10426   
        }
10460  10427   
        #[allow(missing_docs)] // documentation missing in model
10461  10428   
        pub(crate) fn set_query_integer_set(
10462  10429   
            mut self,
10463  10430   
            input: Option<
10464  10431   
                impl ::std::convert::Into<
10465  10432   
                    crate::constrained::MaybeConstrained<crate::model::IntegerSet>,
10466  10433   
                >,
10467  10434   
            >,
@@ -10560,10527 +10623,10587 @@
10580  10547   
        #[allow(missing_docs)] // documentation missing in model
10581  10548   
        pub(crate) fn set_query_timestamp_list(
10582  10549   
            mut self,
10583  10550   
            input: Option<impl ::std::convert::Into<::std::vec::Vec<::aws_smithy_types::DateTime>>>,
10584  10551   
        ) -> Self {
10585  10552   
            self.query_timestamp_list = input.map(|v| v.into());
10586  10553   
            self
10587  10554   
        }
10588  10555   
        #[allow(missing_docs)] // documentation missing in model
10589  10556   
        pub fn query_enum(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
10590         -
            self.query_enum = input.map(
10591         -
                #[allow(clippy::redundant_closure)]
10592         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
10593         -
            );
       10557  +
            self.query_enum = input.map(crate::constrained::MaybeConstrained::Constrained);
10594  10558   
            self
10595  10559   
        }
10596  10560   
        #[allow(missing_docs)] // documentation missing in model
10597  10561   
        pub(crate) fn set_query_enum(
10598  10562   
            mut self,
10599  10563   
            input: Option<
10600  10564   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
10601  10565   
            >,
10602  10566   
        ) -> Self {
10603  10567   
            self.query_enum = input.map(|v| v.into());
@@ -12159,12123 +12222,12183 @@
12179  12143   
            input: Option<impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>>,
12180  12144   
        ) -> Self {
12181  12145   
            self.header_string_list = input.map(|v| v.into());
12182  12146   
            self
12183  12147   
        }
12184  12148   
        #[allow(missing_docs)] // documentation missing in model
12185  12149   
        pub fn header_string_set(
12186  12150   
            mut self,
12187  12151   
            input: ::std::option::Option<crate::model::StringSet>,
12188  12152   
        ) -> Self {
12189         -
            self.header_string_set = input.map(
12190         -
                #[allow(clippy::redundant_closure)]
12191         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
12192         -
            );
       12153  +
            self.header_string_set = input.map(crate::constrained::MaybeConstrained::Constrained);
12193  12154   
            self
12194  12155   
        }
12195  12156   
        #[allow(missing_docs)] // documentation missing in model
12196  12157   
        pub(crate) fn set_header_string_set(
12197  12158   
            mut self,
12198  12159   
            input: Option<
12199  12160   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::StringSet>>,
12200  12161   
            >,
12201  12162   
        ) -> Self {
12202  12163   
            self.header_string_set = input.map(|v| v.into());
@@ -12225,12186 +12288,12246 @@
12245  12206   
        #[allow(missing_docs)] // documentation missing in model
12246  12207   
        pub(crate) fn set_header_timestamp_list(
12247  12208   
            mut self,
12248  12209   
            input: Option<impl ::std::convert::Into<::std::vec::Vec<::aws_smithy_types::DateTime>>>,
12249  12210   
        ) -> Self {
12250  12211   
            self.header_timestamp_list = input.map(|v| v.into());
12251  12212   
            self
12252  12213   
        }
12253  12214   
        #[allow(missing_docs)] // documentation missing in model
12254  12215   
        pub fn header_enum(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
12255         -
            self.header_enum = input.map(
12256         -
                #[allow(clippy::redundant_closure)]
12257         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
12258         -
            );
       12216  +
            self.header_enum = input.map(crate::constrained::MaybeConstrained::Constrained);
12259  12217   
            self
12260  12218   
        }
12261  12219   
        #[allow(missing_docs)] // documentation missing in model
12262  12220   
        pub(crate) fn set_header_enum(
12263  12221   
            mut self,
12264  12222   
            input: Option<
12265  12223   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
12266  12224   
            >,
12267  12225   
        ) -> Self {
12268  12226   
            self.header_enum = input.map(|v| v.into());

tmp-codegen-diff/codegen-server-test/rest_json/rust-server-codegen/src/model.rs

@@ -1801,1801 +1868,1862 @@
 1821   1821   
        /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
 1822   1822   
        ///
 1823   1823   
        pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
 1824   1824   
            self.build_enforcing_all_constraints()
 1825   1825   
        }
 1826   1826   
        fn build_enforcing_all_constraints(
 1827   1827   
            self,
 1828   1828   
        ) -> Result<crate::model::TopLevel, ConstraintViolation> {
 1829   1829   
            Ok(crate::model::TopLevel {
 1830   1830   
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
 1831         -
                dialog_list: self.dialog_list.unwrap_or_else(
 1832         -
                    #[allow(clippy::redundant_closure)]
 1833         -
                    || ::std::vec::Vec::new(),
 1834         -
                ),
 1835         -
                dialog_map: self.dialog_map.unwrap_or_else(
 1836         -
                    #[allow(clippy::redundant_closure)]
 1837         -
                    || ::std::collections::HashMap::new(),
 1838         -
                ),
        1831  +
                dialog_list: self.dialog_list.unwrap_or_default(),
        1832  +
                dialog_map: self.dialog_map.unwrap_or_default(),
 1839   1833   
            })
 1840   1834   
        }
 1841   1835   
    }
 1842   1836   
}
 1843   1837   
/// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 1844   1838   
pub mod client_optional_defaults {
 1845   1839   
 1846   1840   
    impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
 1847   1841   
        fn from(builder: Builder) -> Self {
 1848   1842   
            builder.build()
@@ -2281,2275 +2378,2366 @@
 2301   2295   
        }
 2302   2296   
        fn build_enforcing_all_constraints(
 2303   2297   
            self,
 2304   2298   
        ) -> Result<crate::model::Defaults, ConstraintViolation> {
 2305   2299   
            Ok(crate::model::Defaults {
 2306   2300   
                default_string: self.default_string.unwrap_or_else(
 2307   2301   
                    #[allow(clippy::redundant_closure)]
 2308   2302   
                    || String::from("hi"),
 2309   2303   
                ),
 2310   2304   
                default_boolean: self.default_boolean.unwrap_or(true),
 2311         -
                default_list: self.default_list.unwrap_or_else(
 2312         -
                    #[allow(clippy::redundant_closure)]
 2313         -
                    || ::std::vec::Vec::new(),
 2314         -
                ),
        2305  +
                default_list: self.default_list.unwrap_or_default(),
 2315   2306   
                default_document_map: self.default_document_map.unwrap_or_else(
 2316   2307   
                    #[allow(clippy::redundant_closure)]
 2317   2308   
                    || ::aws_smithy_types::Document::Object(::std::collections::HashMap::new()),
 2318   2309   
                ),
 2319   2310   
                default_document_string: self.default_document_string.unwrap_or_else(
 2320   2311   
                    #[allow(clippy::redundant_closure)]
 2321   2312   
                    || ::aws_smithy_types::Document::String(::std::string::String::from("hi")),
 2322   2313   
                ),
 2323   2314   
                default_document_boolean: self
 2324   2315   
                    .default_document_boolean
 2325   2316   
                    .unwrap_or(::aws_smithy_types::Document::Bool(true)),
 2326   2317   
                default_document_list: self.default_document_list.unwrap_or_else(
 2327   2318   
                    #[allow(clippy::redundant_closure)]
 2328   2319   
                    || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()),
 2329   2320   
                ),
 2330   2321   
                default_null_document: self.default_null_document,
 2331   2322   
                default_timestamp: self.default_timestamp.unwrap_or_else(
 2332   2323   
                    #[allow(clippy::redundant_closure)]
 2333   2324   
                    || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64),
 2334   2325   
                ),
 2335   2326   
                default_blob: self.default_blob.unwrap_or_else(
 2336   2327   
                    #[allow(clippy::redundant_closure)]
 2337   2328   
                    || ::aws_smithy_types::Blob::new("abc"),
 2338   2329   
                ),
 2339   2330   
                default_byte: self.default_byte.unwrap_or(1i8),
 2340   2331   
                default_short: self.default_short.unwrap_or(1i16),
 2341   2332   
                default_integer: self.default_integer.unwrap_or(10i32),
 2342   2333   
                default_long: self.default_long.unwrap_or(100i64),
 2343   2334   
                default_float: self.default_float.unwrap_or(1.0f32),
 2344   2335   
                default_double: self.default_double.unwrap_or(1.0f64),
 2345         -
                default_map: self.default_map.unwrap_or_else(
 2346         -
                    #[allow(clippy::redundant_closure)]
 2347         -
                    || ::std::collections::HashMap::new(),
 2348         -
                ),
        2336  +
                default_map: self.default_map.unwrap_or_default(),
 2349   2337   
                default_enum: self
 2350   2338   
                    .default_enum
 2351   2339   
                    .map(|v| match v {
 2352   2340   
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
 2353   2341   
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
 2354   2342   
                    })
 2355   2343   
                    .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
 2356   2344   
                    .transpose()?
 2357   2345   
                    .unwrap_or(
 2358   2346   
                        "FOO"

tmp-codegen-diff/codegen-server-test/rest_json/rust-server-codegen/src/output.rs

@@ -2420,2420 +2487,2481 @@
 2440   2440   
        ) -> Result<crate::output::OperationWithNestedStructureOutput, ConstraintViolation>
 2441   2441   
        {
 2442   2442   
            self.build_enforcing_all_constraints()
 2443   2443   
        }
 2444   2444   
        fn build_enforcing_all_constraints(
 2445   2445   
            self,
 2446   2446   
        ) -> Result<crate::output::OperationWithNestedStructureOutput, ConstraintViolation>
 2447   2447   
        {
 2448   2448   
            Ok(crate::output::OperationWithNestedStructureOutput {
 2449   2449   
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
 2450         -
                dialog_list: self.dialog_list.unwrap_or_else(
 2451         -
                    #[allow(clippy::redundant_closure)]
 2452         -
                    || ::std::vec::Vec::new(),
 2453         -
                ),
 2454         -
                dialog_map: self.dialog_map.unwrap_or_else(
 2455         -
                    #[allow(clippy::redundant_closure)]
 2456         -
                    || ::std::collections::HashMap::new(),
 2457         -
                ),
        2450  +
                dialog_list: self.dialog_list.unwrap_or_default(),
        2451  +
                dialog_map: self.dialog_map.unwrap_or_default(),
 2458   2452   
            })
 2459   2453   
        }
 2460   2454   
    }
 2461   2455   
}
 2462   2456   
/// See [`OperationWithDefaultsOutput`](crate::output::OperationWithDefaultsOutput).
 2463   2457   
pub mod operation_with_defaults_output {
 2464   2458   
 2465   2459   
    impl ::std::convert::From<Builder> for crate::output::OperationWithDefaultsOutput {
 2466   2460   
        fn from(builder: Builder) -> Self {
 2467   2461   
            builder.build()
@@ -2632,2626 +2729,2717 @@
 2652   2646   
        pub fn build(self) -> crate::output::OperationWithDefaultsOutput {
 2653   2647   
            self.build_enforcing_all_constraints()
 2654   2648   
        }
 2655   2649   
        fn build_enforcing_all_constraints(self) -> crate::output::OperationWithDefaultsOutput {
 2656   2650   
            crate::output::OperationWithDefaultsOutput {
 2657   2651   
                default_string: self.default_string.unwrap_or_else(
 2658   2652   
                    #[allow(clippy::redundant_closure)]
 2659   2653   
                    || String::from("hi"),
 2660   2654   
                ),
 2661   2655   
                default_boolean: self.default_boolean.unwrap_or(true),
 2662         -
                default_list: self.default_list.unwrap_or_else(
 2663         -
                    #[allow(clippy::redundant_closure)]
 2664         -
                    || ::std::vec::Vec::new(),
 2665         -
                ),
        2656  +
                default_list: self.default_list.unwrap_or_default(),
 2666   2657   
                default_document_map: self.default_document_map.unwrap_or_else(
 2667   2658   
                    #[allow(clippy::redundant_closure)]
 2668   2659   
                    || ::aws_smithy_types::Document::Object(::std::collections::HashMap::new()),
 2669   2660   
                ),
 2670   2661   
                default_document_string: self.default_document_string.unwrap_or_else(
 2671   2662   
                    #[allow(clippy::redundant_closure)]
 2672   2663   
                    || ::aws_smithy_types::Document::String(::std::string::String::from("hi")),
 2673   2664   
                ),
 2674   2665   
                default_document_boolean: self
 2675   2666   
                    .default_document_boolean
 2676   2667   
                    .unwrap_or(::aws_smithy_types::Document::Bool(true)),
 2677   2668   
                default_document_list: self.default_document_list.unwrap_or_else(
 2678   2669   
                    #[allow(clippy::redundant_closure)]
 2679   2670   
                    || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()),
 2680   2671   
                ),
 2681   2672   
                default_null_document: self.default_null_document,
 2682   2673   
                default_timestamp: self.default_timestamp.unwrap_or_else(
 2683   2674   
                    #[allow(clippy::redundant_closure)]
 2684   2675   
                    || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64),
 2685   2676   
                ),
 2686   2677   
                default_blob: self.default_blob.unwrap_or_else(
 2687   2678   
                    #[allow(clippy::redundant_closure)]
 2688   2679   
                    || ::aws_smithy_types::Blob::new("abc"),
 2689   2680   
                ),
 2690   2681   
                default_byte: self.default_byte.unwrap_or(1i8),
 2691   2682   
                default_short: self.default_short.unwrap_or(1i16),
 2692   2683   
                default_integer: self.default_integer.unwrap_or(10i32),
 2693   2684   
                default_long: self.default_long.unwrap_or(100i64),
 2694   2685   
                default_float: self.default_float.unwrap_or(1.0f32),
 2695   2686   
                default_double: self.default_double.unwrap_or(1.0f64),
 2696         -
                default_map: self.default_map.unwrap_or_else(
 2697         -
                    #[allow(clippy::redundant_closure)]
 2698         -
                    || ::std::collections::HashMap::new(),
 2699         -
                ),
        2687  +
                default_map: self.default_map.unwrap_or_default(),
 2700   2688   
                default_enum: self.default_enum.unwrap_or(
 2701   2689   
                    "FOO"
 2702   2690   
                        .parse::<crate::model::TestEnum>()
 2703   2691   
                        .expect("static value validated to member"),
 2704   2692   
                ),
 2705   2693   
                default_int_enum: self.default_int_enum.unwrap_or(1i32),
 2706   2694   
                empty_string: self.empty_string.unwrap_or_else(
 2707   2695   
                    #[allow(clippy::redundant_closure)]
 2708   2696   
                    || String::from(""),
 2709   2697   
                ),

tmp-codegen-diff/codegen-server-test/rest_json_extras/rust-server-codegen/src/input.rs

@@ -420,420 +483,480 @@
  440    440   
            crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
  441    441   
        >,
  442    442   
        pub(crate) some_string: ::std::option::Option<::std::string::String>,
  443    443   
    }
  444    444   
    impl Builder {
  445    445   
        #[allow(missing_docs)] // documentation missing in model
  446    446   
        pub fn r#enum(
  447    447   
            mut self,
  448    448   
            input: ::std::option::Option<crate::model::EnumWithEscapedChars>,
  449    449   
        ) -> Self {
  450         -
            self.r#enum = input.map(
  451         -
                #[allow(clippy::redundant_closure)]
  452         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  453         -
            );
         450  +
            self.r#enum = input.map(crate::constrained::MaybeConstrained::Constrained);
  454    451   
            self
  455    452   
        }
  456    453   
        #[allow(missing_docs)] // documentation missing in model
  457    454   
        pub(crate) fn set_enum(
  458    455   
            mut self,
  459    456   
            input: Option<
  460    457   
                impl ::std::convert::Into<
  461    458   
                    crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
  462    459   
                >,
  463    460   
            >,