Skip to content

Commit 19820f0

Browse files
committed
Generate GetBucketLogging
1 parent d85346a commit 19820f0

19 files changed

+958
-261
lines changed

generator/ServiceClientGeneratorLib/ServiceModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,12 @@ public List<Operation> S3AllowListOperations
578578
new Operation(this, "DeleteBucketMetadataConfiguration", DocumentRoot[OperationsKey]["DeleteBucketMetadataConfiguration"]),
579579
new Operation(this, "ListObjects", DocumentRoot[OperationsKey]["ListObjects"]),
580580
new Operation(this,"UpdateBucketMetadataJournalTableConfiguration", DocumentRoot[OperationsKey]["UpdateBucketMetadataJournalTableConfiguration"]),
581-
new Operation(this, "ListMultipartUploads", DocumentRoot[OperationsKey]["ListMultipartUploads"])
581+
new Operation(this, "ListMultipartUploads", DocumentRoot[OperationsKey]["ListMultipartUploads"]),
582+
new Operation(this, "CompleteMultipartUpload", DocumentRoot[OperationsKey]["CompleteMultipartUpload"]),
583+
new Operation(this, "DeleteObject", DocumentRoot[OperationsKey]["DeleteObject"]),
584+
new Operation(this, "DeleteObjects", DocumentRoot[OperationsKey]["DeleteObjects"]),
585+
new Operation(this, "DeleteObjectTagging", DocumentRoot[OperationsKey]["DeleteObjectTagging"]),
586+
new Operation(this, "GetBucketLogging", DocumentRoot[OperationsKey]["GetBucketLogging"])
582587
};
583588
}
584589
return _s3AllowListOperations.Where(operation => operation.data != null).ToList();

generator/ServiceModels/s3/s3.customizations.json

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,208 @@
12891289
"Uploads":{"emitPropertyName":"MultipartUploads"}
12901290

12911291

