-
Notifications
You must be signed in to change notification settings - Fork 2
/
database_snapshots.go
36 lines (31 loc) · 1.07 KB
/
database_snapshots.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package brightbox
import (
"time"
"github.com/brightbox/gobrightbox/v2/enums/databasesnapshotstatus"
)
//go:generate ./generate_enum databasesnapshotstatus creating available deleting deleted failed
// DatabaseSnapshot represents a snapshot of a database server.
// https://api.gb1.brightbox.com/1.0/#databaseSnapshot
type DatabaseSnapshot struct {
ResourceRef
ID string
Name string
Description string
Status databasesnapshotstatus.Enum
DatabaseEngine string `json:"database_engine"`
DatabaseVersion string `json:"database_version"`
Source string
SourceTrigger string `json:"source_trigger"`
Size uint
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at"`
Locked bool
Account Account
}
// DatabaseSnapshotOptions is used to update snapshots
type DatabaseSnapshotOptions struct {
ID string `json:"-"`
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
}