Merge pull request #1199 from versity/sis/getobjectlegalhold-root-tag

fix: Changes the GetObjectLegalHold result root tag to LegalHold
This commit is contained in:
Ben McClelland
2025-04-08 10:20:20 -07:00
committed by GitHub
2 changed files with 8 additions and 3 deletions

View File

@@ -120,18 +120,18 @@ func ParseObjectLockRetentionOutput(input []byte) (*types.ObjectLockRetention, e
return &retention, nil
}
func ParseObjectLegalHoldOutput(status *bool) *types.ObjectLockLegalHold {
func ParseObjectLegalHoldOutput(status *bool) *s3response.GetObjectLegalHoldResult {
if status == nil {
return nil
}
if *status {
return &types.ObjectLockLegalHold{
return &s3response.GetObjectLegalHoldResult{
Status: types.ObjectLockLegalHoldStatusOn,
}
}
return &types.ObjectLockLegalHold{
return &s3response.GetObjectLegalHoldResult{
Status: types.ObjectLockLegalHoldStatusOff,
}
}

View File

@@ -571,6 +571,11 @@ type CopyObjectInput struct {
TaggingDirective types.TaggingDirective
}
type GetObjectLegalHoldResult struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LegalHold"`
Status types.ObjectLockLegalHoldStatus
}
type AmzDate struct {
time.Time
}