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
11 changes: 11 additions & 0 deletions generator/.DevConfigs/49382e82-9599-49a4-87af-dc7c02e0d1eb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"services": [
{
"serviceName": "S3",
"type": "patch",
"changeLogMessages": [
"Generate PutBucketLogging and GetBucketLogging."
]
}
]
}
5 changes: 4 additions & 1 deletion generator/ServiceClientGeneratorLib/ServiceModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,10 @@ public List<Operation> S3AllowListOperations
new Operation(this, "CompleteMultipartUpload", DocumentRoot[OperationsKey]["CompleteMultipartUpload"]),
new Operation(this, "DeleteObject", DocumentRoot[OperationsKey]["DeleteObject"]),
new Operation(this, "DeleteObjects", DocumentRoot[OperationsKey]["DeleteObjects"]),
new Operation(this, "DeleteObjectTagging", DocumentRoot[OperationsKey]["DeleteObjectTagging"])
new Operation(this, "DeleteObjectTagging", DocumentRoot[OperationsKey]["DeleteObjectTagging"]),
new Operation(this, "GetBucketLogging", DocumentRoot[OperationsKey]["GetBucketLogging"]),
new Operation(this, "PutBucketLogging", DocumentRoot[OperationsKey]["PutBucketLogging"])

};
}
return _s3AllowListOperations.Where(operation => operation.data != null).ToList();
Expand Down
61 changes: 60 additions & 1 deletion generator/ServiceModels/s3/s3.customizations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,55 @@
"VersionId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._versionId);"]}
}
]
},
"GetBucketLoggingRequest":{
"modify":[
{
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
}
]
},
"GetBucketLoggingOutput":{
"modify":[
{
"LoggingEnabled":{"emitPropertyName":"BucketLoggingConfig"}
},
{
"BucketLoggingConfig":{"injectXmlPropertyGetter":["get {return BucketLoggingConfigCustomGetter();}"]}
}
]
},
"S3BucketLoggingConfig":{
"modify":[
{
"TargetBucket":{"emitPropertyName":"TargetBucketName"}
},
{
"TargetGrants":{"emitPropertyName":"Grants"}
},
{
"TargetPrefix":{"injectXmlMarshallCode":["TargetPrefixCustomMarshall(publicRequest, xmlWriter);"]}
}
]
},
"PutBucketLoggingRequest":{
"modify":[
{
"LoggingEnabled":{"emitPropertyName": "LoggingConfig", "injectXmlIsSet":[
"return this._loggingConfig != null && this._loggingConfig.IsSetTargetBucketName();"
]}
},
{
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
}
]
},
"BucketLoggingStatus":{
"modify":[
{
"LoggingEnabled":{"emitPropertyName":"LoggingConfig"}
}
]
}
},
"operationModifiers": {
Expand Down Expand Up @@ -1946,6 +1995,12 @@
},
"Error":{
"renameShape": "DeleteError"
},
"LoggingEnabled":{
"renameShape":"S3BucketLoggingConfig"
},
"TargetGrant":{
"renameShape":"S3Grant"
}
},
"overrideTreatEnumsAsString":{
Expand Down Expand Up @@ -2325,6 +2380,9 @@
],
"DeleteObjectsRequest":[
"Delete"
],
"PutBucketLoggingRequest":[
"BucketLoggingStatus"
]
},
"excludeShapes":[
Expand All @@ -2339,6 +2397,7 @@
"IntelligentTieringAndOperator",
"InventoryFilter",
"GlacierJobTier",
"CompletedMultipartUpload"
"CompletedMultipartUpload",
"BucketLoggingStatus"
]
}
19 changes: 5 additions & 14 deletions sdk/src/Services/S3/Custom/Model/GetBucketLoggingResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,15 @@ namespace Amazon.S3.Model
/// <summary>
/// Returns information about the GetBucketLogging response and response metadata.
/// </summary>
public class GetBucketLoggingResponse : AmazonWebServiceResponse
public partial class GetBucketLoggingResponse : AmazonWebServiceResponse
{
private S3BucketLoggingConfig bucketLoggingConfig;

/// <summary>
/// Gets and sets the LoggingConfig property.
/// </summary>
public S3BucketLoggingConfig BucketLoggingConfig
S3BucketLoggingConfig BucketLoggingConfigCustomGetter()
{
get
if (this._bucketLoggingConfig == null)
{
if (this.bucketLoggingConfig == null)
{
this.bucketLoggingConfig = new S3BucketLoggingConfig();
}
return this.bucketLoggingConfig;
this._bucketLoggingConfig = new S3BucketLoggingConfig();
}
set { this.bucketLoggingConfig = value; }
return this._bucketLoggingConfig;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,49 +24,12 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations
/// <summary>
/// Get Bucket Logging Request Marshaller
/// </summary>
public class GetBucketLoggingRequestMarshaller : IMarshaller<IRequest, GetBucketLoggingRequest> ,IMarshaller<IRequest,Amazon.Runtime.AmazonWebServiceRequest>
public partial class GetBucketLoggingRequestMarshaller : IMarshaller<IRequest, GetBucketLoggingRequest> ,IMarshaller<IRequest,Amazon.Runtime.AmazonWebServiceRequest>
{
public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input)
{
return this.Marshall((GetBucketLoggingRequest)input);
}

public IRequest Marshall(GetBucketLoggingRequest getBucketLoggingRequest)
partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketLoggingRequest publicRequest)
{
IRequest request = new DefaultRequest(getBucketLoggingRequest, "Amazon.S3");

request.Suppress404Exceptions = true;
request.HttpMethod = "GET";

if (getBucketLoggingRequest.IsSetExpectedBucketOwner())
request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(getBucketLoggingRequest.ExpectedBucketOwner));

if (string.IsNullOrEmpty(getBucketLoggingRequest.BucketName))
throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetBucketLoggingRequest.BucketName");

request.ResourcePath = "/";
request.AddSubResource("logging");
request.UseQueryString = true;

return request;
defaultRequest.Suppress404Exceptions = true;
}

private static GetBucketLoggingRequestMarshaller _instance;

/// <summary>
/// Singleton for marshaller
/// </summary>
public static GetBucketLoggingRequestMarshaller Instance
{
get
{
if (_instance == null)
{
_instance = new GetBucketLoggingRequestMarshaller();
}
return _instance;
}
}
}
}

This file was deleted.

Loading