@@ -19,32 +19,44 @@ const (
1919
2020// A MySQLDatabase is an instance of Linode MySQL Managed Databases 
2121type  MySQLDatabase  struct  {
22- 	ID               int                        `json:"id"` 
23- 	Status           DatabaseStatus             `json:"status"` 
24- 	Label            string                     `json:"label"` 
25- 	Hosts            DatabaseHost               `json:"hosts"` 
26- 	Region           string                     `json:"region"` 
27- 	Type             string                     `json:"type"` 
28- 	Engine           string                     `json:"engine"` 
29- 	Version          string                     `json:"version"` 
30- 	ClusterSize      int                        `json:"cluster_size"` 
31- 	ReplicationType  string                     `json:"replication_type"` 
32- 	SSLConnection    bool                       `json:"ssl_connection"` 
33- 	Encrypted        bool                       `json:"encrypted"` 
34- 	AllowList        []string                   `json:"allow_list"` 
35- 	InstanceURI      string                     `json:"instance_uri"` 
36- 	Created          * time.Time                 `json:"-"` 
37- 	Updated          * time.Time                 `json:"-"` 
38- 	Updates          DatabaseMaintenanceWindow  `json:"updates"` 
22+ 	ID           int               `json:"id"` 
23+ 	Status       DatabaseStatus    `json:"status"` 
24+ 	Label        string            `json:"label"` 
25+ 	Hosts        DatabaseHost      `json:"hosts"` 
26+ 	Region       string            `json:"region"` 
27+ 	Type         string            `json:"type"` 
28+ 	Engine       string            `json:"engine"` 
29+ 	Version      string            `json:"version"` 
30+ 	ClusterSize  int               `json:"cluster_size"` 
31+ 	Platform     DatabasePlatform  `json:"platform"` 
32+ 
33+ 	// Members has dynamic keys so it is a map 
34+ 	Members  map [string ]DatabaseMemberType  `json:"members"` 
35+ 
36+ 	// Deprecated: ReplicationType is a deprecated property. 
37+ 	ReplicationType  string  `json:"replication_type,omitempty"` 
38+ 	// Deprecated: SSLConnection is a deprecated property. 
39+ 	SSLConnection  bool  `json:"ssl_connection,omitempty"` 
40+ 	// Deprecated: Encrypted is a deprecated property. 
41+ 	Encrypted  bool  `json:"encrypted,omitempty"` 
42+ 
43+ 	AllowList          []string                   `json:"allow_list"` 
44+ 	InstanceURI        string                     `json:"instance_uri"` 
45+ 	Created            * time.Time                 `json:"-"` 
46+ 	Updated            * time.Time                 `json:"-"` 
47+ 	Updates            DatabaseMaintenanceWindow  `json:"updates"` 
48+ 	Fork               * DatabaseFork              `json:"fork"` 
49+ 	OldestRestoreTime  * time.Time                 `json:"-"` 
3950}
4051
4152func  (d  * MySQLDatabase ) UnmarshalJSON (b  []byte ) error  {
4253	type  Mask  MySQLDatabase 
4354
4455	p  :=  struct  {
4556		* Mask 
46- 		Created  * parseabletime.ParseableTime  `json:"created"` 
47- 		Updated  * parseabletime.ParseableTime  `json:"updated"` 
57+ 		Created            * parseabletime.ParseableTime  `json:"created"` 
58+ 		Updated            * parseabletime.ParseableTime  `json:"updated"` 
59+ 		OldestRestoreTime  * parseabletime.ParseableTime  `json:"oldest_restore_time"` 
4860	}{
4961		Mask : (* Mask )(d ),
5062	}
@@ -55,30 +67,41 @@ func (d *MySQLDatabase) UnmarshalJSON(b []byte) error {
5567
5668	d .Created  =  (* time .Time )(p .Created )
5769	d .Updated  =  (* time .Time )(p .Updated )
70+ 	d .OldestRestoreTime  =  (* time .Time )(p .OldestRestoreTime )
5871	return  nil 
5972}
6073
6174// MySQLCreateOptions fields are used when creating a new MySQL Database 
6275type  MySQLCreateOptions  struct  {
63- 	Label            string    `json:"label"` 
64- 	Region           string    `json:"region"` 
65- 	Type             string    `json:"type"` 
66- 	Engine           string    `json:"engine"` 
67- 	AllowList        []string  `json:"allow_list,omitempty"` 
68- 	ReplicationType  string    `json:"replication_type,omitempty"` 
69- 	ClusterSize      int       `json:"cluster_size,omitempty"` 
70- 	Encrypted        bool      `json:"encrypted,omitempty"` 
71- 	SSLConnection    bool      `json:"ssl_connection,omitempty"` 
76+ 	Label        string    `json:"label"` 
77+ 	Region       string    `json:"region"` 
78+ 	Type         string    `json:"type"` 
79+ 	Engine       string    `json:"engine"` 
80+ 	AllowList    []string  `json:"allow_list,omitempty"` 
81+ 	ClusterSize  int       `json:"cluster_size,omitempty"` 
82+ 
83+ 	// Deprecated: ReplicationType is a deprecated property. 
84+ 	ReplicationType  string  `json:"replication_type,omitempty"` 
85+ 	// Deprecated: Encrypted is a deprecated property. 
86+ 	Encrypted  bool  `json:"encrypted,omitempty"` 
87+ 	// Deprecated: SSLConnection is a deprecated property. 
88+ 	SSLConnection  bool  `json:"ssl_connection,omitempty"` 
89+ 
90+ 	Fork  * DatabaseFork  `json:"fork,omitempty"` 
7291}
7392
7493// MySQLUpdateOptions fields are used when altering the existing MySQL Database 
7594type  MySQLUpdateOptions  struct  {
76- 	Label      string                      `json:"label,omitempty"` 
77- 	AllowList  * []string                   `json:"allow_list,omitempty"` 
78- 	Updates    * DatabaseMaintenanceWindow  `json:"updates,omitempty"` 
95+ 	Label        string                      `json:"label,omitempty"` 
96+ 	AllowList    * []string                   `json:"allow_list,omitempty"` 
97+ 	Updates      * DatabaseMaintenanceWindow  `json:"updates,omitempty"` 
98+ 	Type         string                      `json:"type,omitempty"` 
99+ 	ClusterSize  int                         `json:"cluster_size,omitempty"` 
100+ 	Version      string                      `json:"version,omitempty"` 
79101}
80102
81103// MySQLDatabaseBackup is information for interacting with a backup for the existing MySQL Database 
104+ // Deprecated: MySQLDatabaseBackup is a deprecated struct. 
82105type  MySQLDatabaseBackup  struct  {
83106	ID       int         `json:"id"` 
84107	Label    string      `json:"label"` 
@@ -87,6 +110,7 @@ type MySQLDatabaseBackup struct {
87110}
88111
89112// MySQLBackupCreateOptions are options used for CreateMySQLDatabaseBackup(...) 
113+ // Deprecated: MySQLBackupCreateOptions is a deprecated struct. 
90114type  MySQLBackupCreateOptions  struct  {
91115	Label   string               `json:"label"` 
92116	Target  MySQLDatabaseTarget  `json:"target"` 
@@ -132,6 +156,7 @@ func (c *Client) ListMySQLDatabases(ctx context.Context, opts *ListOptions) ([]M
132156}
133157
134158// ListMySQLDatabaseBackups lists all MySQL Database Backups associated with the given MySQL Database 
159+ // Deprecated: ListMySQLDatabaseBackups is a deprecated method. 
135160func  (c  * Client ) ListMySQLDatabaseBackups (ctx  context.Context , databaseID  int , opts  * ListOptions ) ([]MySQLDatabaseBackup , error ) {
136161	response , err  :=  getPaginatedResults [MySQLDatabaseBackup ](ctx , c , formatAPIPath ("databases/mysql/instances/%d/backups" , databaseID ), opts )
137162	if  err  !=  nil  {
@@ -211,6 +236,7 @@ func (c *Client) ResetMySQLDatabaseCredentials(ctx context.Context, databaseID i
211236}
212237
213238// GetMySQLDatabaseBackup returns a specific MySQL Database Backup with the given ids 
239+ // Deprecated: GetMySQLDatabaseBackup is a deprecated method. 
214240func  (c  * Client ) GetMySQLDatabaseBackup (ctx  context.Context , databaseID  int , backupID  int ) (* MySQLDatabaseBackup , error ) {
215241	e  :=  formatAPIPath ("databases/mysql/instances/%d/backups/%d" , databaseID , backupID )
216242	response , err  :=  doGETRequest [MySQLDatabaseBackup ](ctx , c , e )
@@ -222,13 +248,15 @@ func (c *Client) GetMySQLDatabaseBackup(ctx context.Context, databaseID int, bac
222248}
223249
224250// RestoreMySQLDatabaseBackup returns the given MySQL Database with the given Backup 
251+ // Deprecated: RestoreMySQLDatabaseBackup is a deprecated method. 
225252func  (c  * Client ) RestoreMySQLDatabaseBackup (ctx  context.Context , databaseID  int , backupID  int ) error  {
226253	e  :=  formatAPIPath ("databases/mysql/instances/%d/backups/%d/restore" , databaseID , backupID )
227254	_ , err  :=  doPOSTRequest [MySQLDatabaseBackup , any ](ctx , c , e )
228255	return  err 
229256}
230257
231258// CreateMySQLDatabaseBackup creates a snapshot for the given MySQL database 
259+ // Deprecated: CreateMySQLDatabaseBackup is a deprecated method. 
232260func  (c  * Client ) CreateMySQLDatabaseBackup (ctx  context.Context , databaseID  int , opts  MySQLBackupCreateOptions ) error  {
233261	e  :=  formatAPIPath ("databases/mysql/instances/%d/backups" , databaseID )
234262	_ , err  :=  doPOSTRequest [MySQLDatabaseBackup ](ctx , c , e , opts )
0 commit comments