-
Notifications
You must be signed in to change notification settings - Fork 37
/
model_databaseproperties.go
124 lines (108 loc) · 6.21 KB
/
model_databaseproperties.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package databases
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 DatabaseProperties struct {
AutoPauseDelay *int64 `json:"autoPauseDelay,omitempty"`
CatalogCollation *CatalogCollationType `json:"catalogCollation,omitempty"`
Collation *string `json:"collation,omitempty"`
CreateMode *CreateMode `json:"createMode,omitempty"`
CreationDate *string `json:"creationDate,omitempty"`
CurrentBackupStorageRedundancy *BackupStorageRedundancy `json:"currentBackupStorageRedundancy,omitempty"`
CurrentServiceObjectiveName *string `json:"currentServiceObjectiveName,omitempty"`
CurrentSku *Sku `json:"currentSku,omitempty"`
DatabaseId *string `json:"databaseId,omitempty"`
DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty"`
EarliestRestoreDate *string `json:"earliestRestoreDate,omitempty"`
ElasticPoolId *string `json:"elasticPoolId,omitempty"`
FailoverGroupId *string `json:"failoverGroupId,omitempty"`
FederatedClientId *string `json:"federatedClientId,omitempty"`
HighAvailabilityReplicaCount *int64 `json:"highAvailabilityReplicaCount,omitempty"`
IsInfraEncryptionEnabled *bool `json:"isInfraEncryptionEnabled,omitempty"`
IsLedgerOn *bool `json:"isLedgerOn,omitempty"`
LicenseType *DatabaseLicenseType `json:"licenseType,omitempty"`
LongTermRetentionBackupResourceId *string `json:"longTermRetentionBackupResourceId,omitempty"`
MaintenanceConfigurationId *string `json:"maintenanceConfigurationId,omitempty"`
MaxLogSizeBytes *int64 `json:"maxLogSizeBytes,omitempty"`
MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"`
MinCapacity *float64 `json:"minCapacity,omitempty"`
PausedDate *string `json:"pausedDate,omitempty"`
ReadScale *DatabaseReadScale `json:"readScale,omitempty"`
RecoverableDatabaseId *string `json:"recoverableDatabaseId,omitempty"`
RecoveryServicesRecoveryPointId *string `json:"recoveryServicesRecoveryPointId,omitempty"`
RequestedBackupStorageRedundancy *BackupStorageRedundancy `json:"requestedBackupStorageRedundancy,omitempty"`
RequestedServiceObjectiveName *string `json:"requestedServiceObjectiveName,omitempty"`
RestorableDroppedDatabaseId *string `json:"restorableDroppedDatabaseId,omitempty"`
RestorePointInTime *string `json:"restorePointInTime,omitempty"`
ResumedDate *string `json:"resumedDate,omitempty"`
SampleName *SampleName `json:"sampleName,omitempty"`
SecondaryType *SecondaryType `json:"secondaryType,omitempty"`
SourceDatabaseDeletionDate *string `json:"sourceDatabaseDeletionDate,omitempty"`
SourceDatabaseId *string `json:"sourceDatabaseId,omitempty"`
SourceResourceId *string `json:"sourceResourceId,omitempty"`
Status *DatabaseStatus `json:"status,omitempty"`
ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
}
func (o *DatabaseProperties) GetCreationDateAsTime() (*time.Time, error) {
if o.CreationDate == nil {
return nil, nil
}
return dates.ParseAsFormat(o.CreationDate, "2006-01-02T15:04:05Z07:00")
}
func (o *DatabaseProperties) SetCreationDateAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.CreationDate = &formatted
}
func (o *DatabaseProperties) GetEarliestRestoreDateAsTime() (*time.Time, error) {
if o.EarliestRestoreDate == nil {
return nil, nil
}
return dates.ParseAsFormat(o.EarliestRestoreDate, "2006-01-02T15:04:05Z07:00")
}
func (o *DatabaseProperties) SetEarliestRestoreDateAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.EarliestRestoreDate = &formatted
}
func (o *DatabaseProperties) GetPausedDateAsTime() (*time.Time, error) {
if o.PausedDate == nil {
return nil, nil
}
return dates.ParseAsFormat(o.PausedDate, "2006-01-02T15:04:05Z07:00")
}
func (o *DatabaseProperties) SetPausedDateAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.PausedDate = &formatted
}
func (o *DatabaseProperties) GetRestorePointInTimeAsTime() (*time.Time, error) {
if o.RestorePointInTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.RestorePointInTime, "2006-01-02T15:04:05Z07:00")
}
func (o *DatabaseProperties) SetRestorePointInTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.RestorePointInTime = &formatted
}
func (o *DatabaseProperties) GetResumedDateAsTime() (*time.Time, error) {
if o.ResumedDate == nil {
return nil, nil
}
return dates.ParseAsFormat(o.ResumedDate, "2006-01-02T15:04:05Z07:00")
}
func (o *DatabaseProperties) SetResumedDateAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.ResumedDate = &formatted
}
func (o *DatabaseProperties) GetSourceDatabaseDeletionDateAsTime() (*time.Time, error) {
if o.SourceDatabaseDeletionDate == nil {
return nil, nil
}
return dates.ParseAsFormat(o.SourceDatabaseDeletionDate, "2006-01-02T15:04:05Z07:00")
}
func (o *DatabaseProperties) SetSourceDatabaseDeletionDateAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.SourceDatabaseDeletionDate = &formatted
}