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 import java.util.Map; 20 import software.amazon.awssdk.codegen.model.service.Member; 21 22 /** 23 * Use shapeModifiers customization to add/remove shape members or to modify the 24 * properties of a member. 25 */ 26 public class ShapeModifier { 27 28 private boolean excludeShape; 29 private List<String> exclude; 30 private List<Map<String, ModifyModelShapeModifier>> modify; 31 private List<Map<String, Member>> inject; 32 private Integer staxTargetDepthOffset; 33 private Boolean union; 34 35 /** 36 * @return true if the whole shape should be excluded. 37 */ isExcludeShape()38 public boolean isExcludeShape() { 39 return excludeShape; 40 } 41 setExcludeShape(boolean excludeShape)42 public void setExcludeShape(boolean excludeShape) { 43 this.excludeShape = excludeShape; 44 } 45 46 /** 47 * @return A list of member names that should be excluded when processing 48 * the given shape. 49 */ getExclude()50 public List<String> getExclude() { 51 return exclude; 52 } 53 setExclude(List<String> exclude)54 public void setExclude(List<String> exclude) { 55 this.exclude = exclude; 56 } 57 58 /** 59 * @return List of singleton maps, each containing the name of a shape 60 * member, and the modifications that we want to apply to it. 61 */ getModify()62 public List<Map<String, ModifyModelShapeModifier>> getModify() { 63 return modify; 64 } 65 setModify(List<Map<String, ModifyModelShapeModifier>> modify)66 public void setModify(List<Map<String, ModifyModelShapeModifier>> modify) { 67 this.modify = modify; 68 } 69 70 /** 71 * @return A list of singleton maps, each containing a custom member that we want to inject to this shape. 72 */ getInject()73 public List<Map<String, Member>> getInject() { 74 return inject; 75 } 76 setInject(List<Map<String, Member>> inject)77 public void setInject(List<Map<String, Member>> inject) { 78 this.inject = inject; 79 } 80 81 /** 82 * @return the depth offset to use during staxUnmarshalling 83 */ getStaxTargetDepthOffset()84 public Integer getStaxTargetDepthOffset() { 85 return staxTargetDepthOffset; 86 } 87 setStaxTargetDepthOffset(Integer staxTargetDepthOffset)88 public void setStaxTargetDepthOffset(Integer staxTargetDepthOffset) { 89 this.staxTargetDepthOffset = staxTargetDepthOffset; 90 } 91 isUnion()92 public Boolean isUnion() { 93 return union; 94 } 95 setUnion(Boolean union)96 public void setUnion(Boolean union) { 97 this.union = union; 98 } 99 } 100