diff --git a/droplets.go b/droplets.go index 19a099d..ddc9fc3 100644 --- a/droplets.go +++ b/droplets.go @@ -633,14 +633,14 @@ func (s *DropletsServiceOp) dropletActionStatus(ctx context.Context, uri string) // DropletBackupPolicy defines the information about a droplet's backup policy. type DropletBackupPolicy struct { - DropletID int `json:"droplet_id,omitempty"` - BackupEnabled bool `json:"backup_enabled,omitempty"` - BackupPolicy *BackupPolicy `json:"backup_policy,omitempty"` - NextBackupWindow *BackupWindow `json:"next_backup_window,omitempty"` + DropletID int `json:"droplet_id,omitempty"` + BackupEnabled bool `json:"backup_enabled,omitempty"` + BackupPolicy *DropletBackupPolicyConfig `json:"backup_policy,omitempty"` + NextBackupWindow *BackupWindow `json:"next_backup_window,omitempty"` } -// BackupPolicy defines the backup policy for a Droplet. -type BackupPolicy struct { +// DropletBackupPolicyConfig defines the backup policy for a Droplet. +type DropletBackupPolicyConfig struct { Plan string `json:"plan,omitempty"` Weekday string `json:"weekday,omitempty"` Hour int `json:"hour,omitempty"` diff --git a/droplets_test.go b/droplets_test.go index 9f821ae..4b68f5d 100644 --- a/droplets_test.go +++ b/droplets_test.go @@ -996,7 +996,7 @@ func TestDroplets_GetBackupPolicy(t *testing.T) { expected := &DropletBackupPolicy{ DropletID: 12345, BackupEnabled: true, - BackupPolicy: &BackupPolicy{ + BackupPolicy: &DropletBackupPolicyConfig{ Plan: "weekly", Weekday: "SUN", Hour: 0, @@ -1026,7 +1026,7 @@ func TestDroplets_ListBackupPolicies(t *testing.T) { testBackupPolicy := DropletBackupPolicy{ DropletID: 12345, BackupEnabled: true, - BackupPolicy: &BackupPolicy{ + BackupPolicy: &DropletBackupPolicyConfig{ Plan: "weekly", Weekday: "SUN", Hour: 0,