-
Notifications
You must be signed in to change notification settings - Fork 38
/
model_serverendpointcloudtieringstatus.go
60 lines (50 loc) · 2.73 KB
/
model_serverendpointcloudtieringstatus.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
package serverendpointresource
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 ServerEndpointCloudTieringStatus struct {
CachePerformance *CloudTieringCachePerformance `json:"cachePerformance,omitempty"`
DatePolicyStatus *CloudTieringDatePolicyStatus `json:"datePolicyStatus,omitempty"`
FilesNotTiering *CloudTieringFilesNotTiering `json:"filesNotTiering,omitempty"`
Health *ServerEndpointHealthState `json:"health,omitempty"`
HealthLastUpdatedTimestamp *string `json:"healthLastUpdatedTimestamp,omitempty"`
LastCloudTieringResult *int64 `json:"lastCloudTieringResult,omitempty"`
LastSuccessTimestamp *string `json:"lastSuccessTimestamp,omitempty"`
LastUpdatedTimestamp *string `json:"lastUpdatedTimestamp,omitempty"`
LowDiskMode *CloudTieringLowDiskMode `json:"lowDiskMode,omitempty"`
SpaceSavings *CloudTieringSpaceSavings `json:"spaceSavings,omitempty"`
VolumeFreeSpacePolicyStatus *CloudTieringVolumeFreeSpacePolicyStatus `json:"volumeFreeSpacePolicyStatus,omitempty"`
}
func (o *ServerEndpointCloudTieringStatus) GetHealthLastUpdatedTimestampAsTime() (*time.Time, error) {
if o.HealthLastUpdatedTimestamp == nil {
return nil, nil
}
return dates.ParseAsFormat(o.HealthLastUpdatedTimestamp, "2006-01-02T15:04:05Z07:00")
}
func (o *ServerEndpointCloudTieringStatus) SetHealthLastUpdatedTimestampAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.HealthLastUpdatedTimestamp = &formatted
}
func (o *ServerEndpointCloudTieringStatus) GetLastSuccessTimestampAsTime() (*time.Time, error) {
if o.LastSuccessTimestamp == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastSuccessTimestamp, "2006-01-02T15:04:05Z07:00")
}
func (o *ServerEndpointCloudTieringStatus) SetLastSuccessTimestampAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastSuccessTimestamp = &formatted
}
func (o *ServerEndpointCloudTieringStatus) GetLastUpdatedTimestampAsTime() (*time.Time, error) {
if o.LastUpdatedTimestamp == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastUpdatedTimestamp, "2006-01-02T15:04:05Z07:00")
}
func (o *ServerEndpointCloudTieringStatus) SetLastUpdatedTimestampAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastUpdatedTimestamp = &formatted
}