@@ -809,20 +809,6 @@ public PropertyModifier GetPropertyModifier(string shapeName, string propertyNam
809
809
return null ;
810
810
}
811
811
812
- /// <summary>
813
- /// Gets the property modifier for a property if it exists. Otherwise returns false.
814
- /// </summary>
815
- /// <param name="shapeName"></param>
816
- /// <param name="propertyName"></param>
817
- /// <param name="propertyModifier"></param>
818
- /// <returns></returns>
819
- public bool TryGetPropertyModifier ( string shapeName , string propertyName , out PropertyModifier propertyModifier )
820
- {
821
- propertyModifier = null ;
822
- propertyModifier = GetPropertyModifier ( shapeName , propertyName ) ?? null ;
823
- return propertyModifier != null ? true : false ;
824
- }
825
-
826
812
/// <summary>
827
813
/// Determines if the property has a customization to be set to nullable
828
814
/// </summary>
@@ -1034,7 +1020,6 @@ public class ShapeModifier
1034
1020
public const string ShapeModifierXmlNamespaceKey = "xmlNamespace" ;
1035
1021
public const string OriginalMemberIsOutsideContainingShapeKey = "originalMemberIsOutsideContainingShape" ;
1036
1022
public const string PredicateListUnmarshallersKey = "predicateListUnmarshallers" ;
1037
- public const string ExcludeFromUnmarshallingKey = "excludeFromUnmarshalling" ;
1038
1023
1039
1024
private readonly HashSet < string > _excludedProperties ;
1040
1025
private readonly Dictionary < string , JsonData > _modifiedProperties ;
@@ -1045,7 +1030,6 @@ public class ShapeModifier
1045
1030
private readonly HashSet < string > _shapeDocumentation ;
1046
1031
private readonly string _shapeModifierXmlNamespace ;
1047
1032
private readonly Dictionary < string , JsonData > _predicateListUnmarshallers ;
1048
- private readonly HashSet < string > _excludedUnmarshallingProperties ;
1049
1033
1050
1034
public string DeprecationMessage { get ; private set ; }
1051
1035
@@ -1065,7 +1049,6 @@ public ShapeModifier(JsonData data)
1065
1049
_shapeDocumentation = ParseShapeDocumentation ( data ) ;
1066
1050
_shapeModifierXmlNamespace = ParseXmlNamespace ( data ) ;
1067
1051
_predicateListUnmarshallers = ParsePredicateListUnmarshallers ( data ) ;
1068
- _excludedUnmarshallingProperties = ParseExcludedUnmarshallingProperties ( data ) ;
1069
1052
Validate ( data ) ;
1070
1053
}
1071
1054
@@ -1334,7 +1317,6 @@ private static Dictionary<string, JsonData> ParsePredicateListUnmarshallers(Json
1334
1317
?? new Dictionary < string , JsonData > ( ) ;
1335
1318
1336
1319
}
1337
-
1338
1320
/// <summary>
1339
1321
/// This customization tells the generator that the member's shape is a filter type that has predicates
1340
1322
/// and operators and that it should be unmarshalled with the PredicateListUnmarshaller type that each
@@ -1345,35 +1327,6 @@ private static Dictionary<string, JsonData> ParsePredicateListUnmarshallers(Json
1345
1327
public Dictionary < string , JsonData > PredicateListUnmarshallers { get { return _predicateListUnmarshallers ; } }
1346
1328
1347
1329
#endregion
1348
-
1349
- #region ExcludedUnmarshallingProperties
1350
-
1351
- private static HashSet < string > ParseExcludedUnmarshallingProperties ( JsonData data )
1352
- {
1353
- var excludedUnmarshallingProperties = data [ ShapeModifier . ExcludeFromUnmarshallingKey ] ? . Cast < object > ( )
1354
- . Select ( x => x . ToString ( ) ) ;
1355
-
1356
- return new HashSet < string > ( excludedUnmarshallingProperties ?? new string [ 0 ] ) ;
1357
- }
1358
-
1359
- /// <summary>
1360
- /// Properties that should be excluded from unmarshalling. Example usage:
1361
- ///
1362
- /// The members that should be excluded are in the array.
1363
- /// "S3Grantee":{
1364
- /// "modify": [
1365
- /// {
1366
- /// "ID": {"emitPropertyName": "CanonicalUser"}
1367
- /// }
1368
- /// ],
1369
- /// "excludeFromUnmarshalling":
1370
- /// [
1371
- /// "Type"
1372
- /// ]
1373
- /// },
1374
- /// </summary>
1375
- public HashSet < string > ExcludedUnmarshallingProperties { get { return _excludedUnmarshallingProperties ; } }
1376
- #endregion
1377
1330
}
1378
1331
1379
1332
/// <summary>
@@ -1440,17 +1393,14 @@ public class PropertyModifier
1440
1393
public const string EmitPropertyNameKey = "emitPropertyName" ;
1441
1394
public const string LocationNameKey = "locationName" ;
1442
1395
public const string AccessModifierKey = "accessModifier" ;
1443
- public const string InjectXmlUnmarshallCodeKey = "injectXmlUnmarshallCode" ;
1444
- public const string SkipContextTestExpressionUnmarshallingLogicKey = "skipContextTestExpressionUnmarshallingLogic" ;
1445
1396
1446
1397
private readonly string _modelPropertyName ; // for debug inspection assist
1447
1398
private readonly JsonData _modifierData ;
1448
- private readonly HashSet < string > _injectXmlUnmarshallCode ;
1399
+
1449
1400
internal PropertyModifier ( string modelPropertyName , JsonData modifierData )
1450
1401
{
1451
1402
this . _modelPropertyName = modelPropertyName ;
1452
1403
this . _modifierData = modifierData ;
1453
- _injectXmlUnmarshallCode = ParseInjectXmlUnmarshallCode ( ) ;
1454
1404
}
1455
1405
1456
1406
// The access modifier for the property. Defaults to public if not set in the customization.
@@ -1523,55 +1473,13 @@ public bool UseCustomMarshall
1523
1473
}
1524
1474
1525
1475
public string DeprecationMessage
1526
- {
1476
+ {
1527
1477
get
1528
- {
1529
- return _modifierData [ ShapeModifier . DeprecatedMessageKey ] . CastToString ( ) ;
1530
- }
1531
- }
1532
-
1533
- private HashSet < string > ParseInjectXmlUnmarshallCode ( )
1534
- {
1535
- var data = _modifierData [ InjectXmlUnmarshallCodeKey ] ? . Cast < object > ( )
1536
- . Select ( x => x . ToString ( ) ) ;
1537
-
1538
- return new HashSet < string > ( data ?? new string [ 0 ] ) ;
1539
- }
1540
-
1541
- /// <summary>
1542
- /// Use this customization for rest-xml services when you want to inject some code into the "Context.TestExpression" portion
1543
- /// of the member.
1544
- ///
1545
- /// A prime example of this is here https://github.com/aws/aws-sdk-net/blob/79cbc392fc3f1c74fcdf34efd77ad681da8af328/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ListObjectsV2ResponseUnmarshaller.cs#L85
1546
- /// How to use this customization (within the modify array of a property) :
1547
- /// Within the "Contents" member while this member is being unmarshalled the code in the "injectXmlUnmarshallCode" will be added line by line
1548
- /// right before the "continue" statement within each "context.TestExpression" call.
1549
- /// {
1550
- /// "Contents" : {
1551
- /// "emitPropertyName" : "S3Objects",
1552
- /// "injectXmlUnmarshallCode":[
1553
- /// "response.S3Objects[response.S3Objects.Count - 1].BucketName = response.Name;"
1554
- /// ]
1555
- /// }
1556
- /// },
1557
- /// </summary>
1558
- public HashSet < string > InjectXmlUnmarshallCode
1559
1478
{
1560
- get { return _injectXmlUnmarshallCode ; }
1479
+ return _modifierData [ ShapeModifier . DeprecatedMessageKey ] . CastToString ( ) ;
1561
1480
}
1562
-
1563
- /// <summary>
1564
- /// If this is set, all the logic inside of the "context.testExpression" code block for that member won't be generated. this is meant
1565
- /// to be used in conjunction with InjectXmlUnmarshallCode, but can be used separately as well. For example:
1566
- /// "Versions":{
1567
- /// "skipContextTestExpressionUnmarshallingLogic" : true,
1568
- /// "injectXmlUnmarshallCode" :[
1569
- /// "VersionsItemCustomUnmarshall(context, response);"
1570
- /// ]
1571
- /// }
1572
- /// </summary>
1573
- public bool SkipContextTestExpressionUnmarshallingLogic { get { return _modifierData [ SkipContextTestExpressionUnmarshallingLogicKey ] != null ; } }
1574
1481
}
1482
+ }
1575
1483
1576
1484
#endregion
1577
1485
// Injection modifier is an array of objects, each object being the
0 commit comments