Skip to content

Commit 28419ce

Browse files
authored
Revert "Generate 7 more S3 operations (#3949)"
This reverts commit 377386d.
1 parent 377386d commit 28419ce

File tree

125 files changed

+4241
-6848
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+4241
-6848
lines changed

generator/.DevConfigs/79b46eff-9dd1-4281-88f0-22c700a96506.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

generator/ServiceClientGeneratorLib/Customizations.cs

Lines changed: 4 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -809,20 +809,6 @@ public PropertyModifier GetPropertyModifier(string shapeName, string propertyNam
809809
return null;
810810
}
811811

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-
826812
/// <summary>
827813
/// Determines if the property has a customization to be set to nullable
828814
/// </summary>
@@ -1034,7 +1020,6 @@ public class ShapeModifier
10341020
public const string ShapeModifierXmlNamespaceKey = "xmlNamespace";
10351021
public const string OriginalMemberIsOutsideContainingShapeKey = "originalMemberIsOutsideContainingShape";
10361022
public const string PredicateListUnmarshallersKey = "predicateListUnmarshallers";
1037-
public const string ExcludeFromUnmarshallingKey = "excludeFromUnmarshalling";
10381023

10391024
private readonly HashSet<string> _excludedProperties;
10401025
private readonly Dictionary<string, JsonData> _modifiedProperties;
@@ -1045,7 +1030,6 @@ public class ShapeModifier
10451030
private readonly HashSet<string> _shapeDocumentation;
10461031
private readonly string _shapeModifierXmlNamespace;
10471032
private readonly Dictionary<string, JsonData> _predicateListUnmarshallers;
1048-
private readonly HashSet<string> _excludedUnmarshallingProperties;
10491033

10501034
public string DeprecationMessage { get; private set; }
10511035

@@ -1065,7 +1049,6 @@ public ShapeModifier(JsonData data)
10651049
_shapeDocumentation = ParseShapeDocumentation(data);
10661050
_shapeModifierXmlNamespace = ParseXmlNamespace(data);
10671051
_predicateListUnmarshallers = ParsePredicateListUnmarshallers(data);
1068-
_excludedUnmarshallingProperties = ParseExcludedUnmarshallingProperties(data);
10691052
Validate(data);
10701053
}
10711054

@@ -1334,7 +1317,6 @@ private static Dictionary<string, JsonData> ParsePredicateListUnmarshallers(Json
13341317
?? new Dictionary<string, JsonData>();
13351318

13361319
}
1337-
13381320
/// <summary>
13391321
/// This customization tells the generator that the member's shape is a filter type that has predicates
13401322
/// 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
13451327
public Dictionary<string, JsonData> PredicateListUnmarshallers { get { return _predicateListUnmarshallers; } }
13461328

13471329
#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
13771330
}
13781331

13791332
/// <summary>
@@ -1440,17 +1393,14 @@ public class PropertyModifier
14401393
public const string EmitPropertyNameKey = "emitPropertyName";
14411394
public const string LocationNameKey = "locationName";
14421395
public const string AccessModifierKey = "accessModifier";
1443-
public const string InjectXmlUnmarshallCodeKey = "injectXmlUnmarshallCode";
1444-
public const string SkipContextTestExpressionUnmarshallingLogicKey = "skipContextTestExpressionUnmarshallingLogic";
14451396

14461397
private readonly string _modelPropertyName; // for debug inspection assist
14471398
private readonly JsonData _modifierData;
1448-
private readonly HashSet<string> _injectXmlUnmarshallCode;
1399+
14491400
internal PropertyModifier(string modelPropertyName, JsonData modifierData)
14501401
{
14511402
this._modelPropertyName = modelPropertyName;
14521403
this._modifierData = modifierData;
1453-
_injectXmlUnmarshallCode = ParseInjectXmlUnmarshallCode();
14541404
}
14551405

14561406
// The access modifier for the property. Defaults to public if not set in the customization.
@@ -1523,55 +1473,13 @@ public bool UseCustomMarshall
15231473
}
15241474

15251475
public string DeprecationMessage
1526-
{
1476+
{
15271477
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
15591478
{
1560-
get { return _injectXmlUnmarshallCode; }
1479+
return _modifierData[ShapeModifier.DeprecatedMessageKey].CastToString();
15611480
}
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; } }
15741481
}
1482+
}
15751483

15761484
#endregion
15771485
// Injection modifier is an array of objects, each object being the

0 commit comments

Comments
 (0)