package spartaS3

// EventOwnerIdentity event data
type EventOwnerIdentity struct {
	PrincpalID string `json:"principalId"`
}

// Bucket event data
type Bucket struct {
	Name          string             `json:"name"`
	Arn           string             `json:"arn"`
	OwnerIdentity EventOwnerIdentity `json:"ownerIdentity"`
}

// Object event data
type Object struct {
	Key       string `json:"key"`
	Sequencer string `json:"sequencer"`
}

// Event event data
type S3 struct {
	SchemaVersion   string `json:"s3SchemaVersion"`
	ConfigurationID string `json:"configurationId"`
	Bucket          Bucket `json:"bucket"`
	Object          Object `json:"object"`
}

// EventRecord event data
type EventRecord struct {
	Region       string `json:"awsRegion"`
	EventName    string `json:"eventName"`
	EventTime    string `json:"eventTime"`
	EventSource  string `json:"eventSource"`
	EventVersion string `json:"eventVersion"`
	S3           S3     `json:"s3"`
}

// Event event data
type Event struct {
	Records []EventRecord
}

// Sparta package to support AWS S3
package s3

// EventOwnerIdentity event data
type EventOwnerIdentity struct {
	PrincpalID string `json:"principalId"`
}

// Bucket event data
type Bucket struct {
	Name          string             `json:"name"`
	Arn           string             `json:"arn"`
	OwnerIdentity EventOwnerIdentity `json:"ownerIdentity"`
}

// Object event data
type Object struct {
	Key       string `json:"key"`
	Sequencer string `json:"sequencer"`
}

// Event event data
type S3 struct {
	SchemaVersion   string `json:"s3SchemaVersion"`
	ConfigurationID string `json:"configurationId"`
	Bucket          Bucket `json:"bucket"`
	Object          Object `json:"object"`
}

// EventRecord event data
type EventRecord struct {
	Region       string `json:"awsRegion"`
	EventName    string `json:"eventName"`
	EventTime    string `json:"eventTime"`
	EventSource  string `json:"eventSource"`
	EventVersion string `json:"eventVersion"`
	S3           S3     `json:"s3"`
}

// Event event data
type Event struct {
	Records []EventRecord
}

Update to use s3 package namespace
Update to use s3 package namespace
