Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions generator/ServiceClientGeneratorLib/ServiceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,14 +548,14 @@ public List<Operation> S3AllowListOperations
new Operation(this, "ListObjectsV2", DocumentRoot[OperationsKey]["ListObjectsV2"]),
// phase 3 (including those moved from phase 1)
new Operation(this, "CreateSession", DocumentRoot[OperationsKey]["CreateSession"]),
//new Operation(this, "GetBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["GetBucketAnalyticsConfiguration"]),
new Operation(this, "GetBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["GetBucketAnalyticsConfiguration"]),
//new Operation(this, "GetBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["GetBucketIntelligentTieringConfiguration"]),
//new Operation(this, "GetBucketInventoryConfiguration", DocumentRoot[OperationsKey]["GetBucketInventoryConfiguration"]),
//new Operation(this, "GetBucketLogging", DocumentRoot[OperationsKey]["GetBucketLogging"]),
new Operation(this, "GetBucketMetricsConfiguration", DocumentRoot[OperationsKey]["GetBucketMetricsConfiguration"]),
//new Operation(this, "GetBucketVersioning", DocumentRoot[OperationsKey]["GetBucketVersioning"]),
//new Operation(this, "GetBucketWebsite", DocumentRoot[OperationsKey]["GetBucketWebsite"]),
//new Operation(this, "ListBucketAnalyticsConfigurations", DocumentRoot[OperationsKey]["ListBucketAnalyticsConfigurations"]),
new Operation(this, "ListBucketAnalyticsConfigurations", DocumentRoot[OperationsKey]["ListBucketAnalyticsConfigurations"]),
//new Operation(this, "ListBucketIntelligentTieringConfigurations", DocumentRoot[OperationsKey]["ListBucketIntelligentTieringConfigurations"]),
//new Operation(this, "ListBucketInventoryConfigurations", DocumentRoot[OperationsKey]["ListBucketInventoryConfigurations"]),
new Operation(this, "ListBucketMetricsConfigurations", DocumentRoot[OperationsKey]["ListBucketMetricsConfigurations"]),
Expand All @@ -567,7 +567,7 @@ public List<Operation> S3AllowListOperations
//new Operation(this, "PutBucketInventoryConfiguration", DocumentRoot[OperationsKey]["PutBucketInventoryConfiguration"]),
new Operation(this, "PutBucketMetricsConfiguration", DocumentRoot[OperationsKey]["PutBucketMetricsConfiguration"]),
new Operation(this, "DeleteBucketMetricsConfiguration", DocumentRoot[OperationsKey]["DeleteBucketMetricsConfiguration"]),
//new Operation(this, "DeleteBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["DeleteBucketAnalyticsConfiguration"]),
new Operation(this, "DeleteBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["DeleteBucketAnalyticsConfiguration"]),
//new Operation(this, "DeleteBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["DeleteBucketIntelligentTieringConfiguration"]),
//new Operation(this, "DeleteBucketInventoryConfiguration", DocumentRoot[OperationsKey]["DeleteBucketInventoryConfiguration"]),

Expand Down
54 changes: 54 additions & 0 deletions generator/ServiceModels/s3/s3.customizations.json
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,28 @@
"injectXmlMarshallCode": ["AnalyticsFilterCustomMarshall(publicRequest, xmlWriter);"]
}
}
],
"predicateListUnmarshallers": [
{
"AnalyticsFilter" :{
"predicateListUnmarshallerName" : "AnalyticsPredicateListUnmarshaller",
"filterPredicateName": "AnalyticsFilterPredicate"
}
}
]
},
"GetBucketAnalyticsConfigurationRequest":{
"modify" :[
{
"Id" :{"emitPropertyName": "AnalyticsId"}
},
{
"ExpectedBucketOwner":{
"injectXmlIsSet":[
"return !String.IsNullOrEmpty(this._expectedBucketOwner);"
]
}
}
]
},
"AnalyticsS3BucketDestination" : {
Expand All @@ -951,6 +973,38 @@
"Prefix":{
"injectXmlIsSet": ["return !String.IsNullOrEmpty(this._prefix);"]
}
},
{
"Format" :{
"skipContextTestExpressionUnmarshallingLogic" : true,
"injectXmlUnmarshallCode": ["FormatCustomUnmarshall(context, unmarshalledObject);"]
}
}
]
},
"ListBucketAnalyticsConfigurationsRequest":{
"modify":[
{
"ContinuationToken":{
"injectXmlIsSet":["return !string.IsNullOrEmpty(this._continuationToken);"]
}
},
{
"ExpectedBucketOwner" :{
"injectXmlIsSet":["return !string.IsNullOrEmpty(this._expectedBucketOwner);"]
}
}
]
},
"DeleteBucketAnalyticsConfigurationRequest":{
"modify":[
{
"Id":{"emitPropertyName":"AnalyticsId"}
},
{
"ExpectedBucketOwner":{"injectXmlIsSet":[
"return !String.IsNullOrEmpty(this._expectedBucketOwner);"
]}
}
]
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,87 +12,30 @@
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
using System.Collections.Generic;

using Amazon.S3.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using Amazon.S3.Model;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;

namespace Amazon.S3.Model.Internal.MarshallTransformations
{
/// <summary>
/// AnalyticsS3BucketDestination Unmarshaller
/// Custom unmarshaller for AnalyticsS3BucketDestination Object
/// </summary>
public class AnalyticsS3BucketDestinationUnmarshaller : IXmlUnmarshaller<AnalyticsS3BucketDestination, XmlUnmarshallerContext>
public partial class AnalyticsS3BucketDestinationUnmarshaller : IXmlUnmarshaller<AnalyticsS3BucketDestination, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AnalyticsS3BucketDestination Unmarshall(XmlUnmarshallerContext context)
{
AnalyticsS3BucketDestination AnalyticsS3BucketDestination = new AnalyticsS3BucketDestination();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;

if (context.IsStartOfDocument)
targetDepth += 2;

while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Format", targetDepth))
{
AnalyticsS3BucketDestination.Format = AnalyticsS3ExportFileFormat.FindValue(StringUnmarshaller.Instance.Unmarshall(context));

continue;
}
if (context.TestExpression("BucketAccountId", targetDepth))
{
AnalyticsS3BucketDestination.BucketAccountId = StringUnmarshaller.Instance.Unmarshall(context);

continue;
}
if (context.TestExpression("Bucket", targetDepth))
{
AnalyticsS3BucketDestination.BucketName = StringUnmarshaller.Instance.Unmarshall(context);

continue;
}
if (context.TestExpression("Prefix", targetDepth))
{
AnalyticsS3BucketDestination.Prefix = StringUnmarshaller.Instance.Unmarshall(context);

continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return AnalyticsS3BucketDestination;
}
}



return AnalyticsS3BucketDestination;
}

private static AnalyticsS3BucketDestinationUnmarshaller _instance;

/// <summary>
/// Singleton for the unmarshaller
/// </summary>
public static AnalyticsS3BucketDestinationUnmarshaller Instance
void FormatCustomUnmarshall(XmlUnmarshallerContext context, AnalyticsS3BucketDestination unmarshalledObject)
{
get
{
if (_instance == null)
{
_instance = new AnalyticsS3BucketDestinationUnmarshaller();
}
return _instance;
}
unmarshalledObject.Format = AnalyticsS3ExportFileFormat.FindValue(StringUnmarshaller.Instance.Unmarshall(context));
}
}
}

This file was deleted.

Loading