Server Test

Server Test

rev. 045dcb101fe0b7ab2c1feb554ac35a617d4c5a4a

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

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

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

@@ -2737,2737 +2818,2812 @@
 2757   2757   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2758   2758   
    pub struct Builder {
 2759   2759   
        pub(crate) key:
 2760   2760   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TagKey>>,
 2761   2761   
        pub(crate) value:
 2762   2762   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TagValue>>,
 2763   2763   
    }
 2764   2764   
    impl Builder {
 2765   2765   
        /// <p>The key of the tag.</p>
 2766   2766   
        pub fn key(mut self, input: ::std::option::Option<crate::model::TagKey>) -> Self {
 2767         -
            self.key = input.map(
 2768         -
                #[allow(clippy::redundant_closure)]
 2769         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 2770         -
            );
        2767  +
            self.key = input.map(crate::constrained::MaybeConstrained::Constrained);
 2771   2768   
            self
 2772   2769   
        }
 2773   2770   
        /// <p>The key of the tag.</p>
 2774   2771   
        pub(crate) fn set_key(
 2775   2772   
            mut self,
 2776   2773   
            input: Option<
 2777   2774   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::TagKey>>,
 2778   2775   
            >,
 2779   2776   
        ) -> Self {
 2780   2777   
            self.key = input.map(|v| v.into());
 2781   2778   
            self
 2782   2779   
        }
 2783   2780   
        /// <p>The value of the tag.</p>
 2784   2781   
        pub fn value(mut self, input: ::std::option::Option<crate::model::TagValue>) -> Self {
 2785         -
            self.value = input.map(
 2786         -
                #[allow(clippy::redundant_closure)]
 2787         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
 2788         -
            );
        2782  +
            self.value = input.map(crate::constrained::MaybeConstrained::Constrained);
 2789   2783   
            self
 2790   2784   
        }
 2791   2785   
        /// <p>The value of the tag.</p>
 2792   2786   
        pub(crate) fn set_value(
 2793   2787   
            mut self,
 2794   2788   
            input: Option<
 2795   2789   
                impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::TagValue>>,
 2796   2790   
            >,
 2797   2791   
        ) -> Self {
 2798   2792   
            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   
            >,