From d54c005ade80e11c371da3274be9fc174be07e05 Mon Sep 17 00:00:00 2001 From: Zelda Hessler Date: Thu, 16 Feb 2023 11:50:42 -0600 Subject: [PATCH] add: deprecation notice to deprecated fluent builder methods (#2386) * add: deprecation notice to deprecated fluent builder methods * add: CHANGELOG.next.toml notes --- CHANGELOG.next.toml | 12 ++++++++++++ .../generators/client/FluentClientGenerator.kt | 3 +++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index b206c8c663..c15c52fe6c 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -210,3 +210,15 @@ message = "Fix issue where clients using native-tls connector were prevented fro references = ["aws-sdk-rust#736"] meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "client" } author = "Velfi" + +[[aws-sdk-rust]] +message = "Fluent builder methods on the client are now marked as deprecated when the related operation is deprecated." +references = ["aws-sdk-rust#740"] +meta = { "breaking" = false, "tada" = true, "bug" = true } +author = "Velfi" + +[[smithy-rs]] +message = "Fluent builder methods on the client are now marked as deprecated when the related operation is deprecated." +references = ["aws-sdk-rust#740"] +meta = { "breaking" = false, "tada" = true, "bug" = true, "target" = "client"} +author = "Velfi" diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt index 75a2d3bd8c..b43ad4ba73 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt @@ -202,6 +202,9 @@ class FluentClientGenerator( """, ) + // Write a deprecation notice if this operation is deprecated. + writer.deprecatedShape(operation) + writer.rust( """ pub fn ${