-
Notifications
You must be signed in to change notification settings - Fork 40
/
model_storageaccountproperties.go
75 lines (67 loc) · 5.35 KB
/
model_storageaccountproperties.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 storageaccounts
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 StorageAccountProperties struct {
AccessTier *AccessTier `json:"accessTier,omitempty"`
AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"`
AllowCrossTenantReplication *bool `json:"allowCrossTenantReplication,omitempty"`
AllowSharedKeyAccess *bool `json:"allowSharedKeyAccess,omitempty"`
AllowedCopyScope *AllowedCopyScope `json:"allowedCopyScope,omitempty"`
AzureFilesIdentityBasedAuthentication *AzureFilesIdentityBasedAuthentication `json:"azureFilesIdentityBasedAuthentication,omitempty"`
BlobRestoreStatus *BlobRestoreStatus `json:"blobRestoreStatus,omitempty"`
CreationTime *string `json:"creationTime,omitempty"`
CustomDomain *CustomDomain `json:"customDomain,omitempty"`
DefaultToOAuthAuthentication *bool `json:"defaultToOAuthAuthentication,omitempty"`
DnsEndpointType *DnsEndpointType `json:"dnsEndpointType,omitempty"`
Encryption *Encryption `json:"encryption,omitempty"`
FailoverInProgress *bool `json:"failoverInProgress,omitempty"`
GeoReplicationStats *GeoReplicationStats `json:"geoReplicationStats,omitempty"`
ImmutableStorageWithVersioning *ImmutableStorageAccount `json:"immutableStorageWithVersioning,omitempty"`
IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"`
IsLocalUserEnabled *bool `json:"isLocalUserEnabled,omitempty"`
IsNfsV3Enabled *bool `json:"isNfsV3Enabled,omitempty"`
IsSftpEnabled *bool `json:"isSftpEnabled,omitempty"`
KeyCreationTime *KeyCreationTime `json:"keyCreationTime,omitempty"`
KeyPolicy *KeyPolicy `json:"keyPolicy,omitempty"`
LargeFileSharesState *LargeFileSharesState `json:"largeFileSharesState,omitempty"`
LastGeoFailoverTime *string `json:"lastGeoFailoverTime,omitempty"`
MinimumTlsVersion *MinimumTlsVersion `json:"minimumTlsVersion,omitempty"`
NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"`
PrimaryEndpoints *Endpoints `json:"primaryEndpoints,omitempty"`
PrimaryLocation *string `json:"primaryLocation,omitempty"`
PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
PublicNetworkAccess *PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
RoutingPreference *RoutingPreference `json:"routingPreference,omitempty"`
SasPolicy *SasPolicy `json:"sasPolicy,omitempty"`
SecondaryEndpoints *Endpoints `json:"secondaryEndpoints,omitempty"`
SecondaryLocation *string `json:"secondaryLocation,omitempty"`
StatusOfPrimary *AccountStatus `json:"statusOfPrimary,omitempty"`
StatusOfSecondary *AccountStatus `json:"statusOfSecondary,omitempty"`
StorageAccountSkuConversionStatus *StorageAccountSkuConversionStatus `json:"storageAccountSkuConversionStatus,omitempty"`
SupportsHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"`
}
func (o *StorageAccountProperties) GetCreationTimeAsTime() (*time.Time, error) {
if o.CreationTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.CreationTime, "2006-01-02T15:04:05Z07:00")
}
func (o *StorageAccountProperties) SetCreationTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.CreationTime = &formatted
}
func (o *StorageAccountProperties) GetLastGeoFailoverTimeAsTime() (*time.Time, error) {
if o.LastGeoFailoverTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastGeoFailoverTime, "2006-01-02T15:04:05Z07:00")
}
func (o *StorageAccountProperties) SetLastGeoFailoverTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastGeoFailoverTime = &formatted
}