diff --git a/internal/services/vmware/sdk/2020-03-20/authorizations/constants.go b/internal/services/vmware/sdk/2020-03-20/authorizations/constants.go index 9e48acd30231..e7202db9a387 100644 --- a/internal/services/vmware/sdk/2020-03-20/authorizations/constants.go +++ b/internal/services/vmware/sdk/2020-03-20/authorizations/constants.go @@ -12,25 +12,23 @@ const ( func PossibleValuesForExpressRouteAuthorizationProvisioningState() []string { return []string{ - "Failed", - "Succeeded", - "Updating", + string(ExpressRouteAuthorizationProvisioningStateFailed), + string(ExpressRouteAuthorizationProvisioningStateSucceeded), + string(ExpressRouteAuthorizationProvisioningStateUpdating), } } func parseExpressRouteAuthorizationProvisioningState(input string) (*ExpressRouteAuthorizationProvisioningState, error) { vals := map[string]ExpressRouteAuthorizationProvisioningState{ - "failed": "Failed", - "succeeded": "Succeeded", - "updating": "Updating", + "failed": ExpressRouteAuthorizationProvisioningStateFailed, + "succeeded": ExpressRouteAuthorizationProvisioningStateSucceeded, + "updating": ExpressRouteAuthorizationProvisioningStateUpdating, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := ExpressRouteAuthorizationProvisioningState(v) + // otherwise presume it's an undefined value and best-effort it + out := ExpressRouteAuthorizationProvisioningState(input) return &out, nil } diff --git a/internal/services/vmware/sdk/2020-03-20/clusters/constants.go b/internal/services/vmware/sdk/2020-03-20/clusters/constants.go index eba0dcaf052f..6b09f491a56c 100644 --- a/internal/services/vmware/sdk/2020-03-20/clusters/constants.go +++ b/internal/services/vmware/sdk/2020-03-20/clusters/constants.go @@ -14,29 +14,27 @@ const ( func PossibleValuesForClusterProvisioningState() []string { return []string{ - "Cancelled", - "Deleting", - "Failed", - "Succeeded", - "Updating", + string(ClusterProvisioningStateCancelled), + string(ClusterProvisioningStateDeleting), + string(ClusterProvisioningStateFailed), + string(ClusterProvisioningStateSucceeded), + string(ClusterProvisioningStateUpdating), } } func parseClusterProvisioningState(input string) (*ClusterProvisioningState, error) { vals := map[string]ClusterProvisioningState{ - "cancelled": "Cancelled", - "deleting": "Deleting", - "failed": "Failed", - "succeeded": "Succeeded", - "updating": "Updating", + "cancelled": ClusterProvisioningStateCancelled, + "deleting": ClusterProvisioningStateDeleting, + "failed": ClusterProvisioningStateFailed, + "succeeded": ClusterProvisioningStateSucceeded, + "updating": ClusterProvisioningStateUpdating, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := ClusterProvisioningState(v) + // otherwise presume it's an undefined value and best-effort it + out := ClusterProvisioningState(input) return &out, nil } diff --git a/internal/services/vmware/sdk/2020-03-20/hcxenterprisesites/constants.go b/internal/services/vmware/sdk/2020-03-20/hcxenterprisesites/constants.go index 649bdb2146c8..42bb60ce71ba 100644 --- a/internal/services/vmware/sdk/2020-03-20/hcxenterprisesites/constants.go +++ b/internal/services/vmware/sdk/2020-03-20/hcxenterprisesites/constants.go @@ -13,27 +13,25 @@ const ( func PossibleValuesForHcxEnterpriseSiteStatus() []string { return []string{ - "Available", - "Consumed", - "Deactivated", - "Deleted", + string(HcxEnterpriseSiteStatusAvailable), + string(HcxEnterpriseSiteStatusConsumed), + string(HcxEnterpriseSiteStatusDeactivated), + string(HcxEnterpriseSiteStatusDeleted), } } func parseHcxEnterpriseSiteStatus(input string) (*HcxEnterpriseSiteStatus, error) { vals := map[string]HcxEnterpriseSiteStatus{ - "available": "Available", - "consumed": "Consumed", - "deactivated": "Deactivated", - "deleted": "Deleted", + "available": HcxEnterpriseSiteStatusAvailable, + "consumed": HcxEnterpriseSiteStatusConsumed, + "deactivated": HcxEnterpriseSiteStatusDeactivated, + "deleted": HcxEnterpriseSiteStatusDeleted, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := HcxEnterpriseSiteStatus(v) + // otherwise presume it's an undefined value and best-effort it + out := HcxEnterpriseSiteStatus(input) return &out, nil } diff --git a/internal/services/vmware/sdk/2020-03-20/locations/constants.go b/internal/services/vmware/sdk/2020-03-20/locations/constants.go index 1d614a1e2261..46930b0bebab 100644 --- a/internal/services/vmware/sdk/2020-03-20/locations/constants.go +++ b/internal/services/vmware/sdk/2020-03-20/locations/constants.go @@ -11,24 +11,22 @@ const ( func PossibleValuesForQuotaEnabled() []string { return []string{ - "Disabled", - "Enabled", + string(QuotaEnabledDisabled), + string(QuotaEnabledEnabled), } } func parseQuotaEnabled(input string) (*QuotaEnabled, error) { vals := map[string]QuotaEnabled{ - "disabled": "Disabled", - "enabled": "Enabled", + "disabled": QuotaEnabledDisabled, + "enabled": QuotaEnabledEnabled, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := QuotaEnabled(v) + // otherwise presume it's an undefined value and best-effort it + out := QuotaEnabled(input) return &out, nil } @@ -42,25 +40,23 @@ const ( func PossibleValuesForTrialStatus() []string { return []string{ - "TrialAvailable", - "TrialDisabled", - "TrialUsed", + string(TrialStatusTrialAvailable), + string(TrialStatusTrialDisabled), + string(TrialStatusTrialUsed), } } func parseTrialStatus(input string) (*TrialStatus, error) { vals := map[string]TrialStatus{ - "trialavailable": "TrialAvailable", - "trialdisabled": "TrialDisabled", - "trialused": "TrialUsed", + "trialavailable": TrialStatusTrialAvailable, + "trialdisabled": TrialStatusTrialDisabled, + "trialused": TrialStatusTrialUsed, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := TrialStatus(v) + // otherwise presume it's an undefined value and best-effort it + out := TrialStatus(input) return &out, nil } diff --git a/internal/services/vmware/sdk/2020-03-20/privateclouds/constants.go b/internal/services/vmware/sdk/2020-03-20/privateclouds/constants.go index 8aa884e94885..357739d656ec 100644 --- a/internal/services/vmware/sdk/2020-03-20/privateclouds/constants.go +++ b/internal/services/vmware/sdk/2020-03-20/privateclouds/constants.go @@ -14,30 +14,28 @@ const ( func PossibleValuesForClusterProvisioningState() []string { return []string{ - "Cancelled", - "Deleting", - "Failed", - "Succeeded", - "Updating", + string(ClusterProvisioningStateCancelled), + string(ClusterProvisioningStateDeleting), + string(ClusterProvisioningStateFailed), + string(ClusterProvisioningStateSucceeded), + string(ClusterProvisioningStateUpdating), } } func parseClusterProvisioningState(input string) (*ClusterProvisioningState, error) { vals := map[string]ClusterProvisioningState{ - "cancelled": "Cancelled", - "deleting": "Deleting", - "failed": "Failed", - "succeeded": "Succeeded", - "updating": "Updating", + "cancelled": ClusterProvisioningStateCancelled, + "deleting": ClusterProvisioningStateDeleting, + "failed": ClusterProvisioningStateFailed, + "succeeded": ClusterProvisioningStateSucceeded, + "updating": ClusterProvisioningStateUpdating, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := ClusterProvisioningState(v) + // otherwise presume it's an undefined value and best-effort it + out := ClusterProvisioningState(input) return &out, nil } @@ -50,24 +48,22 @@ const ( func PossibleValuesForInternetEnum() []string { return []string{ - "Disabled", - "Enabled", + string(InternetEnumDisabled), + string(InternetEnumEnabled), } } func parseInternetEnum(input string) (*InternetEnum, error) { vals := map[string]InternetEnum{ - "disabled": "Disabled", - "enabled": "Enabled", + "disabled": InternetEnumDisabled, + "enabled": InternetEnumEnabled, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := InternetEnum(v) + // otherwise presume it's an undefined value and best-effort it + out := InternetEnum(input) return &out, nil } @@ -85,34 +81,32 @@ const ( func PossibleValuesForPrivateCloudProvisioningState() []string { return []string{ - "Building", - "Cancelled", - "Deleting", - "Failed", - "Pending", - "Succeeded", - "Updating", + string(PrivateCloudProvisioningStateBuilding), + string(PrivateCloudProvisioningStateCancelled), + string(PrivateCloudProvisioningStateDeleting), + string(PrivateCloudProvisioningStateFailed), + string(PrivateCloudProvisioningStatePending), + string(PrivateCloudProvisioningStateSucceeded), + string(PrivateCloudProvisioningStateUpdating), } } func parsePrivateCloudProvisioningState(input string) (*PrivateCloudProvisioningState, error) { vals := map[string]PrivateCloudProvisioningState{ - "building": "Building", - "cancelled": "Cancelled", - "deleting": "Deleting", - "failed": "Failed", - "pending": "Pending", - "succeeded": "Succeeded", - "updating": "Updating", + "building": PrivateCloudProvisioningStateBuilding, + "cancelled": PrivateCloudProvisioningStateCancelled, + "deleting": PrivateCloudProvisioningStateDeleting, + "failed": PrivateCloudProvisioningStateFailed, + "pending": PrivateCloudProvisioningStatePending, + "succeeded": PrivateCloudProvisioningStateSucceeded, + "updating": PrivateCloudProvisioningStateUpdating, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := PrivateCloudProvisioningState(v) + // otherwise presume it's an undefined value and best-effort it + out := PrivateCloudProvisioningState(input) return &out, nil } @@ -125,23 +119,21 @@ const ( func PossibleValuesForSslEnum() []string { return []string{ - "Disabled", - "Enabled", + string(SslEnumDisabled), + string(SslEnumEnabled), } } func parseSslEnum(input string) (*SslEnum, error) { vals := map[string]SslEnum{ - "disabled": "Disabled", - "enabled": "Enabled", + "disabled": SslEnumDisabled, + "enabled": SslEnumEnabled, } if v, ok := vals[strings.ToLower(input)]; ok { return &v, nil } - // it could be a new value - best effort convert this - v := input - - out := SslEnum(v) + // otherwise presume it's an undefined value and best-effort it + out := SslEnum(input) return &out, nil }