2022-02-28 08:29:03 +00:00
|
|
|
package data
|
|
|
|
|
2022-02-28 13:39:04 +00:00
|
|
|
import (
|
|
|
|
"encoding/xml"
|
|
|
|
"time"
|
|
|
|
)
|
2022-02-28 10:22:07 +00:00
|
|
|
|
2022-02-28 08:29:03 +00:00
|
|
|
type (
|
|
|
|
ObjectLockConfiguration struct {
|
2022-02-28 13:39:04 +00:00
|
|
|
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ObjectLockConfiguration" json:"-"`
|
2022-02-28 08:29:03 +00:00
|
|
|
ObjectLockEnabled string `xml:"ObjectLockEnabled" json:"ObjectLockEnabled"`
|
|
|
|
Rule *ObjectLockRule `xml:"Rule" json:"Rule"`
|
|
|
|
}
|
|
|
|
|
|
|
|
ObjectLockRule struct {
|
|
|
|
DefaultRetention *DefaultRetention `xml:"DefaultRetention" json:"DefaultRetention"`
|
|
|
|
}
|
|
|
|
|
|
|
|
DefaultRetention struct {
|
|
|
|
Days int64 `xml:"Days" json:"Days"`
|
|
|
|
Mode string `xml:"Mode" json:"Mode"`
|
|
|
|
Years int64 `xml:"Years" json:"Years"`
|
|
|
|
}
|
2022-02-28 10:22:07 +00:00
|
|
|
|
2022-02-28 13:39:04 +00:00
|
|
|
LegalHold struct {
|
|
|
|
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LegalHold" json:"-"`
|
|
|
|
Status string `xml:"Status" json:"Status"`
|
|
|
|
}
|
|
|
|
|
|
|
|
Retention struct {
|
|
|
|
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Retention" json:"-"`
|
|
|
|
Mode string `xml:"Mode" json:"Mode"`
|
|
|
|
RetainUntilDate string `xml:"RetainUntilDate" json:"RetainUntilDate"`
|
|
|
|
}
|
|
|
|
|
2022-02-28 10:22:07 +00:00
|
|
|
ObjectLock struct {
|
2022-05-26 13:11:14 +00:00
|
|
|
LegalHold *LegalHoldLock
|
|
|
|
Retention *RetentionLock
|
|
|
|
}
|
|
|
|
|
|
|
|
LegalHoldLock struct {
|
|
|
|
Enabled bool
|
|
|
|
}
|
|
|
|
|
|
|
|
RetentionLock struct {
|
|
|
|
Until time.Time
|
|
|
|
IsCompliance bool
|
|
|
|
ByPassedGovernance bool
|
2022-02-28 10:22:07 +00:00
|
|
|
}
|
2022-02-28 08:29:03 +00:00
|
|
|
)
|