-
Notifications
You must be signed in to change notification settings - Fork 40
/
model_dpmprotecteditemextendedinfo.go
75 lines (63 loc) · 3.19 KB
/
model_dpmprotecteditemextendedinfo.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package protecteditems
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 DPMProtectedItemExtendedInfo struct {
DiskStorageUsedInBytes *string `json:"diskStorageUsedInBytes,omitempty"`
IsCollocated *bool `json:"isCollocated,omitempty"`
IsPresentOnCloud *bool `json:"isPresentOnCloud,omitempty"`
LastBackupStatus *string `json:"lastBackupStatus,omitempty"`
LastRefreshedAt *string `json:"lastRefreshedAt,omitempty"`
OldestRecoveryPoint *string `json:"oldestRecoveryPoint,omitempty"`
OnPremiseLatestRecoveryPoint *string `json:"onPremiseLatestRecoveryPoint,omitempty"`
OnPremiseOldestRecoveryPoint *string `json:"onPremiseOldestRecoveryPoint,omitempty"`
OnPremiseRecoveryPointCount *int64 `json:"onPremiseRecoveryPointCount,omitempty"`
ProtectableObjectLoadPath *map[string]string `json:"protectableObjectLoadPath,omitempty"`
Protected *bool `json:"protected,omitempty"`
ProtectionGroupName *string `json:"protectionGroupName,omitempty"`
RecoveryPointCount *int64 `json:"recoveryPointCount,omitempty"`
TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"`
}
func (o *DPMProtectedItemExtendedInfo) GetLastRefreshedAtAsTime() (*time.Time, error) {
if o.LastRefreshedAt == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastRefreshedAt, "2006-01-02T15:04:05Z07:00")
}
func (o *DPMProtectedItemExtendedInfo) SetLastRefreshedAtAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastRefreshedAt = &formatted
}
func (o *DPMProtectedItemExtendedInfo) GetOldestRecoveryPointAsTime() (*time.Time, error) {
if o.OldestRecoveryPoint == nil {
return nil, nil
}
return dates.ParseAsFormat(o.OldestRecoveryPoint, "2006-01-02T15:04:05Z07:00")
}
func (o *DPMProtectedItemExtendedInfo) SetOldestRecoveryPointAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.OldestRecoveryPoint = &formatted
}
func (o *DPMProtectedItemExtendedInfo) GetOnPremiseLatestRecoveryPointAsTime() (*time.Time, error) {
if o.OnPremiseLatestRecoveryPoint == nil {
return nil, nil
}
return dates.ParseAsFormat(o.OnPremiseLatestRecoveryPoint, "2006-01-02T15:04:05Z07:00")
}
func (o *DPMProtectedItemExtendedInfo) SetOnPremiseLatestRecoveryPointAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.OnPremiseLatestRecoveryPoint = &formatted
}
func (o *DPMProtectedItemExtendedInfo) GetOnPremiseOldestRecoveryPointAsTime() (*time.Time, error) {
if o.OnPremiseOldestRecoveryPoint == nil {
return nil, nil
}
return dates.ParseAsFormat(o.OnPremiseOldestRecoveryPoint, "2006-01-02T15:04:05Z07:00")
}
func (o *DPMProtectedItemExtendedInfo) SetOnPremiseOldestRecoveryPointAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.OnPremiseOldestRecoveryPoint = &formatted
}