1212 * express or implied. See the License for the specific language governing
1313 * permissions and limitations under the License.
1414 */
15+
1516package software .amazon .smithy .aws .typescript .codegen ;
1617
1718import static software .amazon .smithy .typescript .codegen .integration .RuntimeClientPlugin .Convention .HAS_CONFIG ;
1819import static software .amazon .smithy .typescript .codegen .integration .RuntimeClientPlugin .Convention .HAS_MIDDLEWARE ;
1920
20- import java .util .logging .Logger ;
2121import java .util .List ;
2222import java .util .Optional ;
23- import software . amazon . smithy . build . PluginContext ;
23+ import java . util . logging . Logger ;
2424import software .amazon .smithy .aws .traits .ServiceTrait ;
25-
25+ import software .amazon .smithy .build .PluginContext ;
26+ import software .amazon .smithy .model .Model ;
2627import software .amazon .smithy .model .shapes .MemberShape ;
2728import software .amazon .smithy .model .shapes .OperationShape ;
2829import software .amazon .smithy .model .shapes .ServiceShape ;
2930import software .amazon .smithy .model .shapes .Shape ;
3031import software .amazon .smithy .model .traits .RequiredTrait ;
31- import software .amazon .smithy .model .Model ;
3232import software .amazon .smithy .model .transform .ModelTransformer ;
33+ import software .amazon .smithy .typescript .codegen .TypeScriptSettings ;
3334import software .amazon .smithy .typescript .codegen .integration .RuntimeClientPlugin ;
3435import software .amazon .smithy .typescript .codegen .integration .TypeScriptIntegration ;
35- import software .amazon .smithy .typescript .codegen .TypeScriptSettings ;
3636import software .amazon .smithy .utils .ListUtils ;
3737
3838/**
39- * Add S3Control customization
39+ * Add S3Control customization.
4040 */
4141public class AddS3ControlDependency implements TypeScriptIntegration {
42-
42+
4343 private static final Logger LOGGER = Logger .getLogger (AddS3ControlDependency .class .getName ());
4444
4545 @ Override
@@ -50,17 +50,25 @@ public List<RuntimeClientPlugin> getClientPlugins() {
5050 .servicePredicate ((m , s ) -> isS3Control (s ))
5151 .build (),
5252 RuntimeClientPlugin .builder ()
53- .withConventions (AwsDependency .S3_CONTROL_MIDDLEWARE .dependency , "ProcessArnables" , HAS_MIDDLEWARE )
53+ .withConventions (
54+ AwsDependency .S3_CONTROL_MIDDLEWARE .dependency ,
55+ "ProcessArnables" ,
56+ HAS_MIDDLEWARE
57+ )
5458 .operationPredicate ((m , s , o ) -> isS3Control (s ) && isArnableOperation (o ))
5559 .build (),
5660 RuntimeClientPlugin .builder ()
57- .withConventions (AwsDependency .S3_CONTROL_MIDDLEWARE .dependency , "RedirectFromPostId" , HAS_MIDDLEWARE )
61+ .withConventions (
62+ AwsDependency .S3_CONTROL_MIDDLEWARE .dependency ,
63+ "RedirectFromPostId" ,
64+ HAS_MIDDLEWARE
65+ )
5866 .operationPredicate ((m , s , o ) -> isS3Control (s ) && !isArnableOperation (o ))
5967 .build ());
6068 }
6169
6270 @ Override
63- public Model preprocessModel (PluginContext context , TypeScriptSettings settings ) {
71+ public Model preprocessModel (PluginContext context , TypeScriptSettings settings ) {
6472 Model model = context .getModel ();
6573 if (!isS3Control (settings .getService (model ))) {
6674 return model ;
0 commit comments