From 391876c4e68045a3b2299360fcea042114435f16 Mon Sep 17 00:00:00 2001 From: Steven Yuan Date: Wed, 8 Nov 2023 10:58:38 -0800 Subject: [PATCH] Remove unused `moduleDescription` setting --- .../amazon/smithy/go/codegen/GoSettings.java | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java index c9f44ac48..88dd2ad1d 100644 --- a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java +++ b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java @@ -25,22 +25,22 @@ import software.amazon.smithy.model.node.ObjectNode; import software.amazon.smithy.model.shapes.ServiceShape; import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.utils.SmithyInternalApi; /** * Settings used by {@link GoCodegenPlugin}. */ +@SmithyInternalApi public final class GoSettings { private static final String SERVICE = "service"; private static final String MODULE_NAME = "module"; - private static final String MODULE_DESCRIPTION = "moduleDescription"; private static final String MODULE_VERSION = "moduleVersion"; private static final String GENERATE_GO_MOD = "generateGoMod"; private static final String GO_DIRECTIVE = "goDirective"; private ShapeId service; private String moduleName; - private String moduleDescription = ""; private String moduleVersion; private Boolean generateGoMod = false; private String goDirective = GoModuleInfo.DEFAULT_GO_DIRECTIVE; @@ -55,12 +55,10 @@ public final class GoSettings { public static GoSettings from(ObjectNode config) { GoSettings settings = new GoSettings(); config.warnIfAdditionalProperties( - Arrays.asList(SERVICE, MODULE_NAME, MODULE_DESCRIPTION, MODULE_VERSION, GENERATE_GO_MOD, GO_DIRECTIVE)); + Arrays.asList(SERVICE, MODULE_NAME, MODULE_VERSION, GENERATE_GO_MOD, GO_DIRECTIVE)); settings.setService(config.expectStringMember(SERVICE).expectShapeId()); settings.setModuleName(config.expectStringMember(MODULE_NAME).getValue()); - settings.setModuleDescription(config.getStringMemberOrDefault( - MODULE_DESCRIPTION, settings.getModuleName() + " client")); settings.setModuleVersion(config.getStringMemberOrDefault(MODULE_VERSION, null)); settings.setGenerateGoMod(config.getBooleanMemberOrDefault(GENERATE_GO_MOD, false)); settings.setGoDirective(config.getStringMemberOrDefault(GO_DIRECTIVE, GoModuleInfo.DEFAULT_GO_DIRECTIVE)); @@ -121,24 +119,6 @@ public void setModuleName(String moduleName) { this.moduleName = Objects.requireNonNull(moduleName); } - /** - * Gets the optional module description for the module that will be generated. - * - * @return Returns the module description. - */ - public String getModuleDescription() { - return moduleDescription; - } - - /** - * Sets the description of the module to generate. - * - * @param moduleDescription The description of the module to generate. - */ - public void setModuleDescription(String moduleDescription) { - this.moduleDescription = Objects.requireNonNull(moduleDescription); - } - /** * Gets the optional module version for the module that will be generated. *