code: private void preprocess_ModifyShapeMembers(ServiceModel serviceModel, Shape shape, ShapeModifier modifier) {
  
          if (modifier.getModify() != null) {
              for (Map<String, ShapeModifier_ModifyModel> modifies : modifier.getModify()) {
                  for (Entry<String, ShapeModifier_ModifyModel> entry : modifies.entrySet()) {
  
                      String memberToModify = entry.getKey();
                      ShapeModifier_ModifyModel modifyModel = entry.getValue();
  
                      doModifyShapeMembers(serviceModel, shape, memberToModify, modifyModel);
                  }
              }
          }
  
          if (modifier.getExclude() != null) {
              for (String memberToExclude : modifier.getExclude()) {
  
                  if (shape.getRequired() != null &&
                      shape.getRequired().contains(memberToExclude)) {
                      throw new IllegalStateException(
                              "ShapeModifier.exclude customization found for "
                                      + memberToExclude
                                      + ", but this member is marked as required in the model!");
                  }
  
                  if (shape.getMembers() != null) {
                      shape.getMembers().remove(memberToExclude);
                  }
              }
          }
  
          if (modifier.getInject() != null) {
              for (Map<String, Member> injects : modifier.getInject()) {
                  if (shape.getMembers() == null) {
                      shape.setMembers(new HashMap<>());
                  }
                  shape.getMembers().putAll(injects);
              }
          }
  
          if (modifier.getInjectEnumValues() != null) {
              if (shape.getEnumValues() == null) {
                  throw new IllegalStateException("Attempted to add enum members to a non-enum shape!");
              }
              Set<String> extendValues = new HashSet<>(shape.getEnumValues());
              extendValues.addAll(modifier.getInjectEnumValues());
              shape.setEnumValues(new ArrayList<>(extendValues));
          }
      }
docs: Exclude/modify/inject shape members