1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  *  http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 package software.amazon.awssdk.codegen.model.config.customization;
17 
18 import java.util.List;
19 
20 /**
21  * Use shapeSubstitutions customization to override all appearances of the given
22  * shape with a new shape, and optionally use a specific member of the original
23  * shape as the data source.
24  *
25  * When emitFromMember is supplied, an additional marshalling and unmarshalling
26  * path is added to reflect the wire representation of the member.
27  */
28 public class ShapeSubstitution {
29 
30     private String emitAsShape;
31     private String emitFromMember;
32 
33     /**
34      * This contains a list of shapes for which the additional marshalling
35      * path will not be added. This customization is specifically added for
36      * EC2 where we replace all occurrences of AttributeValue with Value in
37      * the model classes. However the wire representation is not changed.
38      *
39      * TODO This customization has been added to preserve backwards
40      * compatibility of EC2 APIs. This should be removed as part of next major
41      * version bump.
42      */
43     private List<String> skipMarshallPathForShapes;
44 
getEmitAsShape()45     public String getEmitAsShape() {
46         return emitAsShape;
47     }
48 
setEmitAsShape(String emitAsShape)49     public void setEmitAsShape(String emitAsShape) {
50         this.emitAsShape = emitAsShape;
51     }
52 
getEmitFromMember()53     public String getEmitFromMember() {
54         return emitFromMember;
55     }
56 
setEmitFromMember(String emitFromMember)57     public void setEmitFromMember(String emitFromMember) {
58         this.emitFromMember = emitFromMember;
59     }
60 
getSkipMarshallPathForShapes()61     public List<String> getSkipMarshallPathForShapes() {
62         return skipMarshallPathForShapes;
63     }
64 
setSkipMarshallPathForShapes(List<String> skipMarshallPathForShapes)65     public void setSkipMarshallPathForShapes(List<String> skipMarshallPathForShapes) {
66         this.skipMarshallPathForShapes = skipMarshallPathForShapes;
67     }
68 }
69