-
Notifications
You must be signed in to change notification settings - Fork 40
/
model_appserviceplanproperties.go
60 lines (52 loc) · 3.1 KB
/
model_appserviceplanproperties.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 appserviceenvironments
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 AppServicePlanProperties struct {
ElasticScaleEnabled *bool `json:"elasticScaleEnabled,omitempty"`
FreeOfferExpirationTime *string `json:"freeOfferExpirationTime,omitempty"`
GeoRegion *string `json:"geoRegion,omitempty"`
HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"`
HyperV *bool `json:"hyperV,omitempty"`
IsSpot *bool `json:"isSpot,omitempty"`
IsXenon *bool `json:"isXenon,omitempty"`
KubeEnvironmentProfile *KubeEnvironmentProfile `json:"kubeEnvironmentProfile,omitempty"`
MaximumElasticWorkerCount *int64 `json:"maximumElasticWorkerCount,omitempty"`
MaximumNumberOfWorkers *int64 `json:"maximumNumberOfWorkers,omitempty"`
NumberOfSites *int64 `json:"numberOfSites,omitempty"`
NumberOfWorkers *int64 `json:"numberOfWorkers,omitempty"`
PerSiteScaling *bool `json:"perSiteScaling,omitempty"`
ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
Reserved *bool `json:"reserved,omitempty"`
ResourceGroup *string `json:"resourceGroup,omitempty"`
SpotExpirationTime *string `json:"spotExpirationTime,omitempty"`
Status *StatusOptions `json:"status,omitempty"`
Subscription *string `json:"subscription,omitempty"`
TargetWorkerCount *int64 `json:"targetWorkerCount,omitempty"`
TargetWorkerSizeId *int64 `json:"targetWorkerSizeId,omitempty"`
WorkerTierName *string `json:"workerTierName,omitempty"`
ZoneRedundant *bool `json:"zoneRedundant,omitempty"`
}
func (o *AppServicePlanProperties) GetFreeOfferExpirationTimeAsTime() (*time.Time, error) {
if o.FreeOfferExpirationTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.FreeOfferExpirationTime, "2006-01-02T15:04:05Z07:00")
}
func (o *AppServicePlanProperties) SetFreeOfferExpirationTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.FreeOfferExpirationTime = &formatted
}
func (o *AppServicePlanProperties) GetSpotExpirationTimeAsTime() (*time.Time, error) {
if o.SpotExpirationTime == nil {
return nil, nil
}
return dates.ParseAsFormat(o.SpotExpirationTime, "2006-01-02T15:04:05Z07:00")
}
func (o *AppServicePlanProperties) SetSpotExpirationTimeAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.SpotExpirationTime = &formatted
}