1292+
}
1293+
]
1294+
},
1295+
"RestoreObjectRequest":{
1296+
"modify":[
1297+
{
1298+
"Tier": {"emitPropertyName":"RetrievalTier"}
1299+
},
1300+
{
1301+
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
1302+
},
1303+
{
1304+
"GlacierJobParameters":{
1305+
"emitPropertyName":"Tier"
1306+
}
1307+
},
1308+
{
1309+
"Type":{"emitPropertyName":"RestoreRequestType"}
1310+
}
1311+
]
1312+
},
1313+
"RestoreRequest":{
1314+
"modify":[
1315+
{
1316+
"GlacierJobParameters":{
1317+
"injectXmlMarshallCode":["TierCustomMarshall(xmlWriter, publicRequest);"]
1318+
}
1319+
},
1320+
{
1321+
"Type":{"emitPropertyName":"RestoreRequestType"}
1322+
},
1323+
{
1324+
"Tier": {"emitPropertyName":"RetrievalTier"}
1325+
}
1326+
]
1327+
},
1328+
"InputSerialization":{
1329+
"modify":[
1330+
{
1331+
"CompressionType":{
1332+
"injectXmlPrivateMemberAssignment" :["private CompressionType _compressionType = CompressionType.None;"]
1333+
}
1334+
}
1335+
1336+
]
1337+
},
1338+
"S3Location":{
1339+
"modify":[
1340+
{
1341+
"AccessControlList":{
1342+
"injectXmlPrivateMemberAssignment":["private S3AccessControlList _accessControlList;"],
1343+
"injectXmlIsSet":["return this._accessControlList != null;"],
1344+
"injectXmlMarshallCode":["AccessControlListCustomMarshall(xmlWriter, publicRequest);"]
1345+
}
1346+
},
1347+
{
1348+
"UserMetadata":{
1349+
"injectXmlPrivateMemberAssignment":["private MetadataCollection _userMetadata;"],
1350+
"injectXmlIsSet":["return this._userMetadata != null;"],
1351+
"injectXmlMarshallCode":["UserMetadataCustomMarshall(xmlWriter, publicRequest);"]
1352+
}
1353+
}
1354+
]
1355+
},
1356+
"JSONInput":{
1357+
"modify":[
1358+
{
1359+
"Type":{"emitPropertyName":"JsonType"}
1360+
}
1361+
]
1362+
},
1363+
"CompleteMultipartUploadOutput":{
1364+
"modify":[
1365+
{
1366+
"ServerSideEncryption":{"emitPropertyName":"ServerSideEncryptionMethod"}
1367+
},
1368+
{
1369+
"SSEKMSKeyId":{"emitPropertyName":"ServerSideEncryptionKeyManagementServiceKeyId"}
1370+
},
1371+
{
1372+
"Expiration":{"injectXmlUnmarshallCode":["ExpirationCustomUnmarshall(context, response);"]}
1373+
}
1374+
]
1375+
},
1376+
"CompletedMultipartUpload":{
1377+
"modify":[
1378+
{
1379+
"Parts": {"emitPropertyName":"PartETags"}
1380+
}
1381+
]
1382+
},
1383+
"DeleteObjectRequest":{
1384+
"modify":[
1385+
{
1386+
"ExpectedBucketOwner":{"injectXmlIsSet": ["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
1387+
},
1388+
{
1389+
"IfMatch" : {"injectXmlIsSet":["return !string.IsNullOrEmpty(this._ifMatch);"]}
1390+
},
1391+
{
1392+
"MFA": {"emitPropertyName": "MfaCodes"}
1393+
},
1394+
{
1395+
"MfaCodes":{
1396+
"injectXmlIsSet": ["return CustomMfaCodesIsSet();"],
1397+
"injectXmlMarshallCode" : ["MfaCodesCustomMarshall(request, publicRequest);"]
1398+
}
1399+
}
1400+
]
1401+
},
1402+
"DeleteObjectOutput":{
1403+
"modify":[
1404+
{
1405+
"DeleteMarker":{"injectXmlUnmarshallCode": ["DeleteMarkerCustomUnmarshall(context, response);"]}
1406+
}
1407+
]
1408+
},
1409+
"DeleteObjectsRequest":{
1410+
"modify":[
1411+
{
1412+
"MFA":{"emitPropertyName" :"MfaCodes"}
1413+
},
1414+
{
1415+
"MfaCodes":{
1416+
"injectXmlIsSet": ["return CustomMfaCodesIsSet();"],
1417+
"injectXmlMarshallCode" : ["MfaCodesCustomMarshall(request, publicRequest);"]
1418+
}
1419+
},
1420+
{
1421+
"ExpectedBucketOwner":{
1422+
"injectXmlIsSet": ["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]
1423+
}
1424+
}
1425+
]
1426+
},
1427+
"DeleteObjectsOutput":{
1428+
"modify":[
1429+
{
1430+
"Deleted":{"emitPropertyName":"DeletedObjects"}
1431+
},
1432+
{
1433+
"Errors":{"emitPropertyName":"DeleteErrors"}
1434+
}
1435+
]
1436+
},
1437+
"Delete":{
1438+
"modify":[
1439+
{
1440+
"Objects":{
1441+
"skipXmlIsSet": true
1442+
}
1443+
}
1444+
]
1445+
},
1446+
"KeyVersion" : {
1447+
"modify":[
1448+
{
1449+
"ETag":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._eTag);"]}
1450+
}
1451+
]
1452+
},
1453+
"DeleteObjectTaggingRequest":{
1454+
"modify":[
1455+
{
1456+
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
1457+
},
1458+
{
1459+
"VersionId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._versionId);"]}
1460+
}
1461+
]
1462+
},
1463+
"DeleteObjectTaggingOutput":{
1464+
"modify":[
1465+
{
1466+
"VersionId":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._versionId);"]}
1467+
}
1468+
]
1469+
},
1470+
"GetBucketLoggingRequest":{
1471+
"modify":[
1472+
{
1473+
"ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]}
1474+
}
1475+
]
1476+
},
1477+
"GetBucketLoggingOutput":{
1478+
"modify":[
1479+
{
1480+
"LoggingEnabled": {"emitPropertyName":"BucketLoggingConfig"}
1481+
},
1482+
{
1483+
"BucketLoggingConfig":{"injectXmlPropertyGetter" : ["get {return BucketLoggingConfigCustomGetter();}"]}
1484+
}
1485+
]
1486+
},
1487+
"S3BucketLoggingConfig":{
1488+
"modify":[
1489+
{
1490+
"TargetBucket":{"emitPropertyName":"TargetBucketName"}
1491+
},
1492+
{
1493+
"TargetGrants":{"emitPropertyName":"Grants"}
12921494
}
12931495
]
12941496
}
@@ -1434,6 +1636,36 @@
14341636
},
14351637
"Type" :{
14361638
"renameShape":"GranteeType"
1639+
},
1640+
"Tier":{
1641+
"renameShape":"GlacierJobTier"
1642+
},
1643+
"Encryption":{
1644+
"renameShape":"S3Encryption"
1645+
},
1646+
"GlacierJobParameters":{
1647+
"renameShape":"GlacierJobTier"
1648+
},
1649+
"JSONType":{
1650+
"renameShape":"JsonType"
1651+
},
1652+
"CompletedPart":{
1653+
"renameShape":"PartETag"
1654+
},
1655+
"MFA":{
1656+
"renameShape": "MfaCodes"
1657+
},
1658+
"ObjectIdentifier":{
1659+
"renameShape": "KeyVersion"
1660+
},
1661+
"Error":{
1662+
"renameShape": "DeleteError"
1663+
},
1664+
"LoggingEnabled":{
1665+
"renameShape":"S3BucketLoggingConfig"
1666+
},
1667+
"TargetGrant":{
1668+
"renameShape": "S3Grant"
14371669
}
14381670
},
14391671
"overrideTreatEnumsAsString":{

sdk/src/Services/S3/Custom/Model/GetBucketLoggingResponse.cs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,15 @@ namespace Amazon.S3.Model
2424
/// <summary>
2525
/// Returns information about the GetBucketLogging response and response metadata.
2626
/// </summary>
27-
public class GetBucketLoggingResponse : AmazonWebServiceResponse
27+
public partial class GetBucketLoggingResponse : AmazonWebServiceResponse
2828
{
29-
private S3BucketLoggingConfig bucketLoggingConfig;
30-
31-
/// <summary>
32-
/// Gets and sets the LoggingConfig property.
33-
/// </summary>
34-
public S3BucketLoggingConfig BucketLoggingConfig
29+
S3BucketLoggingConfig BucketLoggingConfigCustomGetter()
3530
{
36-
get
31+
if (this._bucketLoggingConfig == null)
3732
{
38-
if (this.bucketLoggingConfig == null)
39-
{
40-
this.bucketLoggingConfig = new S3BucketLoggingConfig();
41-
}
42-
return this.bucketLoggingConfig;
33+
this._bucketLoggingConfig = new S3BucketLoggingConfig();
4334
}
44-
set { this.bucketLoggingConfig = value; }
35+
return this._bucketLoggingConfig;
4536
}
4637
}
4738
}

sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,49 +24,12 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations
2424
/// <summary>
2525
/// Get Bucket Logging Request Marshaller
2626
/// </summary>
27-
public class GetBucketLoggingRequestMarshaller : IMarshaller<IRequest, GetBucketLoggingRequest> ,IMarshaller<IRequest,Amazon.Runtime.AmazonWebServiceRequest>
27+
public partial class GetBucketLoggingRequestMarshaller : IMarshaller<IRequest, GetBucketLoggingRequest> ,IMarshaller<IRequest,Amazon.Runtime.AmazonWebServiceRequest>
2828
{
29-
public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input)
30-
{
31-
return this.Marshall((GetBucketLoggingRequest)input);
32-
}
33-
34-
public IRequest Marshall(GetBucketLoggingRequest getBucketLoggingRequest)
29+
partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketLoggingRequest publicRequest)
3530
{
36-
IRequest request = new DefaultRequest(getBucketLoggingRequest, "Amazon.S3");
37-
38-
request.Suppress404Exceptions = true;
39-
request.HttpMethod = "GET";
40-
41-
if (getBucketLoggingRequest.IsSetExpectedBucketOwner())
42-
request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(getBucketLoggingRequest.ExpectedBucketOwner));
43-
44-
if (string.IsNullOrEmpty(getBucketLoggingRequest.BucketName))
45-
throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetBucketLoggingRequest.BucketName");
46-
47-
request.ResourcePath = "/";
48-
request.AddSubResource("logging");
49-
request.UseQueryString = true;
50-
51-
return request;
31+
defaultRequest.Suppress404Exceptions = true;
5232
}
53-
54-
private static GetBucketLoggingRequestMarshaller _instance;
55-
56-
/// <summary>
57-
/// Singleton for marshaller
58-
/// </summary>
59-
public static GetBucketLoggingRequestMarshaller Instance
60-
{
61-
get
62-
{
63-
if (_instance == null)
64-
{
65-
_instance = new GetBucketLoggingRequestMarshaller();
66-
}
67-
return _instance;
68-
}
69-
}
7033
}
7134
}
7235

0 commit comments

Comments
 (0)