Loading codegen/src/v1/aws_conv.rs +0 −3 Original line number Diff line number Diff line Loading @@ -103,9 +103,6 @@ pub fn codegen(ops: &Operations, rust_types: &RustTypes) { let field_ty = &rust_types[field.type_.as_str()]; let needs_unwrap = 'unwrap: { if field.type_ == "OptionalObjectAttributesList" { break 'unwrap true; } if is_op_input(&ty.name, ops) && field.option_type.not() && field.is_required { break 'unwrap true; } Loading codegen/src/v1/dto.rs +0 −3 Original line number Diff line number Diff line Loading @@ -152,9 +152,6 @@ pub fn collect_rust_types(model: &smithy::Model, ops: &Operations) -> RustTypes break 'optional true; } if is_op_input && is_required.not() { if field_type.ends_with("List") { break 'optional false; } break 'optional true; } is_required.not() && default_value.is_none() Loading codegen/src/v1/ops.rs +12 −7 Original line number Diff line number Diff line Loading @@ -425,13 +425,18 @@ fn codegen_op_http_de(op: &Operation, rust_types: &RustTypes) { let field_type = &rust_types[&field.type_]; if let rust::Type::List(_) = field_type { assert!(field.name == "object_attributes" || field.name == "optional_object_attributes"); if field.is_required { assert!(field.option_type.not()); g!("let {}: {} = http::parse_list_header(req, &{header})?;", field.name, field.type_,); } else { assert!(field.option_type); g!( "let {}: {} = http::parse_list_header(req, &{header}, {})?;", "let {}: Option<{}> = http::parse_opt_list_header(req, &{header})?;", field.name, field.type_, field.is_required ); } } else if let rust::Type::Timestamp(ts_ty) = field_type { assert!(field.option_type); let fmt = ts_ty.format.as_deref().unwrap_or("HttpDate"); Loading crates/s3s-aws/src/conv/generated.rs +6 −6 Original line number Diff line number Diff line Loading @@ -4945,7 +4945,7 @@ impl AwsConversion for s3s::dto::ListObjectVersionsInput { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, key_marker: try_from_aws(x.key_marker)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, version_id_marker: try_from_aws(x.version_id_marker)?, Loading @@ -4960,7 +4960,7 @@ impl AwsConversion for s3s::dto::ListObjectVersionsInput { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_key_marker(try_into_aws(x.key_marker)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); Loading Loading @@ -5023,7 +5023,7 @@ impl AwsConversion for s3s::dto::ListObjectsInput { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, marker: try_from_aws(x.marker)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, }) Loading @@ -5037,7 +5037,7 @@ impl AwsConversion for s3s::dto::ListObjectsInput { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_marker(try_into_aws(x.marker)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y.build().map_err(S3Error::internal_error) Loading Loading @@ -5094,7 +5094,7 @@ impl AwsConversion for s3s::dto::ListObjectsV2Input { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, fetch_owner: try_from_aws(x.fetch_owner)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, start_after: try_from_aws(x.start_after)?, Loading @@ -5110,7 +5110,7 @@ impl AwsConversion for s3s::dto::ListObjectsV2Input { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y = y.set_start_after(try_into_aws(x.start_after)?); Loading crates/s3s-aws/src/conv/generated_minio.rs +6 −6 Original line number Diff line number Diff line Loading @@ -4949,7 +4949,7 @@ impl AwsConversion for s3s::dto::ListObjectVersionsInput { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, key_marker: try_from_aws(x.key_marker)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, version_id_marker: try_from_aws(x.version_id_marker)?, Loading @@ -4964,7 +4964,7 @@ impl AwsConversion for s3s::dto::ListObjectVersionsInput { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_key_marker(try_into_aws(x.key_marker)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); Loading Loading @@ -5027,7 +5027,7 @@ impl AwsConversion for s3s::dto::ListObjectsInput { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, marker: try_from_aws(x.marker)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, }) Loading @@ -5041,7 +5041,7 @@ impl AwsConversion for s3s::dto::ListObjectsInput { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_marker(try_into_aws(x.marker)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y.build().map_err(S3Error::internal_error) Loading Loading @@ -5098,7 +5098,7 @@ impl AwsConversion for s3s::dto::ListObjectsV2Input { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, fetch_owner: try_from_aws(x.fetch_owner)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, start_after: try_from_aws(x.start_after)?, Loading @@ -5114,7 +5114,7 @@ impl AwsConversion for s3s::dto::ListObjectsV2Input { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y = y.set_start_after(try_into_aws(x.start_after)?); Loading Loading
codegen/src/v1/aws_conv.rs +0 −3 Original line number Diff line number Diff line Loading @@ -103,9 +103,6 @@ pub fn codegen(ops: &Operations, rust_types: &RustTypes) { let field_ty = &rust_types[field.type_.as_str()]; let needs_unwrap = 'unwrap: { if field.type_ == "OptionalObjectAttributesList" { break 'unwrap true; } if is_op_input(&ty.name, ops) && field.option_type.not() && field.is_required { break 'unwrap true; } Loading
codegen/src/v1/dto.rs +0 −3 Original line number Diff line number Diff line Loading @@ -152,9 +152,6 @@ pub fn collect_rust_types(model: &smithy::Model, ops: &Operations) -> RustTypes break 'optional true; } if is_op_input && is_required.not() { if field_type.ends_with("List") { break 'optional false; } break 'optional true; } is_required.not() && default_value.is_none() Loading
codegen/src/v1/ops.rs +12 −7 Original line number Diff line number Diff line Loading @@ -425,13 +425,18 @@ fn codegen_op_http_de(op: &Operation, rust_types: &RustTypes) { let field_type = &rust_types[&field.type_]; if let rust::Type::List(_) = field_type { assert!(field.name == "object_attributes" || field.name == "optional_object_attributes"); if field.is_required { assert!(field.option_type.not()); g!("let {}: {} = http::parse_list_header(req, &{header})?;", field.name, field.type_,); } else { assert!(field.option_type); g!( "let {}: {} = http::parse_list_header(req, &{header}, {})?;", "let {}: Option<{}> = http::parse_opt_list_header(req, &{header})?;", field.name, field.type_, field.is_required ); } } else if let rust::Type::Timestamp(ts_ty) = field_type { assert!(field.option_type); let fmt = ts_ty.format.as_deref().unwrap_or("HttpDate"); Loading
crates/s3s-aws/src/conv/generated.rs +6 −6 Original line number Diff line number Diff line Loading @@ -4945,7 +4945,7 @@ impl AwsConversion for s3s::dto::ListObjectVersionsInput { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, key_marker: try_from_aws(x.key_marker)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, version_id_marker: try_from_aws(x.version_id_marker)?, Loading @@ -4960,7 +4960,7 @@ impl AwsConversion for s3s::dto::ListObjectVersionsInput { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_key_marker(try_into_aws(x.key_marker)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); Loading Loading @@ -5023,7 +5023,7 @@ impl AwsConversion for s3s::dto::ListObjectsInput { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, marker: try_from_aws(x.marker)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, }) Loading @@ -5037,7 +5037,7 @@ impl AwsConversion for s3s::dto::ListObjectsInput { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_marker(try_into_aws(x.marker)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y.build().map_err(S3Error::internal_error) Loading Loading @@ -5094,7 +5094,7 @@ impl AwsConversion for s3s::dto::ListObjectsV2Input { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, fetch_owner: try_from_aws(x.fetch_owner)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, start_after: try_from_aws(x.start_after)?, Loading @@ -5110,7 +5110,7 @@ impl AwsConversion for s3s::dto::ListObjectsV2Input { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y = y.set_start_after(try_into_aws(x.start_after)?); Loading
crates/s3s-aws/src/conv/generated_minio.rs +6 −6 Original line number Diff line number Diff line Loading @@ -4949,7 +4949,7 @@ impl AwsConversion for s3s::dto::ListObjectVersionsInput { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, key_marker: try_from_aws(x.key_marker)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, version_id_marker: try_from_aws(x.version_id_marker)?, Loading @@ -4964,7 +4964,7 @@ impl AwsConversion for s3s::dto::ListObjectVersionsInput { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_key_marker(try_into_aws(x.key_marker)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); Loading Loading @@ -5027,7 +5027,7 @@ impl AwsConversion for s3s::dto::ListObjectsInput { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, marker: try_from_aws(x.marker)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, }) Loading @@ -5041,7 +5041,7 @@ impl AwsConversion for s3s::dto::ListObjectsInput { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_marker(try_into_aws(x.marker)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y.build().map_err(S3Error::internal_error) Loading Loading @@ -5098,7 +5098,7 @@ impl AwsConversion for s3s::dto::ListObjectsV2Input { expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, fetch_owner: try_from_aws(x.fetch_owner)?, max_keys: try_from_aws(x.max_keys)?, optional_object_attributes: unwrap_from_aws(x.optional_object_attributes, "optional_object_attributes")?, optional_object_attributes: try_from_aws(x.optional_object_attributes)?, prefix: try_from_aws(x.prefix)?, request_payer: try_from_aws(x.request_payer)?, start_after: try_from_aws(x.start_after)?, Loading @@ -5114,7 +5114,7 @@ impl AwsConversion for s3s::dto::ListObjectsV2Input { y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); y = y.set_max_keys(try_into_aws(x.max_keys)?); y = y.set_optional_object_attributes(Some(try_into_aws(x.optional_object_attributes)?)); y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); y = y.set_prefix(try_into_aws(x.prefix)?); y = y.set_request_payer(try_into_aws(x.request_payer)?); y = y.set_start_after(try_into_aws(x.start_after)?); Loading