-
Notifications
You must be signed in to change notification settings - Fork 38
/
model_manageddatabaserestoredetailsproperties.go
59 lines (51 loc) · 3.83 KB
/
model_manageddatabaserestoredetailsproperties.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package manageddatabaserestoredetails
import (
"time"
"github.com/hashicorp/go-azure-helpers/lang/dates"
)
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
type ManagedDatabaseRestoreDetailsProperties struct {
BlockReason *string `json:"blockReason,omitempty"`
CurrentBackupType *string `json:"currentBackupType,omitempty"`
CurrentRestorePlanSizeMB *int64 `json:"currentRestorePlanSizeMB,omitempty"`
CurrentRestoredSizeMB *int64 `json:"currentRestoredSizeMB,omitempty"`
CurrentRestoringFileName *string `json:"currentRestoringFileName,omitempty"`
DiffBackupSets *[]ManagedDatabaseRestoreDetailsBackupSetProperties `json:"diffBackupSets,omitempty"`
FullBackupSets *[]ManagedDatabaseRestoreDetailsBackupSetProperties `json:"fullBackupSets,omitempty"`
LastRestoredFileName *string `json:"lastRestoredFileName,omitempty"`
LastRestoredFileTime *string `json:"lastRestoredFileTime,omitempty"`
LastUploadedFileName *string `json:"lastUploadedFileName,omitempty"`
LastUploadedFileTime *string `json:"lastUploadedFileTime,omitempty"`
LogBackupSets *[]ManagedDatabaseRestoreDetailsBackupSetProperties `json:"logBackupSets,omitempty"`
NumberOfFilesDetected *int64 `json:"numberOfFilesDetected,omitempty"`
NumberOfFilesQueued *int64 `json:"numberOfFilesQueued,omitempty"`
NumberOfFilesRestored *int64 `json:"numberOfFilesRestored,omitempty"`
NumberOfFilesRestoring *int64 `json:"numberOfFilesRestoring,omitempty"`
NumberOfFilesSkipped *int64 `json:"numberOfFilesSkipped,omitempty"`
NumberOfFilesUnrestorable *int64 `json:"numberOfFilesUnrestorable,omitempty"`
PercentCompleted *int64 `json:"percentCompleted,omitempty"`
Status *string `json:"status,omitempty"`
Type *string `json:"type,omitempty"`
UnrestorableFiles *[]ManagedDatabaseRestoreDetailsUnrestorableFileProperties `json:"unrestorableFiles,omitempty"`
}
func (o *ManagedDatabaseRestoreDetailsProperties) GetLastRestoredFileTimeAsTime() (*time.Time, error) {
if o.LastRestoredFileTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastRestoredFileTime, "2006-01-02T15:04:05Z07:00")
}
func (o *ManagedDatabaseRestoreDetailsProperties) SetLastRestoredFileTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastRestoredFileTime = &formatted
}
func (o *ManagedDatabaseRestoreDetailsProperties) GetLastUploadedFileTimeAsTime() (*time.Time, error) {
if o.LastUploadedFileTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastUploadedFileTime, "2006-01-02T15:04:05Z07:00")
}
func (o *ManagedDatabaseRestoreDetailsProperties) SetLastUploadedFileTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastUploadedFileTime = &formatted
}