diff --git a/hack/crossplane/apis/cache/v1api20200601/redis_types_gen.go b/hack/crossplane/apis/cache/v1api20200601/redis_types_gen.go index c7d09ec3eb7..5d2c0d34214 100644 --- a/hack/crossplane/apis/cache/v1api20200601/redis_types_gen.go +++ b/hack/crossplane/apis/cache/v1api20200601/redis_types_gen.go @@ -230,6 +230,13 @@ const ( RedisCreateProperties_MinimumTlsVersion_12 = RedisCreateProperties_MinimumTlsVersion("1.2") ) +// Mapping from string to RedisCreateProperties_MinimumTlsVersion +var redisCreateProperties_MinimumTlsVersion_Values = map[string]RedisCreateProperties_MinimumTlsVersion{ + "1.0": RedisCreateProperties_MinimumTlsVersion_10, + "1.1": RedisCreateProperties_MinimumTlsVersion_11, + "1.2": RedisCreateProperties_MinimumTlsVersion_12, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type RedisCreateProperties_PublicNetworkAccess string @@ -238,6 +245,12 @@ const ( RedisCreateProperties_PublicNetworkAccess_Enabled = RedisCreateProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to RedisCreateProperties_PublicNetworkAccess +var redisCreateProperties_PublicNetworkAccess_Values = map[string]RedisCreateProperties_PublicNetworkAccess{ + "disabled": RedisCreateProperties_PublicNetworkAccess_Disabled, + "enabled": RedisCreateProperties_PublicNetworkAccess_Enabled, +} + type RedisCreateProperties_RedisConfiguration struct { AdditionalProperties map[string]string `json:"additionalProperties,omitempty"` @@ -304,6 +317,13 @@ const ( RedisProperties_MinimumTlsVersion_STATUS_12 = RedisProperties_MinimumTlsVersion_STATUS("1.2") ) +// Mapping from string to RedisProperties_MinimumTlsVersion_STATUS +var redisProperties_MinimumTlsVersion_STATUS_Values = map[string]RedisProperties_MinimumTlsVersion_STATUS{ + "1.0": RedisProperties_MinimumTlsVersion_STATUS_10, + "1.1": RedisProperties_MinimumTlsVersion_STATUS_11, + "1.2": RedisProperties_MinimumTlsVersion_STATUS_12, +} + type RedisProperties_ProvisioningState_STATUS string const ( @@ -321,6 +341,22 @@ const ( RedisProperties_ProvisioningState_STATUS_Updating = RedisProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to RedisProperties_ProvisioningState_STATUS +var redisProperties_ProvisioningState_STATUS_Values = map[string]RedisProperties_ProvisioningState_STATUS{ + "creating": RedisProperties_ProvisioningState_STATUS_Creating, + "deleting": RedisProperties_ProvisioningState_STATUS_Deleting, + "disabled": RedisProperties_ProvisioningState_STATUS_Disabled, + "failed": RedisProperties_ProvisioningState_STATUS_Failed, + "linking": RedisProperties_ProvisioningState_STATUS_Linking, + "provisioning": RedisProperties_ProvisioningState_STATUS_Provisioning, + "recoveringscalefailure": RedisProperties_ProvisioningState_STATUS_RecoveringScaleFailure, + "scaling": RedisProperties_ProvisioningState_STATUS_Scaling, + "succeeded": RedisProperties_ProvisioningState_STATUS_Succeeded, + "unlinking": RedisProperties_ProvisioningState_STATUS_Unlinking, + "unprovisioning": RedisProperties_ProvisioningState_STATUS_Unprovisioning, + "updating": RedisProperties_ProvisioningState_STATUS_Updating, +} + type RedisProperties_PublicNetworkAccess_STATUS string const ( @@ -328,6 +364,12 @@ const ( RedisProperties_PublicNetworkAccess_STATUS_Enabled = RedisProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to RedisProperties_PublicNetworkAccess_STATUS +var redisProperties_PublicNetworkAccess_STATUS_Values = map[string]RedisProperties_PublicNetworkAccess_STATUS{ + "disabled": RedisProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": RedisProperties_PublicNetworkAccess_STATUS_Enabled, +} + type RedisProperties_RedisConfiguration_STATUS struct { AdditionalProperties map[string]string `json:"additionalProperties,omitempty"` @@ -410,6 +452,14 @@ const ( PrivateEndpointConnectionProvisioningState_STATUS_Succeeded = PrivateEndpointConnectionProvisioningState_STATUS("Succeeded") ) +// Mapping from string to PrivateEndpointConnectionProvisioningState_STATUS +var privateEndpointConnectionProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProvisioningState_STATUS{ + "creating": PrivateEndpointConnectionProvisioningState_STATUS_Creating, + "deleting": PrivateEndpointConnectionProvisioningState_STATUS_Deleting, + "failed": PrivateEndpointConnectionProvisioningState_STATUS_Failed, + "succeeded": PrivateEndpointConnectionProvisioningState_STATUS_Succeeded, +} + // A collection of information about the state of the connection between service consumer and provider. type PrivateLinkServiceConnectionState_STATUS struct { // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. @@ -430,6 +480,12 @@ const ( Sku_Family_P = Sku_Family("P") ) +// Mapping from string to Sku_Family +var sku_Family_Values = map[string]Sku_Family{ + "c": Sku_Family_C, + "p": Sku_Family_P, +} + type Sku_Family_STATUS string const ( @@ -437,6 +493,12 @@ const ( Sku_Family_STATUS_P = Sku_Family_STATUS("P") ) +// Mapping from string to Sku_Family_STATUS +var sku_Family_STATUS_Values = map[string]Sku_Family_STATUS{ + "c": Sku_Family_STATUS_C, + "p": Sku_Family_STATUS_P, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type Sku_Name string @@ -446,6 +508,13 @@ const ( Sku_Name_Standard = Sku_Name("Standard") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "basic": Sku_Name_Basic, + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + type Sku_Name_STATUS string const ( @@ -454,6 +523,13 @@ const ( Sku_Name_STATUS_Standard = Sku_Name_STATUS("Standard") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "basic": Sku_Name_STATUS_Basic, + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + // The private endpoint connection status. type PrivateEndpointServiceConnectionStatus_STATUS string @@ -463,6 +539,13 @@ const ( PrivateEndpointServiceConnectionStatus_STATUS_Rejected = PrivateEndpointServiceConnectionStatus_STATUS("Rejected") ) +// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS +var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{ + "approved": PrivateEndpointServiceConnectionStatus_STATUS_Approved, + "pending": PrivateEndpointServiceConnectionStatus_STATUS_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_STATUS_Rejected, +} + func init() { SchemeBuilder.Register(&Redis{}, &RedisList{}) } diff --git a/hack/crossplane/apis/sql/v1api20201101preview/server_types_gen.go b/hack/crossplane/apis/sql/v1api20201101preview/server_types_gen.go index 69d4926da9e..8dfcdd3e40e 100644 --- a/hack/crossplane/apis/sql/v1api20201101preview/server_types_gen.go +++ b/hack/crossplane/apis/sql/v1api20201101preview/server_types_gen.go @@ -230,6 +230,12 @@ const ( ServerProperties_PublicNetworkAccess_Enabled = ServerProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to ServerProperties_PublicNetworkAccess +var serverProperties_PublicNetworkAccess_Values = map[string]ServerProperties_PublicNetworkAccess{ + "disabled": ServerProperties_PublicNetworkAccess_Disabled, + "enabled": ServerProperties_PublicNetworkAccess_Enabled, +} + type ServerProperties_PublicNetworkAccess_STATUS string const ( @@ -237,6 +243,12 @@ const ( ServerProperties_PublicNetworkAccess_STATUS_Enabled = ServerProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ServerProperties_PublicNetworkAccess_STATUS +var serverProperties_PublicNetworkAccess_STATUS_Values = map[string]ServerProperties_PublicNetworkAccess_STATUS{ + "disabled": ServerProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ServerProperties_PublicNetworkAccess_STATUS_Enabled, +} + type ServerProperties_WorkspaceFeature_STATUS string const ( @@ -244,6 +256,12 @@ const ( ServerProperties_WorkspaceFeature_STATUS_Disconnected = ServerProperties_WorkspaceFeature_STATUS("Disconnected") ) +// Mapping from string to ServerProperties_WorkspaceFeature_STATUS +var serverProperties_WorkspaceFeature_STATUS_Values = map[string]ServerProperties_WorkspaceFeature_STATUS{ + "connected": ServerProperties_WorkspaceFeature_STATUS_Connected, + "disconnected": ServerProperties_WorkspaceFeature_STATUS_Disconnected, +} + // Properties of a private endpoint connection. type PrivateEndpointConnectionProperties_STATUS struct { // PrivateEndpoint: Private endpoint which the connection belongs to. @@ -266,6 +284,14 @@ const ( ResourceIdentity_Type_UserAssigned = ResourceIdentity_Type("UserAssigned") ) +// Mapping from string to ResourceIdentity_Type +var resourceIdentity_Type_Values = map[string]ResourceIdentity_Type{ + "none": ResourceIdentity_Type_None, + "systemassigned": ResourceIdentity_Type_SystemAssigned, + "systemassigned,userassigned": ResourceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ResourceIdentity_Type_UserAssigned, +} + type ResourceIdentity_Type_STATUS string const ( @@ -275,15 +301,33 @@ const ( ResourceIdentity_Type_STATUS_UserAssigned = ResourceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ResourceIdentity_Type_STATUS +var resourceIdentity_Type_STATUS_Values = map[string]ResourceIdentity_Type_STATUS{ + "none": ResourceIdentity_Type_STATUS_None, + "systemassigned": ResourceIdentity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": ResourceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ResourceIdentity_Type_STATUS_UserAssigned, +} + // +kubebuilder:validation:Enum={"ActiveDirectory"} type ServerExternalAdministrator_AdministratorType string const ServerExternalAdministrator_AdministratorType_ActiveDirectory = ServerExternalAdministrator_AdministratorType("ActiveDirectory") +// Mapping from string to ServerExternalAdministrator_AdministratorType +var serverExternalAdministrator_AdministratorType_Values = map[string]ServerExternalAdministrator_AdministratorType{ + "activedirectory": ServerExternalAdministrator_AdministratorType_ActiveDirectory, +} + type ServerExternalAdministrator_AdministratorType_STATUS string const ServerExternalAdministrator_AdministratorType_STATUS_ActiveDirectory = ServerExternalAdministrator_AdministratorType_STATUS("ActiveDirectory") +// Mapping from string to ServerExternalAdministrator_AdministratorType_STATUS +var serverExternalAdministrator_AdministratorType_STATUS_Values = map[string]ServerExternalAdministrator_AdministratorType_STATUS{ + "activedirectory": ServerExternalAdministrator_AdministratorType_STATUS_ActiveDirectory, +} + // +kubebuilder:validation:Enum={"Application","Group","User"} type ServerExternalAdministrator_PrincipalType string @@ -293,6 +337,13 @@ const ( ServerExternalAdministrator_PrincipalType_User = ServerExternalAdministrator_PrincipalType("User") ) +// Mapping from string to ServerExternalAdministrator_PrincipalType +var serverExternalAdministrator_PrincipalType_Values = map[string]ServerExternalAdministrator_PrincipalType{ + "application": ServerExternalAdministrator_PrincipalType_Application, + "group": ServerExternalAdministrator_PrincipalType_Group, + "user": ServerExternalAdministrator_PrincipalType_User, +} + type ServerExternalAdministrator_PrincipalType_STATUS string const ( @@ -301,6 +352,13 @@ const ( ServerExternalAdministrator_PrincipalType_STATUS_User = ServerExternalAdministrator_PrincipalType_STATUS("User") ) +// Mapping from string to ServerExternalAdministrator_PrincipalType_STATUS +var serverExternalAdministrator_PrincipalType_STATUS_Values = map[string]ServerExternalAdministrator_PrincipalType_STATUS{ + "application": ServerExternalAdministrator_PrincipalType_STATUS_Application, + "group": ServerExternalAdministrator_PrincipalType_STATUS_Group, + "user": ServerExternalAdministrator_PrincipalType_STATUS_User, +} + // Azure Active Directory identity configuration for a resource. type UserIdentity_STATUS struct { // ClientId: The Azure Active Directory client id. @@ -320,6 +378,15 @@ const ( PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Rejecting = PrivateEndpointConnectionProperties_ProvisioningState_STATUS("Rejecting") ) +// Mapping from string to PrivateEndpointConnectionProperties_ProvisioningState_STATUS +var privateEndpointConnectionProperties_ProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProperties_ProvisioningState_STATUS{ + "approving": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Approving, + "dropping": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Dropping, + "failed": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Failed, + "ready": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Ready, + "rejecting": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Rejecting, +} + type PrivateEndpointProperty_STATUS struct { // Id: Resource id of the private endpoint. Id *string `json:"id,omitempty"` @@ -340,6 +407,11 @@ type PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS string const PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_None = PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS("None") +// Mapping from string to PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS +var privateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_Values = map[string]PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS{ + "none": PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_None, +} + type PrivateLinkServiceConnectionStateProperty_Status_STATUS string const ( @@ -349,6 +421,14 @@ const ( PrivateLinkServiceConnectionStateProperty_Status_STATUS_Rejected = PrivateLinkServiceConnectionStateProperty_Status_STATUS("Rejected") ) +// Mapping from string to PrivateLinkServiceConnectionStateProperty_Status_STATUS +var privateLinkServiceConnectionStateProperty_Status_STATUS_Values = map[string]PrivateLinkServiceConnectionStateProperty_Status_STATUS{ + "approved": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Approved, + "disconnected": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Disconnected, + "pending": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Pending, + "rejected": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Rejected, +} + func init() { SchemeBuilder.Register(&Server{}, &ServerList{}) } diff --git a/hack/crossplane/apis/sql/v1api20201101preview/servers_database_types_gen.go b/hack/crossplane/apis/sql/v1api20201101preview/servers_database_types_gen.go index 439d373a5df..ebc38236bd1 100644 --- a/hack/crossplane/apis/sql/v1api20201101preview/servers_database_types_gen.go +++ b/hack/crossplane/apis/sql/v1api20201101preview/servers_database_types_gen.go @@ -343,6 +343,12 @@ const ( DatabaseProperties_CatalogCollation_SQL_Latin1_General_CP1_CI_AS = DatabaseProperties_CatalogCollation("SQL_Latin1_General_CP1_CI_AS") ) +// Mapping from string to DatabaseProperties_CatalogCollation +var databaseProperties_CatalogCollation_Values = map[string]DatabaseProperties_CatalogCollation{ + "database_default": DatabaseProperties_CatalogCollation_DATABASE_DEFAULT, + "sql_latin1_general_cp1_ci_as": DatabaseProperties_CatalogCollation_SQL_Latin1_General_CP1_CI_AS, +} + type DatabaseProperties_CatalogCollation_STATUS string const ( @@ -350,6 +356,12 @@ const ( DatabaseProperties_CatalogCollation_STATUS_SQL_Latin1_General_CP1_CI_AS = DatabaseProperties_CatalogCollation_STATUS("SQL_Latin1_General_CP1_CI_AS") ) +// Mapping from string to DatabaseProperties_CatalogCollation_STATUS +var databaseProperties_CatalogCollation_STATUS_Values = map[string]DatabaseProperties_CatalogCollation_STATUS{ + "database_default": DatabaseProperties_CatalogCollation_STATUS_DATABASE_DEFAULT, + "sql_latin1_general_cp1_ci_as": DatabaseProperties_CatalogCollation_STATUS_SQL_Latin1_General_CP1_CI_AS, +} + // +kubebuilder:validation:Enum={"Copy","Default","OnlineSecondary","PointInTimeRestore","Recovery","Restore","RestoreExternalBackup","RestoreExternalBackupSecondary","RestoreLongTermRetentionBackup","Secondary"} type DatabaseProperties_CreateMode string @@ -366,6 +378,20 @@ const ( DatabaseProperties_CreateMode_Secondary = DatabaseProperties_CreateMode("Secondary") ) +// Mapping from string to DatabaseProperties_CreateMode +var databaseProperties_CreateMode_Values = map[string]DatabaseProperties_CreateMode{ + "copy": DatabaseProperties_CreateMode_Copy, + "default": DatabaseProperties_CreateMode_Default, + "onlinesecondary": DatabaseProperties_CreateMode_OnlineSecondary, + "pointintimerestore": DatabaseProperties_CreateMode_PointInTimeRestore, + "recovery": DatabaseProperties_CreateMode_Recovery, + "restore": DatabaseProperties_CreateMode_Restore, + "restoreexternalbackup": DatabaseProperties_CreateMode_RestoreExternalBackup, + "restoreexternalbackupsecondary": DatabaseProperties_CreateMode_RestoreExternalBackupSecondary, + "restorelongtermretentionbackup": DatabaseProperties_CreateMode_RestoreLongTermRetentionBackup, + "secondary": DatabaseProperties_CreateMode_Secondary, +} + type DatabaseProperties_CreateMode_STATUS string const ( @@ -381,6 +407,20 @@ const ( DatabaseProperties_CreateMode_STATUS_Secondary = DatabaseProperties_CreateMode_STATUS("Secondary") ) +// Mapping from string to DatabaseProperties_CreateMode_STATUS +var databaseProperties_CreateMode_STATUS_Values = map[string]DatabaseProperties_CreateMode_STATUS{ + "copy": DatabaseProperties_CreateMode_STATUS_Copy, + "default": DatabaseProperties_CreateMode_STATUS_Default, + "onlinesecondary": DatabaseProperties_CreateMode_STATUS_OnlineSecondary, + "pointintimerestore": DatabaseProperties_CreateMode_STATUS_PointInTimeRestore, + "recovery": DatabaseProperties_CreateMode_STATUS_Recovery, + "restore": DatabaseProperties_CreateMode_STATUS_Restore, + "restoreexternalbackup": DatabaseProperties_CreateMode_STATUS_RestoreExternalBackup, + "restoreexternalbackupsecondary": DatabaseProperties_CreateMode_STATUS_RestoreExternalBackupSecondary, + "restorelongtermretentionbackup": DatabaseProperties_CreateMode_STATUS_RestoreLongTermRetentionBackup, + "secondary": DatabaseProperties_CreateMode_STATUS_Secondary, +} + type DatabaseProperties_CurrentBackupStorageRedundancy_STATUS string const ( @@ -389,6 +429,13 @@ const ( DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_Zone = DatabaseProperties_CurrentBackupStorageRedundancy_STATUS("Zone") ) +// Mapping from string to DatabaseProperties_CurrentBackupStorageRedundancy_STATUS +var databaseProperties_CurrentBackupStorageRedundancy_STATUS_Values = map[string]DatabaseProperties_CurrentBackupStorageRedundancy_STATUS{ + "geo": DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_Geo, + "local": DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_Local, + "zone": DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_Zone, +} + // +kubebuilder:validation:Enum={"BasePrice","LicenseIncluded"} type DatabaseProperties_LicenseType string @@ -397,6 +444,12 @@ const ( DatabaseProperties_LicenseType_LicenseIncluded = DatabaseProperties_LicenseType("LicenseIncluded") ) +// Mapping from string to DatabaseProperties_LicenseType +var databaseProperties_LicenseType_Values = map[string]DatabaseProperties_LicenseType{ + "baseprice": DatabaseProperties_LicenseType_BasePrice, + "licenseincluded": DatabaseProperties_LicenseType_LicenseIncluded, +} + type DatabaseProperties_LicenseType_STATUS string const ( @@ -404,6 +457,12 @@ const ( DatabaseProperties_LicenseType_STATUS_LicenseIncluded = DatabaseProperties_LicenseType_STATUS("LicenseIncluded") ) +// Mapping from string to DatabaseProperties_LicenseType_STATUS +var databaseProperties_LicenseType_STATUS_Values = map[string]DatabaseProperties_LicenseType_STATUS{ + "baseprice": DatabaseProperties_LicenseType_STATUS_BasePrice, + "licenseincluded": DatabaseProperties_LicenseType_STATUS_LicenseIncluded, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type DatabaseProperties_ReadScale string @@ -412,6 +471,12 @@ const ( DatabaseProperties_ReadScale_Enabled = DatabaseProperties_ReadScale("Enabled") ) +// Mapping from string to DatabaseProperties_ReadScale +var databaseProperties_ReadScale_Values = map[string]DatabaseProperties_ReadScale{ + "disabled": DatabaseProperties_ReadScale_Disabled, + "enabled": DatabaseProperties_ReadScale_Enabled, +} + type DatabaseProperties_ReadScale_STATUS string const ( @@ -419,6 +484,12 @@ const ( DatabaseProperties_ReadScale_STATUS_Enabled = DatabaseProperties_ReadScale_STATUS("Enabled") ) +// Mapping from string to DatabaseProperties_ReadScale_STATUS +var databaseProperties_ReadScale_STATUS_Values = map[string]DatabaseProperties_ReadScale_STATUS{ + "disabled": DatabaseProperties_ReadScale_STATUS_Disabled, + "enabled": DatabaseProperties_ReadScale_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Geo","Local","Zone"} type DatabaseProperties_RequestedBackupStorageRedundancy string @@ -428,6 +499,13 @@ const ( DatabaseProperties_RequestedBackupStorageRedundancy_Zone = DatabaseProperties_RequestedBackupStorageRedundancy("Zone") ) +// Mapping from string to DatabaseProperties_RequestedBackupStorageRedundancy +var databaseProperties_RequestedBackupStorageRedundancy_Values = map[string]DatabaseProperties_RequestedBackupStorageRedundancy{ + "geo": DatabaseProperties_RequestedBackupStorageRedundancy_Geo, + "local": DatabaseProperties_RequestedBackupStorageRedundancy_Local, + "zone": DatabaseProperties_RequestedBackupStorageRedundancy_Zone, +} + type DatabaseProperties_RequestedBackupStorageRedundancy_STATUS string const ( @@ -436,6 +514,13 @@ const ( DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_Zone = DatabaseProperties_RequestedBackupStorageRedundancy_STATUS("Zone") ) +// Mapping from string to DatabaseProperties_RequestedBackupStorageRedundancy_STATUS +var databaseProperties_RequestedBackupStorageRedundancy_STATUS_Values = map[string]DatabaseProperties_RequestedBackupStorageRedundancy_STATUS{ + "geo": DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_Geo, + "local": DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_Local, + "zone": DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_Zone, +} + // +kubebuilder:validation:Enum={"AdventureWorksLT","WideWorldImportersFull","WideWorldImportersStd"} type DatabaseProperties_SampleName string @@ -445,6 +530,13 @@ const ( DatabaseProperties_SampleName_WideWorldImportersStd = DatabaseProperties_SampleName("WideWorldImportersStd") ) +// Mapping from string to DatabaseProperties_SampleName +var databaseProperties_SampleName_Values = map[string]DatabaseProperties_SampleName{ + "adventureworkslt": DatabaseProperties_SampleName_AdventureWorksLT, + "wideworldimportersfull": DatabaseProperties_SampleName_WideWorldImportersFull, + "wideworldimportersstd": DatabaseProperties_SampleName_WideWorldImportersStd, +} + type DatabaseProperties_SampleName_STATUS string const ( @@ -453,6 +545,13 @@ const ( DatabaseProperties_SampleName_STATUS_WideWorldImportersStd = DatabaseProperties_SampleName_STATUS("WideWorldImportersStd") ) +// Mapping from string to DatabaseProperties_SampleName_STATUS +var databaseProperties_SampleName_STATUS_Values = map[string]DatabaseProperties_SampleName_STATUS{ + "adventureworkslt": DatabaseProperties_SampleName_STATUS_AdventureWorksLT, + "wideworldimportersfull": DatabaseProperties_SampleName_STATUS_WideWorldImportersFull, + "wideworldimportersstd": DatabaseProperties_SampleName_STATUS_WideWorldImportersStd, +} + // +kubebuilder:validation:Enum={"Geo","Named"} type DatabaseProperties_SecondaryType string @@ -461,6 +560,12 @@ const ( DatabaseProperties_SecondaryType_Named = DatabaseProperties_SecondaryType("Named") ) +// Mapping from string to DatabaseProperties_SecondaryType +var databaseProperties_SecondaryType_Values = map[string]DatabaseProperties_SecondaryType{ + "geo": DatabaseProperties_SecondaryType_Geo, + "named": DatabaseProperties_SecondaryType_Named, +} + type DatabaseProperties_SecondaryType_STATUS string const ( @@ -468,6 +573,12 @@ const ( DatabaseProperties_SecondaryType_STATUS_Named = DatabaseProperties_SecondaryType_STATUS("Named") ) +// Mapping from string to DatabaseProperties_SecondaryType_STATUS +var databaseProperties_SecondaryType_STATUS_Values = map[string]DatabaseProperties_SecondaryType_STATUS{ + "geo": DatabaseProperties_SecondaryType_STATUS_Geo, + "named": DatabaseProperties_SecondaryType_STATUS_Named, +} + type DatabaseProperties_Status_STATUS string const ( @@ -494,6 +605,31 @@ const ( DatabaseProperties_Status_STATUS_Suspect = DatabaseProperties_Status_STATUS("Suspect") ) +// Mapping from string to DatabaseProperties_Status_STATUS +var databaseProperties_Status_STATUS_Values = map[string]DatabaseProperties_Status_STATUS{ + "autoclosed": DatabaseProperties_Status_STATUS_AutoClosed, + "copying": DatabaseProperties_Status_STATUS_Copying, + "creating": DatabaseProperties_Status_STATUS_Creating, + "disabled": DatabaseProperties_Status_STATUS_Disabled, + "emergencymode": DatabaseProperties_Status_STATUS_EmergencyMode, + "inaccessible": DatabaseProperties_Status_STATUS_Inaccessible, + "offline": DatabaseProperties_Status_STATUS_Offline, + "offlinechangingdwperformancetiers": DatabaseProperties_Status_STATUS_OfflineChangingDwPerformanceTiers, + "offlinesecondary": DatabaseProperties_Status_STATUS_OfflineSecondary, + "online": DatabaseProperties_Status_STATUS_Online, + "onlinechangingdwperformancetiers": DatabaseProperties_Status_STATUS_OnlineChangingDwPerformanceTiers, + "paused": DatabaseProperties_Status_STATUS_Paused, + "pausing": DatabaseProperties_Status_STATUS_Pausing, + "recovering": DatabaseProperties_Status_STATUS_Recovering, + "recoverypending": DatabaseProperties_Status_STATUS_RecoveryPending, + "restoring": DatabaseProperties_Status_STATUS_Restoring, + "resuming": DatabaseProperties_Status_STATUS_Resuming, + "scaling": DatabaseProperties_Status_STATUS_Scaling, + "shutdown": DatabaseProperties_Status_STATUS_Shutdown, + "standby": DatabaseProperties_Status_STATUS_Standby, + "suspect": DatabaseProperties_Status_STATUS_Suspect, +} + // An ARM Resource SKU. type Sku struct { // Capacity: Capacity of the particular SKU. diff --git a/hack/crossplane/apis/sql/v1api20211101/server_types_gen.go b/hack/crossplane/apis/sql/v1api20211101/server_types_gen.go index fe137cbf392..42666ac5134 100644 --- a/hack/crossplane/apis/sql/v1api20211101/server_types_gen.go +++ b/hack/crossplane/apis/sql/v1api20211101/server_types_gen.go @@ -249,6 +249,12 @@ const ( ServerProperties_PublicNetworkAccess_Enabled = ServerProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to ServerProperties_PublicNetworkAccess +var serverProperties_PublicNetworkAccess_Values = map[string]ServerProperties_PublicNetworkAccess{ + "disabled": ServerProperties_PublicNetworkAccess_Disabled, + "enabled": ServerProperties_PublicNetworkAccess_Enabled, +} + type ServerProperties_PublicNetworkAccess_STATUS string const ( @@ -256,6 +262,12 @@ const ( ServerProperties_PublicNetworkAccess_STATUS_Enabled = ServerProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ServerProperties_PublicNetworkAccess_STATUS +var serverProperties_PublicNetworkAccess_STATUS_Values = map[string]ServerProperties_PublicNetworkAccess_STATUS{ + "disabled": ServerProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ServerProperties_PublicNetworkAccess_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ServerProperties_RestrictOutboundNetworkAccess string @@ -264,6 +276,12 @@ const ( ServerProperties_RestrictOutboundNetworkAccess_Enabled = ServerProperties_RestrictOutboundNetworkAccess("Enabled") ) +// Mapping from string to ServerProperties_RestrictOutboundNetworkAccess +var serverProperties_RestrictOutboundNetworkAccess_Values = map[string]ServerProperties_RestrictOutboundNetworkAccess{ + "disabled": ServerProperties_RestrictOutboundNetworkAccess_Disabled, + "enabled": ServerProperties_RestrictOutboundNetworkAccess_Enabled, +} + type ServerProperties_RestrictOutboundNetworkAccess_STATUS string const ( @@ -271,6 +289,12 @@ const ( ServerProperties_RestrictOutboundNetworkAccess_STATUS_Enabled = ServerProperties_RestrictOutboundNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ServerProperties_RestrictOutboundNetworkAccess_STATUS +var serverProperties_RestrictOutboundNetworkAccess_STATUS_Values = map[string]ServerProperties_RestrictOutboundNetworkAccess_STATUS{ + "disabled": ServerProperties_RestrictOutboundNetworkAccess_STATUS_Disabled, + "enabled": ServerProperties_RestrictOutboundNetworkAccess_STATUS_Enabled, +} + type ServerProperties_WorkspaceFeature_STATUS string const ( @@ -278,6 +302,12 @@ const ( ServerProperties_WorkspaceFeature_STATUS_Disconnected = ServerProperties_WorkspaceFeature_STATUS("Disconnected") ) +// Mapping from string to ServerProperties_WorkspaceFeature_STATUS +var serverProperties_WorkspaceFeature_STATUS_Values = map[string]ServerProperties_WorkspaceFeature_STATUS{ + "connected": ServerProperties_WorkspaceFeature_STATUS_Connected, + "disconnected": ServerProperties_WorkspaceFeature_STATUS_Disconnected, +} + // Properties of a private endpoint connection. type PrivateEndpointConnectionProperties_STATUS struct { // GroupIds: Group IDs. @@ -303,6 +333,14 @@ const ( ResourceIdentity_Type_UserAssigned = ResourceIdentity_Type("UserAssigned") ) +// Mapping from string to ResourceIdentity_Type +var resourceIdentity_Type_Values = map[string]ResourceIdentity_Type{ + "none": ResourceIdentity_Type_None, + "systemassigned": ResourceIdentity_Type_SystemAssigned, + "systemassigned,userassigned": ResourceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ResourceIdentity_Type_UserAssigned, +} + type ResourceIdentity_Type_STATUS string const ( @@ -312,15 +350,33 @@ const ( ResourceIdentity_Type_STATUS_UserAssigned = ResourceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ResourceIdentity_Type_STATUS +var resourceIdentity_Type_STATUS_Values = map[string]ResourceIdentity_Type_STATUS{ + "none": ResourceIdentity_Type_STATUS_None, + "systemassigned": ResourceIdentity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": ResourceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ResourceIdentity_Type_STATUS_UserAssigned, +} + // +kubebuilder:validation:Enum={"ActiveDirectory"} type ServerExternalAdministrator_AdministratorType string const ServerExternalAdministrator_AdministratorType_ActiveDirectory = ServerExternalAdministrator_AdministratorType("ActiveDirectory") +// Mapping from string to ServerExternalAdministrator_AdministratorType +var serverExternalAdministrator_AdministratorType_Values = map[string]ServerExternalAdministrator_AdministratorType{ + "activedirectory": ServerExternalAdministrator_AdministratorType_ActiveDirectory, +} + type ServerExternalAdministrator_AdministratorType_STATUS string const ServerExternalAdministrator_AdministratorType_STATUS_ActiveDirectory = ServerExternalAdministrator_AdministratorType_STATUS("ActiveDirectory") +// Mapping from string to ServerExternalAdministrator_AdministratorType_STATUS +var serverExternalAdministrator_AdministratorType_STATUS_Values = map[string]ServerExternalAdministrator_AdministratorType_STATUS{ + "activedirectory": ServerExternalAdministrator_AdministratorType_STATUS_ActiveDirectory, +} + // +kubebuilder:validation:Enum={"Application","Group","User"} type ServerExternalAdministrator_PrincipalType string @@ -330,6 +386,13 @@ const ( ServerExternalAdministrator_PrincipalType_User = ServerExternalAdministrator_PrincipalType("User") ) +// Mapping from string to ServerExternalAdministrator_PrincipalType +var serverExternalAdministrator_PrincipalType_Values = map[string]ServerExternalAdministrator_PrincipalType{ + "application": ServerExternalAdministrator_PrincipalType_Application, + "group": ServerExternalAdministrator_PrincipalType_Group, + "user": ServerExternalAdministrator_PrincipalType_User, +} + type ServerExternalAdministrator_PrincipalType_STATUS string const ( @@ -338,6 +401,13 @@ const ( ServerExternalAdministrator_PrincipalType_STATUS_User = ServerExternalAdministrator_PrincipalType_STATUS("User") ) +// Mapping from string to ServerExternalAdministrator_PrincipalType_STATUS +var serverExternalAdministrator_PrincipalType_STATUS_Values = map[string]ServerExternalAdministrator_PrincipalType_STATUS{ + "application": ServerExternalAdministrator_PrincipalType_STATUS_Application, + "group": ServerExternalAdministrator_PrincipalType_STATUS_Group, + "user": ServerExternalAdministrator_PrincipalType_STATUS_User, +} + // Azure Active Directory identity configuration for a resource. type UserIdentity_STATUS struct { // ClientId: The Azure Active Directory client id. @@ -357,6 +427,15 @@ const ( PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Rejecting = PrivateEndpointConnectionProperties_ProvisioningState_STATUS("Rejecting") ) +// Mapping from string to PrivateEndpointConnectionProperties_ProvisioningState_STATUS +var privateEndpointConnectionProperties_ProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProperties_ProvisioningState_STATUS{ + "approving": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Approving, + "dropping": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Dropping, + "failed": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Failed, + "ready": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Ready, + "rejecting": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Rejecting, +} + type PrivateEndpointProperty_STATUS struct { // Id: Resource id of the private endpoint. Id *string `json:"id,omitempty"` @@ -377,6 +456,11 @@ type PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS string const PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_None = PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS("None") +// Mapping from string to PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS +var privateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_Values = map[string]PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS{ + "none": PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_None, +} + type PrivateLinkServiceConnectionStateProperty_Status_STATUS string const ( @@ -386,6 +470,14 @@ const ( PrivateLinkServiceConnectionStateProperty_Status_STATUS_Rejected = PrivateLinkServiceConnectionStateProperty_Status_STATUS("Rejected") ) +// Mapping from string to PrivateLinkServiceConnectionStateProperty_Status_STATUS +var privateLinkServiceConnectionStateProperty_Status_STATUS_Values = map[string]PrivateLinkServiceConnectionStateProperty_Status_STATUS{ + "approved": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Approved, + "disconnected": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Disconnected, + "pending": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Pending, + "rejected": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Rejected, +} + func init() { SchemeBuilder.Register(&Server{}, &ServerList{}) } diff --git a/v2/api/apimanagement/v1api20220801/api_types_gen.go b/v2/api/apimanagement/v1api20220801/api_types_gen.go index 715ee353cdf..dcfb9122c14 100644 --- a/v2/api/apimanagement/v1api20220801/api_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/api_types_gen.go @@ -955,8 +955,9 @@ func (serviceApi *Service_Api_Spec) AssignProperties_From_Service_Api_Spec(sourc // ApiType if source.ApiType != nil { - apiType := ApiCreateOrUpdateProperties_ApiType(*source.ApiType) - serviceApi.ApiType = &apiType + apiType := *source.ApiType + apiTypeTemp := genruntime.ToEnum(apiType, apiCreateOrUpdateProperties_ApiType_Values) + serviceApi.ApiType = &apiTypeTemp } else { serviceApi.ApiType = nil } @@ -1029,8 +1030,9 @@ func (serviceApi *Service_Api_Spec) AssignProperties_From_Service_Api_Spec(sourc // Format if source.Format != nil { - format := ApiCreateOrUpdateProperties_Format(*source.Format) - serviceApi.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, apiCreateOrUpdateProperties_Format_Values) + serviceApi.Format = &formatTemp } else { serviceApi.Format = nil } @@ -1077,7 +1079,7 @@ func (serviceApi *Service_Api_Spec) AssignProperties_From_Service_Api_Spec(sourc for protocolIndex, protocolItem := range source.Protocols { // Shadow the loop variable to avoid aliasing protocolItem := protocolItem - protocolList[protocolIndex] = ApiCreateOrUpdateProperties_Protocols(protocolItem) + protocolList[protocolIndex] = genruntime.ToEnum(protocolItem, apiCreateOrUpdateProperties_Protocols_Values) } serviceApi.Protocols = protocolList } else { @@ -1125,16 +1127,18 @@ func (serviceApi *Service_Api_Spec) AssignProperties_From_Service_Api_Spec(sourc // TranslateRequiredQueryParameters if source.TranslateRequiredQueryParameters != nil { - translateRequiredQueryParameter := ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters(*source.TranslateRequiredQueryParameters) - serviceApi.TranslateRequiredQueryParameters = &translateRequiredQueryParameter + translateRequiredQueryParameter := *source.TranslateRequiredQueryParameters + translateRequiredQueryParameterTemp := genruntime.ToEnum(translateRequiredQueryParameter, apiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Values) + serviceApi.TranslateRequiredQueryParameters = &translateRequiredQueryParameterTemp } else { serviceApi.TranslateRequiredQueryParameters = nil } // Type if source.Type != nil { - typeVar := ApiCreateOrUpdateProperties_Type(*source.Type) - serviceApi.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, apiCreateOrUpdateProperties_Type_Values) + serviceApi.Type = &typeTemp } else { serviceApi.Type = nil } @@ -1575,8 +1579,9 @@ func (serviceApi *Service_Api_Spec) Initialize_From_Service_Api_STATUS(source *S // Type if source.Type != nil { - typeVar := ApiCreateOrUpdateProperties_Type(*source.Type) - serviceApi.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, apiCreateOrUpdateProperties_Type_Values) + serviceApi.Type = &typeTemp } else { serviceApi.Type = nil } @@ -2076,8 +2081,9 @@ func (serviceApi *Service_Api_STATUS) AssignProperties_From_Service_Api_STATUS(s // PropertiesType if source.PropertiesType != nil { - propertiesType := ApiContractProperties_Type_STATUS(*source.PropertiesType) - serviceApi.PropertiesType = &propertiesType + propertiesType := *source.PropertiesType + propertiesTypeTemp := genruntime.ToEnum(propertiesType, apiContractProperties_Type_STATUS_Values) + serviceApi.PropertiesType = &propertiesTypeTemp } else { serviceApi.PropertiesType = nil } @@ -2088,7 +2094,7 @@ func (serviceApi *Service_Api_STATUS) AssignProperties_From_Service_Api_STATUS(s for protocolIndex, protocolItem := range source.Protocols { // Shadow the loop variable to avoid aliasing protocolItem := protocolItem - protocolList[protocolIndex] = ApiContractProperties_Protocols_STATUS(protocolItem) + protocolList[protocolIndex] = genruntime.ToEnum(protocolItem, apiContractProperties_Protocols_STATUS_Values) } serviceApi.Protocols = protocolList } else { @@ -2527,6 +2533,14 @@ const ( ApiContractProperties_Protocols_STATUS_Wss = ApiContractProperties_Protocols_STATUS("wss") ) +// Mapping from string to ApiContractProperties_Protocols_STATUS +var apiContractProperties_Protocols_STATUS_Values = map[string]ApiContractProperties_Protocols_STATUS{ + "http": ApiContractProperties_Protocols_STATUS_Http, + "https": ApiContractProperties_Protocols_STATUS_Https, + "ws": ApiContractProperties_Protocols_STATUS_Ws, + "wss": ApiContractProperties_Protocols_STATUS_Wss, +} + type ApiContractProperties_Type_STATUS string const ( @@ -2536,6 +2550,14 @@ const ( ApiContractProperties_Type_STATUS_Websocket = ApiContractProperties_Type_STATUS("websocket") ) +// Mapping from string to ApiContractProperties_Type_STATUS +var apiContractProperties_Type_STATUS_Values = map[string]ApiContractProperties_Type_STATUS{ + "graphql": ApiContractProperties_Type_STATUS_Graphql, + "http": ApiContractProperties_Type_STATUS_Http, + "soap": ApiContractProperties_Type_STATUS_Soap, + "websocket": ApiContractProperties_Type_STATUS_Websocket, +} + // +kubebuilder:validation:Enum={"graphql","http","soap","websocket"} type ApiCreateOrUpdateProperties_ApiType string @@ -2546,6 +2568,14 @@ const ( ApiCreateOrUpdateProperties_ApiType_Websocket = ApiCreateOrUpdateProperties_ApiType("websocket") ) +// Mapping from string to ApiCreateOrUpdateProperties_ApiType +var apiCreateOrUpdateProperties_ApiType_Values = map[string]ApiCreateOrUpdateProperties_ApiType{ + "graphql": ApiCreateOrUpdateProperties_ApiType_Graphql, + "http": ApiCreateOrUpdateProperties_ApiType_Http, + "soap": ApiCreateOrUpdateProperties_ApiType_Soap, + "websocket": ApiCreateOrUpdateProperties_ApiType_Websocket, +} + // +kubebuilder:validation:Enum={"graphql-link","openapi","openapi+json","openapi+json-link","openapi-link","swagger-json","swagger-link-json","wadl-link-json","wadl-xml","wsdl","wsdl-link"} type ApiCreateOrUpdateProperties_Format string @@ -2563,6 +2593,21 @@ const ( ApiCreateOrUpdateProperties_Format_WsdlLink = ApiCreateOrUpdateProperties_Format("wsdl-link") ) +// Mapping from string to ApiCreateOrUpdateProperties_Format +var apiCreateOrUpdateProperties_Format_Values = map[string]ApiCreateOrUpdateProperties_Format{ + "graphql-link": ApiCreateOrUpdateProperties_Format_GraphqlLink, + "openapi": ApiCreateOrUpdateProperties_Format_Openapi, + "openapi+json": ApiCreateOrUpdateProperties_Format_OpenapiJson, + "openapi+json-link": ApiCreateOrUpdateProperties_Format_OpenapiJsonLink, + "openapi-link": ApiCreateOrUpdateProperties_Format_OpenapiLink, + "swagger-json": ApiCreateOrUpdateProperties_Format_SwaggerJson, + "swagger-link-json": ApiCreateOrUpdateProperties_Format_SwaggerLinkJson, + "wadl-link-json": ApiCreateOrUpdateProperties_Format_WadlLinkJson, + "wadl-xml": ApiCreateOrUpdateProperties_Format_WadlXml, + "wsdl": ApiCreateOrUpdateProperties_Format_Wsdl, + "wsdl-link": ApiCreateOrUpdateProperties_Format_WsdlLink, +} + // +kubebuilder:validation:Enum={"http","https","ws","wss"} type ApiCreateOrUpdateProperties_Protocols string @@ -2573,6 +2618,14 @@ const ( ApiCreateOrUpdateProperties_Protocols_Wss = ApiCreateOrUpdateProperties_Protocols("wss") ) +// Mapping from string to ApiCreateOrUpdateProperties_Protocols +var apiCreateOrUpdateProperties_Protocols_Values = map[string]ApiCreateOrUpdateProperties_Protocols{ + "http": ApiCreateOrUpdateProperties_Protocols_Http, + "https": ApiCreateOrUpdateProperties_Protocols_Https, + "ws": ApiCreateOrUpdateProperties_Protocols_Ws, + "wss": ApiCreateOrUpdateProperties_Protocols_Wss, +} + // +kubebuilder:validation:Enum={"query","template"} type ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters string @@ -2581,6 +2634,12 @@ const ( ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Template = ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters("template") ) +// Mapping from string to ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters +var apiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Values = map[string]ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters{ + "query": ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Query, + "template": ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Template, +} + // +kubebuilder:validation:Enum={"graphql","http","soap","websocket"} type ApiCreateOrUpdateProperties_Type string @@ -2591,6 +2650,14 @@ const ( ApiCreateOrUpdateProperties_Type_Websocket = ApiCreateOrUpdateProperties_Type("websocket") ) +// Mapping from string to ApiCreateOrUpdateProperties_Type +var apiCreateOrUpdateProperties_Type_Values = map[string]ApiCreateOrUpdateProperties_Type{ + "graphql": ApiCreateOrUpdateProperties_Type_Graphql, + "http": ApiCreateOrUpdateProperties_Type_Http, + "soap": ApiCreateOrUpdateProperties_Type_Soap, + "websocket": ApiCreateOrUpdateProperties_Type_Websocket, +} + type ApiCreateOrUpdateProperties_WsdlSelector struct { // WsdlEndpointName: Name of endpoint(port) to import from WSDL WsdlEndpointName *string `json:"wsdlEndpointName,omitempty"` @@ -3012,8 +3079,9 @@ func (details *ApiVersionSetContractDetails) AssignProperties_From_ApiVersionSet // VersioningScheme if source.VersioningScheme != nil { - versioningScheme := ApiVersionSetContractDetails_VersioningScheme(*source.VersioningScheme) - details.VersioningScheme = &versioningScheme + versioningScheme := *source.VersioningScheme + versioningSchemeTemp := genruntime.ToEnum(versioningScheme, apiVersionSetContractDetails_VersioningScheme_Values) + details.VersioningScheme = &versioningSchemeTemp } else { details.VersioningScheme = nil } @@ -3196,8 +3264,9 @@ func (details *ApiVersionSetContractDetails_STATUS) AssignProperties_From_ApiVer // VersioningScheme if source.VersioningScheme != nil { - versioningScheme := ApiVersionSetContractDetails_VersioningScheme_STATUS(*source.VersioningScheme) - details.VersioningScheme = &versioningScheme + versioningScheme := *source.VersioningScheme + versioningSchemeTemp := genruntime.ToEnum(versioningScheme, apiVersionSetContractDetails_VersioningScheme_STATUS_Values) + details.VersioningScheme = &versioningSchemeTemp } else { details.VersioningScheme = nil } @@ -3986,6 +4055,13 @@ const ( ApiVersionSetContractDetails_VersioningScheme_Segment = ApiVersionSetContractDetails_VersioningScheme("Segment") ) +// Mapping from string to ApiVersionSetContractDetails_VersioningScheme +var apiVersionSetContractDetails_VersioningScheme_Values = map[string]ApiVersionSetContractDetails_VersioningScheme{ + "header": ApiVersionSetContractDetails_VersioningScheme_Header, + "query": ApiVersionSetContractDetails_VersioningScheme_Query, + "segment": ApiVersionSetContractDetails_VersioningScheme_Segment, +} + type ApiVersionSetContractDetails_VersioningScheme_STATUS string const ( @@ -3994,6 +4070,13 @@ const ( ApiVersionSetContractDetails_VersioningScheme_STATUS_Segment = ApiVersionSetContractDetails_VersioningScheme_STATUS("Segment") ) +// Mapping from string to ApiVersionSetContractDetails_VersioningScheme_STATUS +var apiVersionSetContractDetails_VersioningScheme_STATUS_Values = map[string]ApiVersionSetContractDetails_VersioningScheme_STATUS{ + "header": ApiVersionSetContractDetails_VersioningScheme_STATUS_Header, + "query": ApiVersionSetContractDetails_VersioningScheme_STATUS_Query, + "segment": ApiVersionSetContractDetails_VersioningScheme_STATUS_Segment, +} + // API OAuth2 Authentication settings details. type OAuth2AuthenticationSettingsContract struct { // AuthorizationServerId: OAuth authorization server identifier. @@ -4243,7 +4326,7 @@ func (contract *OpenIdAuthenticationSettingsContract) AssignProperties_From_Open for bearerTokenSendingMethodIndex, bearerTokenSendingMethodItem := range source.BearerTokenSendingMethods { // Shadow the loop variable to avoid aliasing bearerTokenSendingMethodItem := bearerTokenSendingMethodItem - bearerTokenSendingMethodList[bearerTokenSendingMethodIndex] = BearerTokenSendingMethodsContract(bearerTokenSendingMethodItem) + bearerTokenSendingMethodList[bearerTokenSendingMethodIndex] = genruntime.ToEnum(bearerTokenSendingMethodItem, bearerTokenSendingMethodsContract_Values) } contract.BearerTokenSendingMethods = bearerTokenSendingMethodList } else { @@ -4360,7 +4443,7 @@ func (contract *OpenIdAuthenticationSettingsContract_STATUS) AssignProperties_Fr for bearerTokenSendingMethodIndex, bearerTokenSendingMethodItem := range source.BearerTokenSendingMethods { // Shadow the loop variable to avoid aliasing bearerTokenSendingMethodItem := bearerTokenSendingMethodItem - bearerTokenSendingMethodList[bearerTokenSendingMethodIndex] = BearerTokenSendingMethodsContract_STATUS(bearerTokenSendingMethodItem) + bearerTokenSendingMethodList[bearerTokenSendingMethodIndex] = genruntime.ToEnum(bearerTokenSendingMethodItem, bearerTokenSendingMethodsContract_STATUS_Values) } contract.BearerTokenSendingMethods = bearerTokenSendingMethodList } else { @@ -4415,6 +4498,12 @@ const ( BearerTokenSendingMethodsContract_Query = BearerTokenSendingMethodsContract("query") ) +// Mapping from string to BearerTokenSendingMethodsContract +var bearerTokenSendingMethodsContract_Values = map[string]BearerTokenSendingMethodsContract{ + "authorizationheader": BearerTokenSendingMethodsContract_AuthorizationHeader, + "query": BearerTokenSendingMethodsContract_Query, +} + // Form of an authorization grant, which the client uses to request the access token. type BearerTokenSendingMethodsContract_STATUS string @@ -4423,6 +4512,12 @@ const ( BearerTokenSendingMethodsContract_STATUS_Query = BearerTokenSendingMethodsContract_STATUS("query") ) +// Mapping from string to BearerTokenSendingMethodsContract_STATUS +var bearerTokenSendingMethodsContract_STATUS_Values = map[string]BearerTokenSendingMethodsContract_STATUS{ + "authorizationheader": BearerTokenSendingMethodsContract_STATUS_AuthorizationHeader, + "query": BearerTokenSendingMethodsContract_STATUS_Query, +} + func init() { SchemeBuilder.Register(&Api{}, &ApiList{}) } diff --git a/v2/api/apimanagement/v1api20220801/api_version_set_types_gen.go b/v2/api/apimanagement/v1api20220801/api_version_set_types_gen.go index 61c498ffdae..c2da9106fb2 100644 --- a/v2/api/apimanagement/v1api20220801/api_version_set_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/api_version_set_types_gen.go @@ -569,8 +569,9 @@ func (versionSet *Service_ApiVersionSet_Spec) AssignProperties_From_Service_ApiV // VersioningScheme if source.VersioningScheme != nil { - versioningScheme := ApiVersionSetContractProperties_VersioningScheme(*source.VersioningScheme) - versionSet.VersioningScheme = &versioningScheme + versioningScheme := *source.VersioningScheme + versioningSchemeTemp := genruntime.ToEnum(versioningScheme, apiVersionSetContractProperties_VersioningScheme_Values) + versionSet.VersioningScheme = &versioningSchemeTemp } else { versionSet.VersioningScheme = nil } @@ -888,8 +889,9 @@ func (versionSet *Service_ApiVersionSet_STATUS) AssignProperties_From_Service_Ap // VersioningScheme if source.VersioningScheme != nil { - versioningScheme := ApiVersionSetContractProperties_VersioningScheme_STATUS(*source.VersioningScheme) - versionSet.VersioningScheme = &versioningScheme + versioningScheme := *source.VersioningScheme + versioningSchemeTemp := genruntime.ToEnum(versioningScheme, apiVersionSetContractProperties_VersioningScheme_STATUS_Values) + versionSet.VersioningScheme = &versioningSchemeTemp } else { versionSet.VersioningScheme = nil } @@ -955,6 +957,13 @@ const ( ApiVersionSetContractProperties_VersioningScheme_Segment = ApiVersionSetContractProperties_VersioningScheme("Segment") ) +// Mapping from string to ApiVersionSetContractProperties_VersioningScheme +var apiVersionSetContractProperties_VersioningScheme_Values = map[string]ApiVersionSetContractProperties_VersioningScheme{ + "header": ApiVersionSetContractProperties_VersioningScheme_Header, + "query": ApiVersionSetContractProperties_VersioningScheme_Query, + "segment": ApiVersionSetContractProperties_VersioningScheme_Segment, +} + type ApiVersionSetContractProperties_VersioningScheme_STATUS string const ( @@ -963,6 +972,13 @@ const ( ApiVersionSetContractProperties_VersioningScheme_STATUS_Segment = ApiVersionSetContractProperties_VersioningScheme_STATUS("Segment") ) +// Mapping from string to ApiVersionSetContractProperties_VersioningScheme_STATUS +var apiVersionSetContractProperties_VersioningScheme_STATUS_Values = map[string]ApiVersionSetContractProperties_VersioningScheme_STATUS{ + "header": ApiVersionSetContractProperties_VersioningScheme_STATUS_Header, + "query": ApiVersionSetContractProperties_VersioningScheme_STATUS_Query, + "segment": ApiVersionSetContractProperties_VersioningScheme_STATUS_Segment, +} + func init() { SchemeBuilder.Register(&ApiVersionSet{}, &ApiVersionSetList{}) } diff --git a/v2/api/apimanagement/v1api20220801/authorization_providers_authorization_types_gen.go b/v2/api/apimanagement/v1api20220801/authorization_providers_authorization_types_gen.go index 658065c05db..31b6afa669e 100644 --- a/v2/api/apimanagement/v1api20220801/authorization_providers_authorization_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/authorization_providers_authorization_types_gen.go @@ -488,8 +488,9 @@ func (authorization *Service_AuthorizationProviders_Authorization_Spec) AssignPr // AuthorizationType if source.AuthorizationType != nil { - authorizationType := AuthorizationContractProperties_AuthorizationType(*source.AuthorizationType) - authorization.AuthorizationType = &authorizationType + authorizationType := *source.AuthorizationType + authorizationTypeTemp := genruntime.ToEnum(authorizationType, authorizationContractProperties_AuthorizationType_Values) + authorization.AuthorizationType = &authorizationTypeTemp } else { authorization.AuthorizationType = nil } @@ -499,8 +500,9 @@ func (authorization *Service_AuthorizationProviders_Authorization_Spec) AssignPr // Oauth2GrantType if source.Oauth2GrantType != nil { - oauth2GrantType := AuthorizationContractProperties_Oauth2GrantType(*source.Oauth2GrantType) - authorization.Oauth2GrantType = &oauth2GrantType + oauth2GrantType := *source.Oauth2GrantType + oauth2GrantTypeTemp := genruntime.ToEnum(oauth2GrantType, authorizationContractProperties_Oauth2GrantType_Values) + authorization.Oauth2GrantType = &oauth2GrantTypeTemp } else { authorization.Oauth2GrantType = nil } @@ -787,8 +789,9 @@ func (authorization *Service_AuthorizationProviders_Authorization_STATUS) Assign // AuthorizationType if source.AuthorizationType != nil { - authorizationType := AuthorizationContractProperties_AuthorizationType_STATUS(*source.AuthorizationType) - authorization.AuthorizationType = &authorizationType + authorizationType := *source.AuthorizationType + authorizationTypeTemp := genruntime.ToEnum(authorizationType, authorizationContractProperties_AuthorizationType_STATUS_Values) + authorization.AuthorizationType = &authorizationTypeTemp } else { authorization.AuthorizationType = nil } @@ -816,8 +819,9 @@ func (authorization *Service_AuthorizationProviders_Authorization_STATUS) Assign // Oauth2GrantType if source.Oauth2GrantType != nil { - oauth2GrantType := AuthorizationContractProperties_Oauth2GrantType_STATUS(*source.Oauth2GrantType) - authorization.Oauth2GrantType = &oauth2GrantType + oauth2GrantType := *source.Oauth2GrantType + oauth2GrantTypeTemp := genruntime.ToEnum(oauth2GrantType, authorizationContractProperties_Oauth2GrantType_STATUS_Values) + authorization.Oauth2GrantType = &oauth2GrantTypeTemp } else { authorization.Oauth2GrantType = nil } @@ -902,10 +906,20 @@ type AuthorizationContractProperties_AuthorizationType string const AuthorizationContractProperties_AuthorizationType_OAuth2 = AuthorizationContractProperties_AuthorizationType("OAuth2") +// Mapping from string to AuthorizationContractProperties_AuthorizationType +var authorizationContractProperties_AuthorizationType_Values = map[string]AuthorizationContractProperties_AuthorizationType{ + "oauth2": AuthorizationContractProperties_AuthorizationType_OAuth2, +} + type AuthorizationContractProperties_AuthorizationType_STATUS string const AuthorizationContractProperties_AuthorizationType_STATUS_OAuth2 = AuthorizationContractProperties_AuthorizationType_STATUS("OAuth2") +// Mapping from string to AuthorizationContractProperties_AuthorizationType_STATUS +var authorizationContractProperties_AuthorizationType_STATUS_Values = map[string]AuthorizationContractProperties_AuthorizationType_STATUS{ + "oauth2": AuthorizationContractProperties_AuthorizationType_STATUS_OAuth2, +} + // +kubebuilder:validation:Enum={"AuthorizationCode","ClientCredentials"} type AuthorizationContractProperties_Oauth2GrantType string @@ -914,6 +928,12 @@ const ( AuthorizationContractProperties_Oauth2GrantType_ClientCredentials = AuthorizationContractProperties_Oauth2GrantType("ClientCredentials") ) +// Mapping from string to AuthorizationContractProperties_Oauth2GrantType +var authorizationContractProperties_Oauth2GrantType_Values = map[string]AuthorizationContractProperties_Oauth2GrantType{ + "authorizationcode": AuthorizationContractProperties_Oauth2GrantType_AuthorizationCode, + "clientcredentials": AuthorizationContractProperties_Oauth2GrantType_ClientCredentials, +} + type AuthorizationContractProperties_Oauth2GrantType_STATUS string const ( @@ -921,6 +941,12 @@ const ( AuthorizationContractProperties_Oauth2GrantType_STATUS_ClientCredentials = AuthorizationContractProperties_Oauth2GrantType_STATUS("ClientCredentials") ) +// Mapping from string to AuthorizationContractProperties_Oauth2GrantType_STATUS +var authorizationContractProperties_Oauth2GrantType_STATUS_Values = map[string]AuthorizationContractProperties_Oauth2GrantType_STATUS{ + "authorizationcode": AuthorizationContractProperties_Oauth2GrantType_STATUS_AuthorizationCode, + "clientcredentials": AuthorizationContractProperties_Oauth2GrantType_STATUS_ClientCredentials, +} + // Authorization error details. type AuthorizationError_STATUS struct { // Code: Error code diff --git a/v2/api/apimanagement/v1api20220801/backend_types_gen.go b/v2/api/apimanagement/v1api20220801/backend_types_gen.go index e2697d9b470..f6f404d2531 100644 --- a/v2/api/apimanagement/v1api20220801/backend_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/backend_types_gen.go @@ -675,8 +675,9 @@ func (backend *Service_Backend_Spec) AssignProperties_From_Service_Backend_Spec( // Protocol if source.Protocol != nil { - protocol := BackendContractProperties_Protocol(*source.Protocol) - backend.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, backendContractProperties_Protocol_Values) + backend.Protocol = &protocolTemp } else { backend.Protocol = nil } @@ -1227,8 +1228,9 @@ func (backend *Service_Backend_STATUS) AssignProperties_From_Service_Backend_STA // Protocol if source.Protocol != nil { - protocol := BackendContractProperties_Protocol_STATUS(*source.Protocol) - backend.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, backendContractProperties_Protocol_STATUS_Values) + backend.Protocol = &protocolTemp } else { backend.Protocol = nil } @@ -1377,6 +1379,12 @@ const ( BackendContractProperties_Protocol_Soap = BackendContractProperties_Protocol("soap") ) +// Mapping from string to BackendContractProperties_Protocol +var backendContractProperties_Protocol_Values = map[string]BackendContractProperties_Protocol{ + "http": BackendContractProperties_Protocol_Http, + "soap": BackendContractProperties_Protocol_Soap, +} + type BackendContractProperties_Protocol_STATUS string const ( @@ -1384,6 +1392,12 @@ const ( BackendContractProperties_Protocol_STATUS_Soap = BackendContractProperties_Protocol_STATUS("soap") ) +// Mapping from string to BackendContractProperties_Protocol_STATUS +var backendContractProperties_Protocol_STATUS_Values = map[string]BackendContractProperties_Protocol_STATUS{ + "http": BackendContractProperties_Protocol_STATUS_Http, + "soap": BackendContractProperties_Protocol_STATUS_Soap, +} + // Details of the Credentials used to connect to Backend. type BackendCredentialsContract struct { // Authorization: Authorization header authentication diff --git a/v2/api/apimanagement/v1api20220801/policy_fragment_types_gen.go b/v2/api/apimanagement/v1api20220801/policy_fragment_types_gen.go index a8d846e03cf..d4d34715d01 100644 --- a/v2/api/apimanagement/v1api20220801/policy_fragment_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/policy_fragment_types_gen.go @@ -503,8 +503,9 @@ func (fragment *Service_PolicyFragment_Spec) AssignProperties_From_Service_Polic // Format if source.Format != nil { - format := PolicyFragmentContractProperties_Format(*source.Format) - fragment.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyFragmentContractProperties_Format_Values) + fragment.Format = &formatTemp } else { fragment.Format = nil } @@ -759,8 +760,9 @@ func (fragment *Service_PolicyFragment_STATUS) AssignProperties_From_Service_Pol // Format if source.Format != nil { - format := PolicyFragmentContractProperties_Format_STATUS(*source.Format) - fragment.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyFragmentContractProperties_Format_STATUS_Values) + fragment.Format = &formatTemp } else { fragment.Format = nil } @@ -831,6 +833,12 @@ const ( PolicyFragmentContractProperties_Format_Xml = PolicyFragmentContractProperties_Format("xml") ) +// Mapping from string to PolicyFragmentContractProperties_Format +var policyFragmentContractProperties_Format_Values = map[string]PolicyFragmentContractProperties_Format{ + "rawxml": PolicyFragmentContractProperties_Format_Rawxml, + "xml": PolicyFragmentContractProperties_Format_Xml, +} + type PolicyFragmentContractProperties_Format_STATUS string const ( @@ -838,6 +846,12 @@ const ( PolicyFragmentContractProperties_Format_STATUS_Xml = PolicyFragmentContractProperties_Format_STATUS("xml") ) +// Mapping from string to PolicyFragmentContractProperties_Format_STATUS +var policyFragmentContractProperties_Format_STATUS_Values = map[string]PolicyFragmentContractProperties_Format_STATUS{ + "rawxml": PolicyFragmentContractProperties_Format_STATUS_Rawxml, + "xml": PolicyFragmentContractProperties_Format_STATUS_Xml, +} + func init() { SchemeBuilder.Register(&PolicyFragment{}, &PolicyFragmentList{}) } diff --git a/v2/api/apimanagement/v1api20220801/policy_types_gen.go b/v2/api/apimanagement/v1api20220801/policy_types_gen.go index a3c0914337a..18ef1f2d723 100644 --- a/v2/api/apimanagement/v1api20220801/policy_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/policy_types_gen.go @@ -455,8 +455,9 @@ func (policy *Service_Policy_Spec) AssignProperties_From_Service_Policy_Spec(sou // Format if source.Format != nil { - format := PolicyContractProperties_Format(*source.Format) - policy.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyContractProperties_Format_Values) + policy.Format = &formatTemp } else { policy.Format = nil } @@ -672,8 +673,9 @@ func (policy *Service_Policy_STATUS) AssignProperties_From_Service_Policy_STATUS // Format if source.Format != nil { - format := PolicyContractProperties_Format_STATUS(*source.Format) - policy.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyContractProperties_Format_STATUS_Values) + policy.Format = &formatTemp } else { policy.Format = nil } @@ -743,6 +745,14 @@ const ( PolicyContractProperties_Format_XmlLink = PolicyContractProperties_Format("xml-link") ) +// Mapping from string to PolicyContractProperties_Format +var policyContractProperties_Format_Values = map[string]PolicyContractProperties_Format{ + "rawxml": PolicyContractProperties_Format_Rawxml, + "rawxml-link": PolicyContractProperties_Format_RawxmlLink, + "xml": PolicyContractProperties_Format_Xml, + "xml-link": PolicyContractProperties_Format_XmlLink, +} + type PolicyContractProperties_Format_STATUS string const ( @@ -752,6 +762,14 @@ const ( PolicyContractProperties_Format_STATUS_XmlLink = PolicyContractProperties_Format_STATUS("xml-link") ) +// Mapping from string to PolicyContractProperties_Format_STATUS +var policyContractProperties_Format_STATUS_Values = map[string]PolicyContractProperties_Format_STATUS{ + "rawxml": PolicyContractProperties_Format_STATUS_Rawxml, + "rawxml-link": PolicyContractProperties_Format_STATUS_RawxmlLink, + "xml": PolicyContractProperties_Format_STATUS_Xml, + "xml-link": PolicyContractProperties_Format_STATUS_XmlLink, +} + func init() { SchemeBuilder.Register(&Policy{}, &PolicyList{}) } diff --git a/v2/api/apimanagement/v1api20220801/product_policy_types_gen.go b/v2/api/apimanagement/v1api20220801/product_policy_types_gen.go index 02c86408731..3c3fa57fa81 100644 --- a/v2/api/apimanagement/v1api20220801/product_policy_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/product_policy_types_gen.go @@ -455,8 +455,9 @@ func (policy *Service_Products_Policy_Spec) AssignProperties_From_Service_Produc // Format if source.Format != nil { - format := PolicyContractProperties_Format(*source.Format) - policy.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyContractProperties_Format_Values) + policy.Format = &formatTemp } else { policy.Format = nil } @@ -672,8 +673,9 @@ func (policy *Service_Products_Policy_STATUS) AssignProperties_From_Service_Prod // Format if source.Format != nil { - format := PolicyContractProperties_Format_STATUS(*source.Format) - policy.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyContractProperties_Format_STATUS_Values) + policy.Format = &formatTemp } else { policy.Format = nil } diff --git a/v2/api/apimanagement/v1api20220801/product_types_gen.go b/v2/api/apimanagement/v1api20220801/product_types_gen.go index 3bf7818bc77..bb47c4e7a8a 100644 --- a/v2/api/apimanagement/v1api20220801/product_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/product_types_gen.go @@ -607,8 +607,9 @@ func (product *Service_Product_Spec) AssignProperties_From_Service_Product_Spec( // State if source.State != nil { - state := ProductContractProperties_State(*source.State) - product.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, productContractProperties_State_Values) + product.State = &stateTemp } else { product.State = nil } @@ -994,8 +995,9 @@ func (product *Service_Product_STATUS) AssignProperties_From_Service_Product_STA // State if source.State != nil { - state := ProductContractProperties_State_STATUS(*source.State) - product.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, productContractProperties_State_STATUS_Values) + product.State = &stateTemp } else { product.State = nil } @@ -1093,6 +1095,12 @@ const ( ProductContractProperties_State_Published = ProductContractProperties_State("published") ) +// Mapping from string to ProductContractProperties_State +var productContractProperties_State_Values = map[string]ProductContractProperties_State{ + "notpublished": ProductContractProperties_State_NotPublished, + "published": ProductContractProperties_State_Published, +} + type ProductContractProperties_State_STATUS string const ( @@ -1100,6 +1108,12 @@ const ( ProductContractProperties_State_STATUS_Published = ProductContractProperties_State_STATUS("published") ) +// Mapping from string to ProductContractProperties_State_STATUS +var productContractProperties_State_STATUS_Values = map[string]ProductContractProperties_State_STATUS{ + "notpublished": ProductContractProperties_State_STATUS_NotPublished, + "published": ProductContractProperties_State_STATUS_Published, +} + func init() { SchemeBuilder.Register(&Product{}, &ProductList{}) } diff --git a/v2/api/apimanagement/v1api20220801/service_spec_arm_types_gen.go b/v2/api/apimanagement/v1api20220801/service_spec_arm_types_gen.go index 8a4079f9282..27afdec84cc 100644 --- a/v2/api/apimanagement/v1api20220801/service_spec_arm_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/service_spec_arm_types_gen.go @@ -172,6 +172,14 @@ const ( ApiManagementServiceIdentity_Type_UserAssigned = ApiManagementServiceIdentity_Type("UserAssigned") ) +// Mapping from string to ApiManagementServiceIdentity_Type +var apiManagementServiceIdentity_Type_Values = map[string]ApiManagementServiceIdentity_Type{ + "none": ApiManagementServiceIdentity_Type_None, + "systemassigned": ApiManagementServiceIdentity_Type_SystemAssigned, + "systemassigned, userassigned": ApiManagementServiceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ApiManagementServiceIdentity_Type_UserAssigned, +} + // +kubebuilder:validation:Enum={"Basic","Consumption","Developer","Isolated","Premium","Standard"} type ApiManagementServiceSkuProperties_Name string @@ -184,6 +192,16 @@ const ( ApiManagementServiceSkuProperties_Name_Standard = ApiManagementServiceSkuProperties_Name("Standard") ) +// Mapping from string to ApiManagementServiceSkuProperties_Name +var apiManagementServiceSkuProperties_Name_Values = map[string]ApiManagementServiceSkuProperties_Name{ + "basic": ApiManagementServiceSkuProperties_Name_Basic, + "consumption": ApiManagementServiceSkuProperties_Name_Consumption, + "developer": ApiManagementServiceSkuProperties_Name_Developer, + "isolated": ApiManagementServiceSkuProperties_Name_Isolated, + "premium": ApiManagementServiceSkuProperties_Name_Premium, + "standard": ApiManagementServiceSkuProperties_Name_Standard, +} + // Control Plane Apis version constraint for the API Management service. type ApiVersionConstraint_ARM struct { // MinApiVersion: Limit control plane API calls to API Management service with version equal to or newer than this value. diff --git a/v2/api/apimanagement/v1api20220801/service_status_arm_types_gen.go b/v2/api/apimanagement/v1api20220801/service_status_arm_types_gen.go index a8c83e6bb2e..b2138c0fcff 100644 --- a/v2/api/apimanagement/v1api20220801/service_status_arm_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/service_status_arm_types_gen.go @@ -271,6 +271,14 @@ const ( ApiManagementServiceIdentity_Type_STATUS_UserAssigned = ApiManagementServiceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ApiManagementServiceIdentity_Type_STATUS +var apiManagementServiceIdentity_Type_STATUS_Values = map[string]ApiManagementServiceIdentity_Type_STATUS{ + "none": ApiManagementServiceIdentity_Type_STATUS_None, + "systemassigned": ApiManagementServiceIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": ApiManagementServiceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ApiManagementServiceIdentity_Type_STATUS_UserAssigned, +} + type ApiManagementServiceSkuProperties_Name_STATUS string const ( @@ -282,6 +290,16 @@ const ( ApiManagementServiceSkuProperties_Name_STATUS_Standard = ApiManagementServiceSkuProperties_Name_STATUS("Standard") ) +// Mapping from string to ApiManagementServiceSkuProperties_Name_STATUS +var apiManagementServiceSkuProperties_Name_STATUS_Values = map[string]ApiManagementServiceSkuProperties_Name_STATUS{ + "basic": ApiManagementServiceSkuProperties_Name_STATUS_Basic, + "consumption": ApiManagementServiceSkuProperties_Name_STATUS_Consumption, + "developer": ApiManagementServiceSkuProperties_Name_STATUS_Developer, + "isolated": ApiManagementServiceSkuProperties_Name_STATUS_Isolated, + "premium": ApiManagementServiceSkuProperties_Name_STATUS_Premium, + "standard": ApiManagementServiceSkuProperties_Name_STATUS_Standard, +} + // Control Plane Apis version constraint for the API Management service. type ApiVersionConstraint_STATUS_ARM struct { // MinApiVersion: Limit control plane API calls to API Management service with version equal to or newer than this value. @@ -364,6 +382,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -373,6 +399,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + type UserIdentityProperties_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/apimanagement/v1api20220801/service_subscription_spec_arm_types_gen.go b/v2/api/apimanagement/v1api20220801/service_subscription_spec_arm_types_gen.go index a0347b21516..b516110bb3c 100644 --- a/v2/api/apimanagement/v1api20220801/service_subscription_spec_arm_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/service_subscription_spec_arm_types_gen.go @@ -67,3 +67,13 @@ const ( SubscriptionCreateParameterProperties_State_Submitted = SubscriptionCreateParameterProperties_State("submitted") SubscriptionCreateParameterProperties_State_Suspended = SubscriptionCreateParameterProperties_State("suspended") ) + +// Mapping from string to SubscriptionCreateParameterProperties_State +var subscriptionCreateParameterProperties_State_Values = map[string]SubscriptionCreateParameterProperties_State{ + "active": SubscriptionCreateParameterProperties_State_Active, + "cancelled": SubscriptionCreateParameterProperties_State_Cancelled, + "expired": SubscriptionCreateParameterProperties_State_Expired, + "rejected": SubscriptionCreateParameterProperties_State_Rejected, + "submitted": SubscriptionCreateParameterProperties_State_Submitted, + "suspended": SubscriptionCreateParameterProperties_State_Suspended, +} diff --git a/v2/api/apimanagement/v1api20220801/service_subscription_status_arm_types_gen.go b/v2/api/apimanagement/v1api20220801/service_subscription_status_arm_types_gen.go index cf33ffff0c5..58a6d31401d 100644 --- a/v2/api/apimanagement/v1api20220801/service_subscription_status_arm_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/service_subscription_status_arm_types_gen.go @@ -77,3 +77,13 @@ const ( SubscriptionContractProperties_State_STATUS_Submitted = SubscriptionContractProperties_State_STATUS("submitted") SubscriptionContractProperties_State_STATUS_Suspended = SubscriptionContractProperties_State_STATUS("suspended") ) + +// Mapping from string to SubscriptionContractProperties_State_STATUS +var subscriptionContractProperties_State_STATUS_Values = map[string]SubscriptionContractProperties_State_STATUS{ + "active": SubscriptionContractProperties_State_STATUS_Active, + "cancelled": SubscriptionContractProperties_State_STATUS_Cancelled, + "expired": SubscriptionContractProperties_State_STATUS_Expired, + "rejected": SubscriptionContractProperties_State_STATUS_Rejected, + "submitted": SubscriptionContractProperties_State_STATUS_Submitted, + "suspended": SubscriptionContractProperties_State_STATUS_Suspended, +} diff --git a/v2/api/apimanagement/v1api20220801/service_types_gen.go b/v2/api/apimanagement/v1api20220801/service_types_gen.go index 3357a625e08..d7ed94934a5 100644 --- a/v2/api/apimanagement/v1api20220801/service_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/service_types_gen.go @@ -997,8 +997,9 @@ func (service *Service_Spec) AssignProperties_From_Service_Spec(source *v2022080 // NatGatewayState if source.NatGatewayState != nil { - natGatewayState := ApiManagementServiceProperties_NatGatewayState(*source.NatGatewayState) - service.NatGatewayState = &natGatewayState + natGatewayState := *source.NatGatewayState + natGatewayStateTemp := genruntime.ToEnum(natGatewayState, apiManagementServiceProperties_NatGatewayState_Values) + service.NatGatewayState = &natGatewayStateTemp } else { service.NatGatewayState = nil } @@ -1029,8 +1030,9 @@ func (service *Service_Spec) AssignProperties_From_Service_Spec(source *v2022080 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ApiManagementServiceProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - service.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, apiManagementServiceProperties_PublicNetworkAccess_Values) + service.PublicNetworkAccess = &publicNetworkAccessTemp } else { service.PublicNetworkAccess = nil } @@ -1088,8 +1090,9 @@ func (service *Service_Spec) AssignProperties_From_Service_Spec(source *v2022080 // VirtualNetworkType if source.VirtualNetworkType != nil { - virtualNetworkType := ApiManagementServiceProperties_VirtualNetworkType(*source.VirtualNetworkType) - service.VirtualNetworkType = &virtualNetworkType + virtualNetworkType := *source.VirtualNetworkType + virtualNetworkTypeTemp := genruntime.ToEnum(virtualNetworkType, apiManagementServiceProperties_VirtualNetworkType_Values) + service.VirtualNetworkType = &virtualNetworkTypeTemp } else { service.VirtualNetworkType = nil } @@ -2269,8 +2272,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // NatGatewayState if source.NatGatewayState != nil { - natGatewayState := ApiManagementServiceProperties_NatGatewayState_STATUS(*source.NatGatewayState) - service.NatGatewayState = &natGatewayState + natGatewayState := *source.NatGatewayState + natGatewayStateTemp := genruntime.ToEnum(natGatewayState, apiManagementServiceProperties_NatGatewayState_STATUS_Values) + service.NatGatewayState = &natGatewayStateTemp } else { service.NatGatewayState = nil } @@ -2283,8 +2287,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // PlatformVersion if source.PlatformVersion != nil { - platformVersion := ApiManagementServiceProperties_PlatformVersion_STATUS(*source.PlatformVersion) - service.PlatformVersion = &platformVersion + platformVersion := *source.PlatformVersion + platformVersionTemp := genruntime.ToEnum(platformVersion, apiManagementServiceProperties_PlatformVersion_STATUS_Values) + service.PlatformVersion = &platformVersionTemp } else { service.PlatformVersion = nil } @@ -2324,8 +2329,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ApiManagementServiceProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - service.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, apiManagementServiceProperties_PublicNetworkAccess_STATUS_Values) + service.PublicNetworkAccess = &publicNetworkAccessTemp } else { service.PublicNetworkAccess = nil } @@ -2394,8 +2400,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // VirtualNetworkType if source.VirtualNetworkType != nil { - virtualNetworkType := ApiManagementServiceProperties_VirtualNetworkType_STATUS(*source.VirtualNetworkType) - service.VirtualNetworkType = &virtualNetworkType + virtualNetworkType := *source.VirtualNetworkType + virtualNetworkTypeTemp := genruntime.ToEnum(virtualNetworkType, apiManagementServiceProperties_VirtualNetworkType_STATUS_Values) + service.VirtualNetworkType = &virtualNetworkTypeTemp } else { service.VirtualNetworkType = nil } @@ -2857,8 +2864,9 @@ func (location *AdditionalLocation) AssignProperties_From_AdditionalLocation(sou // NatGatewayState if source.NatGatewayState != nil { - natGatewayState := AdditionalLocation_NatGatewayState(*source.NatGatewayState) - location.NatGatewayState = &natGatewayState + natGatewayState := *source.NatGatewayState + natGatewayStateTemp := genruntime.ToEnum(natGatewayState, additionalLocation_NatGatewayState_Values) + location.NatGatewayState = &natGatewayStateTemp } else { location.NatGatewayState = nil } @@ -3193,8 +3201,9 @@ func (location *AdditionalLocation_STATUS) AssignProperties_From_AdditionalLocat // NatGatewayState if source.NatGatewayState != nil { - natGatewayState := AdditionalLocation_NatGatewayState_STATUS(*source.NatGatewayState) - location.NatGatewayState = &natGatewayState + natGatewayState := *source.NatGatewayState + natGatewayStateTemp := genruntime.ToEnum(natGatewayState, additionalLocation_NatGatewayState_STATUS_Values) + location.NatGatewayState = &natGatewayStateTemp } else { location.NatGatewayState = nil } @@ -3204,8 +3213,9 @@ func (location *AdditionalLocation_STATUS) AssignProperties_From_AdditionalLocat // PlatformVersion if source.PlatformVersion != nil { - platformVersion := AdditionalLocation_PlatformVersion_STATUS(*source.PlatformVersion) - location.PlatformVersion = &platformVersion + platformVersion := *source.PlatformVersion + platformVersionTemp := genruntime.ToEnum(platformVersion, additionalLocation_PlatformVersion_STATUS_Values) + location.PlatformVersion = &platformVersionTemp } else { location.PlatformVersion = nil } @@ -3406,8 +3416,9 @@ func (identity *ApiManagementServiceIdentity) AssignProperties_From_ApiManagemen // Type if source.Type != nil { - typeVar := ApiManagementServiceIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, apiManagementServiceIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3582,8 +3593,9 @@ func (identity *ApiManagementServiceIdentity_STATUS) AssignProperties_From_ApiMa // Type if source.Type != nil { - typeVar := ApiManagementServiceIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, apiManagementServiceIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3666,6 +3678,12 @@ const ( ApiManagementServiceProperties_NatGatewayState_Enabled = ApiManagementServiceProperties_NatGatewayState("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_NatGatewayState +var apiManagementServiceProperties_NatGatewayState_Values = map[string]ApiManagementServiceProperties_NatGatewayState{ + "disabled": ApiManagementServiceProperties_NatGatewayState_Disabled, + "enabled": ApiManagementServiceProperties_NatGatewayState_Enabled, +} + type ApiManagementServiceProperties_NatGatewayState_STATUS string const ( @@ -3673,6 +3691,12 @@ const ( ApiManagementServiceProperties_NatGatewayState_STATUS_Enabled = ApiManagementServiceProperties_NatGatewayState_STATUS("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_NatGatewayState_STATUS +var apiManagementServiceProperties_NatGatewayState_STATUS_Values = map[string]ApiManagementServiceProperties_NatGatewayState_STATUS{ + "disabled": ApiManagementServiceProperties_NatGatewayState_STATUS_Disabled, + "enabled": ApiManagementServiceProperties_NatGatewayState_STATUS_Enabled, +} + type ApiManagementServiceProperties_PlatformVersion_STATUS string const ( @@ -3682,6 +3706,14 @@ const ( ApiManagementServiceProperties_PlatformVersion_STATUS_Undetermined = ApiManagementServiceProperties_PlatformVersion_STATUS("undetermined") ) +// Mapping from string to ApiManagementServiceProperties_PlatformVersion_STATUS +var apiManagementServiceProperties_PlatformVersion_STATUS_Values = map[string]ApiManagementServiceProperties_PlatformVersion_STATUS{ + "mtv1": ApiManagementServiceProperties_PlatformVersion_STATUS_Mtv1, + "stv1": ApiManagementServiceProperties_PlatformVersion_STATUS_Stv1, + "stv2": ApiManagementServiceProperties_PlatformVersion_STATUS_Stv2, + "undetermined": ApiManagementServiceProperties_PlatformVersion_STATUS_Undetermined, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ApiManagementServiceProperties_PublicNetworkAccess string @@ -3690,6 +3722,12 @@ const ( ApiManagementServiceProperties_PublicNetworkAccess_Enabled = ApiManagementServiceProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_PublicNetworkAccess +var apiManagementServiceProperties_PublicNetworkAccess_Values = map[string]ApiManagementServiceProperties_PublicNetworkAccess{ + "disabled": ApiManagementServiceProperties_PublicNetworkAccess_Disabled, + "enabled": ApiManagementServiceProperties_PublicNetworkAccess_Enabled, +} + type ApiManagementServiceProperties_PublicNetworkAccess_STATUS string const ( @@ -3697,6 +3735,12 @@ const ( ApiManagementServiceProperties_PublicNetworkAccess_STATUS_Enabled = ApiManagementServiceProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_PublicNetworkAccess_STATUS +var apiManagementServiceProperties_PublicNetworkAccess_STATUS_Values = map[string]ApiManagementServiceProperties_PublicNetworkAccess_STATUS{ + "disabled": ApiManagementServiceProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ApiManagementServiceProperties_PublicNetworkAccess_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"External","Internal","None"} type ApiManagementServiceProperties_VirtualNetworkType string @@ -3706,6 +3750,13 @@ const ( ApiManagementServiceProperties_VirtualNetworkType_None = ApiManagementServiceProperties_VirtualNetworkType("None") ) +// Mapping from string to ApiManagementServiceProperties_VirtualNetworkType +var apiManagementServiceProperties_VirtualNetworkType_Values = map[string]ApiManagementServiceProperties_VirtualNetworkType{ + "external": ApiManagementServiceProperties_VirtualNetworkType_External, + "internal": ApiManagementServiceProperties_VirtualNetworkType_Internal, + "none": ApiManagementServiceProperties_VirtualNetworkType_None, +} + type ApiManagementServiceProperties_VirtualNetworkType_STATUS string const ( @@ -3714,6 +3765,13 @@ const ( ApiManagementServiceProperties_VirtualNetworkType_STATUS_None = ApiManagementServiceProperties_VirtualNetworkType_STATUS("None") ) +// Mapping from string to ApiManagementServiceProperties_VirtualNetworkType_STATUS +var apiManagementServiceProperties_VirtualNetworkType_STATUS_Values = map[string]ApiManagementServiceProperties_VirtualNetworkType_STATUS{ + "external": ApiManagementServiceProperties_VirtualNetworkType_STATUS_External, + "internal": ApiManagementServiceProperties_VirtualNetworkType_STATUS_Internal, + "none": ApiManagementServiceProperties_VirtualNetworkType_STATUS_None, +} + // API Management service resource SKU properties. type ApiManagementServiceSkuProperties struct { // +kubebuilder:validation:Required @@ -3784,8 +3842,9 @@ func (properties *ApiManagementServiceSkuProperties) AssignProperties_From_ApiMa // Name if source.Name != nil { - name := ApiManagementServiceSkuProperties_Name(*source.Name) - properties.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, apiManagementServiceSkuProperties_Name_Values) + properties.Name = &nameTemp } else { properties.Name = nil } @@ -3886,8 +3945,9 @@ func (properties *ApiManagementServiceSkuProperties_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := ApiManagementServiceSkuProperties_Name_STATUS(*source.Name) - properties.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, apiManagementServiceSkuProperties_Name_STATUS_Values) + properties.Name = &nameTemp } else { properties.Name = nil } @@ -4195,8 +4255,9 @@ func (configuration *CertificateConfiguration) AssignProperties_From_Certificate // StoreName if source.StoreName != nil { - storeName := CertificateConfiguration_StoreName(*source.StoreName) - configuration.StoreName = &storeName + storeName := *source.StoreName + storeNameTemp := genruntime.ToEnum(storeName, certificateConfiguration_StoreName_Values) + configuration.StoreName = &storeNameTemp } else { configuration.StoreName = nil } @@ -4356,8 +4417,9 @@ func (configuration *CertificateConfiguration_STATUS) AssignProperties_From_Cert // StoreName if source.StoreName != nil { - storeName := CertificateConfiguration_StoreName_STATUS(*source.StoreName) - configuration.StoreName = &storeName + storeName := *source.StoreName + storeNameTemp := genruntime.ToEnum(storeName, certificateConfiguration_StoreName_STATUS_Values) + configuration.StoreName = &storeNameTemp } else { configuration.StoreName = nil } @@ -4656,16 +4718,18 @@ func (configuration *HostnameConfiguration) AssignProperties_From_HostnameConfig // CertificateSource if source.CertificateSource != nil { - certificateSource := HostnameConfiguration_CertificateSource(*source.CertificateSource) - configuration.CertificateSource = &certificateSource + certificateSource := *source.CertificateSource + certificateSourceTemp := genruntime.ToEnum(certificateSource, hostnameConfiguration_CertificateSource_Values) + configuration.CertificateSource = &certificateSourceTemp } else { configuration.CertificateSource = nil } // CertificateStatus if source.CertificateStatus != nil { - certificateStatus := HostnameConfiguration_CertificateStatus(*source.CertificateStatus) - configuration.CertificateStatus = &certificateStatus + certificateStatus := *source.CertificateStatus + certificateStatusTemp := genruntime.ToEnum(certificateStatus, hostnameConfiguration_CertificateStatus_Values) + configuration.CertificateStatus = &certificateStatusTemp } else { configuration.CertificateStatus = nil } @@ -4708,8 +4772,9 @@ func (configuration *HostnameConfiguration) AssignProperties_From_HostnameConfig // Type if source.Type != nil { - typeVar := HostnameConfiguration_Type(*source.Type) - configuration.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, hostnameConfiguration_Type_Values) + configuration.Type = &typeTemp } else { configuration.Type = nil } @@ -5024,16 +5089,18 @@ func (configuration *HostnameConfiguration_STATUS) AssignProperties_From_Hostnam // CertificateSource if source.CertificateSource != nil { - certificateSource := HostnameConfiguration_CertificateSource_STATUS(*source.CertificateSource) - configuration.CertificateSource = &certificateSource + certificateSource := *source.CertificateSource + certificateSourceTemp := genruntime.ToEnum(certificateSource, hostnameConfiguration_CertificateSource_STATUS_Values) + configuration.CertificateSource = &certificateSourceTemp } else { configuration.CertificateSource = nil } // CertificateStatus if source.CertificateStatus != nil { - certificateStatus := HostnameConfiguration_CertificateStatus_STATUS(*source.CertificateStatus) - configuration.CertificateStatus = &certificateStatus + certificateStatus := *source.CertificateStatus + certificateStatusTemp := genruntime.ToEnum(certificateStatus, hostnameConfiguration_CertificateStatus_STATUS_Values) + configuration.CertificateStatus = &certificateStatusTemp } else { configuration.CertificateStatus = nil } @@ -5068,8 +5135,9 @@ func (configuration *HostnameConfiguration_STATUS) AssignProperties_From_Hostnam // Type if source.Type != nil { - typeVar := HostnameConfiguration_Type_STATUS(*source.Type) - configuration.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, hostnameConfiguration_Type_STATUS_Values) + configuration.Type = &typeTemp } else { configuration.Type = nil } @@ -5451,8 +5519,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -5465,8 +5534,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -5715,6 +5785,12 @@ const ( AdditionalLocation_NatGatewayState_Enabled = AdditionalLocation_NatGatewayState("Enabled") ) +// Mapping from string to AdditionalLocation_NatGatewayState +var additionalLocation_NatGatewayState_Values = map[string]AdditionalLocation_NatGatewayState{ + "disabled": AdditionalLocation_NatGatewayState_Disabled, + "enabled": AdditionalLocation_NatGatewayState_Enabled, +} + type AdditionalLocation_NatGatewayState_STATUS string const ( @@ -5722,6 +5798,12 @@ const ( AdditionalLocation_NatGatewayState_STATUS_Enabled = AdditionalLocation_NatGatewayState_STATUS("Enabled") ) +// Mapping from string to AdditionalLocation_NatGatewayState_STATUS +var additionalLocation_NatGatewayState_STATUS_Values = map[string]AdditionalLocation_NatGatewayState_STATUS{ + "disabled": AdditionalLocation_NatGatewayState_STATUS_Disabled, + "enabled": AdditionalLocation_NatGatewayState_STATUS_Enabled, +} + type AdditionalLocation_PlatformVersion_STATUS string const ( @@ -5731,6 +5813,14 @@ const ( AdditionalLocation_PlatformVersion_STATUS_Undetermined = AdditionalLocation_PlatformVersion_STATUS("undetermined") ) +// Mapping from string to AdditionalLocation_PlatformVersion_STATUS +var additionalLocation_PlatformVersion_STATUS_Values = map[string]AdditionalLocation_PlatformVersion_STATUS{ + "mtv1": AdditionalLocation_PlatformVersion_STATUS_Mtv1, + "stv1": AdditionalLocation_PlatformVersion_STATUS_Stv1, + "stv2": AdditionalLocation_PlatformVersion_STATUS_Stv2, + "undetermined": AdditionalLocation_PlatformVersion_STATUS_Undetermined, +} + // A wrapper for an ARM resource id type ArmIdWrapper_STATUS struct { Id *string `json:"id,omitempty"` @@ -5797,6 +5887,12 @@ const ( CertificateConfiguration_StoreName_Root = CertificateConfiguration_StoreName("Root") ) +// Mapping from string to CertificateConfiguration_StoreName +var certificateConfiguration_StoreName_Values = map[string]CertificateConfiguration_StoreName{ + "certificateauthority": CertificateConfiguration_StoreName_CertificateAuthority, + "root": CertificateConfiguration_StoreName_Root, +} + type CertificateConfiguration_StoreName_STATUS string const ( @@ -5804,6 +5900,12 @@ const ( CertificateConfiguration_StoreName_STATUS_Root = CertificateConfiguration_StoreName_STATUS("Root") ) +// Mapping from string to CertificateConfiguration_StoreName_STATUS +var certificateConfiguration_StoreName_STATUS_Values = map[string]CertificateConfiguration_StoreName_STATUS{ + "certificateauthority": CertificateConfiguration_StoreName_STATUS_CertificateAuthority, + "root": CertificateConfiguration_StoreName_STATUS_Root, +} + // SSL certificate information. type CertificateInformation struct { // Expiry: Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as @@ -6125,6 +6227,14 @@ const ( HostnameConfiguration_CertificateSource_Managed = HostnameConfiguration_CertificateSource("Managed") ) +// Mapping from string to HostnameConfiguration_CertificateSource +var hostnameConfiguration_CertificateSource_Values = map[string]HostnameConfiguration_CertificateSource{ + "builtin": HostnameConfiguration_CertificateSource_BuiltIn, + "custom": HostnameConfiguration_CertificateSource_Custom, + "keyvault": HostnameConfiguration_CertificateSource_KeyVault, + "managed": HostnameConfiguration_CertificateSource_Managed, +} + type HostnameConfiguration_CertificateSource_STATUS string const ( @@ -6134,6 +6244,14 @@ const ( HostnameConfiguration_CertificateSource_STATUS_Managed = HostnameConfiguration_CertificateSource_STATUS("Managed") ) +// Mapping from string to HostnameConfiguration_CertificateSource_STATUS +var hostnameConfiguration_CertificateSource_STATUS_Values = map[string]HostnameConfiguration_CertificateSource_STATUS{ + "builtin": HostnameConfiguration_CertificateSource_STATUS_BuiltIn, + "custom": HostnameConfiguration_CertificateSource_STATUS_Custom, + "keyvault": HostnameConfiguration_CertificateSource_STATUS_KeyVault, + "managed": HostnameConfiguration_CertificateSource_STATUS_Managed, +} + // +kubebuilder:validation:Enum={"Completed","Failed","InProgress"} type HostnameConfiguration_CertificateStatus string @@ -6143,6 +6261,13 @@ const ( HostnameConfiguration_CertificateStatus_InProgress = HostnameConfiguration_CertificateStatus("InProgress") ) +// Mapping from string to HostnameConfiguration_CertificateStatus +var hostnameConfiguration_CertificateStatus_Values = map[string]HostnameConfiguration_CertificateStatus{ + "completed": HostnameConfiguration_CertificateStatus_Completed, + "failed": HostnameConfiguration_CertificateStatus_Failed, + "inprogress": HostnameConfiguration_CertificateStatus_InProgress, +} + type HostnameConfiguration_CertificateStatus_STATUS string const ( @@ -6151,6 +6276,13 @@ const ( HostnameConfiguration_CertificateStatus_STATUS_InProgress = HostnameConfiguration_CertificateStatus_STATUS("InProgress") ) +// Mapping from string to HostnameConfiguration_CertificateStatus_STATUS +var hostnameConfiguration_CertificateStatus_STATUS_Values = map[string]HostnameConfiguration_CertificateStatus_STATUS{ + "completed": HostnameConfiguration_CertificateStatus_STATUS_Completed, + "failed": HostnameConfiguration_CertificateStatus_STATUS_Failed, + "inprogress": HostnameConfiguration_CertificateStatus_STATUS_InProgress, +} + // +kubebuilder:validation:Enum={"DeveloperPortal","Management","Portal","Proxy","Scm"} type HostnameConfiguration_Type string @@ -6162,6 +6294,15 @@ const ( HostnameConfiguration_Type_Scm = HostnameConfiguration_Type("Scm") ) +// Mapping from string to HostnameConfiguration_Type +var hostnameConfiguration_Type_Values = map[string]HostnameConfiguration_Type{ + "developerportal": HostnameConfiguration_Type_DeveloperPortal, + "management": HostnameConfiguration_Type_Management, + "portal": HostnameConfiguration_Type_Portal, + "proxy": HostnameConfiguration_Type_Proxy, + "scm": HostnameConfiguration_Type_Scm, +} + type HostnameConfiguration_Type_STATUS string const ( @@ -6172,6 +6313,15 @@ const ( HostnameConfiguration_Type_STATUS_Scm = HostnameConfiguration_Type_STATUS("Scm") ) +// Mapping from string to HostnameConfiguration_Type_STATUS +var hostnameConfiguration_Type_STATUS_Values = map[string]HostnameConfiguration_Type_STATUS{ + "developerportal": HostnameConfiguration_Type_STATUS_DeveloperPortal, + "management": HostnameConfiguration_Type_STATUS_Management, + "portal": HostnameConfiguration_Type_STATUS_Portal, + "proxy": HostnameConfiguration_Type_STATUS_Proxy, + "scm": HostnameConfiguration_Type_STATUS_Scm, +} + // A collection of information about the state of the connection between service consumer and provider. type PrivateLinkServiceConnectionState_STATUS struct { // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. @@ -6231,8 +6381,9 @@ func (state *PrivateLinkServiceConnectionState_STATUS) AssignProperties_From_Pri // Status if source.Status != nil { - status := PrivateEndpointServiceConnectionStatus_STATUS(*source.Status) - state.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, privateEndpointServiceConnectionStatus_STATUS_Values) + state.Status = &statusTemp } else { state.Status = nil } @@ -6387,6 +6538,13 @@ const ( PrivateEndpointServiceConnectionStatus_STATUS_Rejected = PrivateEndpointServiceConnectionStatus_STATUS("Rejected") ) +// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS +var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{ + "approved": PrivateEndpointServiceConnectionStatus_STATUS_Approved, + "pending": PrivateEndpointServiceConnectionStatus_STATUS_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_STATUS_Rejected, +} + func init() { SchemeBuilder.Register(&Service{}, &ServiceList{}) } diff --git a/v2/api/apimanagement/v1api20220801/subscription_types_gen.go b/v2/api/apimanagement/v1api20220801/subscription_types_gen.go index 57217e4bc6e..35b0ea0a7ee 100644 --- a/v2/api/apimanagement/v1api20220801/subscription_types_gen.go +++ b/v2/api/apimanagement/v1api20220801/subscription_types_gen.go @@ -646,8 +646,9 @@ func (subscription *Service_Subscription_Spec) AssignProperties_From_Service_Sub // State if source.State != nil { - state := SubscriptionCreateParameterProperties_State(*source.State) - subscription.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, subscriptionCreateParameterProperties_State_Values) + subscription.State = &stateTemp } else { subscription.State = nil } @@ -1095,8 +1096,9 @@ func (subscription *Service_Subscription_STATUS) AssignProperties_From_Service_S // State if source.State != nil { - state := SubscriptionContractProperties_State_STATUS(*source.State) - subscription.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, subscriptionContractProperties_State_STATUS_Values) + subscription.State = &stateTemp } else { subscription.State = nil } diff --git a/v2/api/apimanagement/v1api20230501preview/api_types_gen.go b/v2/api/apimanagement/v1api20230501preview/api_types_gen.go index 6b41b7fc018..627e351920d 100644 --- a/v2/api/apimanagement/v1api20230501preview/api_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/api_types_gen.go @@ -959,8 +959,9 @@ func (serviceApi *Service_Api_Spec) AssignProperties_From_Service_Api_Spec(sourc // ApiType if source.ApiType != nil { - apiType := ApiCreateOrUpdateProperties_ApiType(*source.ApiType) - serviceApi.ApiType = &apiType + apiType := *source.ApiType + apiTypeTemp := genruntime.ToEnum(apiType, apiCreateOrUpdateProperties_ApiType_Values) + serviceApi.ApiType = &apiTypeTemp } else { serviceApi.ApiType = nil } @@ -1033,8 +1034,9 @@ func (serviceApi *Service_Api_Spec) AssignProperties_From_Service_Api_Spec(sourc // Format if source.Format != nil { - format := ApiCreateOrUpdateProperties_Format(*source.Format) - serviceApi.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, apiCreateOrUpdateProperties_Format_Values) + serviceApi.Format = &formatTemp } else { serviceApi.Format = nil } @@ -1081,7 +1083,7 @@ func (serviceApi *Service_Api_Spec) AssignProperties_From_Service_Api_Spec(sourc for protocolIndex, protocolItem := range source.Protocols { // Shadow the loop variable to avoid aliasing protocolItem := protocolItem - protocolList[protocolIndex] = ApiCreateOrUpdateProperties_Protocols(protocolItem) + protocolList[protocolIndex] = genruntime.ToEnum(protocolItem, apiCreateOrUpdateProperties_Protocols_Values) } serviceApi.Protocols = protocolList } else { @@ -1129,16 +1131,18 @@ func (serviceApi *Service_Api_Spec) AssignProperties_From_Service_Api_Spec(sourc // TranslateRequiredQueryParameters if source.TranslateRequiredQueryParameters != nil { - translateRequiredQueryParameter := ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters(*source.TranslateRequiredQueryParameters) - serviceApi.TranslateRequiredQueryParameters = &translateRequiredQueryParameter + translateRequiredQueryParameter := *source.TranslateRequiredQueryParameters + translateRequiredQueryParameterTemp := genruntime.ToEnum(translateRequiredQueryParameter, apiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Values) + serviceApi.TranslateRequiredQueryParameters = &translateRequiredQueryParameterTemp } else { serviceApi.TranslateRequiredQueryParameters = nil } // Type if source.Type != nil { - typeVar := ApiCreateOrUpdateProperties_Type(*source.Type) - serviceApi.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, apiCreateOrUpdateProperties_Type_Values) + serviceApi.Type = &typeTemp } else { serviceApi.Type = nil } @@ -1909,8 +1913,9 @@ func (serviceApi *Service_Api_STATUS) AssignProperties_From_Service_Api_STATUS(s // PropertiesType if source.PropertiesType != nil { - propertiesType := ApiContractProperties_Type_STATUS(*source.PropertiesType) - serviceApi.PropertiesType = &propertiesType + propertiesType := *source.PropertiesType + propertiesTypeTemp := genruntime.ToEnum(propertiesType, apiContractProperties_Type_STATUS_Values) + serviceApi.PropertiesType = &propertiesTypeTemp } else { serviceApi.PropertiesType = nil } @@ -1921,7 +1926,7 @@ func (serviceApi *Service_Api_STATUS) AssignProperties_From_Service_Api_STATUS(s for protocolIndex, protocolItem := range source.Protocols { // Shadow the loop variable to avoid aliasing protocolItem := protocolItem - protocolList[protocolIndex] = ApiContractProperties_Protocols_STATUS(protocolItem) + protocolList[protocolIndex] = genruntime.ToEnum(protocolItem, apiContractProperties_Protocols_STATUS_Values) } serviceApi.Protocols = protocolList } else { @@ -2350,6 +2355,14 @@ const ( ApiContractProperties_Protocols_STATUS_Wss = ApiContractProperties_Protocols_STATUS("wss") ) +// Mapping from string to ApiContractProperties_Protocols_STATUS +var apiContractProperties_Protocols_STATUS_Values = map[string]ApiContractProperties_Protocols_STATUS{ + "http": ApiContractProperties_Protocols_STATUS_Http, + "https": ApiContractProperties_Protocols_STATUS_Https, + "ws": ApiContractProperties_Protocols_STATUS_Ws, + "wss": ApiContractProperties_Protocols_STATUS_Wss, +} + type ApiContractProperties_Type_STATUS string const ( @@ -2361,6 +2374,16 @@ const ( ApiContractProperties_Type_STATUS_Websocket = ApiContractProperties_Type_STATUS("websocket") ) +// Mapping from string to ApiContractProperties_Type_STATUS +var apiContractProperties_Type_STATUS_Values = map[string]ApiContractProperties_Type_STATUS{ + "graphql": ApiContractProperties_Type_STATUS_Graphql, + "grpc": ApiContractProperties_Type_STATUS_Grpc, + "http": ApiContractProperties_Type_STATUS_Http, + "odata": ApiContractProperties_Type_STATUS_Odata, + "soap": ApiContractProperties_Type_STATUS_Soap, + "websocket": ApiContractProperties_Type_STATUS_Websocket, +} + // +kubebuilder:validation:Enum={"graphql","grpc","http","odata","soap","websocket"} type ApiCreateOrUpdateProperties_ApiType string @@ -2373,6 +2396,16 @@ const ( ApiCreateOrUpdateProperties_ApiType_Websocket = ApiCreateOrUpdateProperties_ApiType("websocket") ) +// Mapping from string to ApiCreateOrUpdateProperties_ApiType +var apiCreateOrUpdateProperties_ApiType_Values = map[string]ApiCreateOrUpdateProperties_ApiType{ + "graphql": ApiCreateOrUpdateProperties_ApiType_Graphql, + "grpc": ApiCreateOrUpdateProperties_ApiType_Grpc, + "http": ApiCreateOrUpdateProperties_ApiType_Http, + "odata": ApiCreateOrUpdateProperties_ApiType_Odata, + "soap": ApiCreateOrUpdateProperties_ApiType_Soap, + "websocket": ApiCreateOrUpdateProperties_ApiType_Websocket, +} + // +kubebuilder:validation:Enum={"graphql-link","grpc","grpc-link","odata","odata-link","openapi","openapi+json","openapi+json-link","openapi-link","swagger-json","swagger-link-json","wadl-link-json","wadl-xml","wsdl","wsdl-link"} type ApiCreateOrUpdateProperties_Format string @@ -2394,6 +2427,25 @@ const ( ApiCreateOrUpdateProperties_Format_WsdlLink = ApiCreateOrUpdateProperties_Format("wsdl-link") ) +// Mapping from string to ApiCreateOrUpdateProperties_Format +var apiCreateOrUpdateProperties_Format_Values = map[string]ApiCreateOrUpdateProperties_Format{ + "graphql-link": ApiCreateOrUpdateProperties_Format_GraphqlLink, + "grpc": ApiCreateOrUpdateProperties_Format_Grpc, + "grpc-link": ApiCreateOrUpdateProperties_Format_GrpcLink, + "odata": ApiCreateOrUpdateProperties_Format_Odata, + "odata-link": ApiCreateOrUpdateProperties_Format_OdataLink, + "openapi": ApiCreateOrUpdateProperties_Format_Openapi, + "openapi+json": ApiCreateOrUpdateProperties_Format_OpenapiJson, + "openapi+json-link": ApiCreateOrUpdateProperties_Format_OpenapiJsonLink, + "openapi-link": ApiCreateOrUpdateProperties_Format_OpenapiLink, + "swagger-json": ApiCreateOrUpdateProperties_Format_SwaggerJson, + "swagger-link-json": ApiCreateOrUpdateProperties_Format_SwaggerLinkJson, + "wadl-link-json": ApiCreateOrUpdateProperties_Format_WadlLinkJson, + "wadl-xml": ApiCreateOrUpdateProperties_Format_WadlXml, + "wsdl": ApiCreateOrUpdateProperties_Format_Wsdl, + "wsdl-link": ApiCreateOrUpdateProperties_Format_WsdlLink, +} + // +kubebuilder:validation:Enum={"http","https","ws","wss"} type ApiCreateOrUpdateProperties_Protocols string @@ -2404,6 +2456,14 @@ const ( ApiCreateOrUpdateProperties_Protocols_Wss = ApiCreateOrUpdateProperties_Protocols("wss") ) +// Mapping from string to ApiCreateOrUpdateProperties_Protocols +var apiCreateOrUpdateProperties_Protocols_Values = map[string]ApiCreateOrUpdateProperties_Protocols{ + "http": ApiCreateOrUpdateProperties_Protocols_Http, + "https": ApiCreateOrUpdateProperties_Protocols_Https, + "ws": ApiCreateOrUpdateProperties_Protocols_Ws, + "wss": ApiCreateOrUpdateProperties_Protocols_Wss, +} + // +kubebuilder:validation:Enum={"query","template"} type ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters string @@ -2412,6 +2472,12 @@ const ( ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Template = ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters("template") ) +// Mapping from string to ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters +var apiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Values = map[string]ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters{ + "query": ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Query, + "template": ApiCreateOrUpdateProperties_TranslateRequiredQueryParameters_Template, +} + // +kubebuilder:validation:Enum={"graphql","grpc","http","odata","soap","websocket"} type ApiCreateOrUpdateProperties_Type string @@ -2424,6 +2490,16 @@ const ( ApiCreateOrUpdateProperties_Type_Websocket = ApiCreateOrUpdateProperties_Type("websocket") ) +// Mapping from string to ApiCreateOrUpdateProperties_Type +var apiCreateOrUpdateProperties_Type_Values = map[string]ApiCreateOrUpdateProperties_Type{ + "graphql": ApiCreateOrUpdateProperties_Type_Graphql, + "grpc": ApiCreateOrUpdateProperties_Type_Grpc, + "http": ApiCreateOrUpdateProperties_Type_Http, + "odata": ApiCreateOrUpdateProperties_Type_Odata, + "soap": ApiCreateOrUpdateProperties_Type_Soap, + "websocket": ApiCreateOrUpdateProperties_Type_Websocket, +} + type ApiCreateOrUpdateProperties_WsdlSelector struct { // WsdlEndpointName: Name of endpoint(port) to import from WSDL WsdlEndpointName *string `json:"wsdlEndpointName,omitempty"` @@ -2832,8 +2908,9 @@ func (details *ApiVersionSetContractDetails) AssignProperties_From_ApiVersionSet // VersioningScheme if source.VersioningScheme != nil { - versioningScheme := ApiVersionSetContractDetails_VersioningScheme(*source.VersioningScheme) - details.VersioningScheme = &versioningScheme + versioningScheme := *source.VersioningScheme + versioningSchemeTemp := genruntime.ToEnum(versioningScheme, apiVersionSetContractDetails_VersioningScheme_Values) + details.VersioningScheme = &versioningSchemeTemp } else { details.VersioningScheme = nil } @@ -2981,8 +3058,9 @@ func (details *ApiVersionSetContractDetails_STATUS) AssignProperties_From_ApiVer // VersioningScheme if source.VersioningScheme != nil { - versioningScheme := ApiVersionSetContractDetails_VersioningScheme_STATUS(*source.VersioningScheme) - details.VersioningScheme = &versioningScheme + versioningScheme := *source.VersioningScheme + versioningSchemeTemp := genruntime.ToEnum(versioningScheme, apiVersionSetContractDetails_VersioningScheme_STATUS_Values) + details.VersioningScheme = &versioningSchemeTemp } else { details.VersioningScheme = nil } @@ -3691,6 +3769,13 @@ const ( ApiVersionSetContractDetails_VersioningScheme_Segment = ApiVersionSetContractDetails_VersioningScheme("Segment") ) +// Mapping from string to ApiVersionSetContractDetails_VersioningScheme +var apiVersionSetContractDetails_VersioningScheme_Values = map[string]ApiVersionSetContractDetails_VersioningScheme{ + "header": ApiVersionSetContractDetails_VersioningScheme_Header, + "query": ApiVersionSetContractDetails_VersioningScheme_Query, + "segment": ApiVersionSetContractDetails_VersioningScheme_Segment, +} + type ApiVersionSetContractDetails_VersioningScheme_STATUS string const ( @@ -3699,6 +3784,13 @@ const ( ApiVersionSetContractDetails_VersioningScheme_STATUS_Segment = ApiVersionSetContractDetails_VersioningScheme_STATUS("Segment") ) +// Mapping from string to ApiVersionSetContractDetails_VersioningScheme_STATUS +var apiVersionSetContractDetails_VersioningScheme_STATUS_Values = map[string]ApiVersionSetContractDetails_VersioningScheme_STATUS{ + "header": ApiVersionSetContractDetails_VersioningScheme_STATUS_Header, + "query": ApiVersionSetContractDetails_VersioningScheme_STATUS_Query, + "segment": ApiVersionSetContractDetails_VersioningScheme_STATUS_Segment, +} + // API OAuth2 Authentication settings details. type OAuth2AuthenticationSettingsContract struct { // AuthorizationServerId: OAuth authorization server identifier. @@ -3935,7 +4027,7 @@ func (contract *OpenIdAuthenticationSettingsContract) AssignProperties_From_Open for bearerTokenSendingMethodIndex, bearerTokenSendingMethodItem := range source.BearerTokenSendingMethods { // Shadow the loop variable to avoid aliasing bearerTokenSendingMethodItem := bearerTokenSendingMethodItem - bearerTokenSendingMethodList[bearerTokenSendingMethodIndex] = BearerTokenSendingMethodsContract(bearerTokenSendingMethodItem) + bearerTokenSendingMethodList[bearerTokenSendingMethodIndex] = genruntime.ToEnum(bearerTokenSendingMethodItem, bearerTokenSendingMethodsContract_Values) } contract.BearerTokenSendingMethods = bearerTokenSendingMethodList } else { @@ -4028,7 +4120,7 @@ func (contract *OpenIdAuthenticationSettingsContract_STATUS) AssignProperties_Fr for bearerTokenSendingMethodIndex, bearerTokenSendingMethodItem := range source.BearerTokenSendingMethods { // Shadow the loop variable to avoid aliasing bearerTokenSendingMethodItem := bearerTokenSendingMethodItem - bearerTokenSendingMethodList[bearerTokenSendingMethodIndex] = BearerTokenSendingMethodsContract_STATUS(bearerTokenSendingMethodItem) + bearerTokenSendingMethodList[bearerTokenSendingMethodIndex] = genruntime.ToEnum(bearerTokenSendingMethodItem, bearerTokenSendingMethodsContract_STATUS_Values) } contract.BearerTokenSendingMethods = bearerTokenSendingMethodList } else { @@ -4083,6 +4175,12 @@ const ( BearerTokenSendingMethodsContract_Query = BearerTokenSendingMethodsContract("query") ) +// Mapping from string to BearerTokenSendingMethodsContract +var bearerTokenSendingMethodsContract_Values = map[string]BearerTokenSendingMethodsContract{ + "authorizationheader": BearerTokenSendingMethodsContract_AuthorizationHeader, + "query": BearerTokenSendingMethodsContract_Query, +} + // Form of an authorization grant, which the client uses to request the access token. type BearerTokenSendingMethodsContract_STATUS string @@ -4091,6 +4189,12 @@ const ( BearerTokenSendingMethodsContract_STATUS_Query = BearerTokenSendingMethodsContract_STATUS("query") ) +// Mapping from string to BearerTokenSendingMethodsContract_STATUS +var bearerTokenSendingMethodsContract_STATUS_Values = map[string]BearerTokenSendingMethodsContract_STATUS{ + "authorizationheader": BearerTokenSendingMethodsContract_STATUS_AuthorizationHeader, + "query": BearerTokenSendingMethodsContract_STATUS_Query, +} + func init() { SchemeBuilder.Register(&Api{}, &ApiList{}) } diff --git a/v2/api/apimanagement/v1api20230501preview/api_version_set_types_gen.go b/v2/api/apimanagement/v1api20230501preview/api_version_set_types_gen.go index 6972c7ce313..ee8184a39ad 100644 --- a/v2/api/apimanagement/v1api20230501preview/api_version_set_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/api_version_set_types_gen.go @@ -572,8 +572,9 @@ func (versionSet *Service_ApiVersionSet_Spec) AssignProperties_From_Service_ApiV // VersioningScheme if source.VersioningScheme != nil { - versioningScheme := ApiVersionSetContractProperties_VersioningScheme(*source.VersioningScheme) - versionSet.VersioningScheme = &versioningScheme + versioningScheme := *source.VersioningScheme + versioningSchemeTemp := genruntime.ToEnum(versioningScheme, apiVersionSetContractProperties_VersioningScheme_Values) + versionSet.VersioningScheme = &versioningSchemeTemp } else { versionSet.VersioningScheme = nil } @@ -849,8 +850,9 @@ func (versionSet *Service_ApiVersionSet_STATUS) AssignProperties_From_Service_Ap // VersioningScheme if source.VersioningScheme != nil { - versioningScheme := ApiVersionSetContractProperties_VersioningScheme_STATUS(*source.VersioningScheme) - versionSet.VersioningScheme = &versioningScheme + versioningScheme := *source.VersioningScheme + versioningSchemeTemp := genruntime.ToEnum(versioningScheme, apiVersionSetContractProperties_VersioningScheme_STATUS_Values) + versionSet.VersioningScheme = &versioningSchemeTemp } else { versionSet.VersioningScheme = nil } @@ -916,6 +918,13 @@ const ( ApiVersionSetContractProperties_VersioningScheme_Segment = ApiVersionSetContractProperties_VersioningScheme("Segment") ) +// Mapping from string to ApiVersionSetContractProperties_VersioningScheme +var apiVersionSetContractProperties_VersioningScheme_Values = map[string]ApiVersionSetContractProperties_VersioningScheme{ + "header": ApiVersionSetContractProperties_VersioningScheme_Header, + "query": ApiVersionSetContractProperties_VersioningScheme_Query, + "segment": ApiVersionSetContractProperties_VersioningScheme_Segment, +} + type ApiVersionSetContractProperties_VersioningScheme_STATUS string const ( @@ -924,6 +933,13 @@ const ( ApiVersionSetContractProperties_VersioningScheme_STATUS_Segment = ApiVersionSetContractProperties_VersioningScheme_STATUS("Segment") ) +// Mapping from string to ApiVersionSetContractProperties_VersioningScheme_STATUS +var apiVersionSetContractProperties_VersioningScheme_STATUS_Values = map[string]ApiVersionSetContractProperties_VersioningScheme_STATUS{ + "header": ApiVersionSetContractProperties_VersioningScheme_STATUS_Header, + "query": ApiVersionSetContractProperties_VersioningScheme_STATUS_Query, + "segment": ApiVersionSetContractProperties_VersioningScheme_STATUS_Segment, +} + func init() { SchemeBuilder.Register(&ApiVersionSet{}, &ApiVersionSetList{}) } diff --git a/v2/api/apimanagement/v1api20230501preview/authorization_providers_authorization_types_gen.go b/v2/api/apimanagement/v1api20230501preview/authorization_providers_authorization_types_gen.go index 5e9d80407d6..28bf48f8189 100644 --- a/v2/api/apimanagement/v1api20230501preview/authorization_providers_authorization_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/authorization_providers_authorization_types_gen.go @@ -491,8 +491,9 @@ func (authorization *Service_AuthorizationProviders_Authorization_Spec) AssignPr // AuthorizationType if source.AuthorizationType != nil { - authorizationType := AuthorizationContractProperties_AuthorizationType(*source.AuthorizationType) - authorization.AuthorizationType = &authorizationType + authorizationType := *source.AuthorizationType + authorizationTypeTemp := genruntime.ToEnum(authorizationType, authorizationContractProperties_AuthorizationType_Values) + authorization.AuthorizationType = &authorizationTypeTemp } else { authorization.AuthorizationType = nil } @@ -502,8 +503,9 @@ func (authorization *Service_AuthorizationProviders_Authorization_Spec) AssignPr // Oauth2GrantType if source.Oauth2GrantType != nil { - oauth2GrantType := AuthorizationContractProperties_Oauth2GrantType(*source.Oauth2GrantType) - authorization.Oauth2GrantType = &oauth2GrantType + oauth2GrantType := *source.Oauth2GrantType + oauth2GrantTypeTemp := genruntime.ToEnum(oauth2GrantType, authorizationContractProperties_Oauth2GrantType_Values) + authorization.Oauth2GrantType = &oauth2GrantTypeTemp } else { authorization.Oauth2GrantType = nil } @@ -767,8 +769,9 @@ func (authorization *Service_AuthorizationProviders_Authorization_STATUS) Assign // AuthorizationType if source.AuthorizationType != nil { - authorizationType := AuthorizationContractProperties_AuthorizationType_STATUS(*source.AuthorizationType) - authorization.AuthorizationType = &authorizationType + authorizationType := *source.AuthorizationType + authorizationTypeTemp := genruntime.ToEnum(authorizationType, authorizationContractProperties_AuthorizationType_STATUS_Values) + authorization.AuthorizationType = &authorizationTypeTemp } else { authorization.AuthorizationType = nil } @@ -796,8 +799,9 @@ func (authorization *Service_AuthorizationProviders_Authorization_STATUS) Assign // Oauth2GrantType if source.Oauth2GrantType != nil { - oauth2GrantType := AuthorizationContractProperties_Oauth2GrantType_STATUS(*source.Oauth2GrantType) - authorization.Oauth2GrantType = &oauth2GrantType + oauth2GrantType := *source.Oauth2GrantType + oauth2GrantTypeTemp := genruntime.ToEnum(oauth2GrantType, authorizationContractProperties_Oauth2GrantType_STATUS_Values) + authorization.Oauth2GrantType = &oauth2GrantTypeTemp } else { authorization.Oauth2GrantType = nil } @@ -882,10 +886,20 @@ type AuthorizationContractProperties_AuthorizationType string const AuthorizationContractProperties_AuthorizationType_OAuth2 = AuthorizationContractProperties_AuthorizationType("OAuth2") +// Mapping from string to AuthorizationContractProperties_AuthorizationType +var authorizationContractProperties_AuthorizationType_Values = map[string]AuthorizationContractProperties_AuthorizationType{ + "oauth2": AuthorizationContractProperties_AuthorizationType_OAuth2, +} + type AuthorizationContractProperties_AuthorizationType_STATUS string const AuthorizationContractProperties_AuthorizationType_STATUS_OAuth2 = AuthorizationContractProperties_AuthorizationType_STATUS("OAuth2") +// Mapping from string to AuthorizationContractProperties_AuthorizationType_STATUS +var authorizationContractProperties_AuthorizationType_STATUS_Values = map[string]AuthorizationContractProperties_AuthorizationType_STATUS{ + "oauth2": AuthorizationContractProperties_AuthorizationType_STATUS_OAuth2, +} + // +kubebuilder:validation:Enum={"AuthorizationCode","ClientCredentials"} type AuthorizationContractProperties_Oauth2GrantType string @@ -894,6 +908,12 @@ const ( AuthorizationContractProperties_Oauth2GrantType_ClientCredentials = AuthorizationContractProperties_Oauth2GrantType("ClientCredentials") ) +// Mapping from string to AuthorizationContractProperties_Oauth2GrantType +var authorizationContractProperties_Oauth2GrantType_Values = map[string]AuthorizationContractProperties_Oauth2GrantType{ + "authorizationcode": AuthorizationContractProperties_Oauth2GrantType_AuthorizationCode, + "clientcredentials": AuthorizationContractProperties_Oauth2GrantType_ClientCredentials, +} + type AuthorizationContractProperties_Oauth2GrantType_STATUS string const ( @@ -901,6 +921,12 @@ const ( AuthorizationContractProperties_Oauth2GrantType_STATUS_ClientCredentials = AuthorizationContractProperties_Oauth2GrantType_STATUS("ClientCredentials") ) +// Mapping from string to AuthorizationContractProperties_Oauth2GrantType_STATUS +var authorizationContractProperties_Oauth2GrantType_STATUS_Values = map[string]AuthorizationContractProperties_Oauth2GrantType_STATUS{ + "authorizationcode": AuthorizationContractProperties_Oauth2GrantType_STATUS_AuthorizationCode, + "clientcredentials": AuthorizationContractProperties_Oauth2GrantType_STATUS_ClientCredentials, +} + // Authorization error details. type AuthorizationError_STATUS struct { // Code: Error code diff --git a/v2/api/apimanagement/v1api20230501preview/backend_types_gen.go b/v2/api/apimanagement/v1api20230501preview/backend_types_gen.go index 4e6e7c969f9..4fcb7ae20a9 100644 --- a/v2/api/apimanagement/v1api20230501preview/backend_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/backend_types_gen.go @@ -771,8 +771,9 @@ func (backend *Service_Backend_Spec) AssignProperties_From_Service_Backend_Spec( // Protocol if source.Protocol != nil { - protocol := BackendContractProperties_Protocol(*source.Protocol) - backend.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, backendContractProperties_Protocol_Values) + backend.Protocol = &protocolTemp } else { backend.Protocol = nil } @@ -819,8 +820,9 @@ func (backend *Service_Backend_Spec) AssignProperties_From_Service_Backend_Spec( // Type if source.Type != nil { - typeVar := BackendContractProperties_Type(*source.Type) - backend.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, backendContractProperties_Type_Values) + backend.Type = &typeTemp } else { backend.Type = nil } @@ -1338,16 +1340,18 @@ func (backend *Service_Backend_STATUS) AssignProperties_From_Service_Backend_STA // PropertiesType if source.PropertiesType != nil { - propertiesType := BackendContractProperties_Type_STATUS(*source.PropertiesType) - backend.PropertiesType = &propertiesType + propertiesType := *source.PropertiesType + propertiesTypeTemp := genruntime.ToEnum(propertiesType, backendContractProperties_Type_STATUS_Values) + backend.PropertiesType = &propertiesTypeTemp } else { backend.PropertiesType = nil } // Protocol if source.Protocol != nil { - protocol := BackendContractProperties_Protocol_STATUS(*source.Protocol) - backend.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, backendContractProperties_Protocol_STATUS_Values) + backend.Protocol = &protocolTemp } else { backend.Protocol = nil } @@ -1733,6 +1737,12 @@ const ( BackendContractProperties_Protocol_Soap = BackendContractProperties_Protocol("soap") ) +// Mapping from string to BackendContractProperties_Protocol +var backendContractProperties_Protocol_Values = map[string]BackendContractProperties_Protocol{ + "http": BackendContractProperties_Protocol_Http, + "soap": BackendContractProperties_Protocol_Soap, +} + type BackendContractProperties_Protocol_STATUS string const ( @@ -1740,6 +1750,12 @@ const ( BackendContractProperties_Protocol_STATUS_Soap = BackendContractProperties_Protocol_STATUS("soap") ) +// Mapping from string to BackendContractProperties_Protocol_STATUS +var backendContractProperties_Protocol_STATUS_Values = map[string]BackendContractProperties_Protocol_STATUS{ + "http": BackendContractProperties_Protocol_STATUS_Http, + "soap": BackendContractProperties_Protocol_STATUS_Soap, +} + // +kubebuilder:validation:Enum={"Pool","Single"} type BackendContractProperties_Type string @@ -1748,6 +1764,12 @@ const ( BackendContractProperties_Type_Single = BackendContractProperties_Type("Single") ) +// Mapping from string to BackendContractProperties_Type +var backendContractProperties_Type_Values = map[string]BackendContractProperties_Type{ + "pool": BackendContractProperties_Type_Pool, + "single": BackendContractProperties_Type_Single, +} + type BackendContractProperties_Type_STATUS string const ( @@ -1755,6 +1777,12 @@ const ( BackendContractProperties_Type_STATUS_Single = BackendContractProperties_Type_STATUS("Single") ) +// Mapping from string to BackendContractProperties_Type_STATUS +var backendContractProperties_Type_STATUS_Values = map[string]BackendContractProperties_Type_STATUS{ + "pool": BackendContractProperties_Type_STATUS_Pool, + "single": BackendContractProperties_Type_STATUS_Single, +} + // Details of the Credentials used to connect to Backend. type BackendCredentialsContract struct { // Authorization: Authorization header authentication diff --git a/v2/api/apimanagement/v1api20230501preview/policy_fragment_types_gen.go b/v2/api/apimanagement/v1api20230501preview/policy_fragment_types_gen.go index 51db41c1cf0..91f2896a51c 100644 --- a/v2/api/apimanagement/v1api20230501preview/policy_fragment_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/policy_fragment_types_gen.go @@ -506,8 +506,9 @@ func (fragment *Service_PolicyFragment_Spec) AssignProperties_From_Service_Polic // Format if source.Format != nil { - format := PolicyFragmentContractProperties_Format(*source.Format) - fragment.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyFragmentContractProperties_Format_Values) + fragment.Format = &formatTemp } else { fragment.Format = nil } @@ -748,8 +749,9 @@ func (fragment *Service_PolicyFragment_STATUS) AssignProperties_From_Service_Pol // Format if source.Format != nil { - format := PolicyFragmentContractProperties_Format_STATUS(*source.Format) - fragment.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyFragmentContractProperties_Format_STATUS_Values) + fragment.Format = &formatTemp } else { fragment.Format = nil } @@ -826,6 +828,12 @@ const ( PolicyFragmentContractProperties_Format_Xml = PolicyFragmentContractProperties_Format("xml") ) +// Mapping from string to PolicyFragmentContractProperties_Format +var policyFragmentContractProperties_Format_Values = map[string]PolicyFragmentContractProperties_Format{ + "rawxml": PolicyFragmentContractProperties_Format_Rawxml, + "xml": PolicyFragmentContractProperties_Format_Xml, +} + type PolicyFragmentContractProperties_Format_STATUS string const ( @@ -833,6 +841,12 @@ const ( PolicyFragmentContractProperties_Format_STATUS_Xml = PolicyFragmentContractProperties_Format_STATUS("xml") ) +// Mapping from string to PolicyFragmentContractProperties_Format_STATUS +var policyFragmentContractProperties_Format_STATUS_Values = map[string]PolicyFragmentContractProperties_Format_STATUS{ + "rawxml": PolicyFragmentContractProperties_Format_STATUS_Rawxml, + "xml": PolicyFragmentContractProperties_Format_STATUS_Xml, +} + func init() { SchemeBuilder.Register(&PolicyFragment{}, &PolicyFragmentList{}) } diff --git a/v2/api/apimanagement/v1api20230501preview/policy_types_gen.go b/v2/api/apimanagement/v1api20230501preview/policy_types_gen.go index cf3c199f0bf..ac313a81a33 100644 --- a/v2/api/apimanagement/v1api20230501preview/policy_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/policy_types_gen.go @@ -458,8 +458,9 @@ func (policy *Service_Policy_Spec) AssignProperties_From_Service_Policy_Spec(sou // Format if source.Format != nil { - format := PolicyContractProperties_Format(*source.Format) - policy.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyContractProperties_Format_Values) + policy.Format = &formatTemp } else { policy.Format = nil } @@ -657,8 +658,9 @@ func (policy *Service_Policy_STATUS) AssignProperties_From_Service_Policy_STATUS // Format if source.Format != nil { - format := PolicyContractProperties_Format_STATUS(*source.Format) - policy.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyContractProperties_Format_STATUS_Values) + policy.Format = &formatTemp } else { policy.Format = nil } @@ -728,6 +730,14 @@ const ( PolicyContractProperties_Format_XmlLink = PolicyContractProperties_Format("xml-link") ) +// Mapping from string to PolicyContractProperties_Format +var policyContractProperties_Format_Values = map[string]PolicyContractProperties_Format{ + "rawxml": PolicyContractProperties_Format_Rawxml, + "rawxml-link": PolicyContractProperties_Format_RawxmlLink, + "xml": PolicyContractProperties_Format_Xml, + "xml-link": PolicyContractProperties_Format_XmlLink, +} + type PolicyContractProperties_Format_STATUS string const ( @@ -737,6 +747,14 @@ const ( PolicyContractProperties_Format_STATUS_XmlLink = PolicyContractProperties_Format_STATUS("xml-link") ) +// Mapping from string to PolicyContractProperties_Format_STATUS +var policyContractProperties_Format_STATUS_Values = map[string]PolicyContractProperties_Format_STATUS{ + "rawxml": PolicyContractProperties_Format_STATUS_Rawxml, + "rawxml-link": PolicyContractProperties_Format_STATUS_RawxmlLink, + "xml": PolicyContractProperties_Format_STATUS_Xml, + "xml-link": PolicyContractProperties_Format_STATUS_XmlLink, +} + func init() { SchemeBuilder.Register(&Policy{}, &PolicyList{}) } diff --git a/v2/api/apimanagement/v1api20230501preview/product_policy_types_gen.go b/v2/api/apimanagement/v1api20230501preview/product_policy_types_gen.go index de3057a7c90..f03d895ab83 100644 --- a/v2/api/apimanagement/v1api20230501preview/product_policy_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/product_policy_types_gen.go @@ -458,8 +458,9 @@ func (policy *Service_Products_Policy_Spec) AssignProperties_From_Service_Produc // Format if source.Format != nil { - format := PolicyContractProperties_Format(*source.Format) - policy.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyContractProperties_Format_Values) + policy.Format = &formatTemp } else { policy.Format = nil } @@ -657,8 +658,9 @@ func (policy *Service_Products_Policy_STATUS) AssignProperties_From_Service_Prod // Format if source.Format != nil { - format := PolicyContractProperties_Format_STATUS(*source.Format) - policy.Format = &format + format := *source.Format + formatTemp := genruntime.ToEnum(format, policyContractProperties_Format_STATUS_Values) + policy.Format = &formatTemp } else { policy.Format = nil } diff --git a/v2/api/apimanagement/v1api20230501preview/product_types_gen.go b/v2/api/apimanagement/v1api20230501preview/product_types_gen.go index 2287810104d..d7525435b89 100644 --- a/v2/api/apimanagement/v1api20230501preview/product_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/product_types_gen.go @@ -610,8 +610,9 @@ func (product *Service_Product_Spec) AssignProperties_From_Service_Product_Spec( // State if source.State != nil { - state := ProductContractProperties_State(*source.State) - product.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, productContractProperties_State_Values) + product.State = &stateTemp } else { product.State = nil } @@ -944,8 +945,9 @@ func (product *Service_Product_STATUS) AssignProperties_From_Service_Product_STA // State if source.State != nil { - state := ProductContractProperties_State_STATUS(*source.State) - product.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, productContractProperties_State_STATUS_Values) + product.State = &stateTemp } else { product.State = nil } @@ -1043,6 +1045,12 @@ const ( ProductContractProperties_State_Published = ProductContractProperties_State("published") ) +// Mapping from string to ProductContractProperties_State +var productContractProperties_State_Values = map[string]ProductContractProperties_State{ + "notpublished": ProductContractProperties_State_NotPublished, + "published": ProductContractProperties_State_Published, +} + type ProductContractProperties_State_STATUS string const ( @@ -1050,6 +1058,12 @@ const ( ProductContractProperties_State_STATUS_Published = ProductContractProperties_State_STATUS("published") ) +// Mapping from string to ProductContractProperties_State_STATUS +var productContractProperties_State_STATUS_Values = map[string]ProductContractProperties_State_STATUS{ + "notpublished": ProductContractProperties_State_STATUS_NotPublished, + "published": ProductContractProperties_State_STATUS_Published, +} + func init() { SchemeBuilder.Register(&Product{}, &ProductList{}) } diff --git a/v2/api/apimanagement/v1api20230501preview/service_spec_arm_types_gen.go b/v2/api/apimanagement/v1api20230501preview/service_spec_arm_types_gen.go index ee4a2a21349..a0dd7887235 100644 --- a/v2/api/apimanagement/v1api20230501preview/service_spec_arm_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/service_spec_arm_types_gen.go @@ -181,6 +181,14 @@ const ( ApiManagementServiceIdentity_Type_UserAssigned = ApiManagementServiceIdentity_Type("UserAssigned") ) +// Mapping from string to ApiManagementServiceIdentity_Type +var apiManagementServiceIdentity_Type_Values = map[string]ApiManagementServiceIdentity_Type{ + "none": ApiManagementServiceIdentity_Type_None, + "systemassigned": ApiManagementServiceIdentity_Type_SystemAssigned, + "systemassigned, userassigned": ApiManagementServiceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ApiManagementServiceIdentity_Type_UserAssigned, +} + // +kubebuilder:validation:Enum={"Basic","BasicV2","Consumption","Developer","Isolated","Premium","Standard","StandardV2"} type ApiManagementServiceSkuProperties_Name string @@ -195,6 +203,18 @@ const ( ApiManagementServiceSkuProperties_Name_StandardV2 = ApiManagementServiceSkuProperties_Name("StandardV2") ) +// Mapping from string to ApiManagementServiceSkuProperties_Name +var apiManagementServiceSkuProperties_Name_Values = map[string]ApiManagementServiceSkuProperties_Name{ + "basic": ApiManagementServiceSkuProperties_Name_Basic, + "basicv2": ApiManagementServiceSkuProperties_Name_BasicV2, + "consumption": ApiManagementServiceSkuProperties_Name_Consumption, + "developer": ApiManagementServiceSkuProperties_Name_Developer, + "isolated": ApiManagementServiceSkuProperties_Name_Isolated, + "premium": ApiManagementServiceSkuProperties_Name_Premium, + "standard": ApiManagementServiceSkuProperties_Name_Standard, + "standardv2": ApiManagementServiceSkuProperties_Name_StandardV2, +} + // Control Plane Apis version constraint for the API Management service. type ApiVersionConstraint_ARM struct { // MinApiVersion: Limit control plane API calls to API Management service with version equal to or newer than this value. diff --git a/v2/api/apimanagement/v1api20230501preview/service_status_arm_types_gen.go b/v2/api/apimanagement/v1api20230501preview/service_status_arm_types_gen.go index 1b8f7453826..716893f9695 100644 --- a/v2/api/apimanagement/v1api20230501preview/service_status_arm_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/service_status_arm_types_gen.go @@ -280,6 +280,14 @@ const ( ApiManagementServiceIdentity_Type_STATUS_UserAssigned = ApiManagementServiceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ApiManagementServiceIdentity_Type_STATUS +var apiManagementServiceIdentity_Type_STATUS_Values = map[string]ApiManagementServiceIdentity_Type_STATUS{ + "none": ApiManagementServiceIdentity_Type_STATUS_None, + "systemassigned": ApiManagementServiceIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": ApiManagementServiceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ApiManagementServiceIdentity_Type_STATUS_UserAssigned, +} + type ApiManagementServiceSkuProperties_Name_STATUS string const ( @@ -293,6 +301,18 @@ const ( ApiManagementServiceSkuProperties_Name_STATUS_StandardV2 = ApiManagementServiceSkuProperties_Name_STATUS("StandardV2") ) +// Mapping from string to ApiManagementServiceSkuProperties_Name_STATUS +var apiManagementServiceSkuProperties_Name_STATUS_Values = map[string]ApiManagementServiceSkuProperties_Name_STATUS{ + "basic": ApiManagementServiceSkuProperties_Name_STATUS_Basic, + "basicv2": ApiManagementServiceSkuProperties_Name_STATUS_BasicV2, + "consumption": ApiManagementServiceSkuProperties_Name_STATUS_Consumption, + "developer": ApiManagementServiceSkuProperties_Name_STATUS_Developer, + "isolated": ApiManagementServiceSkuProperties_Name_STATUS_Isolated, + "premium": ApiManagementServiceSkuProperties_Name_STATUS_Premium, + "standard": ApiManagementServiceSkuProperties_Name_STATUS_Standard, + "standardv2": ApiManagementServiceSkuProperties_Name_STATUS_StandardV2, +} + // Control Plane Apis version constraint for the API Management service. type ApiVersionConstraint_STATUS_ARM struct { // MinApiVersion: Limit control plane API calls to API Management service with version equal to or newer than this value. @@ -383,6 +403,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -392,6 +420,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + type UserIdentityProperties_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/apimanagement/v1api20230501preview/service_subscription_spec_arm_types_gen.go b/v2/api/apimanagement/v1api20230501preview/service_subscription_spec_arm_types_gen.go index 4c0eaf1620c..c9ead45dc60 100644 --- a/v2/api/apimanagement/v1api20230501preview/service_subscription_spec_arm_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/service_subscription_spec_arm_types_gen.go @@ -67,3 +67,13 @@ const ( SubscriptionCreateParameterProperties_State_Submitted = SubscriptionCreateParameterProperties_State("submitted") SubscriptionCreateParameterProperties_State_Suspended = SubscriptionCreateParameterProperties_State("suspended") ) + +// Mapping from string to SubscriptionCreateParameterProperties_State +var subscriptionCreateParameterProperties_State_Values = map[string]SubscriptionCreateParameterProperties_State{ + "active": SubscriptionCreateParameterProperties_State_Active, + "cancelled": SubscriptionCreateParameterProperties_State_Cancelled, + "expired": SubscriptionCreateParameterProperties_State_Expired, + "rejected": SubscriptionCreateParameterProperties_State_Rejected, + "submitted": SubscriptionCreateParameterProperties_State_Submitted, + "suspended": SubscriptionCreateParameterProperties_State_Suspended, +} diff --git a/v2/api/apimanagement/v1api20230501preview/service_subscription_status_arm_types_gen.go b/v2/api/apimanagement/v1api20230501preview/service_subscription_status_arm_types_gen.go index d4ad1e1e099..e10dfda5fb6 100644 --- a/v2/api/apimanagement/v1api20230501preview/service_subscription_status_arm_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/service_subscription_status_arm_types_gen.go @@ -77,3 +77,13 @@ const ( SubscriptionContractProperties_State_STATUS_Submitted = SubscriptionContractProperties_State_STATUS("submitted") SubscriptionContractProperties_State_STATUS_Suspended = SubscriptionContractProperties_State_STATUS("suspended") ) + +// Mapping from string to SubscriptionContractProperties_State_STATUS +var subscriptionContractProperties_State_STATUS_Values = map[string]SubscriptionContractProperties_State_STATUS{ + "active": SubscriptionContractProperties_State_STATUS_Active, + "cancelled": SubscriptionContractProperties_State_STATUS_Cancelled, + "expired": SubscriptionContractProperties_State_STATUS_Expired, + "rejected": SubscriptionContractProperties_State_STATUS_Rejected, + "submitted": SubscriptionContractProperties_State_STATUS_Submitted, + "suspended": SubscriptionContractProperties_State_STATUS_Suspended, +} diff --git a/v2/api/apimanagement/v1api20230501preview/service_types_gen.go b/v2/api/apimanagement/v1api20230501preview/service_types_gen.go index d89f77d00c1..b012f2eeccb 100644 --- a/v2/api/apimanagement/v1api20230501preview/service_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/service_types_gen.go @@ -1023,8 +1023,9 @@ func (service *Service_Spec) AssignProperties_From_Service_Spec(source *v2023050 // DeveloperPortalStatus if source.DeveloperPortalStatus != nil { - developerPortalStatus := ApiManagementServiceProperties_DeveloperPortalStatus(*source.DeveloperPortalStatus) - service.DeveloperPortalStatus = &developerPortalStatus + developerPortalStatus := *source.DeveloperPortalStatus + developerPortalStatusTemp := genruntime.ToEnum(developerPortalStatus, apiManagementServiceProperties_DeveloperPortalStatus_Values) + service.DeveloperPortalStatus = &developerPortalStatusTemp } else { service.DeveloperPortalStatus = nil } @@ -1077,8 +1078,9 @@ func (service *Service_Spec) AssignProperties_From_Service_Spec(source *v2023050 // LegacyPortalStatus if source.LegacyPortalStatus != nil { - legacyPortalStatus := ApiManagementServiceProperties_LegacyPortalStatus(*source.LegacyPortalStatus) - service.LegacyPortalStatus = &legacyPortalStatus + legacyPortalStatus := *source.LegacyPortalStatus + legacyPortalStatusTemp := genruntime.ToEnum(legacyPortalStatus, apiManagementServiceProperties_LegacyPortalStatus_Values) + service.LegacyPortalStatus = &legacyPortalStatusTemp } else { service.LegacyPortalStatus = nil } @@ -1088,8 +1090,9 @@ func (service *Service_Spec) AssignProperties_From_Service_Spec(source *v2023050 // NatGatewayState if source.NatGatewayState != nil { - natGatewayState := ApiManagementServiceProperties_NatGatewayState(*source.NatGatewayState) - service.NatGatewayState = &natGatewayState + natGatewayState := *source.NatGatewayState + natGatewayStateTemp := genruntime.ToEnum(natGatewayState, apiManagementServiceProperties_NatGatewayState_Values) + service.NatGatewayState = &natGatewayStateTemp } else { service.NatGatewayState = nil } @@ -1120,8 +1123,9 @@ func (service *Service_Spec) AssignProperties_From_Service_Spec(source *v2023050 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ApiManagementServiceProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - service.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, apiManagementServiceProperties_PublicNetworkAccess_Values) + service.PublicNetworkAccess = &publicNetworkAccessTemp } else { service.PublicNetworkAccess = nil } @@ -1179,8 +1183,9 @@ func (service *Service_Spec) AssignProperties_From_Service_Spec(source *v2023050 // VirtualNetworkType if source.VirtualNetworkType != nil { - virtualNetworkType := ApiManagementServiceProperties_VirtualNetworkType(*source.VirtualNetworkType) - service.VirtualNetworkType = &virtualNetworkType + virtualNetworkType := *source.VirtualNetworkType + virtualNetworkTypeTemp := genruntime.ToEnum(virtualNetworkType, apiManagementServiceProperties_VirtualNetworkType_Values) + service.VirtualNetworkType = &virtualNetworkTypeTemp } else { service.VirtualNetworkType = nil } @@ -2170,8 +2175,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // DeveloperPortalStatus if source.DeveloperPortalStatus != nil { - developerPortalStatus := ApiManagementServiceProperties_DeveloperPortalStatus_STATUS(*source.DeveloperPortalStatus) - service.DeveloperPortalStatus = &developerPortalStatus + developerPortalStatus := *source.DeveloperPortalStatus + developerPortalStatusTemp := genruntime.ToEnum(developerPortalStatus, apiManagementServiceProperties_DeveloperPortalStatus_STATUS_Values) + service.DeveloperPortalStatus = &developerPortalStatusTemp } else { service.DeveloperPortalStatus = nil } @@ -2239,8 +2245,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // LegacyPortalStatus if source.LegacyPortalStatus != nil { - legacyPortalStatus := ApiManagementServiceProperties_LegacyPortalStatus_STATUS(*source.LegacyPortalStatus) - service.LegacyPortalStatus = &legacyPortalStatus + legacyPortalStatus := *source.LegacyPortalStatus + legacyPortalStatusTemp := genruntime.ToEnum(legacyPortalStatus, apiManagementServiceProperties_LegacyPortalStatus_STATUS_Values) + service.LegacyPortalStatus = &legacyPortalStatusTemp } else { service.LegacyPortalStatus = nil } @@ -2256,8 +2263,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // NatGatewayState if source.NatGatewayState != nil { - natGatewayState := ApiManagementServiceProperties_NatGatewayState_STATUS(*source.NatGatewayState) - service.NatGatewayState = &natGatewayState + natGatewayState := *source.NatGatewayState + natGatewayStateTemp := genruntime.ToEnum(natGatewayState, apiManagementServiceProperties_NatGatewayState_STATUS_Values) + service.NatGatewayState = &natGatewayStateTemp } else { service.NatGatewayState = nil } @@ -2270,8 +2278,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // PlatformVersion if source.PlatformVersion != nil { - platformVersion := ApiManagementServiceProperties_PlatformVersion_STATUS(*source.PlatformVersion) - service.PlatformVersion = &platformVersion + platformVersion := *source.PlatformVersion + platformVersionTemp := genruntime.ToEnum(platformVersion, apiManagementServiceProperties_PlatformVersion_STATUS_Values) + service.PlatformVersion = &platformVersionTemp } else { service.PlatformVersion = nil } @@ -2311,8 +2320,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ApiManagementServiceProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - service.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, apiManagementServiceProperties_PublicNetworkAccess_STATUS_Values) + service.PublicNetworkAccess = &publicNetworkAccessTemp } else { service.PublicNetworkAccess = nil } @@ -2381,8 +2391,9 @@ func (service *Service_STATUS) AssignProperties_From_Service_STATUS(source *v202 // VirtualNetworkType if source.VirtualNetworkType != nil { - virtualNetworkType := ApiManagementServiceProperties_VirtualNetworkType_STATUS(*source.VirtualNetworkType) - service.VirtualNetworkType = &virtualNetworkType + virtualNetworkType := *source.VirtualNetworkType + virtualNetworkTypeTemp := genruntime.ToEnum(virtualNetworkType, apiManagementServiceProperties_VirtualNetworkType_STATUS_Values) + service.VirtualNetworkType = &virtualNetworkTypeTemp } else { service.VirtualNetworkType = nil } @@ -2872,8 +2883,9 @@ func (location *AdditionalLocation) AssignProperties_From_AdditionalLocation(sou // NatGatewayState if source.NatGatewayState != nil { - natGatewayState := AdditionalLocation_NatGatewayState(*source.NatGatewayState) - location.NatGatewayState = &natGatewayState + natGatewayState := *source.NatGatewayState + natGatewayStateTemp := genruntime.ToEnum(natGatewayState, additionalLocation_NatGatewayState_Values) + location.NatGatewayState = &natGatewayStateTemp } else { location.NatGatewayState = nil } @@ -3147,8 +3159,9 @@ func (location *AdditionalLocation_STATUS) AssignProperties_From_AdditionalLocat // NatGatewayState if source.NatGatewayState != nil { - natGatewayState := AdditionalLocation_NatGatewayState_STATUS(*source.NatGatewayState) - location.NatGatewayState = &natGatewayState + natGatewayState := *source.NatGatewayState + natGatewayStateTemp := genruntime.ToEnum(natGatewayState, additionalLocation_NatGatewayState_STATUS_Values) + location.NatGatewayState = &natGatewayStateTemp } else { location.NatGatewayState = nil } @@ -3158,8 +3171,9 @@ func (location *AdditionalLocation_STATUS) AssignProperties_From_AdditionalLocat // PlatformVersion if source.PlatformVersion != nil { - platformVersion := AdditionalLocation_PlatformVersion_STATUS(*source.PlatformVersion) - location.PlatformVersion = &platformVersion + platformVersion := *source.PlatformVersion + platformVersionTemp := genruntime.ToEnum(platformVersion, additionalLocation_PlatformVersion_STATUS_Values) + location.PlatformVersion = &platformVersionTemp } else { location.PlatformVersion = nil } @@ -3360,8 +3374,9 @@ func (identity *ApiManagementServiceIdentity) AssignProperties_From_ApiManagemen // Type if source.Type != nil { - typeVar := ApiManagementServiceIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, apiManagementServiceIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3509,8 +3524,9 @@ func (identity *ApiManagementServiceIdentity_STATUS) AssignProperties_From_ApiMa // Type if source.Type != nil { - typeVar := ApiManagementServiceIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, apiManagementServiceIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3593,6 +3609,12 @@ const ( ApiManagementServiceProperties_DeveloperPortalStatus_Enabled = ApiManagementServiceProperties_DeveloperPortalStatus("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_DeveloperPortalStatus +var apiManagementServiceProperties_DeveloperPortalStatus_Values = map[string]ApiManagementServiceProperties_DeveloperPortalStatus{ + "disabled": ApiManagementServiceProperties_DeveloperPortalStatus_Disabled, + "enabled": ApiManagementServiceProperties_DeveloperPortalStatus_Enabled, +} + type ApiManagementServiceProperties_DeveloperPortalStatus_STATUS string const ( @@ -3600,6 +3622,12 @@ const ( ApiManagementServiceProperties_DeveloperPortalStatus_STATUS_Enabled = ApiManagementServiceProperties_DeveloperPortalStatus_STATUS("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_DeveloperPortalStatus_STATUS +var apiManagementServiceProperties_DeveloperPortalStatus_STATUS_Values = map[string]ApiManagementServiceProperties_DeveloperPortalStatus_STATUS{ + "disabled": ApiManagementServiceProperties_DeveloperPortalStatus_STATUS_Disabled, + "enabled": ApiManagementServiceProperties_DeveloperPortalStatus_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ApiManagementServiceProperties_LegacyPortalStatus string @@ -3608,6 +3636,12 @@ const ( ApiManagementServiceProperties_LegacyPortalStatus_Enabled = ApiManagementServiceProperties_LegacyPortalStatus("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_LegacyPortalStatus +var apiManagementServiceProperties_LegacyPortalStatus_Values = map[string]ApiManagementServiceProperties_LegacyPortalStatus{ + "disabled": ApiManagementServiceProperties_LegacyPortalStatus_Disabled, + "enabled": ApiManagementServiceProperties_LegacyPortalStatus_Enabled, +} + type ApiManagementServiceProperties_LegacyPortalStatus_STATUS string const ( @@ -3615,6 +3649,12 @@ const ( ApiManagementServiceProperties_LegacyPortalStatus_STATUS_Enabled = ApiManagementServiceProperties_LegacyPortalStatus_STATUS("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_LegacyPortalStatus_STATUS +var apiManagementServiceProperties_LegacyPortalStatus_STATUS_Values = map[string]ApiManagementServiceProperties_LegacyPortalStatus_STATUS{ + "disabled": ApiManagementServiceProperties_LegacyPortalStatus_STATUS_Disabled, + "enabled": ApiManagementServiceProperties_LegacyPortalStatus_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ApiManagementServiceProperties_NatGatewayState string @@ -3623,6 +3663,12 @@ const ( ApiManagementServiceProperties_NatGatewayState_Enabled = ApiManagementServiceProperties_NatGatewayState("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_NatGatewayState +var apiManagementServiceProperties_NatGatewayState_Values = map[string]ApiManagementServiceProperties_NatGatewayState{ + "disabled": ApiManagementServiceProperties_NatGatewayState_Disabled, + "enabled": ApiManagementServiceProperties_NatGatewayState_Enabled, +} + type ApiManagementServiceProperties_NatGatewayState_STATUS string const ( @@ -3630,6 +3676,12 @@ const ( ApiManagementServiceProperties_NatGatewayState_STATUS_Enabled = ApiManagementServiceProperties_NatGatewayState_STATUS("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_NatGatewayState_STATUS +var apiManagementServiceProperties_NatGatewayState_STATUS_Values = map[string]ApiManagementServiceProperties_NatGatewayState_STATUS{ + "disabled": ApiManagementServiceProperties_NatGatewayState_STATUS_Disabled, + "enabled": ApiManagementServiceProperties_NatGatewayState_STATUS_Enabled, +} + type ApiManagementServiceProperties_PlatformVersion_STATUS string const ( @@ -3640,6 +3692,15 @@ const ( ApiManagementServiceProperties_PlatformVersion_STATUS_Undetermined = ApiManagementServiceProperties_PlatformVersion_STATUS("undetermined") ) +// Mapping from string to ApiManagementServiceProperties_PlatformVersion_STATUS +var apiManagementServiceProperties_PlatformVersion_STATUS_Values = map[string]ApiManagementServiceProperties_PlatformVersion_STATUS{ + "mtv1": ApiManagementServiceProperties_PlatformVersion_STATUS_Mtv1, + "stv1": ApiManagementServiceProperties_PlatformVersion_STATUS_Stv1, + "stv2": ApiManagementServiceProperties_PlatformVersion_STATUS_Stv2, + "stv2.1": ApiManagementServiceProperties_PlatformVersion_STATUS_Stv21, + "undetermined": ApiManagementServiceProperties_PlatformVersion_STATUS_Undetermined, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ApiManagementServiceProperties_PublicNetworkAccess string @@ -3648,6 +3709,12 @@ const ( ApiManagementServiceProperties_PublicNetworkAccess_Enabled = ApiManagementServiceProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_PublicNetworkAccess +var apiManagementServiceProperties_PublicNetworkAccess_Values = map[string]ApiManagementServiceProperties_PublicNetworkAccess{ + "disabled": ApiManagementServiceProperties_PublicNetworkAccess_Disabled, + "enabled": ApiManagementServiceProperties_PublicNetworkAccess_Enabled, +} + type ApiManagementServiceProperties_PublicNetworkAccess_STATUS string const ( @@ -3655,6 +3722,12 @@ const ( ApiManagementServiceProperties_PublicNetworkAccess_STATUS_Enabled = ApiManagementServiceProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ApiManagementServiceProperties_PublicNetworkAccess_STATUS +var apiManagementServiceProperties_PublicNetworkAccess_STATUS_Values = map[string]ApiManagementServiceProperties_PublicNetworkAccess_STATUS{ + "disabled": ApiManagementServiceProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ApiManagementServiceProperties_PublicNetworkAccess_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"External","Internal","None"} type ApiManagementServiceProperties_VirtualNetworkType string @@ -3664,6 +3737,13 @@ const ( ApiManagementServiceProperties_VirtualNetworkType_None = ApiManagementServiceProperties_VirtualNetworkType("None") ) +// Mapping from string to ApiManagementServiceProperties_VirtualNetworkType +var apiManagementServiceProperties_VirtualNetworkType_Values = map[string]ApiManagementServiceProperties_VirtualNetworkType{ + "external": ApiManagementServiceProperties_VirtualNetworkType_External, + "internal": ApiManagementServiceProperties_VirtualNetworkType_Internal, + "none": ApiManagementServiceProperties_VirtualNetworkType_None, +} + type ApiManagementServiceProperties_VirtualNetworkType_STATUS string const ( @@ -3672,6 +3752,13 @@ const ( ApiManagementServiceProperties_VirtualNetworkType_STATUS_None = ApiManagementServiceProperties_VirtualNetworkType_STATUS("None") ) +// Mapping from string to ApiManagementServiceProperties_VirtualNetworkType_STATUS +var apiManagementServiceProperties_VirtualNetworkType_STATUS_Values = map[string]ApiManagementServiceProperties_VirtualNetworkType_STATUS{ + "external": ApiManagementServiceProperties_VirtualNetworkType_STATUS_External, + "internal": ApiManagementServiceProperties_VirtualNetworkType_STATUS_Internal, + "none": ApiManagementServiceProperties_VirtualNetworkType_STATUS_None, +} + // API Management service resource SKU properties. type ApiManagementServiceSkuProperties struct { // +kubebuilder:validation:Required @@ -3742,8 +3829,9 @@ func (properties *ApiManagementServiceSkuProperties) AssignProperties_From_ApiMa // Name if source.Name != nil { - name := ApiManagementServiceSkuProperties_Name(*source.Name) - properties.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, apiManagementServiceSkuProperties_Name_Values) + properties.Name = &nameTemp } else { properties.Name = nil } @@ -3826,8 +3914,9 @@ func (properties *ApiManagementServiceSkuProperties_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := ApiManagementServiceSkuProperties_Name_STATUS(*source.Name) - properties.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, apiManagementServiceSkuProperties_Name_STATUS_Values) + properties.Name = &nameTemp } else { properties.Name = nil } @@ -4125,8 +4214,9 @@ func (configuration *CertificateConfiguration) AssignProperties_From_Certificate // StoreName if source.StoreName != nil { - storeName := CertificateConfiguration_StoreName(*source.StoreName) - configuration.StoreName = &storeName + storeName := *source.StoreName + storeNameTemp := genruntime.ToEnum(storeName, certificateConfiguration_StoreName_Values) + configuration.StoreName = &storeNameTemp } else { configuration.StoreName = nil } @@ -4256,8 +4346,9 @@ func (configuration *CertificateConfiguration_STATUS) AssignProperties_From_Cert // StoreName if source.StoreName != nil { - storeName := CertificateConfiguration_StoreName_STATUS(*source.StoreName) - configuration.StoreName = &storeName + storeName := *source.StoreName + storeNameTemp := genruntime.ToEnum(storeName, certificateConfiguration_StoreName_STATUS_Values) + configuration.StoreName = &storeNameTemp } else { configuration.StoreName = nil } @@ -4357,8 +4448,9 @@ func (configurationApi *ConfigurationApi) AssignProperties_From_ConfigurationApi // LegacyApi if source.LegacyApi != nil { - legacyApi := ConfigurationApi_LegacyApi(*source.LegacyApi) - configurationApi.LegacyApi = &legacyApi + legacyApi := *source.LegacyApi + legacyApiTemp := genruntime.ToEnum(legacyApi, configurationApi_LegacyApi_Values) + configurationApi.LegacyApi = &legacyApiTemp } else { configurationApi.LegacyApi = nil } @@ -4428,8 +4520,9 @@ func (configurationApi *ConfigurationApi_STATUS) AssignProperties_From_Configura // LegacyApi if source.LegacyApi != nil { - legacyApi := ConfigurationApi_LegacyApi_STATUS(*source.LegacyApi) - configurationApi.LegacyApi = &legacyApi + legacyApi := *source.LegacyApi + legacyApiTemp := genruntime.ToEnum(legacyApi, configurationApi_LegacyApi_STATUS_Values) + configurationApi.LegacyApi = &legacyApiTemp } else { configurationApi.LegacyApi = nil } @@ -4713,16 +4806,18 @@ func (configuration *HostnameConfiguration) AssignProperties_From_HostnameConfig // CertificateSource if source.CertificateSource != nil { - certificateSource := HostnameConfiguration_CertificateSource(*source.CertificateSource) - configuration.CertificateSource = &certificateSource + certificateSource := *source.CertificateSource + certificateSourceTemp := genruntime.ToEnum(certificateSource, hostnameConfiguration_CertificateSource_Values) + configuration.CertificateSource = &certificateSourceTemp } else { configuration.CertificateSource = nil } // CertificateStatus if source.CertificateStatus != nil { - certificateStatus := HostnameConfiguration_CertificateStatus(*source.CertificateStatus) - configuration.CertificateStatus = &certificateStatus + certificateStatus := *source.CertificateStatus + certificateStatusTemp := genruntime.ToEnum(certificateStatus, hostnameConfiguration_CertificateStatus_Values) + configuration.CertificateStatus = &certificateStatusTemp } else { configuration.CertificateStatus = nil } @@ -4765,8 +4860,9 @@ func (configuration *HostnameConfiguration) AssignProperties_From_HostnameConfig // Type if source.Type != nil { - typeVar := HostnameConfiguration_Type(*source.Type) - configuration.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, hostnameConfiguration_Type_Values) + configuration.Type = &typeTemp } else { configuration.Type = nil } @@ -5010,16 +5106,18 @@ func (configuration *HostnameConfiguration_STATUS) AssignProperties_From_Hostnam // CertificateSource if source.CertificateSource != nil { - certificateSource := HostnameConfiguration_CertificateSource_STATUS(*source.CertificateSource) - configuration.CertificateSource = &certificateSource + certificateSource := *source.CertificateSource + certificateSourceTemp := genruntime.ToEnum(certificateSource, hostnameConfiguration_CertificateSource_STATUS_Values) + configuration.CertificateSource = &certificateSourceTemp } else { configuration.CertificateSource = nil } // CertificateStatus if source.CertificateStatus != nil { - certificateStatus := HostnameConfiguration_CertificateStatus_STATUS(*source.CertificateStatus) - configuration.CertificateStatus = &certificateStatus + certificateStatus := *source.CertificateStatus + certificateStatusTemp := genruntime.ToEnum(certificateStatus, hostnameConfiguration_CertificateStatus_STATUS_Values) + configuration.CertificateStatus = &certificateStatusTemp } else { configuration.CertificateStatus = nil } @@ -5054,8 +5152,9 @@ func (configuration *HostnameConfiguration_STATUS) AssignProperties_From_Hostnam // Type if source.Type != nil { - typeVar := HostnameConfiguration_Type_STATUS(*source.Type) - configuration.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, hostnameConfiguration_Type_STATUS_Values) + configuration.Type = &typeTemp } else { configuration.Type = nil } @@ -5437,8 +5536,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -5451,8 +5551,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -5686,6 +5787,12 @@ const ( AdditionalLocation_NatGatewayState_Enabled = AdditionalLocation_NatGatewayState("Enabled") ) +// Mapping from string to AdditionalLocation_NatGatewayState +var additionalLocation_NatGatewayState_Values = map[string]AdditionalLocation_NatGatewayState{ + "disabled": AdditionalLocation_NatGatewayState_Disabled, + "enabled": AdditionalLocation_NatGatewayState_Enabled, +} + type AdditionalLocation_NatGatewayState_STATUS string const ( @@ -5693,6 +5800,12 @@ const ( AdditionalLocation_NatGatewayState_STATUS_Enabled = AdditionalLocation_NatGatewayState_STATUS("Enabled") ) +// Mapping from string to AdditionalLocation_NatGatewayState_STATUS +var additionalLocation_NatGatewayState_STATUS_Values = map[string]AdditionalLocation_NatGatewayState_STATUS{ + "disabled": AdditionalLocation_NatGatewayState_STATUS_Disabled, + "enabled": AdditionalLocation_NatGatewayState_STATUS_Enabled, +} + type AdditionalLocation_PlatformVersion_STATUS string const ( @@ -5703,6 +5816,15 @@ const ( AdditionalLocation_PlatformVersion_STATUS_Undetermined = AdditionalLocation_PlatformVersion_STATUS("undetermined") ) +// Mapping from string to AdditionalLocation_PlatformVersion_STATUS +var additionalLocation_PlatformVersion_STATUS_Values = map[string]AdditionalLocation_PlatformVersion_STATUS{ + "mtv1": AdditionalLocation_PlatformVersion_STATUS_Mtv1, + "stv1": AdditionalLocation_PlatformVersion_STATUS_Stv1, + "stv2": AdditionalLocation_PlatformVersion_STATUS_Stv2, + "stv2.1": AdditionalLocation_PlatformVersion_STATUS_Stv21, + "undetermined": AdditionalLocation_PlatformVersion_STATUS_Undetermined, +} + // A wrapper for an ARM resource id type ArmIdWrapper_STATUS struct { Id *string `json:"id,omitempty"` @@ -5769,6 +5891,12 @@ const ( CertificateConfiguration_StoreName_Root = CertificateConfiguration_StoreName("Root") ) +// Mapping from string to CertificateConfiguration_StoreName +var certificateConfiguration_StoreName_Values = map[string]CertificateConfiguration_StoreName{ + "certificateauthority": CertificateConfiguration_StoreName_CertificateAuthority, + "root": CertificateConfiguration_StoreName_Root, +} + type CertificateConfiguration_StoreName_STATUS string const ( @@ -5776,6 +5904,12 @@ const ( CertificateConfiguration_StoreName_STATUS_Root = CertificateConfiguration_StoreName_STATUS("Root") ) +// Mapping from string to CertificateConfiguration_StoreName_STATUS +var certificateConfiguration_StoreName_STATUS_Values = map[string]CertificateConfiguration_StoreName_STATUS{ + "certificateauthority": CertificateConfiguration_StoreName_STATUS_CertificateAuthority, + "root": CertificateConfiguration_StoreName_STATUS_Root, +} + // SSL certificate information. type CertificateInformation struct { // Expiry: Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as @@ -6079,6 +6213,12 @@ const ( ConfigurationApi_LegacyApi_Enabled = ConfigurationApi_LegacyApi("Enabled") ) +// Mapping from string to ConfigurationApi_LegacyApi +var configurationApi_LegacyApi_Values = map[string]ConfigurationApi_LegacyApi{ + "disabled": ConfigurationApi_LegacyApi_Disabled, + "enabled": ConfigurationApi_LegacyApi_Enabled, +} + type ConfigurationApi_LegacyApi_STATUS string const ( @@ -6086,6 +6226,12 @@ const ( ConfigurationApi_LegacyApi_STATUS_Enabled = ConfigurationApi_LegacyApi_STATUS("Enabled") ) +// Mapping from string to ConfigurationApi_LegacyApi_STATUS +var configurationApi_LegacyApi_STATUS_Values = map[string]ConfigurationApi_LegacyApi_STATUS{ + "disabled": ConfigurationApi_LegacyApi_STATUS_Disabled, + "enabled": ConfigurationApi_LegacyApi_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"BuiltIn","Custom","KeyVault","Managed"} type HostnameConfiguration_CertificateSource string @@ -6096,6 +6242,14 @@ const ( HostnameConfiguration_CertificateSource_Managed = HostnameConfiguration_CertificateSource("Managed") ) +// Mapping from string to HostnameConfiguration_CertificateSource +var hostnameConfiguration_CertificateSource_Values = map[string]HostnameConfiguration_CertificateSource{ + "builtin": HostnameConfiguration_CertificateSource_BuiltIn, + "custom": HostnameConfiguration_CertificateSource_Custom, + "keyvault": HostnameConfiguration_CertificateSource_KeyVault, + "managed": HostnameConfiguration_CertificateSource_Managed, +} + type HostnameConfiguration_CertificateSource_STATUS string const ( @@ -6105,6 +6259,14 @@ const ( HostnameConfiguration_CertificateSource_STATUS_Managed = HostnameConfiguration_CertificateSource_STATUS("Managed") ) +// Mapping from string to HostnameConfiguration_CertificateSource_STATUS +var hostnameConfiguration_CertificateSource_STATUS_Values = map[string]HostnameConfiguration_CertificateSource_STATUS{ + "builtin": HostnameConfiguration_CertificateSource_STATUS_BuiltIn, + "custom": HostnameConfiguration_CertificateSource_STATUS_Custom, + "keyvault": HostnameConfiguration_CertificateSource_STATUS_KeyVault, + "managed": HostnameConfiguration_CertificateSource_STATUS_Managed, +} + // +kubebuilder:validation:Enum={"Completed","Failed","InProgress"} type HostnameConfiguration_CertificateStatus string @@ -6114,6 +6276,13 @@ const ( HostnameConfiguration_CertificateStatus_InProgress = HostnameConfiguration_CertificateStatus("InProgress") ) +// Mapping from string to HostnameConfiguration_CertificateStatus +var hostnameConfiguration_CertificateStatus_Values = map[string]HostnameConfiguration_CertificateStatus{ + "completed": HostnameConfiguration_CertificateStatus_Completed, + "failed": HostnameConfiguration_CertificateStatus_Failed, + "inprogress": HostnameConfiguration_CertificateStatus_InProgress, +} + type HostnameConfiguration_CertificateStatus_STATUS string const ( @@ -6122,6 +6291,13 @@ const ( HostnameConfiguration_CertificateStatus_STATUS_InProgress = HostnameConfiguration_CertificateStatus_STATUS("InProgress") ) +// Mapping from string to HostnameConfiguration_CertificateStatus_STATUS +var hostnameConfiguration_CertificateStatus_STATUS_Values = map[string]HostnameConfiguration_CertificateStatus_STATUS{ + "completed": HostnameConfiguration_CertificateStatus_STATUS_Completed, + "failed": HostnameConfiguration_CertificateStatus_STATUS_Failed, + "inprogress": HostnameConfiguration_CertificateStatus_STATUS_InProgress, +} + // +kubebuilder:validation:Enum={"ConfigurationApi","DeveloperPortal","Management","Portal","Proxy","Scm"} type HostnameConfiguration_Type string @@ -6134,6 +6310,16 @@ const ( HostnameConfiguration_Type_Scm = HostnameConfiguration_Type("Scm") ) +// Mapping from string to HostnameConfiguration_Type +var hostnameConfiguration_Type_Values = map[string]HostnameConfiguration_Type{ + "configurationapi": HostnameConfiguration_Type_ConfigurationApi, + "developerportal": HostnameConfiguration_Type_DeveloperPortal, + "management": HostnameConfiguration_Type_Management, + "portal": HostnameConfiguration_Type_Portal, + "proxy": HostnameConfiguration_Type_Proxy, + "scm": HostnameConfiguration_Type_Scm, +} + type HostnameConfiguration_Type_STATUS string const ( @@ -6145,6 +6331,16 @@ const ( HostnameConfiguration_Type_STATUS_Scm = HostnameConfiguration_Type_STATUS("Scm") ) +// Mapping from string to HostnameConfiguration_Type_STATUS +var hostnameConfiguration_Type_STATUS_Values = map[string]HostnameConfiguration_Type_STATUS{ + "configurationapi": HostnameConfiguration_Type_STATUS_ConfigurationApi, + "developerportal": HostnameConfiguration_Type_STATUS_DeveloperPortal, + "management": HostnameConfiguration_Type_STATUS_Management, + "portal": HostnameConfiguration_Type_STATUS_Portal, + "proxy": HostnameConfiguration_Type_STATUS_Proxy, + "scm": HostnameConfiguration_Type_STATUS_Scm, +} + // A collection of information about the state of the connection between service consumer and provider. type PrivateLinkServiceConnectionState_STATUS struct { // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. @@ -6204,8 +6400,9 @@ func (state *PrivateLinkServiceConnectionState_STATUS) AssignProperties_From_Pri // Status if source.Status != nil { - status := PrivateEndpointServiceConnectionStatus_STATUS(*source.Status) - state.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, privateEndpointServiceConnectionStatus_STATUS_Values) + state.Status = &statusTemp } else { state.Status = nil } @@ -6360,6 +6557,13 @@ const ( PrivateEndpointServiceConnectionStatus_STATUS_Rejected = PrivateEndpointServiceConnectionStatus_STATUS("Rejected") ) +// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS +var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{ + "approved": PrivateEndpointServiceConnectionStatus_STATUS_Approved, + "pending": PrivateEndpointServiceConnectionStatus_STATUS_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_STATUS_Rejected, +} + func init() { SchemeBuilder.Register(&Service{}, &ServiceList{}) } diff --git a/v2/api/apimanagement/v1api20230501preview/subscription_types_gen.go b/v2/api/apimanagement/v1api20230501preview/subscription_types_gen.go index ffa1b41067c..a430792af0a 100644 --- a/v2/api/apimanagement/v1api20230501preview/subscription_types_gen.go +++ b/v2/api/apimanagement/v1api20230501preview/subscription_types_gen.go @@ -649,8 +649,9 @@ func (subscription *Service_Subscription_Spec) AssignProperties_From_Service_Sub // State if source.State != nil { - state := SubscriptionCreateParameterProperties_State(*source.State) - subscription.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, subscriptionCreateParameterProperties_State_Values) + subscription.State = &stateTemp } else { subscription.State = nil } @@ -1056,8 +1057,9 @@ func (subscription *Service_Subscription_STATUS) AssignProperties_From_Service_S // State if source.State != nil { - state := SubscriptionContractProperties_State_STATUS(*source.State) - subscription.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, subscriptionContractProperties_State_STATUS_Values) + subscription.State = &stateTemp } else { subscription.State = nil } diff --git a/v2/api/appconfiguration/v1api20220501/configuration_store_spec_arm_types_gen.go b/v2/api/appconfiguration/v1api20220501/configuration_store_spec_arm_types_gen.go index 3bd710948d5..34be4c1acb9 100644 --- a/v2/api/appconfiguration/v1api20220501/configuration_store_spec_arm_types_gen.go +++ b/v2/api/appconfiguration/v1api20220501/configuration_store_spec_arm_types_gen.go @@ -117,6 +117,14 @@ const ( ResourceIdentity_Type_UserAssigned = ResourceIdentity_Type("UserAssigned") ) +// Mapping from string to ResourceIdentity_Type +var resourceIdentity_Type_Values = map[string]ResourceIdentity_Type{ + "none": ResourceIdentity_Type_None, + "systemassigned": ResourceIdentity_Type_SystemAssigned, + "systemassigned, userassigned": ResourceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ResourceIdentity_Type_UserAssigned, +} + // +kubebuilder:validation:Enum={"Application","Key","ManagedIdentity","User"} type SystemData_CreatedByType string @@ -127,6 +135,14 @@ const ( SystemData_CreatedByType_User = SystemData_CreatedByType("User") ) +// Mapping from string to SystemData_CreatedByType +var systemData_CreatedByType_Values = map[string]SystemData_CreatedByType{ + "application": SystemData_CreatedByType_Application, + "key": SystemData_CreatedByType_Key, + "managedidentity": SystemData_CreatedByType_ManagedIdentity, + "user": SystemData_CreatedByType_User, +} + // +kubebuilder:validation:Enum={"Application","Key","ManagedIdentity","User"} type SystemData_LastModifiedByType string @@ -137,6 +153,14 @@ const ( SystemData_LastModifiedByType_User = SystemData_LastModifiedByType("User") ) +// Mapping from string to SystemData_LastModifiedByType +var systemData_LastModifiedByType_Values = map[string]SystemData_LastModifiedByType{ + "application": SystemData_LastModifiedByType_Application, + "key": SystemData_LastModifiedByType_Key, + "managedidentity": SystemData_LastModifiedByType_ManagedIdentity, + "user": SystemData_LastModifiedByType_User, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/appconfiguration/v1api20220501/configuration_store_status_arm_types_gen.go b/v2/api/appconfiguration/v1api20220501/configuration_store_status_arm_types_gen.go index 9fefc291d59..40381c7fece 100644 --- a/v2/api/appconfiguration/v1api20220501/configuration_store_status_arm_types_gen.go +++ b/v2/api/appconfiguration/v1api20220501/configuration_store_status_arm_types_gen.go @@ -137,6 +137,14 @@ const ( ResourceIdentity_Type_STATUS_UserAssigned = ResourceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ResourceIdentity_Type_STATUS +var resourceIdentity_Type_STATUS_Values = map[string]ResourceIdentity_Type_STATUS{ + "none": ResourceIdentity_Type_STATUS_None, + "systemassigned": ResourceIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": ResourceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ResourceIdentity_Type_STATUS_UserAssigned, +} + type SystemData_CreatedByType_STATUS string const ( @@ -146,6 +154,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -155,6 +171,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // A resource identity that is managed by the user of the service. type UserIdentity_STATUS_ARM struct { // ClientId: The client ID of the user-assigned identity. diff --git a/v2/api/appconfiguration/v1api20220501/configuration_store_types_gen.go b/v2/api/appconfiguration/v1api20220501/configuration_store_types_gen.go index 59e9dab669d..34a2610f62e 100644 --- a/v2/api/appconfiguration/v1api20220501/configuration_store_types_gen.go +++ b/v2/api/appconfiguration/v1api20220501/configuration_store_types_gen.go @@ -700,8 +700,9 @@ func (store *ConfigurationStore_Spec) AssignProperties_From_ConfigurationStore_S // CreateMode if source.CreateMode != nil { - createMode := ConfigurationStoreProperties_CreateMode(*source.CreateMode) - store.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, configurationStoreProperties_CreateMode_Values) + store.CreateMode = &createModeTemp } else { store.CreateMode = nil } @@ -771,8 +772,9 @@ func (store *ConfigurationStore_Spec) AssignProperties_From_ConfigurationStore_S // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ConfigurationStoreProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - store.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, configurationStoreProperties_PublicNetworkAccess_Values) + store.PublicNetworkAccess = &publicNetworkAccessTemp } else { store.PublicNetworkAccess = nil } @@ -1352,8 +1354,9 @@ func (store *ConfigurationStore_STATUS) AssignProperties_From_ConfigurationStore // CreateMode if source.CreateMode != nil { - createMode := ConfigurationStoreProperties_CreateMode_STATUS(*source.CreateMode) - store.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, configurationStoreProperties_CreateMode_STATUS_Values) + store.CreateMode = &createModeTemp } else { store.CreateMode = nil } @@ -1433,16 +1436,18 @@ func (store *ConfigurationStore_STATUS) AssignProperties_From_ConfigurationStore // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ConfigurationStoreProperties_ProvisioningState_STATUS(*source.ProvisioningState) - store.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, configurationStoreProperties_ProvisioningState_STATUS_Values) + store.ProvisioningState = &provisioningStateTemp } else { store.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ConfigurationStoreProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - store.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, configurationStoreProperties_PublicNetworkAccess_STATUS_Values) + store.PublicNetworkAccess = &publicNetworkAccessTemp } else { store.PublicNetworkAccess = nil } @@ -1694,6 +1699,12 @@ const ( ConfigurationStoreProperties_CreateMode_Recover = ConfigurationStoreProperties_CreateMode("Recover") ) +// Mapping from string to ConfigurationStoreProperties_CreateMode +var configurationStoreProperties_CreateMode_Values = map[string]ConfigurationStoreProperties_CreateMode{ + "default": ConfigurationStoreProperties_CreateMode_Default, + "recover": ConfigurationStoreProperties_CreateMode_Recover, +} + type ConfigurationStoreProperties_CreateMode_STATUS string const ( @@ -1701,6 +1712,12 @@ const ( ConfigurationStoreProperties_CreateMode_STATUS_Recover = ConfigurationStoreProperties_CreateMode_STATUS("Recover") ) +// Mapping from string to ConfigurationStoreProperties_CreateMode_STATUS +var configurationStoreProperties_CreateMode_STATUS_Values = map[string]ConfigurationStoreProperties_CreateMode_STATUS{ + "default": ConfigurationStoreProperties_CreateMode_STATUS_Default, + "recover": ConfigurationStoreProperties_CreateMode_STATUS_Recover, +} + type ConfigurationStoreProperties_ProvisioningState_STATUS string const ( @@ -1712,6 +1729,16 @@ const ( ConfigurationStoreProperties_ProvisioningState_STATUS_Updating = ConfigurationStoreProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ConfigurationStoreProperties_ProvisioningState_STATUS +var configurationStoreProperties_ProvisioningState_STATUS_Values = map[string]ConfigurationStoreProperties_ProvisioningState_STATUS{ + "canceled": ConfigurationStoreProperties_ProvisioningState_STATUS_Canceled, + "creating": ConfigurationStoreProperties_ProvisioningState_STATUS_Creating, + "deleting": ConfigurationStoreProperties_ProvisioningState_STATUS_Deleting, + "failed": ConfigurationStoreProperties_ProvisioningState_STATUS_Failed, + "succeeded": ConfigurationStoreProperties_ProvisioningState_STATUS_Succeeded, + "updating": ConfigurationStoreProperties_ProvisioningState_STATUS_Updating, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ConfigurationStoreProperties_PublicNetworkAccess string @@ -1720,6 +1747,12 @@ const ( ConfigurationStoreProperties_PublicNetworkAccess_Enabled = ConfigurationStoreProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to ConfigurationStoreProperties_PublicNetworkAccess +var configurationStoreProperties_PublicNetworkAccess_Values = map[string]ConfigurationStoreProperties_PublicNetworkAccess{ + "disabled": ConfigurationStoreProperties_PublicNetworkAccess_Disabled, + "enabled": ConfigurationStoreProperties_PublicNetworkAccess_Enabled, +} + type ConfigurationStoreProperties_PublicNetworkAccess_STATUS string const ( @@ -1727,6 +1760,12 @@ const ( ConfigurationStoreProperties_PublicNetworkAccess_STATUS_Enabled = ConfigurationStoreProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ConfigurationStoreProperties_PublicNetworkAccess_STATUS +var configurationStoreProperties_PublicNetworkAccess_STATUS_Values = map[string]ConfigurationStoreProperties_PublicNetworkAccess_STATUS{ + "disabled": ConfigurationStoreProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ConfigurationStoreProperties_PublicNetworkAccess_STATUS_Enabled, +} + // The encryption settings for a configuration store. type EncryptionProperties struct { // KeyVaultProperties: Key vault properties. @@ -2057,8 +2096,9 @@ func (identity *ResourceIdentity) AssignProperties_From_ResourceIdentity(source // Type if source.Type != nil { - typeVar := ResourceIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, resourceIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2233,8 +2273,9 @@ func (identity *ResourceIdentity_STATUS) AssignProperties_From_ResourceIdentity_ // Type if source.Type != nil { - typeVar := ResourceIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, resourceIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2584,8 +2625,9 @@ func (data *SystemData) AssignProperties_From_SystemData(source *v20220501s.Syst // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -2598,8 +2640,9 @@ func (data *SystemData) AssignProperties_From_SystemData(source *v20220501s.Syst // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -2773,8 +2816,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -2787,8 +2831,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } diff --git a/v2/api/authorization/v1api20200801preview/role_assignment_types_gen.go b/v2/api/authorization/v1api20200801preview/role_assignment_types_gen.go index e9e0e285070..0b1129b5a5d 100644 --- a/v2/api/authorization/v1api20200801preview/role_assignment_types_gen.go +++ b/v2/api/authorization/v1api20200801preview/role_assignment_types_gen.go @@ -602,8 +602,9 @@ func (assignment *RoleAssignment_Spec) AssignProperties_From_RoleAssignment_Spec // PrincipalType if source.PrincipalType != nil { - principalType := RoleAssignmentProperties_PrincipalType(*source.PrincipalType) - assignment.PrincipalType = &principalType + principalType := *source.PrincipalType + principalTypeTemp := genruntime.ToEnum(principalType, roleAssignmentProperties_PrincipalType_Values) + assignment.PrincipalType = &principalTypeTemp } else { assignment.PrincipalType = nil } @@ -983,8 +984,9 @@ func (assignment *RoleAssignment_STATUS) AssignProperties_From_RoleAssignment_ST // PrincipalType if source.PrincipalType != nil { - principalType := RoleAssignmentProperties_PrincipalType_STATUS(*source.PrincipalType) - assignment.PrincipalType = &principalType + principalType := *source.PrincipalType + principalTypeTemp := genruntime.ToEnum(principalType, roleAssignmentProperties_PrincipalType_STATUS_Values) + assignment.PrincipalType = &principalTypeTemp } else { assignment.PrincipalType = nil } @@ -1087,6 +1089,14 @@ const ( RoleAssignmentProperties_PrincipalType_User = RoleAssignmentProperties_PrincipalType("User") ) +// Mapping from string to RoleAssignmentProperties_PrincipalType +var roleAssignmentProperties_PrincipalType_Values = map[string]RoleAssignmentProperties_PrincipalType{ + "foreigngroup": RoleAssignmentProperties_PrincipalType_ForeignGroup, + "group": RoleAssignmentProperties_PrincipalType_Group, + "serviceprincipal": RoleAssignmentProperties_PrincipalType_ServicePrincipal, + "user": RoleAssignmentProperties_PrincipalType_User, +} + type RoleAssignmentProperties_PrincipalType_STATUS string const ( @@ -1096,6 +1106,14 @@ const ( RoleAssignmentProperties_PrincipalType_STATUS_User = RoleAssignmentProperties_PrincipalType_STATUS("User") ) +// Mapping from string to RoleAssignmentProperties_PrincipalType_STATUS +var roleAssignmentProperties_PrincipalType_STATUS_Values = map[string]RoleAssignmentProperties_PrincipalType_STATUS{ + "foreigngroup": RoleAssignmentProperties_PrincipalType_STATUS_ForeignGroup, + "group": RoleAssignmentProperties_PrincipalType_STATUS_Group, + "serviceprincipal": RoleAssignmentProperties_PrincipalType_STATUS_ServicePrincipal, + "user": RoleAssignmentProperties_PrincipalType_STATUS_User, +} + func init() { SchemeBuilder.Register(&RoleAssignment{}, &RoleAssignmentList{}) } diff --git a/v2/api/authorization/v1api20220401/role_assignment_types_gen.go b/v2/api/authorization/v1api20220401/role_assignment_types_gen.go index 5cc19f5438a..c544895a3a1 100644 --- a/v2/api/authorization/v1api20220401/role_assignment_types_gen.go +++ b/v2/api/authorization/v1api20220401/role_assignment_types_gen.go @@ -599,8 +599,9 @@ func (assignment *RoleAssignment_Spec) AssignProperties_From_RoleAssignment_Spec // PrincipalType if source.PrincipalType != nil { - principalType := RoleAssignmentProperties_PrincipalType(*source.PrincipalType) - assignment.PrincipalType = &principalType + principalType := *source.PrincipalType + principalTypeTemp := genruntime.ToEnum(principalType, roleAssignmentProperties_PrincipalType_Values) + assignment.PrincipalType = &principalTypeTemp } else { assignment.PrincipalType = nil } @@ -1018,8 +1019,9 @@ func (assignment *RoleAssignment_STATUS) AssignProperties_From_RoleAssignment_ST // PrincipalType if source.PrincipalType != nil { - principalType := RoleAssignmentProperties_PrincipalType_STATUS(*source.PrincipalType) - assignment.PrincipalType = &principalType + principalType := *source.PrincipalType + principalTypeTemp := genruntime.ToEnum(principalType, roleAssignmentProperties_PrincipalType_STATUS_Values) + assignment.PrincipalType = &principalTypeTemp } else { assignment.PrincipalType = nil } @@ -1123,6 +1125,15 @@ const ( RoleAssignmentProperties_PrincipalType_User = RoleAssignmentProperties_PrincipalType("User") ) +// Mapping from string to RoleAssignmentProperties_PrincipalType +var roleAssignmentProperties_PrincipalType_Values = map[string]RoleAssignmentProperties_PrincipalType{ + "device": RoleAssignmentProperties_PrincipalType_Device, + "foreigngroup": RoleAssignmentProperties_PrincipalType_ForeignGroup, + "group": RoleAssignmentProperties_PrincipalType_Group, + "serviceprincipal": RoleAssignmentProperties_PrincipalType_ServicePrincipal, + "user": RoleAssignmentProperties_PrincipalType_User, +} + type RoleAssignmentProperties_PrincipalType_STATUS string const ( @@ -1133,6 +1144,15 @@ const ( RoleAssignmentProperties_PrincipalType_STATUS_User = RoleAssignmentProperties_PrincipalType_STATUS("User") ) +// Mapping from string to RoleAssignmentProperties_PrincipalType_STATUS +var roleAssignmentProperties_PrincipalType_STATUS_Values = map[string]RoleAssignmentProperties_PrincipalType_STATUS{ + "device": RoleAssignmentProperties_PrincipalType_STATUS_Device, + "foreigngroup": RoleAssignmentProperties_PrincipalType_STATUS_ForeignGroup, + "group": RoleAssignmentProperties_PrincipalType_STATUS_Group, + "serviceprincipal": RoleAssignmentProperties_PrincipalType_STATUS_ServicePrincipal, + "user": RoleAssignmentProperties_PrincipalType_STATUS_User, +} + func init() { SchemeBuilder.Register(&RoleAssignment{}, &RoleAssignmentList{}) } diff --git a/v2/api/batch/v1api20210101/batch_account_spec_arm_types_gen.go b/v2/api/batch/v1api20210101/batch_account_spec_arm_types_gen.go index 49f71b15a44..4200cecbddc 100644 --- a/v2/api/batch/v1api20210101/batch_account_spec_arm_types_gen.go +++ b/v2/api/batch/v1api20210101/batch_account_spec_arm_types_gen.go @@ -80,6 +80,13 @@ const ( BatchAccountIdentity_Type_UserAssigned = BatchAccountIdentity_Type("UserAssigned") ) +// Mapping from string to BatchAccountIdentity_Type +var batchAccountIdentity_Type_Values = map[string]BatchAccountIdentity_Type{ + "none": BatchAccountIdentity_Type_None, + "systemassigned": BatchAccountIdentity_Type_SystemAssigned, + "userassigned": BatchAccountIdentity_Type_UserAssigned, +} + // Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft // managed key. For additional control, a customer-managed key can be used instead. type EncryptionProperties_ARM struct { diff --git a/v2/api/batch/v1api20210101/batch_account_status_arm_types_gen.go b/v2/api/batch/v1api20210101/batch_account_status_arm_types_gen.go index 14bc85978c5..a8baa7699a0 100644 --- a/v2/api/batch/v1api20210101/batch_account_status_arm_types_gen.go +++ b/v2/api/batch/v1api20210101/batch_account_status_arm_types_gen.go @@ -113,6 +113,13 @@ const ( BatchAccountIdentity_Type_STATUS_UserAssigned = BatchAccountIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to BatchAccountIdentity_Type_STATUS +var batchAccountIdentity_Type_STATUS_Values = map[string]BatchAccountIdentity_Type_STATUS{ + "none": BatchAccountIdentity_Type_STATUS_None, + "systemassigned": BatchAccountIdentity_Type_STATUS_SystemAssigned, + "userassigned": BatchAccountIdentity_Type_STATUS_UserAssigned, +} + type BatchAccountIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/batch/v1api20210101/batch_account_types_gen.go b/v2/api/batch/v1api20210101/batch_account_types_gen.go index dcc32f7e330..71f6ed93336 100644 --- a/v2/api/batch/v1api20210101/batch_account_types_gen.go +++ b/v2/api/batch/v1api20210101/batch_account_types_gen.go @@ -678,16 +678,18 @@ func (account *BatchAccount_Spec) AssignProperties_From_BatchAccount_Spec(source // PoolAllocationMode if source.PoolAllocationMode != nil { - poolAllocationMode := PoolAllocationMode(*source.PoolAllocationMode) - account.PoolAllocationMode = &poolAllocationMode + poolAllocationMode := *source.PoolAllocationMode + poolAllocationModeTemp := genruntime.ToEnum(poolAllocationMode, poolAllocationMode_Values) + account.PoolAllocationMode = &poolAllocationModeTemp } else { account.PoolAllocationMode = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccessType(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccessType_Values) + account.PublicNetworkAccess = &publicNetworkAccessTemp } else { account.PublicNetworkAccess = nil } @@ -1320,8 +1322,9 @@ func (account *BatchAccount_STATUS) AssignProperties_From_BatchAccount_STATUS(so // PoolAllocationMode if source.PoolAllocationMode != nil { - poolAllocationMode := PoolAllocationMode_STATUS(*source.PoolAllocationMode) - account.PoolAllocationMode = &poolAllocationMode + poolAllocationMode := *source.PoolAllocationMode + poolAllocationModeTemp := genruntime.ToEnum(poolAllocationMode, poolAllocationMode_STATUS_Values) + account.PoolAllocationMode = &poolAllocationModeTemp } else { account.PoolAllocationMode = nil } @@ -1349,16 +1352,18 @@ func (account *BatchAccount_STATUS) AssignProperties_From_BatchAccount_STATUS(so // ProvisioningState if source.ProvisioningState != nil { - provisioningState := BatchAccountProperties_ProvisioningState_STATUS(*source.ProvisioningState) - account.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, batchAccountProperties_ProvisioningState_STATUS_Values) + account.ProvisioningState = &provisioningStateTemp } else { account.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccessType_STATUS(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccessType_STATUS_Values) + account.PublicNetworkAccess = &publicNetworkAccessTemp } else { account.PublicNetworkAccess = nil } @@ -1782,8 +1787,9 @@ func (identity *BatchAccountIdentity) AssignProperties_From_BatchAccountIdentity // Type if source.Type != nil { - typeVar := BatchAccountIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, batchAccountIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1958,8 +1964,9 @@ func (identity *BatchAccountIdentity_STATUS) AssignProperties_From_BatchAccountI // Type if source.Type != nil { - typeVar := BatchAccountIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, batchAccountIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2045,6 +2052,16 @@ const ( BatchAccountProperties_ProvisioningState_STATUS_Succeeded = BatchAccountProperties_ProvisioningState_STATUS("Succeeded") ) +// Mapping from string to BatchAccountProperties_ProvisioningState_STATUS +var batchAccountProperties_ProvisioningState_STATUS_Values = map[string]BatchAccountProperties_ProvisioningState_STATUS{ + "cancelled": BatchAccountProperties_ProvisioningState_STATUS_Cancelled, + "creating": BatchAccountProperties_ProvisioningState_STATUS_Creating, + "deleting": BatchAccountProperties_ProvisioningState_STATUS_Deleting, + "failed": BatchAccountProperties_ProvisioningState_STATUS_Failed, + "invalid": BatchAccountProperties_ProvisioningState_STATUS_Invalid, + "succeeded": BatchAccountProperties_ProvisioningState_STATUS_Succeeded, +} + // Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft // managed key. For additional control, a customer-managed key can be used instead. type EncryptionProperties struct { @@ -2120,8 +2137,9 @@ func (properties *EncryptionProperties) AssignProperties_From_EncryptionProperti // KeySource if source.KeySource != nil { - keySource := EncryptionProperties_KeySource(*source.KeySource) - properties.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryptionProperties_KeySource_Values) + properties.KeySource = &keySourceTemp } else { properties.KeySource = nil } @@ -2255,8 +2273,9 @@ func (properties *EncryptionProperties_STATUS) AssignProperties_From_EncryptionP // KeySource if source.KeySource != nil { - keySource := EncryptionProperties_KeySource_STATUS(*source.KeySource) - properties.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryptionProperties_KeySource_STATUS_Values) + properties.KeySource = &keySourceTemp } else { properties.KeySource = nil } @@ -2521,6 +2540,12 @@ const ( PoolAllocationMode_UserSubscription = PoolAllocationMode("UserSubscription") ) +// Mapping from string to PoolAllocationMode +var poolAllocationMode_Values = map[string]PoolAllocationMode{ + "batchservice": PoolAllocationMode_BatchService, + "usersubscription": PoolAllocationMode_UserSubscription, +} + // The allocation mode for creating pools in the Batch account. type PoolAllocationMode_STATUS string @@ -2529,6 +2554,12 @@ const ( PoolAllocationMode_STATUS_UserSubscription = PoolAllocationMode_STATUS("UserSubscription") ) +// Mapping from string to PoolAllocationMode_STATUS +var poolAllocationMode_STATUS_Values = map[string]PoolAllocationMode_STATUS{ + "batchservice": PoolAllocationMode_STATUS_BatchService, + "usersubscription": PoolAllocationMode_STATUS_UserSubscription, +} + // Contains information about a private link resource. type PrivateEndpointConnection_STATUS struct { // Id: The ID of the resource. @@ -2597,6 +2628,12 @@ const ( PublicNetworkAccessType_Enabled = PublicNetworkAccessType("Enabled") ) +// Mapping from string to PublicNetworkAccessType +var publicNetworkAccessType_Values = map[string]PublicNetworkAccessType{ + "disabled": PublicNetworkAccessType_Disabled, + "enabled": PublicNetworkAccessType_Enabled, +} + // The network access type for operating on the resources in the Batch account. type PublicNetworkAccessType_STATUS string @@ -2605,6 +2642,12 @@ const ( PublicNetworkAccessType_STATUS_Enabled = PublicNetworkAccessType_STATUS("Enabled") ) +// Mapping from string to PublicNetworkAccessType_STATUS +var publicNetworkAccessType_STATUS_Values = map[string]PublicNetworkAccessType_STATUS{ + "disabled": PublicNetworkAccessType_STATUS_Disabled, + "enabled": PublicNetworkAccessType_STATUS_Enabled, +} + // A VM Family and its associated core quota for the Batch account. type VirtualMachineFamilyCoreQuota_STATUS struct { // CoreQuota: The core quota for the VM family for the Batch account. @@ -2760,6 +2803,12 @@ const ( EncryptionProperties_KeySource_MicrosoftKeyVault = EncryptionProperties_KeySource("Microsoft.KeyVault") ) +// Mapping from string to EncryptionProperties_KeySource +var encryptionProperties_KeySource_Values = map[string]EncryptionProperties_KeySource{ + "microsoft.batch": EncryptionProperties_KeySource_MicrosoftBatch, + "microsoft.keyvault": EncryptionProperties_KeySource_MicrosoftKeyVault, +} + type EncryptionProperties_KeySource_STATUS string const ( @@ -2767,6 +2816,12 @@ const ( EncryptionProperties_KeySource_STATUS_MicrosoftKeyVault = EncryptionProperties_KeySource_STATUS("Microsoft.KeyVault") ) +// Mapping from string to EncryptionProperties_KeySource_STATUS +var encryptionProperties_KeySource_STATUS_Values = map[string]EncryptionProperties_KeySource_STATUS{ + "microsoft.batch": EncryptionProperties_KeySource_STATUS_MicrosoftBatch, + "microsoft.keyvault": EncryptionProperties_KeySource_STATUS_MicrosoftKeyVault, +} + // KeyVault configuration when using an encryption KeySource of Microsoft.KeyVault. type KeyVaultProperties struct { // KeyIdentifier: Full path to the versioned secret. Example diff --git a/v2/api/cache/v1api20201201/redis_linked_server_types_gen.go b/v2/api/cache/v1api20201201/redis_linked_server_types_gen.go index 92777674179..04376c50df1 100644 --- a/v2/api/cache/v1api20201201/redis_linked_server_types_gen.go +++ b/v2/api/cache/v1api20201201/redis_linked_server_types_gen.go @@ -510,8 +510,9 @@ func (server *Redis_LinkedServer_Spec) AssignProperties_From_Redis_LinkedServer_ // ServerRole if source.ServerRole != nil { - serverRole := RedisLinkedServerCreateProperties_ServerRole(*source.ServerRole) - server.ServerRole = &serverRole + serverRole := *source.ServerRole + serverRoleTemp := genruntime.ToEnum(serverRole, redisLinkedServerCreateProperties_ServerRole_Values) + server.ServerRole = &serverRoleTemp } else { server.ServerRole = nil } @@ -751,8 +752,9 @@ func (server *Redis_LinkedServer_STATUS) AssignProperties_From_Redis_LinkedServe // ServerRole if source.ServerRole != nil { - serverRole := RedisLinkedServerProperties_ServerRole_STATUS(*source.ServerRole) - server.ServerRole = &serverRole + serverRole := *source.ServerRole + serverRoleTemp := genruntime.ToEnum(serverRole, redisLinkedServerProperties_ServerRole_STATUS_Values) + server.ServerRole = &serverRoleTemp } else { server.ServerRole = nil } @@ -817,6 +819,12 @@ const ( RedisLinkedServerCreateProperties_ServerRole_Secondary = RedisLinkedServerCreateProperties_ServerRole("Secondary") ) +// Mapping from string to RedisLinkedServerCreateProperties_ServerRole +var redisLinkedServerCreateProperties_ServerRole_Values = map[string]RedisLinkedServerCreateProperties_ServerRole{ + "primary": RedisLinkedServerCreateProperties_ServerRole_Primary, + "secondary": RedisLinkedServerCreateProperties_ServerRole_Secondary, +} + type RedisLinkedServerProperties_ServerRole_STATUS string const ( @@ -824,6 +832,12 @@ const ( RedisLinkedServerProperties_ServerRole_STATUS_Secondary = RedisLinkedServerProperties_ServerRole_STATUS("Secondary") ) +// Mapping from string to RedisLinkedServerProperties_ServerRole_STATUS +var redisLinkedServerProperties_ServerRole_STATUS_Values = map[string]RedisLinkedServerProperties_ServerRole_STATUS{ + "primary": RedisLinkedServerProperties_ServerRole_STATUS_Primary, + "secondary": RedisLinkedServerProperties_ServerRole_STATUS_Secondary, +} + func init() { SchemeBuilder.Register(&RedisLinkedServer{}, &RedisLinkedServerList{}) } diff --git a/v2/api/cache/v1api20201201/redis_patch_schedule_types_gen.go b/v2/api/cache/v1api20201201/redis_patch_schedule_types_gen.go index 9aacb710605..984ac238e82 100644 --- a/v2/api/cache/v1api20201201/redis_patch_schedule_types_gen.go +++ b/v2/api/cache/v1api20201201/redis_patch_schedule_types_gen.go @@ -825,8 +825,9 @@ func (entry *ScheduleEntry) AssignProperties_From_ScheduleEntry(source *v2020120 // DayOfWeek if source.DayOfWeek != nil { - dayOfWeek := ScheduleEntry_DayOfWeek(*source.DayOfWeek) - entry.DayOfWeek = &dayOfWeek + dayOfWeek := *source.DayOfWeek + dayOfWeekTemp := genruntime.ToEnum(dayOfWeek, scheduleEntry_DayOfWeek_Values) + entry.DayOfWeek = &dayOfWeekTemp } else { entry.DayOfWeek = nil } @@ -924,8 +925,9 @@ func (entry *ScheduleEntry_STATUS) AssignProperties_From_ScheduleEntry_STATUS(so // DayOfWeek if source.DayOfWeek != nil { - dayOfWeek := ScheduleEntry_DayOfWeek_STATUS(*source.DayOfWeek) - entry.DayOfWeek = &dayOfWeek + dayOfWeek := *source.DayOfWeek + dayOfWeekTemp := genruntime.ToEnum(dayOfWeek, scheduleEntry_DayOfWeek_STATUS_Values) + entry.DayOfWeek = &dayOfWeekTemp } else { entry.DayOfWeek = nil } @@ -985,6 +987,19 @@ const ( ScheduleEntry_DayOfWeek_Weekend = ScheduleEntry_DayOfWeek("Weekend") ) +// Mapping from string to ScheduleEntry_DayOfWeek +var scheduleEntry_DayOfWeek_Values = map[string]ScheduleEntry_DayOfWeek{ + "everyday": ScheduleEntry_DayOfWeek_Everyday, + "friday": ScheduleEntry_DayOfWeek_Friday, + "monday": ScheduleEntry_DayOfWeek_Monday, + "saturday": ScheduleEntry_DayOfWeek_Saturday, + "sunday": ScheduleEntry_DayOfWeek_Sunday, + "thursday": ScheduleEntry_DayOfWeek_Thursday, + "tuesday": ScheduleEntry_DayOfWeek_Tuesday, + "wednesday": ScheduleEntry_DayOfWeek_Wednesday, + "weekend": ScheduleEntry_DayOfWeek_Weekend, +} + type ScheduleEntry_DayOfWeek_STATUS string const ( @@ -999,6 +1014,19 @@ const ( ScheduleEntry_DayOfWeek_STATUS_Weekend = ScheduleEntry_DayOfWeek_STATUS("Weekend") ) +// Mapping from string to ScheduleEntry_DayOfWeek_STATUS +var scheduleEntry_DayOfWeek_STATUS_Values = map[string]ScheduleEntry_DayOfWeek_STATUS{ + "everyday": ScheduleEntry_DayOfWeek_STATUS_Everyday, + "friday": ScheduleEntry_DayOfWeek_STATUS_Friday, + "monday": ScheduleEntry_DayOfWeek_STATUS_Monday, + "saturday": ScheduleEntry_DayOfWeek_STATUS_Saturday, + "sunday": ScheduleEntry_DayOfWeek_STATUS_Sunday, + "thursday": ScheduleEntry_DayOfWeek_STATUS_Thursday, + "tuesday": ScheduleEntry_DayOfWeek_STATUS_Tuesday, + "wednesday": ScheduleEntry_DayOfWeek_STATUS_Wednesday, + "weekend": ScheduleEntry_DayOfWeek_STATUS_Weekend, +} + func init() { SchemeBuilder.Register(&RedisPatchSchedule{}, &RedisPatchScheduleList{}) } diff --git a/v2/api/cache/v1api20201201/redis_types_gen.go b/v2/api/cache/v1api20201201/redis_types_gen.go index 8f0e423ba41..a27d22d96df 100644 --- a/v2/api/cache/v1api20201201/redis_types_gen.go +++ b/v2/api/cache/v1api20201201/redis_types_gen.go @@ -765,8 +765,9 @@ func (redis *Redis_Spec) AssignProperties_From_Redis_Spec(source *v20201201s.Red // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := RedisCreateProperties_MinimumTlsVersion(*source.MinimumTlsVersion) - redis.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, redisCreateProperties_MinimumTlsVersion_Values) + redis.MinimumTlsVersion = &minimumTlsVersionTemp } else { redis.MinimumTlsVersion = nil } @@ -793,8 +794,9 @@ func (redis *Redis_Spec) AssignProperties_From_Redis_Spec(source *v20201201s.Red // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := RedisCreateProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - redis.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, redisCreateProperties_PublicNetworkAccess_Values) + redis.PublicNetworkAccess = &publicNetworkAccessTemp } else { redis.PublicNetworkAccess = nil } @@ -1455,8 +1457,9 @@ func (redis *Redis_STATUS) AssignProperties_From_Redis_STATUS(source *v20201201s // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := RedisProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - redis.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, redisProperties_MinimumTlsVersion_STATUS_Values) + redis.MinimumTlsVersion = &minimumTlsVersionTemp } else { redis.MinimumTlsVersion = nil } @@ -1487,16 +1490,18 @@ func (redis *Redis_STATUS) AssignProperties_From_Redis_STATUS(source *v20201201s // ProvisioningState if source.ProvisioningState != nil { - provisioningState := RedisProperties_ProvisioningState_STATUS(*source.ProvisioningState) - redis.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, redisProperties_ProvisioningState_STATUS_Values) + redis.ProvisioningState = &provisioningStateTemp } else { redis.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := RedisProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - redis.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, redisProperties_PublicNetworkAccess_STATUS_Values) + redis.PublicNetworkAccess = &publicNetworkAccessTemp } else { redis.PublicNetworkAccess = nil } @@ -1808,6 +1813,13 @@ const ( RedisCreateProperties_MinimumTlsVersion_12 = RedisCreateProperties_MinimumTlsVersion("1.2") ) +// Mapping from string to RedisCreateProperties_MinimumTlsVersion +var redisCreateProperties_MinimumTlsVersion_Values = map[string]RedisCreateProperties_MinimumTlsVersion{ + "1.0": RedisCreateProperties_MinimumTlsVersion_10, + "1.1": RedisCreateProperties_MinimumTlsVersion_11, + "1.2": RedisCreateProperties_MinimumTlsVersion_12, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type RedisCreateProperties_PublicNetworkAccess string @@ -1816,6 +1828,12 @@ const ( RedisCreateProperties_PublicNetworkAccess_Enabled = RedisCreateProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to RedisCreateProperties_PublicNetworkAccess +var redisCreateProperties_PublicNetworkAccess_Values = map[string]RedisCreateProperties_PublicNetworkAccess{ + "disabled": RedisCreateProperties_PublicNetworkAccess_Disabled, + "enabled": RedisCreateProperties_PublicNetworkAccess_Enabled, +} + type RedisCreateProperties_RedisConfiguration struct { AdditionalProperties map[string]string `json:"additionalProperties,omitempty"` @@ -2419,6 +2437,13 @@ const ( RedisProperties_MinimumTlsVersion_STATUS_12 = RedisProperties_MinimumTlsVersion_STATUS("1.2") ) +// Mapping from string to RedisProperties_MinimumTlsVersion_STATUS +var redisProperties_MinimumTlsVersion_STATUS_Values = map[string]RedisProperties_MinimumTlsVersion_STATUS{ + "1.0": RedisProperties_MinimumTlsVersion_STATUS_10, + "1.1": RedisProperties_MinimumTlsVersion_STATUS_11, + "1.2": RedisProperties_MinimumTlsVersion_STATUS_12, +} + type RedisProperties_ProvisioningState_STATUS string const ( @@ -2436,6 +2461,22 @@ const ( RedisProperties_ProvisioningState_STATUS_Updating = RedisProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to RedisProperties_ProvisioningState_STATUS +var redisProperties_ProvisioningState_STATUS_Values = map[string]RedisProperties_ProvisioningState_STATUS{ + "creating": RedisProperties_ProvisioningState_STATUS_Creating, + "deleting": RedisProperties_ProvisioningState_STATUS_Deleting, + "disabled": RedisProperties_ProvisioningState_STATUS_Disabled, + "failed": RedisProperties_ProvisioningState_STATUS_Failed, + "linking": RedisProperties_ProvisioningState_STATUS_Linking, + "provisioning": RedisProperties_ProvisioningState_STATUS_Provisioning, + "recoveringscalefailure": RedisProperties_ProvisioningState_STATUS_RecoveringScaleFailure, + "scaling": RedisProperties_ProvisioningState_STATUS_Scaling, + "succeeded": RedisProperties_ProvisioningState_STATUS_Succeeded, + "unlinking": RedisProperties_ProvisioningState_STATUS_Unlinking, + "unprovisioning": RedisProperties_ProvisioningState_STATUS_Unprovisioning, + "updating": RedisProperties_ProvisioningState_STATUS_Updating, +} + type RedisProperties_PublicNetworkAccess_STATUS string const ( @@ -2443,6 +2484,12 @@ const ( RedisProperties_PublicNetworkAccess_STATUS_Enabled = RedisProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to RedisProperties_PublicNetworkAccess_STATUS +var redisProperties_PublicNetworkAccess_STATUS_Values = map[string]RedisProperties_PublicNetworkAccess_STATUS{ + "disabled": RedisProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": RedisProperties_PublicNetworkAccess_STATUS_Enabled, +} + type RedisProperties_RedisConfiguration_STATUS struct { AdditionalProperties map[string]string `json:"additionalProperties,omitempty"` @@ -2800,16 +2847,18 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20201201s.Sku) error { // Family if source.Family != nil { - family := Sku_Family(*source.Family) - sku.Family = &family + family := *source.Family + familyTemp := genruntime.ToEnum(family, sku_Family_Values) + sku.Family = &familyTemp } else { sku.Family = nil } // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -2910,16 +2959,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20201201s.Sku_S // Family if source.Family != nil { - family := Sku_Family_STATUS(*source.Family) - sku.Family = &family + family := *source.Family + familyTemp := genruntime.ToEnum(family, sku_Family_STATUS_Values) + sku.Family = &familyTemp } else { sku.Family = nil } // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3093,6 +3144,12 @@ const ( Sku_Family_P = Sku_Family("P") ) +// Mapping from string to Sku_Family +var sku_Family_Values = map[string]Sku_Family{ + "c": Sku_Family_C, + "p": Sku_Family_P, +} + type Sku_Family_STATUS string const ( @@ -3100,6 +3157,12 @@ const ( Sku_Family_STATUS_P = Sku_Family_STATUS("P") ) +// Mapping from string to Sku_Family_STATUS +var sku_Family_STATUS_Values = map[string]Sku_Family_STATUS{ + "c": Sku_Family_STATUS_C, + "p": Sku_Family_STATUS_P, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type Sku_Name string @@ -3109,6 +3172,13 @@ const ( Sku_Name_Standard = Sku_Name("Standard") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "basic": Sku_Name_Basic, + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + type Sku_Name_STATUS string const ( @@ -3117,6 +3187,13 @@ const ( Sku_Name_STATUS_Standard = Sku_Name_STATUS("Standard") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "basic": Sku_Name_STATUS_Basic, + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + func init() { SchemeBuilder.Register(&Redis{}, &RedisList{}) } diff --git a/v2/api/cache/v1api20210301/redis_enterprise_database_types_gen.go b/v2/api/cache/v1api20210301/redis_enterprise_database_types_gen.go index 495b7b1370b..7df54f84300 100644 --- a/v2/api/cache/v1api20210301/redis_enterprise_database_types_gen.go +++ b/v2/api/cache/v1api20210301/redis_enterprise_database_types_gen.go @@ -559,24 +559,27 @@ func (database *RedisEnterprise_Database_Spec) AssignProperties_From_RedisEnterp // ClientProtocol if source.ClientProtocol != nil { - clientProtocol := DatabaseProperties_ClientProtocol(*source.ClientProtocol) - database.ClientProtocol = &clientProtocol + clientProtocol := *source.ClientProtocol + clientProtocolTemp := genruntime.ToEnum(clientProtocol, databaseProperties_ClientProtocol_Values) + database.ClientProtocol = &clientProtocolTemp } else { database.ClientProtocol = nil } // ClusteringPolicy if source.ClusteringPolicy != nil { - clusteringPolicy := DatabaseProperties_ClusteringPolicy(*source.ClusteringPolicy) - database.ClusteringPolicy = &clusteringPolicy + clusteringPolicy := *source.ClusteringPolicy + clusteringPolicyTemp := genruntime.ToEnum(clusteringPolicy, databaseProperties_ClusteringPolicy_Values) + database.ClusteringPolicy = &clusteringPolicyTemp } else { database.ClusteringPolicy = nil } // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := DatabaseProperties_EvictionPolicy(*source.EvictionPolicy) - database.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, databaseProperties_EvictionPolicy_Values) + database.EvictionPolicy = &evictionPolicyTemp } else { database.EvictionPolicy = nil } @@ -937,16 +940,18 @@ func (database *RedisEnterprise_Database_STATUS) AssignProperties_From_RedisEnte // ClientProtocol if source.ClientProtocol != nil { - clientProtocol := DatabaseProperties_ClientProtocol_STATUS(*source.ClientProtocol) - database.ClientProtocol = &clientProtocol + clientProtocol := *source.ClientProtocol + clientProtocolTemp := genruntime.ToEnum(clientProtocol, databaseProperties_ClientProtocol_STATUS_Values) + database.ClientProtocol = &clientProtocolTemp } else { database.ClientProtocol = nil } // ClusteringPolicy if source.ClusteringPolicy != nil { - clusteringPolicy := DatabaseProperties_ClusteringPolicy_STATUS(*source.ClusteringPolicy) - database.ClusteringPolicy = &clusteringPolicy + clusteringPolicy := *source.ClusteringPolicy + clusteringPolicyTemp := genruntime.ToEnum(clusteringPolicy, databaseProperties_ClusteringPolicy_STATUS_Values) + database.ClusteringPolicy = &clusteringPolicyTemp } else { database.ClusteringPolicy = nil } @@ -956,8 +961,9 @@ func (database *RedisEnterprise_Database_STATUS) AssignProperties_From_RedisEnte // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := DatabaseProperties_EvictionPolicy_STATUS(*source.EvictionPolicy) - database.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, databaseProperties_EvictionPolicy_STATUS_Values) + database.EvictionPolicy = &evictionPolicyTemp } else { database.EvictionPolicy = nil } @@ -1003,16 +1009,18 @@ func (database *RedisEnterprise_Database_STATUS) AssignProperties_From_RedisEnte // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - database.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + database.ProvisioningState = &provisioningStateTemp } else { database.ProvisioningState = nil } // ResourceState if source.ResourceState != nil { - resourceState := ResourceState_STATUS(*source.ResourceState) - database.ResourceState = &resourceState + resourceState := *source.ResourceState + resourceStateTemp := genruntime.ToEnum(resourceState, resourceState_STATUS_Values) + database.ResourceState = &resourceStateTemp } else { database.ResourceState = nil } @@ -1133,6 +1141,12 @@ const ( DatabaseProperties_ClientProtocol_Plaintext = DatabaseProperties_ClientProtocol("Plaintext") ) +// Mapping from string to DatabaseProperties_ClientProtocol +var databaseProperties_ClientProtocol_Values = map[string]DatabaseProperties_ClientProtocol{ + "encrypted": DatabaseProperties_ClientProtocol_Encrypted, + "plaintext": DatabaseProperties_ClientProtocol_Plaintext, +} + type DatabaseProperties_ClientProtocol_STATUS string const ( @@ -1140,6 +1154,12 @@ const ( DatabaseProperties_ClientProtocol_STATUS_Plaintext = DatabaseProperties_ClientProtocol_STATUS("Plaintext") ) +// Mapping from string to DatabaseProperties_ClientProtocol_STATUS +var databaseProperties_ClientProtocol_STATUS_Values = map[string]DatabaseProperties_ClientProtocol_STATUS{ + "encrypted": DatabaseProperties_ClientProtocol_STATUS_Encrypted, + "plaintext": DatabaseProperties_ClientProtocol_STATUS_Plaintext, +} + // +kubebuilder:validation:Enum={"EnterpriseCluster","OSSCluster"} type DatabaseProperties_ClusteringPolicy string @@ -1148,6 +1168,12 @@ const ( DatabaseProperties_ClusteringPolicy_OSSCluster = DatabaseProperties_ClusteringPolicy("OSSCluster") ) +// Mapping from string to DatabaseProperties_ClusteringPolicy +var databaseProperties_ClusteringPolicy_Values = map[string]DatabaseProperties_ClusteringPolicy{ + "enterprisecluster": DatabaseProperties_ClusteringPolicy_EnterpriseCluster, + "osscluster": DatabaseProperties_ClusteringPolicy_OSSCluster, +} + type DatabaseProperties_ClusteringPolicy_STATUS string const ( @@ -1155,6 +1181,12 @@ const ( DatabaseProperties_ClusteringPolicy_STATUS_OSSCluster = DatabaseProperties_ClusteringPolicy_STATUS("OSSCluster") ) +// Mapping from string to DatabaseProperties_ClusteringPolicy_STATUS +var databaseProperties_ClusteringPolicy_STATUS_Values = map[string]DatabaseProperties_ClusteringPolicy_STATUS{ + "enterprisecluster": DatabaseProperties_ClusteringPolicy_STATUS_EnterpriseCluster, + "osscluster": DatabaseProperties_ClusteringPolicy_STATUS_OSSCluster, +} + // +kubebuilder:validation:Enum={"AllKeysLFU","AllKeysLRU","AllKeysRandom","NoEviction","VolatileLFU","VolatileLRU","VolatileRandom","VolatileTTL"} type DatabaseProperties_EvictionPolicy string @@ -1169,6 +1201,18 @@ const ( DatabaseProperties_EvictionPolicy_VolatileTTL = DatabaseProperties_EvictionPolicy("VolatileTTL") ) +// Mapping from string to DatabaseProperties_EvictionPolicy +var databaseProperties_EvictionPolicy_Values = map[string]DatabaseProperties_EvictionPolicy{ + "allkeyslfu": DatabaseProperties_EvictionPolicy_AllKeysLFU, + "allkeyslru": DatabaseProperties_EvictionPolicy_AllKeysLRU, + "allkeysrandom": DatabaseProperties_EvictionPolicy_AllKeysRandom, + "noeviction": DatabaseProperties_EvictionPolicy_NoEviction, + "volatilelfu": DatabaseProperties_EvictionPolicy_VolatileLFU, + "volatilelru": DatabaseProperties_EvictionPolicy_VolatileLRU, + "volatilerandom": DatabaseProperties_EvictionPolicy_VolatileRandom, + "volatilettl": DatabaseProperties_EvictionPolicy_VolatileTTL, +} + type DatabaseProperties_EvictionPolicy_STATUS string const ( @@ -1182,6 +1226,18 @@ const ( DatabaseProperties_EvictionPolicy_STATUS_VolatileTTL = DatabaseProperties_EvictionPolicy_STATUS("VolatileTTL") ) +// Mapping from string to DatabaseProperties_EvictionPolicy_STATUS +var databaseProperties_EvictionPolicy_STATUS_Values = map[string]DatabaseProperties_EvictionPolicy_STATUS{ + "allkeyslfu": DatabaseProperties_EvictionPolicy_STATUS_AllKeysLFU, + "allkeyslru": DatabaseProperties_EvictionPolicy_STATUS_AllKeysLRU, + "allkeysrandom": DatabaseProperties_EvictionPolicy_STATUS_AllKeysRandom, + "noeviction": DatabaseProperties_EvictionPolicy_STATUS_NoEviction, + "volatilelfu": DatabaseProperties_EvictionPolicy_STATUS_VolatileLFU, + "volatilelru": DatabaseProperties_EvictionPolicy_STATUS_VolatileLRU, + "volatilerandom": DatabaseProperties_EvictionPolicy_STATUS_VolatileRandom, + "volatilettl": DatabaseProperties_EvictionPolicy_STATUS_VolatileTTL, +} + // Specifies configuration of a redis module type Module struct { // Args: Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'. @@ -1470,8 +1526,9 @@ func (persistence *Persistence) AssignProperties_From_Persistence(source *v20210 // AofFrequency if source.AofFrequency != nil { - aofFrequency := Persistence_AofFrequency(*source.AofFrequency) - persistence.AofFrequency = &aofFrequency + aofFrequency := *source.AofFrequency + aofFrequencyTemp := genruntime.ToEnum(aofFrequency, persistence_AofFrequency_Values) + persistence.AofFrequency = &aofFrequencyTemp } else { persistence.AofFrequency = nil } @@ -1486,8 +1543,9 @@ func (persistence *Persistence) AssignProperties_From_Persistence(source *v20210 // RdbFrequency if source.RdbFrequency != nil { - rdbFrequency := Persistence_RdbFrequency(*source.RdbFrequency) - persistence.RdbFrequency = &rdbFrequency + rdbFrequency := *source.RdbFrequency + rdbFrequencyTemp := genruntime.ToEnum(rdbFrequency, persistence_RdbFrequency_Values) + persistence.RdbFrequency = &rdbFrequencyTemp } else { persistence.RdbFrequency = nil } @@ -1614,8 +1672,9 @@ func (persistence *Persistence_STATUS) AssignProperties_From_Persistence_STATUS( // AofFrequency if source.AofFrequency != nil { - aofFrequency := Persistence_AofFrequency_STATUS(*source.AofFrequency) - persistence.AofFrequency = &aofFrequency + aofFrequency := *source.AofFrequency + aofFrequencyTemp := genruntime.ToEnum(aofFrequency, persistence_AofFrequency_STATUS_Values) + persistence.AofFrequency = &aofFrequencyTemp } else { persistence.AofFrequency = nil } @@ -1630,8 +1689,9 @@ func (persistence *Persistence_STATUS) AssignProperties_From_Persistence_STATUS( // RdbFrequency if source.RdbFrequency != nil { - rdbFrequency := Persistence_RdbFrequency_STATUS(*source.RdbFrequency) - persistence.RdbFrequency = &rdbFrequency + rdbFrequency := *source.RdbFrequency + rdbFrequencyTemp := genruntime.ToEnum(rdbFrequency, persistence_RdbFrequency_STATUS_Values) + persistence.RdbFrequency = &rdbFrequencyTemp } else { persistence.RdbFrequency = nil } @@ -1696,6 +1756,12 @@ const ( Persistence_AofFrequency_Always = Persistence_AofFrequency("always") ) +// Mapping from string to Persistence_AofFrequency +var persistence_AofFrequency_Values = map[string]Persistence_AofFrequency{ + "1s": Persistence_AofFrequency_1S, + "always": Persistence_AofFrequency_Always, +} + type Persistence_AofFrequency_STATUS string const ( @@ -1703,6 +1769,12 @@ const ( Persistence_AofFrequency_STATUS_Always = Persistence_AofFrequency_STATUS("always") ) +// Mapping from string to Persistence_AofFrequency_STATUS +var persistence_AofFrequency_STATUS_Values = map[string]Persistence_AofFrequency_STATUS{ + "1s": Persistence_AofFrequency_STATUS_1S, + "always": Persistence_AofFrequency_STATUS_Always, +} + // +kubebuilder:validation:Enum={"12h","1h","6h"} type Persistence_RdbFrequency string @@ -1712,6 +1784,13 @@ const ( Persistence_RdbFrequency_6H = Persistence_RdbFrequency("6h") ) +// Mapping from string to Persistence_RdbFrequency +var persistence_RdbFrequency_Values = map[string]Persistence_RdbFrequency{ + "12h": Persistence_RdbFrequency_12H, + "1h": Persistence_RdbFrequency_1H, + "6h": Persistence_RdbFrequency_6H, +} + type Persistence_RdbFrequency_STATUS string const ( @@ -1720,6 +1799,13 @@ const ( Persistence_RdbFrequency_STATUS_6H = Persistence_RdbFrequency_STATUS("6h") ) +// Mapping from string to Persistence_RdbFrequency_STATUS +var persistence_RdbFrequency_STATUS_Values = map[string]Persistence_RdbFrequency_STATUS{ + "12h": Persistence_RdbFrequency_STATUS_12H, + "1h": Persistence_RdbFrequency_STATUS_1H, + "6h": Persistence_RdbFrequency_STATUS_6H, +} + func init() { SchemeBuilder.Register(&RedisEnterpriseDatabase{}, &RedisEnterpriseDatabaseList{}) } diff --git a/v2/api/cache/v1api20210301/redis_enterprise_spec_arm_types_gen.go b/v2/api/cache/v1api20210301/redis_enterprise_spec_arm_types_gen.go index ed036fddc2d..b6f2525e0e0 100644 --- a/v2/api/cache/v1api20210301/redis_enterprise_spec_arm_types_gen.go +++ b/v2/api/cache/v1api20210301/redis_enterprise_spec_arm_types_gen.go @@ -68,3 +68,14 @@ const ( Sku_Name_Enterprise_E20 = Sku_Name("Enterprise_E20") Sku_Name_Enterprise_E50 = Sku_Name("Enterprise_E50") ) + +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "enterpriseflash_f1500": Sku_Name_EnterpriseFlash_F1500, + "enterpriseflash_f300": Sku_Name_EnterpriseFlash_F300, + "enterpriseflash_f700": Sku_Name_EnterpriseFlash_F700, + "enterprise_e10": Sku_Name_Enterprise_E10, + "enterprise_e100": Sku_Name_Enterprise_E100, + "enterprise_e20": Sku_Name_Enterprise_E20, + "enterprise_e50": Sku_Name_Enterprise_E50, +} diff --git a/v2/api/cache/v1api20210301/redis_enterprise_status_arm_types_gen.go b/v2/api/cache/v1api20210301/redis_enterprise_status_arm_types_gen.go index 093ebcda09e..06552126179 100644 --- a/v2/api/cache/v1api20210301/redis_enterprise_status_arm_types_gen.go +++ b/v2/api/cache/v1api20210301/redis_enterprise_status_arm_types_gen.go @@ -79,3 +79,14 @@ const ( Sku_Name_STATUS_Enterprise_E20 = Sku_Name_STATUS("Enterprise_E20") Sku_Name_STATUS_Enterprise_E50 = Sku_Name_STATUS("Enterprise_E50") ) + +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "enterpriseflash_f1500": Sku_Name_STATUS_EnterpriseFlash_F1500, + "enterpriseflash_f300": Sku_Name_STATUS_EnterpriseFlash_F300, + "enterpriseflash_f700": Sku_Name_STATUS_EnterpriseFlash_F700, + "enterprise_e10": Sku_Name_STATUS_Enterprise_E10, + "enterprise_e100": Sku_Name_STATUS_Enterprise_E100, + "enterprise_e20": Sku_Name_STATUS_Enterprise_E20, + "enterprise_e50": Sku_Name_STATUS_Enterprise_E50, +} diff --git a/v2/api/cache/v1api20210301/redis_enterprise_types_gen.go b/v2/api/cache/v1api20210301/redis_enterprise_types_gen.go index 437cec1f7a4..cda4af3f81c 100644 --- a/v2/api/cache/v1api20210301/redis_enterprise_types_gen.go +++ b/v2/api/cache/v1api20210301/redis_enterprise_types_gen.go @@ -538,8 +538,9 @@ func (enterprise *RedisEnterprise_Spec) AssignProperties_From_RedisEnterprise_Sp // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := ClusterProperties_MinimumTlsVersion(*source.MinimumTlsVersion) - enterprise.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, clusterProperties_MinimumTlsVersion_Values) + enterprise.MinimumTlsVersion = &minimumTlsVersionTemp } else { enterprise.MinimumTlsVersion = nil } @@ -881,8 +882,9 @@ func (enterprise *RedisEnterprise_STATUS) AssignProperties_From_RedisEnterprise_ // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := ClusterProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - enterprise.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, clusterProperties_MinimumTlsVersion_STATUS_Values) + enterprise.MinimumTlsVersion = &minimumTlsVersionTemp } else { enterprise.MinimumTlsVersion = nil } @@ -910,8 +912,9 @@ func (enterprise *RedisEnterprise_STATUS) AssignProperties_From_RedisEnterprise_ // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - enterprise.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + enterprise.ProvisioningState = &provisioningStateTemp } else { enterprise.ProvisioningState = nil } @@ -921,8 +924,9 @@ func (enterprise *RedisEnterprise_STATUS) AssignProperties_From_RedisEnterprise_ // ResourceState if source.ResourceState != nil { - resourceState := ResourceState_STATUS(*source.ResourceState) - enterprise.ResourceState = &resourceState + resourceState := *source.ResourceState + resourceStateTemp := genruntime.ToEnum(resourceState, resourceState_STATUS_Values) + enterprise.ResourceState = &resourceStateTemp } else { enterprise.ResourceState = nil } @@ -1058,6 +1062,13 @@ const ( ClusterProperties_MinimumTlsVersion_12 = ClusterProperties_MinimumTlsVersion("1.2") ) +// Mapping from string to ClusterProperties_MinimumTlsVersion +var clusterProperties_MinimumTlsVersion_Values = map[string]ClusterProperties_MinimumTlsVersion{ + "1.0": ClusterProperties_MinimumTlsVersion_10, + "1.1": ClusterProperties_MinimumTlsVersion_11, + "1.2": ClusterProperties_MinimumTlsVersion_12, +} + type ClusterProperties_MinimumTlsVersion_STATUS string const ( @@ -1066,6 +1077,13 @@ const ( ClusterProperties_MinimumTlsVersion_STATUS_12 = ClusterProperties_MinimumTlsVersion_STATUS("1.2") ) +// Mapping from string to ClusterProperties_MinimumTlsVersion_STATUS +var clusterProperties_MinimumTlsVersion_STATUS_Values = map[string]ClusterProperties_MinimumTlsVersion_STATUS{ + "1.0": ClusterProperties_MinimumTlsVersion_STATUS_10, + "1.1": ClusterProperties_MinimumTlsVersion_STATUS_11, + "1.2": ClusterProperties_MinimumTlsVersion_STATUS_12, +} + // The Private Endpoint Connection resource. type PrivateEndpointConnection_STATUS struct { // Id: Fully qualified resource ID for the resource. Ex - @@ -1138,6 +1156,16 @@ const ( ProvisioningState_STATUS_Updating = ProvisioningState_STATUS("Updating") ) +// Mapping from string to ProvisioningState_STATUS +var provisioningState_STATUS_Values = map[string]ProvisioningState_STATUS{ + "canceled": ProvisioningState_STATUS_Canceled, + "creating": ProvisioningState_STATUS_Creating, + "deleting": ProvisioningState_STATUS_Deleting, + "failed": ProvisioningState_STATUS_Failed, + "succeeded": ProvisioningState_STATUS_Succeeded, + "updating": ProvisioningState_STATUS_Updating, +} + // Current resource status type ResourceState_STATUS string @@ -1156,6 +1184,22 @@ const ( ResourceState_STATUS_Updating = ResourceState_STATUS("Updating") ) +// Mapping from string to ResourceState_STATUS +var resourceState_STATUS_Values = map[string]ResourceState_STATUS{ + "createfailed": ResourceState_STATUS_CreateFailed, + "creating": ResourceState_STATUS_Creating, + "deletefailed": ResourceState_STATUS_DeleteFailed, + "deleting": ResourceState_STATUS_Deleting, + "disablefailed": ResourceState_STATUS_DisableFailed, + "disabled": ResourceState_STATUS_Disabled, + "disabling": ResourceState_STATUS_Disabling, + "enablefailed": ResourceState_STATUS_EnableFailed, + "enabling": ResourceState_STATUS_Enabling, + "running": ResourceState_STATUS_Running, + "updatefailed": ResourceState_STATUS_UpdateFailed, + "updating": ResourceState_STATUS_Updating, +} + // SKU parameters supplied to the create RedisEnterprise operation. type Sku struct { // Capacity: The size of the RedisEnterprise cluster. Defaults to 2 or 3 depending on SKU. Valid values are (2, 4, 6, ...) @@ -1226,8 +1270,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20210301s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -1311,8 +1356,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20210301s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } diff --git a/v2/api/cache/v1api20230401/redis_linked_server_types_gen.go b/v2/api/cache/v1api20230401/redis_linked_server_types_gen.go index 483493aa33a..2d1950b44d3 100644 --- a/v2/api/cache/v1api20230401/redis_linked_server_types_gen.go +++ b/v2/api/cache/v1api20230401/redis_linked_server_types_gen.go @@ -507,8 +507,9 @@ func (server *Redis_LinkedServer_Spec) AssignProperties_From_Redis_LinkedServer_ // ServerRole if source.ServerRole != nil { - serverRole := RedisLinkedServerCreateProperties_ServerRole(*source.ServerRole) - server.ServerRole = &serverRole + serverRole := *source.ServerRole + serverRoleTemp := genruntime.ToEnum(serverRole, redisLinkedServerCreateProperties_ServerRole_Values) + server.ServerRole = &serverRoleTemp } else { server.ServerRole = nil } @@ -806,8 +807,9 @@ func (server *Redis_LinkedServer_STATUS) AssignProperties_From_Redis_LinkedServe // ServerRole if source.ServerRole != nil { - serverRole := RedisLinkedServerProperties_ServerRole_STATUS(*source.ServerRole) - server.ServerRole = &serverRole + serverRole := *source.ServerRole + serverRoleTemp := genruntime.ToEnum(serverRole, redisLinkedServerProperties_ServerRole_STATUS_Values) + server.ServerRole = &serverRoleTemp } else { server.ServerRole = nil } @@ -878,6 +880,12 @@ const ( RedisLinkedServerCreateProperties_ServerRole_Secondary = RedisLinkedServerCreateProperties_ServerRole("Secondary") ) +// Mapping from string to RedisLinkedServerCreateProperties_ServerRole +var redisLinkedServerCreateProperties_ServerRole_Values = map[string]RedisLinkedServerCreateProperties_ServerRole{ + "primary": RedisLinkedServerCreateProperties_ServerRole_Primary, + "secondary": RedisLinkedServerCreateProperties_ServerRole_Secondary, +} + type RedisLinkedServerProperties_ServerRole_STATUS string const ( @@ -885,6 +893,12 @@ const ( RedisLinkedServerProperties_ServerRole_STATUS_Secondary = RedisLinkedServerProperties_ServerRole_STATUS("Secondary") ) +// Mapping from string to RedisLinkedServerProperties_ServerRole_STATUS +var redisLinkedServerProperties_ServerRole_STATUS_Values = map[string]RedisLinkedServerProperties_ServerRole_STATUS{ + "primary": RedisLinkedServerProperties_ServerRole_STATUS_Primary, + "secondary": RedisLinkedServerProperties_ServerRole_STATUS_Secondary, +} + func init() { SchemeBuilder.Register(&RedisLinkedServer{}, &RedisLinkedServerList{}) } diff --git a/v2/api/cache/v1api20230401/redis_patch_schedule_types_gen.go b/v2/api/cache/v1api20230401/redis_patch_schedule_types_gen.go index fb3d1d32d0e..191dc35c58f 100644 --- a/v2/api/cache/v1api20230401/redis_patch_schedule_types_gen.go +++ b/v2/api/cache/v1api20230401/redis_patch_schedule_types_gen.go @@ -847,8 +847,9 @@ func (entry *ScheduleEntry) AssignProperties_From_ScheduleEntry(source *v2023040 // DayOfWeek if source.DayOfWeek != nil { - dayOfWeek := ScheduleEntry_DayOfWeek(*source.DayOfWeek) - entry.DayOfWeek = &dayOfWeek + dayOfWeek := *source.DayOfWeek + dayOfWeekTemp := genruntime.ToEnum(dayOfWeek, scheduleEntry_DayOfWeek_Values) + entry.DayOfWeek = &dayOfWeekTemp } else { entry.DayOfWeek = nil } @@ -967,8 +968,9 @@ func (entry *ScheduleEntry_STATUS) AssignProperties_From_ScheduleEntry_STATUS(so // DayOfWeek if source.DayOfWeek != nil { - dayOfWeek := ScheduleEntry_DayOfWeek_STATUS(*source.DayOfWeek) - entry.DayOfWeek = &dayOfWeek + dayOfWeek := *source.DayOfWeek + dayOfWeekTemp := genruntime.ToEnum(dayOfWeek, scheduleEntry_DayOfWeek_STATUS_Values) + entry.DayOfWeek = &dayOfWeekTemp } else { entry.DayOfWeek = nil } @@ -1028,6 +1030,19 @@ const ( ScheduleEntry_DayOfWeek_Weekend = ScheduleEntry_DayOfWeek("Weekend") ) +// Mapping from string to ScheduleEntry_DayOfWeek +var scheduleEntry_DayOfWeek_Values = map[string]ScheduleEntry_DayOfWeek{ + "everyday": ScheduleEntry_DayOfWeek_Everyday, + "friday": ScheduleEntry_DayOfWeek_Friday, + "monday": ScheduleEntry_DayOfWeek_Monday, + "saturday": ScheduleEntry_DayOfWeek_Saturday, + "sunday": ScheduleEntry_DayOfWeek_Sunday, + "thursday": ScheduleEntry_DayOfWeek_Thursday, + "tuesday": ScheduleEntry_DayOfWeek_Tuesday, + "wednesday": ScheduleEntry_DayOfWeek_Wednesday, + "weekend": ScheduleEntry_DayOfWeek_Weekend, +} + type ScheduleEntry_DayOfWeek_STATUS string const ( @@ -1042,6 +1057,19 @@ const ( ScheduleEntry_DayOfWeek_STATUS_Weekend = ScheduleEntry_DayOfWeek_STATUS("Weekend") ) +// Mapping from string to ScheduleEntry_DayOfWeek_STATUS +var scheduleEntry_DayOfWeek_STATUS_Values = map[string]ScheduleEntry_DayOfWeek_STATUS{ + "everyday": ScheduleEntry_DayOfWeek_STATUS_Everyday, + "friday": ScheduleEntry_DayOfWeek_STATUS_Friday, + "monday": ScheduleEntry_DayOfWeek_STATUS_Monday, + "saturday": ScheduleEntry_DayOfWeek_STATUS_Saturday, + "sunday": ScheduleEntry_DayOfWeek_STATUS_Sunday, + "thursday": ScheduleEntry_DayOfWeek_STATUS_Thursday, + "tuesday": ScheduleEntry_DayOfWeek_STATUS_Tuesday, + "wednesday": ScheduleEntry_DayOfWeek_STATUS_Wednesday, + "weekend": ScheduleEntry_DayOfWeek_STATUS_Weekend, +} + func init() { SchemeBuilder.Register(&RedisPatchSchedule{}, &RedisPatchScheduleList{}) } diff --git a/v2/api/cache/v1api20230401/redis_spec_arm_types_gen.go b/v2/api/cache/v1api20230401/redis_spec_arm_types_gen.go index 5c1d1af4a68..e04985ccb0e 100644 --- a/v2/api/cache/v1api20230401/redis_spec_arm_types_gen.go +++ b/v2/api/cache/v1api20230401/redis_spec_arm_types_gen.go @@ -104,6 +104,14 @@ const ( ManagedServiceIdentityType_UserAssigned = ManagedServiceIdentityType("UserAssigned") ) +// Mapping from string to ManagedServiceIdentityType +var managedServiceIdentityType_Values = map[string]ManagedServiceIdentityType{ + "none": ManagedServiceIdentityType_None, + "systemassigned": ManagedServiceIdentityType_SystemAssigned, + "systemassigned, userassigned": ManagedServiceIdentityType_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentityType_UserAssigned, +} + type RedisCreateProperties_RedisConfiguration_ARM struct { // AofBackupEnabled: Specifies whether the aof backup is enabled AofBackupEnabled *string `json:"aof-backup-enabled,omitempty"` diff --git a/v2/api/cache/v1api20230401/redis_status_arm_types_gen.go b/v2/api/cache/v1api20230401/redis_status_arm_types_gen.go index 0ae2c6709fc..96e4c4baccb 100644 --- a/v2/api/cache/v1api20230401/redis_status_arm_types_gen.go +++ b/v2/api/cache/v1api20230401/redis_status_arm_types_gen.go @@ -125,6 +125,14 @@ const ( ManagedServiceIdentityType_STATUS_UserAssigned = ManagedServiceIdentityType_STATUS("UserAssigned") ) +// Mapping from string to ManagedServiceIdentityType_STATUS +var managedServiceIdentityType_STATUS_Values = map[string]ManagedServiceIdentityType_STATUS{ + "none": ManagedServiceIdentityType_STATUS_None, + "systemassigned": ManagedServiceIdentityType_STATUS_SystemAssigned, + "systemassigned, userassigned": ManagedServiceIdentityType_STATUS_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentityType_STATUS_UserAssigned, +} + // The Private Endpoint Connection resource. type PrivateEndpointConnection_STATUS_ARM struct { // Id: Fully qualified resource ID for the resource. Ex - diff --git a/v2/api/cache/v1api20230401/redis_types_gen.go b/v2/api/cache/v1api20230401/redis_types_gen.go index e5c8ae194b4..c3b1193370d 100644 --- a/v2/api/cache/v1api20230401/redis_types_gen.go +++ b/v2/api/cache/v1api20230401/redis_types_gen.go @@ -799,8 +799,9 @@ func (redis *Redis_Spec) AssignProperties_From_Redis_Spec(source *v20230401s.Red // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := RedisCreateProperties_MinimumTlsVersion(*source.MinimumTlsVersion) - redis.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, redisCreateProperties_MinimumTlsVersion_Values) + redis.MinimumTlsVersion = &minimumTlsVersionTemp } else { redis.MinimumTlsVersion = nil } @@ -827,8 +828,9 @@ func (redis *Redis_Spec) AssignProperties_From_Redis_Spec(source *v20230401s.Red // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := RedisCreateProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - redis.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, redisCreateProperties_PublicNetworkAccess_Values) + redis.PublicNetworkAccess = &publicNetworkAccessTemp } else { redis.PublicNetworkAccess = nil } @@ -1635,8 +1637,9 @@ func (redis *Redis_STATUS) AssignProperties_From_Redis_STATUS(source *v20230401s // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := RedisProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - redis.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, redisProperties_MinimumTlsVersion_STATUS_Values) + redis.MinimumTlsVersion = &minimumTlsVersionTemp } else { redis.MinimumTlsVersion = nil } @@ -1667,16 +1670,18 @@ func (redis *Redis_STATUS) AssignProperties_From_Redis_STATUS(source *v20230401s // ProvisioningState if source.ProvisioningState != nil { - provisioningState := RedisProperties_ProvisioningState_STATUS(*source.ProvisioningState) - redis.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, redisProperties_ProvisioningState_STATUS_Values) + redis.ProvisioningState = &provisioningStateTemp } else { redis.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := RedisProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - redis.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, redisProperties_PublicNetworkAccess_STATUS_Values) + redis.PublicNetworkAccess = &publicNetworkAccessTemp } else { redis.PublicNetworkAccess = nil } @@ -1996,8 +2001,9 @@ func (identity *ManagedServiceIdentity) AssignProperties_From_ManagedServiceIden // Type if source.Type != nil { - typeVar := ManagedServiceIdentityType(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentityType_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2168,8 +2174,9 @@ func (identity *ManagedServiceIdentity_STATUS) AssignProperties_From_ManagedServ // Type if source.Type != nil { - typeVar := ManagedServiceIdentityType_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentityType_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2313,6 +2320,13 @@ const ( RedisCreateProperties_MinimumTlsVersion_12 = RedisCreateProperties_MinimumTlsVersion("1.2") ) +// Mapping from string to RedisCreateProperties_MinimumTlsVersion +var redisCreateProperties_MinimumTlsVersion_Values = map[string]RedisCreateProperties_MinimumTlsVersion{ + "1.0": RedisCreateProperties_MinimumTlsVersion_10, + "1.1": RedisCreateProperties_MinimumTlsVersion_11, + "1.2": RedisCreateProperties_MinimumTlsVersion_12, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type RedisCreateProperties_PublicNetworkAccess string @@ -2321,6 +2335,12 @@ const ( RedisCreateProperties_PublicNetworkAccess_Enabled = RedisCreateProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to RedisCreateProperties_PublicNetworkAccess +var redisCreateProperties_PublicNetworkAccess_Values = map[string]RedisCreateProperties_PublicNetworkAccess{ + "disabled": RedisCreateProperties_PublicNetworkAccess_Disabled, + "enabled": RedisCreateProperties_PublicNetworkAccess_Enabled, +} + type RedisCreateProperties_RedisConfiguration struct { // AofBackupEnabled: Specifies whether the aof backup is enabled AofBackupEnabled *string `json:"aof-backup-enabled,omitempty"` @@ -2993,6 +3013,13 @@ const ( RedisProperties_MinimumTlsVersion_STATUS_12 = RedisProperties_MinimumTlsVersion_STATUS("1.2") ) +// Mapping from string to RedisProperties_MinimumTlsVersion_STATUS +var redisProperties_MinimumTlsVersion_STATUS_Values = map[string]RedisProperties_MinimumTlsVersion_STATUS{ + "1.0": RedisProperties_MinimumTlsVersion_STATUS_10, + "1.1": RedisProperties_MinimumTlsVersion_STATUS_11, + "1.2": RedisProperties_MinimumTlsVersion_STATUS_12, +} + type RedisProperties_ProvisioningState_STATUS string const ( @@ -3010,6 +3037,22 @@ const ( RedisProperties_ProvisioningState_STATUS_Updating = RedisProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to RedisProperties_ProvisioningState_STATUS +var redisProperties_ProvisioningState_STATUS_Values = map[string]RedisProperties_ProvisioningState_STATUS{ + "creating": RedisProperties_ProvisioningState_STATUS_Creating, + "deleting": RedisProperties_ProvisioningState_STATUS_Deleting, + "disabled": RedisProperties_ProvisioningState_STATUS_Disabled, + "failed": RedisProperties_ProvisioningState_STATUS_Failed, + "linking": RedisProperties_ProvisioningState_STATUS_Linking, + "provisioning": RedisProperties_ProvisioningState_STATUS_Provisioning, + "recoveringscalefailure": RedisProperties_ProvisioningState_STATUS_RecoveringScaleFailure, + "scaling": RedisProperties_ProvisioningState_STATUS_Scaling, + "succeeded": RedisProperties_ProvisioningState_STATUS_Succeeded, + "unlinking": RedisProperties_ProvisioningState_STATUS_Unlinking, + "unprovisioning": RedisProperties_ProvisioningState_STATUS_Unprovisioning, + "updating": RedisProperties_ProvisioningState_STATUS_Updating, +} + type RedisProperties_PublicNetworkAccess_STATUS string const ( @@ -3017,6 +3060,12 @@ const ( RedisProperties_PublicNetworkAccess_STATUS_Enabled = RedisProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to RedisProperties_PublicNetworkAccess_STATUS +var redisProperties_PublicNetworkAccess_STATUS_Values = map[string]RedisProperties_PublicNetworkAccess_STATUS{ + "disabled": RedisProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": RedisProperties_PublicNetworkAccess_STATUS_Enabled, +} + type RedisProperties_RedisConfiguration_STATUS struct { // AofBackupEnabled: Specifies whether the aof backup is enabled AofBackupEnabled *string `json:"aof-backup-enabled,omitempty"` @@ -3406,16 +3455,18 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20230401s.Sku) error { // Family if source.Family != nil { - family := Sku_Family(*source.Family) - sku.Family = &family + family := *source.Family + familyTemp := genruntime.ToEnum(family, sku_Family_Values) + sku.Family = &familyTemp } else { sku.Family = nil } // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3542,16 +3593,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20230401s.Sku_S // Family if source.Family != nil { - family := Sku_Family_STATUS(*source.Family) - sku.Family = &family + family := *source.Family + familyTemp := genruntime.ToEnum(family, sku_Family_STATUS_Values) + sku.Family = &familyTemp } else { sku.Family = nil } // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3725,6 +3778,12 @@ const ( Sku_Family_P = Sku_Family("P") ) +// Mapping from string to Sku_Family +var sku_Family_Values = map[string]Sku_Family{ + "c": Sku_Family_C, + "p": Sku_Family_P, +} + type Sku_Family_STATUS string const ( @@ -3732,6 +3791,12 @@ const ( Sku_Family_STATUS_P = Sku_Family_STATUS("P") ) +// Mapping from string to Sku_Family_STATUS +var sku_Family_STATUS_Values = map[string]Sku_Family_STATUS{ + "c": Sku_Family_STATUS_C, + "p": Sku_Family_STATUS_P, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type Sku_Name string @@ -3741,6 +3806,13 @@ const ( Sku_Name_Standard = Sku_Name("Standard") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "basic": Sku_Name_Basic, + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + type Sku_Name_STATUS string const ( @@ -3749,6 +3821,13 @@ const ( Sku_Name_STATUS_Standard = Sku_Name_STATUS("Standard") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "basic": Sku_Name_STATUS_Basic, + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + // User assigned identity properties type UserAssignedIdentity_STATUS struct { // ClientId: The client ID of the assigned identity. diff --git a/v2/api/cache/v1api20230701/redis_enterprise_database_types_gen.go b/v2/api/cache/v1api20230701/redis_enterprise_database_types_gen.go index e07ee38a7ce..f225e3ebdbb 100644 --- a/v2/api/cache/v1api20230701/redis_enterprise_database_types_gen.go +++ b/v2/api/cache/v1api20230701/redis_enterprise_database_types_gen.go @@ -582,24 +582,27 @@ func (database *RedisEnterprise_Database_Spec) AssignProperties_From_RedisEnterp // ClientProtocol if source.ClientProtocol != nil { - clientProtocol := DatabaseProperties_ClientProtocol(*source.ClientProtocol) - database.ClientProtocol = &clientProtocol + clientProtocol := *source.ClientProtocol + clientProtocolTemp := genruntime.ToEnum(clientProtocol, databaseProperties_ClientProtocol_Values) + database.ClientProtocol = &clientProtocolTemp } else { database.ClientProtocol = nil } // ClusteringPolicy if source.ClusteringPolicy != nil { - clusteringPolicy := DatabaseProperties_ClusteringPolicy(*source.ClusteringPolicy) - database.ClusteringPolicy = &clusteringPolicy + clusteringPolicy := *source.ClusteringPolicy + clusteringPolicyTemp := genruntime.ToEnum(clusteringPolicy, databaseProperties_ClusteringPolicy_Values) + database.ClusteringPolicy = &clusteringPolicyTemp } else { database.ClusteringPolicy = nil } // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := DatabaseProperties_EvictionPolicy(*source.EvictionPolicy) - database.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, databaseProperties_EvictionPolicy_Values) + database.EvictionPolicy = &evictionPolicyTemp } else { database.EvictionPolicy = nil } @@ -1077,16 +1080,18 @@ func (database *RedisEnterprise_Database_STATUS) AssignProperties_From_RedisEnte // ClientProtocol if source.ClientProtocol != nil { - clientProtocol := DatabaseProperties_ClientProtocol_STATUS(*source.ClientProtocol) - database.ClientProtocol = &clientProtocol + clientProtocol := *source.ClientProtocol + clientProtocolTemp := genruntime.ToEnum(clientProtocol, databaseProperties_ClientProtocol_STATUS_Values) + database.ClientProtocol = &clientProtocolTemp } else { database.ClientProtocol = nil } // ClusteringPolicy if source.ClusteringPolicy != nil { - clusteringPolicy := DatabaseProperties_ClusteringPolicy_STATUS(*source.ClusteringPolicy) - database.ClusteringPolicy = &clusteringPolicy + clusteringPolicy := *source.ClusteringPolicy + clusteringPolicyTemp := genruntime.ToEnum(clusteringPolicy, databaseProperties_ClusteringPolicy_STATUS_Values) + database.ClusteringPolicy = &clusteringPolicyTemp } else { database.ClusteringPolicy = nil } @@ -1096,8 +1101,9 @@ func (database *RedisEnterprise_Database_STATUS) AssignProperties_From_RedisEnte // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := DatabaseProperties_EvictionPolicy_STATUS(*source.EvictionPolicy) - database.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, databaseProperties_EvictionPolicy_STATUS_Values) + database.EvictionPolicy = &evictionPolicyTemp } else { database.EvictionPolicy = nil } @@ -1155,16 +1161,18 @@ func (database *RedisEnterprise_Database_STATUS) AssignProperties_From_RedisEnte // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - database.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + database.ProvisioningState = &provisioningStateTemp } else { database.ProvisioningState = nil } // ResourceState if source.ResourceState != nil { - resourceState := ResourceState_STATUS(*source.ResourceState) - database.ResourceState = &resourceState + resourceState := *source.ResourceState + resourceStateTemp := genruntime.ToEnum(resourceState, resourceState_STATUS_Values) + database.ResourceState = &resourceStateTemp } else { database.ResourceState = nil } @@ -1297,6 +1305,12 @@ const ( DatabaseProperties_ClientProtocol_Plaintext = DatabaseProperties_ClientProtocol("Plaintext") ) +// Mapping from string to DatabaseProperties_ClientProtocol +var databaseProperties_ClientProtocol_Values = map[string]DatabaseProperties_ClientProtocol{ + "encrypted": DatabaseProperties_ClientProtocol_Encrypted, + "plaintext": DatabaseProperties_ClientProtocol_Plaintext, +} + type DatabaseProperties_ClientProtocol_STATUS string const ( @@ -1304,6 +1318,12 @@ const ( DatabaseProperties_ClientProtocol_STATUS_Plaintext = DatabaseProperties_ClientProtocol_STATUS("Plaintext") ) +// Mapping from string to DatabaseProperties_ClientProtocol_STATUS +var databaseProperties_ClientProtocol_STATUS_Values = map[string]DatabaseProperties_ClientProtocol_STATUS{ + "encrypted": DatabaseProperties_ClientProtocol_STATUS_Encrypted, + "plaintext": DatabaseProperties_ClientProtocol_STATUS_Plaintext, +} + // +kubebuilder:validation:Enum={"EnterpriseCluster","OSSCluster"} type DatabaseProperties_ClusteringPolicy string @@ -1312,6 +1332,12 @@ const ( DatabaseProperties_ClusteringPolicy_OSSCluster = DatabaseProperties_ClusteringPolicy("OSSCluster") ) +// Mapping from string to DatabaseProperties_ClusteringPolicy +var databaseProperties_ClusteringPolicy_Values = map[string]DatabaseProperties_ClusteringPolicy{ + "enterprisecluster": DatabaseProperties_ClusteringPolicy_EnterpriseCluster, + "osscluster": DatabaseProperties_ClusteringPolicy_OSSCluster, +} + type DatabaseProperties_ClusteringPolicy_STATUS string const ( @@ -1319,6 +1345,12 @@ const ( DatabaseProperties_ClusteringPolicy_STATUS_OSSCluster = DatabaseProperties_ClusteringPolicy_STATUS("OSSCluster") ) +// Mapping from string to DatabaseProperties_ClusteringPolicy_STATUS +var databaseProperties_ClusteringPolicy_STATUS_Values = map[string]DatabaseProperties_ClusteringPolicy_STATUS{ + "enterprisecluster": DatabaseProperties_ClusteringPolicy_STATUS_EnterpriseCluster, + "osscluster": DatabaseProperties_ClusteringPolicy_STATUS_OSSCluster, +} + // +kubebuilder:validation:Enum={"AllKeysLFU","AllKeysLRU","AllKeysRandom","NoEviction","VolatileLFU","VolatileLRU","VolatileRandom","VolatileTTL"} type DatabaseProperties_EvictionPolicy string @@ -1333,6 +1365,18 @@ const ( DatabaseProperties_EvictionPolicy_VolatileTTL = DatabaseProperties_EvictionPolicy("VolatileTTL") ) +// Mapping from string to DatabaseProperties_EvictionPolicy +var databaseProperties_EvictionPolicy_Values = map[string]DatabaseProperties_EvictionPolicy{ + "allkeyslfu": DatabaseProperties_EvictionPolicy_AllKeysLFU, + "allkeyslru": DatabaseProperties_EvictionPolicy_AllKeysLRU, + "allkeysrandom": DatabaseProperties_EvictionPolicy_AllKeysRandom, + "noeviction": DatabaseProperties_EvictionPolicy_NoEviction, + "volatilelfu": DatabaseProperties_EvictionPolicy_VolatileLFU, + "volatilelru": DatabaseProperties_EvictionPolicy_VolatileLRU, + "volatilerandom": DatabaseProperties_EvictionPolicy_VolatileRandom, + "volatilettl": DatabaseProperties_EvictionPolicy_VolatileTTL, +} + type DatabaseProperties_EvictionPolicy_STATUS string const ( @@ -1346,6 +1390,18 @@ const ( DatabaseProperties_EvictionPolicy_STATUS_VolatileTTL = DatabaseProperties_EvictionPolicy_STATUS("VolatileTTL") ) +// Mapping from string to DatabaseProperties_EvictionPolicy_STATUS +var databaseProperties_EvictionPolicy_STATUS_Values = map[string]DatabaseProperties_EvictionPolicy_STATUS{ + "allkeyslfu": DatabaseProperties_EvictionPolicy_STATUS_AllKeysLFU, + "allkeyslru": DatabaseProperties_EvictionPolicy_STATUS_AllKeysLRU, + "allkeysrandom": DatabaseProperties_EvictionPolicy_STATUS_AllKeysRandom, + "noeviction": DatabaseProperties_EvictionPolicy_STATUS_NoEviction, + "volatilelfu": DatabaseProperties_EvictionPolicy_STATUS_VolatileLFU, + "volatilelru": DatabaseProperties_EvictionPolicy_STATUS_VolatileLRU, + "volatilerandom": DatabaseProperties_EvictionPolicy_STATUS_VolatileRandom, + "volatilettl": DatabaseProperties_EvictionPolicy_STATUS_VolatileTTL, +} + type DatabaseProperties_GeoReplication struct { // GroupNickname: Name for the group of linked database resources GroupNickname *string `json:"groupNickname,omitempty"` @@ -1913,8 +1969,9 @@ func (persistence *Persistence) AssignProperties_From_Persistence(source *v20230 // AofFrequency if source.AofFrequency != nil { - aofFrequency := Persistence_AofFrequency(*source.AofFrequency) - persistence.AofFrequency = &aofFrequency + aofFrequency := *source.AofFrequency + aofFrequencyTemp := genruntime.ToEnum(aofFrequency, persistence_AofFrequency_Values) + persistence.AofFrequency = &aofFrequencyTemp } else { persistence.AofFrequency = nil } @@ -1929,8 +1986,9 @@ func (persistence *Persistence) AssignProperties_From_Persistence(source *v20230 // RdbFrequency if source.RdbFrequency != nil { - rdbFrequency := Persistence_RdbFrequency(*source.RdbFrequency) - persistence.RdbFrequency = &rdbFrequency + rdbFrequency := *source.RdbFrequency + rdbFrequencyTemp := genruntime.ToEnum(rdbFrequency, persistence_RdbFrequency_Values) + persistence.RdbFrequency = &rdbFrequencyTemp } else { persistence.RdbFrequency = nil } @@ -2096,8 +2154,9 @@ func (persistence *Persistence_STATUS) AssignProperties_From_Persistence_STATUS( // AofFrequency if source.AofFrequency != nil { - aofFrequency := Persistence_AofFrequency_STATUS(*source.AofFrequency) - persistence.AofFrequency = &aofFrequency + aofFrequency := *source.AofFrequency + aofFrequencyTemp := genruntime.ToEnum(aofFrequency, persistence_AofFrequency_STATUS_Values) + persistence.AofFrequency = &aofFrequencyTemp } else { persistence.AofFrequency = nil } @@ -2112,8 +2171,9 @@ func (persistence *Persistence_STATUS) AssignProperties_From_Persistence_STATUS( // RdbFrequency if source.RdbFrequency != nil { - rdbFrequency := Persistence_RdbFrequency_STATUS(*source.RdbFrequency) - persistence.RdbFrequency = &rdbFrequency + rdbFrequency := *source.RdbFrequency + rdbFrequencyTemp := genruntime.ToEnum(rdbFrequency, persistence_RdbFrequency_STATUS_Values) + persistence.RdbFrequency = &rdbFrequencyTemp } else { persistence.RdbFrequency = nil } @@ -2316,8 +2376,9 @@ func (database *LinkedDatabase_STATUS) AssignProperties_From_LinkedDatabase_STAT // State if source.State != nil { - state := LinkedDatabase_State_STATUS(*source.State) - database.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, linkedDatabase_State_STATUS_Values) + database.State = &stateTemp } else { database.State = nil } @@ -2361,6 +2422,12 @@ const ( Persistence_AofFrequency_Always = Persistence_AofFrequency("always") ) +// Mapping from string to Persistence_AofFrequency +var persistence_AofFrequency_Values = map[string]Persistence_AofFrequency{ + "1s": Persistence_AofFrequency_1S, + "always": Persistence_AofFrequency_Always, +} + type Persistence_AofFrequency_STATUS string const ( @@ -2368,6 +2435,12 @@ const ( Persistence_AofFrequency_STATUS_Always = Persistence_AofFrequency_STATUS("always") ) +// Mapping from string to Persistence_AofFrequency_STATUS +var persistence_AofFrequency_STATUS_Values = map[string]Persistence_AofFrequency_STATUS{ + "1s": Persistence_AofFrequency_STATUS_1S, + "always": Persistence_AofFrequency_STATUS_Always, +} + // +kubebuilder:validation:Enum={"12h","1h","6h"} type Persistence_RdbFrequency string @@ -2377,6 +2450,13 @@ const ( Persistence_RdbFrequency_6H = Persistence_RdbFrequency("6h") ) +// Mapping from string to Persistence_RdbFrequency +var persistence_RdbFrequency_Values = map[string]Persistence_RdbFrequency{ + "12h": Persistence_RdbFrequency_12H, + "1h": Persistence_RdbFrequency_1H, + "6h": Persistence_RdbFrequency_6H, +} + type Persistence_RdbFrequency_STATUS string const ( @@ -2385,6 +2465,13 @@ const ( Persistence_RdbFrequency_STATUS_6H = Persistence_RdbFrequency_STATUS("6h") ) +// Mapping from string to Persistence_RdbFrequency_STATUS +var persistence_RdbFrequency_STATUS_Values = map[string]Persistence_RdbFrequency_STATUS{ + "12h": Persistence_RdbFrequency_STATUS_12H, + "1h": Persistence_RdbFrequency_STATUS_1H, + "6h": Persistence_RdbFrequency_STATUS_6H, +} + type LinkedDatabase_State_STATUS string const ( @@ -2395,6 +2482,15 @@ const ( LinkedDatabase_State_STATUS_Unlinking = LinkedDatabase_State_STATUS("Unlinking") ) +// Mapping from string to LinkedDatabase_State_STATUS +var linkedDatabase_State_STATUS_Values = map[string]LinkedDatabase_State_STATUS{ + "linkfailed": LinkedDatabase_State_STATUS_LinkFailed, + "linked": LinkedDatabase_State_STATUS_Linked, + "linking": LinkedDatabase_State_STATUS_Linking, + "unlinkfailed": LinkedDatabase_State_STATUS_UnlinkFailed, + "unlinking": LinkedDatabase_State_STATUS_Unlinking, +} + func init() { SchemeBuilder.Register(&RedisEnterpriseDatabase{}, &RedisEnterpriseDatabaseList{}) } diff --git a/v2/api/cache/v1api20230701/redis_enterprise_spec_arm_types_gen.go b/v2/api/cache/v1api20230701/redis_enterprise_spec_arm_types_gen.go index 9d6c83a0a9c..707dd367136 100644 --- a/v2/api/cache/v1api20230701/redis_enterprise_spec_arm_types_gen.go +++ b/v2/api/cache/v1api20230701/redis_enterprise_spec_arm_types_gen.go @@ -68,3 +68,14 @@ const ( Sku_Name_Enterprise_E20 = Sku_Name("Enterprise_E20") Sku_Name_Enterprise_E50 = Sku_Name("Enterprise_E50") ) + +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "enterpriseflash_f1500": Sku_Name_EnterpriseFlash_F1500, + "enterpriseflash_f300": Sku_Name_EnterpriseFlash_F300, + "enterpriseflash_f700": Sku_Name_EnterpriseFlash_F700, + "enterprise_e10": Sku_Name_Enterprise_E10, + "enterprise_e100": Sku_Name_Enterprise_E100, + "enterprise_e20": Sku_Name_Enterprise_E20, + "enterprise_e50": Sku_Name_Enterprise_E50, +} diff --git a/v2/api/cache/v1api20230701/redis_enterprise_status_arm_types_gen.go b/v2/api/cache/v1api20230701/redis_enterprise_status_arm_types_gen.go index 85c4c75798a..72de36d6aed 100644 --- a/v2/api/cache/v1api20230701/redis_enterprise_status_arm_types_gen.go +++ b/v2/api/cache/v1api20230701/redis_enterprise_status_arm_types_gen.go @@ -79,3 +79,14 @@ const ( Sku_Name_STATUS_Enterprise_E20 = Sku_Name_STATUS("Enterprise_E20") Sku_Name_STATUS_Enterprise_E50 = Sku_Name_STATUS("Enterprise_E50") ) + +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "enterpriseflash_f1500": Sku_Name_STATUS_EnterpriseFlash_F1500, + "enterpriseflash_f300": Sku_Name_STATUS_EnterpriseFlash_F300, + "enterpriseflash_f700": Sku_Name_STATUS_EnterpriseFlash_F700, + "enterprise_e10": Sku_Name_STATUS_Enterprise_E10, + "enterprise_e100": Sku_Name_STATUS_Enterprise_E100, + "enterprise_e20": Sku_Name_STATUS_Enterprise_E20, + "enterprise_e50": Sku_Name_STATUS_Enterprise_E50, +} diff --git a/v2/api/cache/v1api20230701/redis_enterprise_types_gen.go b/v2/api/cache/v1api20230701/redis_enterprise_types_gen.go index 785bbcaf282..81df7a396d1 100644 --- a/v2/api/cache/v1api20230701/redis_enterprise_types_gen.go +++ b/v2/api/cache/v1api20230701/redis_enterprise_types_gen.go @@ -535,8 +535,9 @@ func (enterprise *RedisEnterprise_Spec) AssignProperties_From_RedisEnterprise_Sp // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := ClusterProperties_MinimumTlsVersion(*source.MinimumTlsVersion) - enterprise.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, clusterProperties_MinimumTlsVersion_Values) + enterprise.MinimumTlsVersion = &minimumTlsVersionTemp } else { enterprise.MinimumTlsVersion = nil } @@ -914,8 +915,9 @@ func (enterprise *RedisEnterprise_STATUS) AssignProperties_From_RedisEnterprise_ // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := ClusterProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - enterprise.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, clusterProperties_MinimumTlsVersion_STATUS_Values) + enterprise.MinimumTlsVersion = &minimumTlsVersionTemp } else { enterprise.MinimumTlsVersion = nil } @@ -943,8 +945,9 @@ func (enterprise *RedisEnterprise_STATUS) AssignProperties_From_RedisEnterprise_ // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - enterprise.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + enterprise.ProvisioningState = &provisioningStateTemp } else { enterprise.ProvisioningState = nil } @@ -954,8 +957,9 @@ func (enterprise *RedisEnterprise_STATUS) AssignProperties_From_RedisEnterprise_ // ResourceState if source.ResourceState != nil { - resourceState := ResourceState_STATUS(*source.ResourceState) - enterprise.ResourceState = &resourceState + resourceState := *source.ResourceState + resourceStateTemp := genruntime.ToEnum(resourceState, resourceState_STATUS_Values) + enterprise.ResourceState = &resourceStateTemp } else { enterprise.ResourceState = nil } @@ -1091,6 +1095,13 @@ const ( ClusterProperties_MinimumTlsVersion_12 = ClusterProperties_MinimumTlsVersion("1.2") ) +// Mapping from string to ClusterProperties_MinimumTlsVersion +var clusterProperties_MinimumTlsVersion_Values = map[string]ClusterProperties_MinimumTlsVersion{ + "1.0": ClusterProperties_MinimumTlsVersion_10, + "1.1": ClusterProperties_MinimumTlsVersion_11, + "1.2": ClusterProperties_MinimumTlsVersion_12, +} + type ClusterProperties_MinimumTlsVersion_STATUS string const ( @@ -1099,6 +1110,13 @@ const ( ClusterProperties_MinimumTlsVersion_STATUS_12 = ClusterProperties_MinimumTlsVersion_STATUS("1.2") ) +// Mapping from string to ClusterProperties_MinimumTlsVersion_STATUS +var clusterProperties_MinimumTlsVersion_STATUS_Values = map[string]ClusterProperties_MinimumTlsVersion_STATUS{ + "1.0": ClusterProperties_MinimumTlsVersion_STATUS_10, + "1.1": ClusterProperties_MinimumTlsVersion_STATUS_11, + "1.2": ClusterProperties_MinimumTlsVersion_STATUS_12, +} + // The Private Endpoint Connection resource. type PrivateEndpointConnection_STATUS struct { // Id: Fully qualified resource ID for the resource. Ex - @@ -1171,6 +1189,16 @@ const ( ProvisioningState_STATUS_Updating = ProvisioningState_STATUS("Updating") ) +// Mapping from string to ProvisioningState_STATUS +var provisioningState_STATUS_Values = map[string]ProvisioningState_STATUS{ + "canceled": ProvisioningState_STATUS_Canceled, + "creating": ProvisioningState_STATUS_Creating, + "deleting": ProvisioningState_STATUS_Deleting, + "failed": ProvisioningState_STATUS_Failed, + "succeeded": ProvisioningState_STATUS_Succeeded, + "updating": ProvisioningState_STATUS_Updating, +} + // Current resource status type ResourceState_STATUS string @@ -1189,6 +1217,22 @@ const ( ResourceState_STATUS_Updating = ResourceState_STATUS("Updating") ) +// Mapping from string to ResourceState_STATUS +var resourceState_STATUS_Values = map[string]ResourceState_STATUS{ + "createfailed": ResourceState_STATUS_CreateFailed, + "creating": ResourceState_STATUS_Creating, + "deletefailed": ResourceState_STATUS_DeleteFailed, + "deleting": ResourceState_STATUS_Deleting, + "disablefailed": ResourceState_STATUS_DisableFailed, + "disabled": ResourceState_STATUS_Disabled, + "disabling": ResourceState_STATUS_Disabling, + "enablefailed": ResourceState_STATUS_EnableFailed, + "enabling": ResourceState_STATUS_Enabling, + "running": ResourceState_STATUS_Running, + "updatefailed": ResourceState_STATUS_UpdateFailed, + "updating": ResourceState_STATUS_Updating, +} + // SKU parameters supplied to the create RedisEnterprise operation. type Sku struct { // Capacity: The size of the RedisEnterprise cluster. Defaults to 2 or 3 depending on SKU. Valid values are (2, 4, 6, ...) @@ -1259,8 +1303,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20230701s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -1362,8 +1407,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20230701s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } diff --git a/v2/api/cdn/v1api20210601/profile_spec_arm_types_gen.go b/v2/api/cdn/v1api20210601/profile_spec_arm_types_gen.go index b50bae07fe5..28116192a4d 100644 --- a/v2/api/cdn/v1api20210601/profile_spec_arm_types_gen.go +++ b/v2/api/cdn/v1api20210601/profile_spec_arm_types_gen.go @@ -92,3 +92,20 @@ const ( Sku_Name_Standard_Microsoft = Sku_Name("Standard_Microsoft") Sku_Name_Standard_Verizon = Sku_Name("Standard_Verizon") ) + +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "custom_verizon": Sku_Name_Custom_Verizon, + "premium_azurefrontdoor": Sku_Name_Premium_AzureFrontDoor, + "premium_verizon": Sku_Name_Premium_Verizon, + "standardplus_955bandwidth_chinacdn": Sku_Name_StandardPlus_955BandWidth_ChinaCdn, + "standardplus_avgbandwidth_chinacdn": Sku_Name_StandardPlus_AvgBandWidth_ChinaCdn, + "standardplus_chinacdn": Sku_Name_StandardPlus_ChinaCdn, + "standard_955bandwidth_chinacdn": Sku_Name_Standard_955BandWidth_ChinaCdn, + "standard_akamai": Sku_Name_Standard_Akamai, + "standard_avgbandwidth_chinacdn": Sku_Name_Standard_AvgBandWidth_ChinaCdn, + "standard_azurefrontdoor": Sku_Name_Standard_AzureFrontDoor, + "standard_chinacdn": Sku_Name_Standard_ChinaCdn, + "standard_microsoft": Sku_Name_Standard_Microsoft, + "standard_verizon": Sku_Name_Standard_Verizon, +} diff --git a/v2/api/cdn/v1api20210601/profile_status_arm_types_gen.go b/v2/api/cdn/v1api20210601/profile_status_arm_types_gen.go index 075705ca3b6..dface4fa142 100644 --- a/v2/api/cdn/v1api20210601/profile_status_arm_types_gen.go +++ b/v2/api/cdn/v1api20210601/profile_status_arm_types_gen.go @@ -110,6 +110,14 @@ const ( IdentityType_STATUS_User = IdentityType_STATUS("user") ) +// Mapping from string to IdentityType_STATUS +var identityType_STATUS_Values = map[string]IdentityType_STATUS{ + "application": IdentityType_STATUS_Application, + "key": IdentityType_STATUS_Key, + "managedidentity": IdentityType_STATUS_ManagedIdentity, + "user": IdentityType_STATUS_User, +} + type Sku_Name_STATUS string const ( @@ -127,3 +135,20 @@ const ( Sku_Name_STATUS_Standard_Microsoft = Sku_Name_STATUS("Standard_Microsoft") Sku_Name_STATUS_Standard_Verizon = Sku_Name_STATUS("Standard_Verizon") ) + +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "custom_verizon": Sku_Name_STATUS_Custom_Verizon, + "premium_azurefrontdoor": Sku_Name_STATUS_Premium_AzureFrontDoor, + "premium_verizon": Sku_Name_STATUS_Premium_Verizon, + "standardplus_955bandwidth_chinacdn": Sku_Name_STATUS_StandardPlus_955BandWidth_ChinaCdn, + "standardplus_avgbandwidth_chinacdn": Sku_Name_STATUS_StandardPlus_AvgBandWidth_ChinaCdn, + "standardplus_chinacdn": Sku_Name_STATUS_StandardPlus_ChinaCdn, + "standard_955bandwidth_chinacdn": Sku_Name_STATUS_Standard_955BandWidth_ChinaCdn, + "standard_akamai": Sku_Name_STATUS_Standard_Akamai, + "standard_avgbandwidth_chinacdn": Sku_Name_STATUS_Standard_AvgBandWidth_ChinaCdn, + "standard_azurefrontdoor": Sku_Name_STATUS_Standard_AzureFrontDoor, + "standard_chinacdn": Sku_Name_STATUS_Standard_ChinaCdn, + "standard_microsoft": Sku_Name_STATUS_Standard_Microsoft, + "standard_verizon": Sku_Name_STATUS_Standard_Verizon, +} diff --git a/v2/api/cdn/v1api20210601/profile_types_gen.go b/v2/api/cdn/v1api20210601/profile_types_gen.go index b187fa0c6f9..b2eab69e85e 100644 --- a/v2/api/cdn/v1api20210601/profile_types_gen.go +++ b/v2/api/cdn/v1api20210601/profile_types_gen.go @@ -861,16 +861,18 @@ func (profile *Profile_STATUS) AssignProperties_From_Profile_STATUS(source *v202 // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProfileProperties_ProvisioningState_STATUS(*source.ProvisioningState) - profile.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, profileProperties_ProvisioningState_STATUS_Values) + profile.ProvisioningState = &provisioningStateTemp } else { profile.ProvisioningState = nil } // ResourceState if source.ResourceState != nil { - resourceState := ProfileProperties_ResourceState_STATUS(*source.ResourceState) - profile.ResourceState = &resourceState + resourceState := *source.ResourceState + resourceStateTemp := genruntime.ToEnum(resourceState, profileProperties_ResourceState_STATUS_Values) + profile.ResourceState = &resourceStateTemp } else { profile.ResourceState = nil } @@ -1002,6 +1004,15 @@ const ( ProfileProperties_ProvisioningState_STATUS_Updating = ProfileProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ProfileProperties_ProvisioningState_STATUS +var profileProperties_ProvisioningState_STATUS_Values = map[string]ProfileProperties_ProvisioningState_STATUS{ + "creating": ProfileProperties_ProvisioningState_STATUS_Creating, + "deleting": ProfileProperties_ProvisioningState_STATUS_Deleting, + "failed": ProfileProperties_ProvisioningState_STATUS_Failed, + "succeeded": ProfileProperties_ProvisioningState_STATUS_Succeeded, + "updating": ProfileProperties_ProvisioningState_STATUS_Updating, +} + type ProfileProperties_ResourceState_STATUS string const ( @@ -1011,6 +1022,14 @@ const ( ProfileProperties_ResourceState_STATUS_Disabled = ProfileProperties_ResourceState_STATUS("Disabled") ) +// Mapping from string to ProfileProperties_ResourceState_STATUS +var profileProperties_ResourceState_STATUS_Values = map[string]ProfileProperties_ResourceState_STATUS{ + "active": ProfileProperties_ResourceState_STATUS_Active, + "creating": ProfileProperties_ResourceState_STATUS_Creating, + "deleting": ProfileProperties_ResourceState_STATUS_Deleting, + "disabled": ProfileProperties_ResourceState_STATUS_Disabled, +} + // Standard_Verizon = The SKU name for a Standard Verizon CDN profile. // Premium_Verizon = The SKU name for a Premium Verizon // CDN profile. @@ -1084,8 +1103,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20210601s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -1176,8 +1196,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20210601s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -1296,8 +1317,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := IdentityType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, identityType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -1310,8 +1332,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := IdentityType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, identityType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } diff --git a/v2/api/cdn/v1api20210601/profiles_endpoint_types_gen.go b/v2/api/cdn/v1api20210601/profiles_endpoint_types_gen.go index acb24892066..9d2fb4ff95c 100644 --- a/v2/api/cdn/v1api20210601/profiles_endpoint_types_gen.go +++ b/v2/api/cdn/v1api20210601/profiles_endpoint_types_gen.go @@ -884,8 +884,9 @@ func (endpoint *Profiles_Endpoint_Spec) AssignProperties_From_Profiles_Endpoint_ // OptimizationType if source.OptimizationType != nil { - optimizationType := OptimizationType(*source.OptimizationType) - endpoint.OptimizationType = &optimizationType + optimizationType := *source.OptimizationType + optimizationTypeTemp := genruntime.ToEnum(optimizationType, optimizationType_Values) + endpoint.OptimizationType = &optimizationTypeTemp } else { endpoint.OptimizationType = nil } @@ -945,8 +946,9 @@ func (endpoint *Profiles_Endpoint_Spec) AssignProperties_From_Profiles_Endpoint_ // QueryStringCachingBehavior if source.QueryStringCachingBehavior != nil { - queryStringCachingBehavior := QueryStringCachingBehavior(*source.QueryStringCachingBehavior) - endpoint.QueryStringCachingBehavior = &queryStringCachingBehavior + queryStringCachingBehavior := *source.QueryStringCachingBehavior + queryStringCachingBehaviorTemp := genruntime.ToEnum(queryStringCachingBehavior, queryStringCachingBehavior_Values) + endpoint.QueryStringCachingBehavior = &queryStringCachingBehaviorTemp } else { endpoint.QueryStringCachingBehavior = nil } @@ -1898,8 +1900,9 @@ func (endpoint *Profiles_Endpoint_STATUS) AssignProperties_From_Profiles_Endpoin // OptimizationType if source.OptimizationType != nil { - optimizationType := OptimizationType_STATUS(*source.OptimizationType) - endpoint.OptimizationType = &optimizationType + optimizationType := *source.OptimizationType + optimizationTypeTemp := genruntime.ToEnum(optimizationType, optimizationType_STATUS_Values) + endpoint.OptimizationType = &optimizationTypeTemp } else { endpoint.OptimizationType = nil } @@ -1951,24 +1954,27 @@ func (endpoint *Profiles_Endpoint_STATUS) AssignProperties_From_Profiles_Endpoin // ProvisioningState if source.ProvisioningState != nil { - provisioningState := EndpointProperties_ProvisioningState_STATUS(*source.ProvisioningState) - endpoint.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, endpointProperties_ProvisioningState_STATUS_Values) + endpoint.ProvisioningState = &provisioningStateTemp } else { endpoint.ProvisioningState = nil } // QueryStringCachingBehavior if source.QueryStringCachingBehavior != nil { - queryStringCachingBehavior := QueryStringCachingBehavior_STATUS(*source.QueryStringCachingBehavior) - endpoint.QueryStringCachingBehavior = &queryStringCachingBehavior + queryStringCachingBehavior := *source.QueryStringCachingBehavior + queryStringCachingBehaviorTemp := genruntime.ToEnum(queryStringCachingBehavior, queryStringCachingBehavior_STATUS_Values) + endpoint.QueryStringCachingBehavior = &queryStringCachingBehaviorTemp } else { endpoint.QueryStringCachingBehavior = nil } // ResourceState if source.ResourceState != nil { - resourceState := EndpointProperties_ResourceState_STATUS(*source.ResourceState) - endpoint.ResourceState = &resourceState + resourceState := *source.ResourceState + resourceStateTemp := genruntime.ToEnum(resourceState, endpointProperties_ResourceState_STATUS_Values) + endpoint.ResourceState = &resourceStateTemp } else { endpoint.ResourceState = nil } @@ -3057,8 +3063,9 @@ func (origin *DeepCreatedOrigin_STATUS) AssignProperties_From_DeepCreatedOrigin_ // PrivateEndpointStatus if source.PrivateEndpointStatus != nil { - privateEndpointStatus := PrivateEndpointStatus_STATUS(*source.PrivateEndpointStatus) - origin.PrivateEndpointStatus = &privateEndpointStatus + privateEndpointStatus := *source.PrivateEndpointStatus + privateEndpointStatusTemp := genruntime.ToEnum(privateEndpointStatus, privateEndpointStatus_STATUS_Values) + origin.PrivateEndpointStatus = &privateEndpointStatusTemp } else { origin.PrivateEndpointStatus = nil } @@ -3978,6 +3985,15 @@ const ( EndpointProperties_ProvisioningState_STATUS_Updating = EndpointProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to EndpointProperties_ProvisioningState_STATUS +var endpointProperties_ProvisioningState_STATUS_Values = map[string]EndpointProperties_ProvisioningState_STATUS{ + "creating": EndpointProperties_ProvisioningState_STATUS_Creating, + "deleting": EndpointProperties_ProvisioningState_STATUS_Deleting, + "failed": EndpointProperties_ProvisioningState_STATUS_Failed, + "succeeded": EndpointProperties_ProvisioningState_STATUS_Succeeded, + "updating": EndpointProperties_ProvisioningState_STATUS_Updating, +} + type EndpointProperties_ResourceState_STATUS string const ( @@ -3989,6 +4005,16 @@ const ( EndpointProperties_ResourceState_STATUS_Stopping = EndpointProperties_ResourceState_STATUS("Stopping") ) +// Mapping from string to EndpointProperties_ResourceState_STATUS +var endpointProperties_ResourceState_STATUS_Values = map[string]EndpointProperties_ResourceState_STATUS{ + "creating": EndpointProperties_ResourceState_STATUS_Creating, + "deleting": EndpointProperties_ResourceState_STATUS_Deleting, + "running": EndpointProperties_ResourceState_STATUS_Running, + "starting": EndpointProperties_ResourceState_STATUS_Starting, + "stopped": EndpointProperties_ResourceState_STATUS_Stopped, + "stopping": EndpointProperties_ResourceState_STATUS_Stopping, +} + type EndpointProperties_WebApplicationFirewallPolicyLink struct { // Reference: Resource ID. Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` @@ -4226,8 +4252,9 @@ func (filter *GeoFilter) AssignProperties_From_GeoFilter(source *v20210601s.GeoF // Action if source.Action != nil { - action := GeoFilter_Action(*source.Action) - filter.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, geoFilter_Action_Values) + filter.Action = &actionTemp } else { filter.Action = nil } @@ -4345,8 +4372,9 @@ func (filter *GeoFilter_STATUS) AssignProperties_From_GeoFilter_STATUS(source *v // Action if source.Action != nil { - action := GeoFilter_Action_STATUS(*source.Action) - filter.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, geoFilter_Action_STATUS_Values) + filter.Action = &actionTemp } else { filter.Action = nil } @@ -4404,6 +4432,15 @@ const ( OptimizationType_VideoOnDemandMediaStreaming = OptimizationType("VideoOnDemandMediaStreaming") ) +// Mapping from string to OptimizationType +var optimizationType_Values = map[string]OptimizationType{ + "dynamicsiteacceleration": OptimizationType_DynamicSiteAcceleration, + "generalmediastreaming": OptimizationType_GeneralMediaStreaming, + "generalwebdelivery": OptimizationType_GeneralWebDelivery, + "largefiledownload": OptimizationType_LargeFileDownload, + "videoondemandmediastreaming": OptimizationType_VideoOnDemandMediaStreaming, +} + // Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. With this // information we can apply scenario driven optimization. type OptimizationType_STATUS string @@ -4416,6 +4453,15 @@ const ( OptimizationType_STATUS_VideoOnDemandMediaStreaming = OptimizationType_STATUS("VideoOnDemandMediaStreaming") ) +// Mapping from string to OptimizationType_STATUS +var optimizationType_STATUS_Values = map[string]OptimizationType_STATUS{ + "dynamicsiteacceleration": OptimizationType_STATUS_DynamicSiteAcceleration, + "generalmediastreaming": OptimizationType_STATUS_GeneralMediaStreaming, + "generalwebdelivery": OptimizationType_STATUS_GeneralWebDelivery, + "largefiledownload": OptimizationType_STATUS_LargeFileDownload, + "videoondemandmediastreaming": OptimizationType_STATUS_VideoOnDemandMediaStreaming, +} + // Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass // caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. // +kubebuilder:validation:Enum={"BypassCaching","IgnoreQueryString","NotSet","UseQueryString"} @@ -4428,6 +4474,14 @@ const ( QueryStringCachingBehavior_UseQueryString = QueryStringCachingBehavior("UseQueryString") ) +// Mapping from string to QueryStringCachingBehavior +var queryStringCachingBehavior_Values = map[string]QueryStringCachingBehavior{ + "bypasscaching": QueryStringCachingBehavior_BypassCaching, + "ignorequerystring": QueryStringCachingBehavior_IgnoreQueryString, + "notset": QueryStringCachingBehavior_NotSet, + "usequerystring": QueryStringCachingBehavior_UseQueryString, +} + // Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass // caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. type QueryStringCachingBehavior_STATUS string @@ -4439,6 +4493,14 @@ const ( QueryStringCachingBehavior_STATUS_UseQueryString = QueryStringCachingBehavior_STATUS("UseQueryString") ) +// Mapping from string to QueryStringCachingBehavior_STATUS +var queryStringCachingBehavior_STATUS_Values = map[string]QueryStringCachingBehavior_STATUS{ + "bypasscaching": QueryStringCachingBehavior_STATUS_BypassCaching, + "ignorequerystring": QueryStringCachingBehavior_STATUS_IgnoreQueryString, + "notset": QueryStringCachingBehavior_STATUS_NotSet, + "usequerystring": QueryStringCachingBehavior_STATUS_UseQueryString, +} + // Reference to another resource. type ResourceReference struct { // Reference: Resource ID. @@ -5280,6 +5342,12 @@ const ( GeoFilter_Action_Block = GeoFilter_Action("Block") ) +// Mapping from string to GeoFilter_Action +var geoFilter_Action_Values = map[string]GeoFilter_Action{ + "allow": GeoFilter_Action_Allow, + "block": GeoFilter_Action_Block, +} + type GeoFilter_Action_STATUS string const ( @@ -5287,6 +5355,12 @@ const ( GeoFilter_Action_STATUS_Block = GeoFilter_Action_STATUS("Block") ) +// Mapping from string to GeoFilter_Action_STATUS +var geoFilter_Action_STATUS_Values = map[string]GeoFilter_Action_STATUS{ + "allow": GeoFilter_Action_STATUS_Allow, + "block": GeoFilter_Action_STATUS_Block, +} + // The JSON object that contains the properties to send health probes to origin. type HealthProbeParameters struct { // +kubebuilder:validation:Maximum=255 @@ -5395,16 +5469,18 @@ func (parameters *HealthProbeParameters) AssignProperties_From_HealthProbeParame // ProbeProtocol if source.ProbeProtocol != nil { - probeProtocol := HealthProbeParameters_ProbeProtocol(*source.ProbeProtocol) - parameters.ProbeProtocol = &probeProtocol + probeProtocol := *source.ProbeProtocol + probeProtocolTemp := genruntime.ToEnum(probeProtocol, healthProbeParameters_ProbeProtocol_Values) + parameters.ProbeProtocol = &probeProtocolTemp } else { parameters.ProbeProtocol = nil } // ProbeRequestType if source.ProbeRequestType != nil { - probeRequestType := HealthProbeParameters_ProbeRequestType(*source.ProbeRequestType) - parameters.ProbeRequestType = &probeRequestType + probeRequestType := *source.ProbeRequestType + probeRequestTypeTemp := genruntime.ToEnum(probeRequestType, healthProbeParameters_ProbeRequestType_Values) + parameters.ProbeRequestType = &probeRequestTypeTemp } else { parameters.ProbeRequestType = nil } @@ -5558,16 +5634,18 @@ func (parameters *HealthProbeParameters_STATUS) AssignProperties_From_HealthProb // ProbeProtocol if source.ProbeProtocol != nil { - probeProtocol := HealthProbeParameters_ProbeProtocol_STATUS(*source.ProbeProtocol) - parameters.ProbeProtocol = &probeProtocol + probeProtocol := *source.ProbeProtocol + probeProtocolTemp := genruntime.ToEnum(probeProtocol, healthProbeParameters_ProbeProtocol_STATUS_Values) + parameters.ProbeProtocol = &probeProtocolTemp } else { parameters.ProbeProtocol = nil } // ProbeRequestType if source.ProbeRequestType != nil { - probeRequestType := HealthProbeParameters_ProbeRequestType_STATUS(*source.ProbeRequestType) - parameters.ProbeRequestType = &probeRequestType + probeRequestType := *source.ProbeRequestType + probeRequestTypeTemp := genruntime.ToEnum(probeRequestType, healthProbeParameters_ProbeRequestType_STATUS_Values) + parameters.ProbeRequestType = &probeRequestTypeTemp } else { parameters.ProbeRequestType = nil } @@ -5756,8 +5834,9 @@ func (parameters *KeyVaultSigningKeyParameters) AssignProperties_From_KeyVaultSi // TypeName if source.TypeName != nil { - typeName := KeyVaultSigningKeyParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, keyVaultSigningKeyParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -5928,8 +6007,9 @@ func (parameters *KeyVaultSigningKeyParameters_STATUS) AssignProperties_From_Key // TypeName if source.TypeName != nil { - typeName := KeyVaultSigningKeyParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, keyVaultSigningKeyParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -5991,6 +6071,15 @@ const ( PrivateEndpointStatus_STATUS_Timeout = PrivateEndpointStatus_STATUS("Timeout") ) +// Mapping from string to PrivateEndpointStatus_STATUS +var privateEndpointStatus_STATUS_Values = map[string]PrivateEndpointStatus_STATUS{ + "approved": PrivateEndpointStatus_STATUS_Approved, + "disconnected": PrivateEndpointStatus_STATUS_Disconnected, + "pending": PrivateEndpointStatus_STATUS_Pending, + "rejected": PrivateEndpointStatus_STATUS_Rejected, + "timeout": PrivateEndpointStatus_STATUS_Timeout, +} + // The JSON object that contains the properties to determine origin health using real requests/responses. type ResponseBasedOriginErrorDetectionParameters struct { // HttpErrorRanges: The list of Http status code ranges that are considered as server errors for origin and it is marked as @@ -6099,8 +6188,9 @@ func (parameters *ResponseBasedOriginErrorDetectionParameters) AssignProperties_ // ResponseBasedDetectedErrorTypes if source.ResponseBasedDetectedErrorTypes != nil { - responseBasedDetectedErrorType := ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes(*source.ResponseBasedDetectedErrorTypes) - parameters.ResponseBasedDetectedErrorTypes = &responseBasedDetectedErrorType + responseBasedDetectedErrorType := *source.ResponseBasedDetectedErrorTypes + responseBasedDetectedErrorTypeTemp := genruntime.ToEnum(responseBasedDetectedErrorType, responseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_Values) + parameters.ResponseBasedDetectedErrorTypes = &responseBasedDetectedErrorTypeTemp } else { parameters.ResponseBasedDetectedErrorTypes = nil } @@ -6284,8 +6374,9 @@ func (parameters *ResponseBasedOriginErrorDetectionParameters_STATUS) AssignProp // ResponseBasedDetectedErrorTypes if source.ResponseBasedDetectedErrorTypes != nil { - responseBasedDetectedErrorType := ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS(*source.ResponseBasedDetectedErrorTypes) - parameters.ResponseBasedDetectedErrorTypes = &responseBasedDetectedErrorType + responseBasedDetectedErrorType := *source.ResponseBasedDetectedErrorTypes + responseBasedDetectedErrorTypeTemp := genruntime.ToEnum(responseBasedDetectedErrorType, responseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS_Values) + parameters.ResponseBasedDetectedErrorTypes = &responseBasedDetectedErrorTypeTemp } else { parameters.ResponseBasedDetectedErrorTypes = nil } @@ -9303,6 +9394,13 @@ const ( HealthProbeParameters_ProbeProtocol_NotSet = HealthProbeParameters_ProbeProtocol("NotSet") ) +// Mapping from string to HealthProbeParameters_ProbeProtocol +var healthProbeParameters_ProbeProtocol_Values = map[string]HealthProbeParameters_ProbeProtocol{ + "http": HealthProbeParameters_ProbeProtocol_Http, + "https": HealthProbeParameters_ProbeProtocol_Https, + "notset": HealthProbeParameters_ProbeProtocol_NotSet, +} + type HealthProbeParameters_ProbeProtocol_STATUS string const ( @@ -9311,6 +9409,13 @@ const ( HealthProbeParameters_ProbeProtocol_STATUS_NotSet = HealthProbeParameters_ProbeProtocol_STATUS("NotSet") ) +// Mapping from string to HealthProbeParameters_ProbeProtocol_STATUS +var healthProbeParameters_ProbeProtocol_STATUS_Values = map[string]HealthProbeParameters_ProbeProtocol_STATUS{ + "http": HealthProbeParameters_ProbeProtocol_STATUS_Http, + "https": HealthProbeParameters_ProbeProtocol_STATUS_Https, + "notset": HealthProbeParameters_ProbeProtocol_STATUS_NotSet, +} + // +kubebuilder:validation:Enum={"GET","HEAD","NotSet"} type HealthProbeParameters_ProbeRequestType string @@ -9320,6 +9425,13 @@ const ( HealthProbeParameters_ProbeRequestType_NotSet = HealthProbeParameters_ProbeRequestType("NotSet") ) +// Mapping from string to HealthProbeParameters_ProbeRequestType +var healthProbeParameters_ProbeRequestType_Values = map[string]HealthProbeParameters_ProbeRequestType{ + "get": HealthProbeParameters_ProbeRequestType_GET, + "head": HealthProbeParameters_ProbeRequestType_HEAD, + "notset": HealthProbeParameters_ProbeRequestType_NotSet, +} + type HealthProbeParameters_ProbeRequestType_STATUS string const ( @@ -9328,6 +9440,13 @@ const ( HealthProbeParameters_ProbeRequestType_STATUS_NotSet = HealthProbeParameters_ProbeRequestType_STATUS("NotSet") ) +// Mapping from string to HealthProbeParameters_ProbeRequestType_STATUS +var healthProbeParameters_ProbeRequestType_STATUS_Values = map[string]HealthProbeParameters_ProbeRequestType_STATUS{ + "get": HealthProbeParameters_ProbeRequestType_STATUS_GET, + "head": HealthProbeParameters_ProbeRequestType_STATUS_HEAD, + "notset": HealthProbeParameters_ProbeRequestType_STATUS_NotSet, +} + // The JSON object that represents the range for http status codes type HttpErrorRangeParameters struct { // +kubebuilder:validation:Maximum=999 @@ -9549,10 +9668,20 @@ type KeyVaultSigningKeyParameters_TypeName string const KeyVaultSigningKeyParameters_TypeName_KeyVaultSigningKeyParameters = KeyVaultSigningKeyParameters_TypeName("KeyVaultSigningKeyParameters") +// Mapping from string to KeyVaultSigningKeyParameters_TypeName +var keyVaultSigningKeyParameters_TypeName_Values = map[string]KeyVaultSigningKeyParameters_TypeName{ + "keyvaultsigningkeyparameters": KeyVaultSigningKeyParameters_TypeName_KeyVaultSigningKeyParameters, +} + type KeyVaultSigningKeyParameters_TypeName_STATUS string const KeyVaultSigningKeyParameters_TypeName_STATUS_KeyVaultSigningKeyParameters = KeyVaultSigningKeyParameters_TypeName_STATUS("KeyVaultSigningKeyParameters") +// Mapping from string to KeyVaultSigningKeyParameters_TypeName_STATUS +var keyVaultSigningKeyParameters_TypeName_STATUS_Values = map[string]KeyVaultSigningKeyParameters_TypeName_STATUS{ + "keyvaultsigningkeyparameters": KeyVaultSigningKeyParameters_TypeName_STATUS_KeyVaultSigningKeyParameters, +} + // +kubebuilder:validation:Enum={"None","TcpAndHttpErrors","TcpErrorsOnly"} type ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes string @@ -9562,6 +9691,13 @@ const ( ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_TcpErrorsOnly = ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes("TcpErrorsOnly") ) +// Mapping from string to ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes +var responseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_Values = map[string]ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes{ + "none": ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_None, + "tcpandhttperrors": ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_TcpAndHttpErrors, + "tcperrorsonly": ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_TcpErrorsOnly, +} + type ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS string const ( @@ -9570,6 +9706,13 @@ const ( ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS_TcpErrorsOnly = ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS("TcpErrorsOnly") ) +// Mapping from string to ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS +var responseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS_Values = map[string]ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS{ + "none": ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS_None, + "tcpandhttperrors": ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS_TcpAndHttpErrors, + "tcperrorsonly": ResponseBasedOriginErrorDetectionParameters_ResponseBasedDetectedErrorTypes_STATUS_TcpErrorsOnly, +} + type DeliveryRuleCacheExpirationAction struct { // +kubebuilder:validation:Required // Name: The name of the action for the delivery rule. @@ -9641,8 +9784,9 @@ func (action *DeliveryRuleCacheExpirationAction) AssignProperties_From_DeliveryR // Name if source.Name != nil { - name := DeliveryRuleCacheExpirationAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCacheExpirationAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -9771,8 +9915,9 @@ func (action *DeliveryRuleCacheExpirationAction_STATUS) AssignProperties_From_De // Name if source.Name != nil { - name := DeliveryRuleCacheExpirationAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCacheExpirationAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -9900,8 +10045,9 @@ func (action *DeliveryRuleCacheKeyQueryStringAction) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleCacheKeyQueryStringAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCacheKeyQueryStringAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -10030,8 +10176,9 @@ func (action *DeliveryRuleCacheKeyQueryStringAction_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleCacheKeyQueryStringAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCacheKeyQueryStringAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -10159,8 +10306,9 @@ func (condition *DeliveryRuleClientPortCondition) AssignProperties_From_Delivery // Name if source.Name != nil { - name := DeliveryRuleClientPortCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleClientPortCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10289,8 +10437,9 @@ func (condition *DeliveryRuleClientPortCondition_STATUS) AssignProperties_From_D // Name if source.Name != nil { - name := DeliveryRuleClientPortCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleClientPortCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10418,8 +10567,9 @@ func (condition *DeliveryRuleCookiesCondition) AssignProperties_From_DeliveryRul // Name if source.Name != nil { - name := DeliveryRuleCookiesCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCookiesCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10548,8 +10698,9 @@ func (condition *DeliveryRuleCookiesCondition_STATUS) AssignProperties_From_Deli // Name if source.Name != nil { - name := DeliveryRuleCookiesCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCookiesCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10677,8 +10828,9 @@ func (condition *DeliveryRuleHostNameCondition) AssignProperties_From_DeliveryRu // Name if source.Name != nil { - name := DeliveryRuleHostNameCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleHostNameCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10807,8 +10959,9 @@ func (condition *DeliveryRuleHostNameCondition_STATUS) AssignProperties_From_Del // Name if source.Name != nil { - name := DeliveryRuleHostNameCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleHostNameCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10936,8 +11089,9 @@ func (condition *DeliveryRuleHttpVersionCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleHttpVersionCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleHttpVersionCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -11066,8 +11220,9 @@ func (condition *DeliveryRuleHttpVersionCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleHttpVersionCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleHttpVersionCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -11195,8 +11350,9 @@ func (condition *DeliveryRuleIsDeviceCondition) AssignProperties_From_DeliveryRu // Name if source.Name != nil { - name := DeliveryRuleIsDeviceCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleIsDeviceCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -11325,8 +11481,9 @@ func (condition *DeliveryRuleIsDeviceCondition_STATUS) AssignProperties_From_Del // Name if source.Name != nil { - name := DeliveryRuleIsDeviceCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleIsDeviceCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -11454,8 +11611,9 @@ func (condition *DeliveryRulePostArgsCondition) AssignProperties_From_DeliveryRu // Name if source.Name != nil { - name := DeliveryRulePostArgsCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRulePostArgsCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -11584,8 +11742,9 @@ func (condition *DeliveryRulePostArgsCondition_STATUS) AssignProperties_From_Del // Name if source.Name != nil { - name := DeliveryRulePostArgsCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRulePostArgsCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -11713,8 +11872,9 @@ func (condition *DeliveryRuleQueryStringCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleQueryStringCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleQueryStringCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -11843,8 +12003,9 @@ func (condition *DeliveryRuleQueryStringCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleQueryStringCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleQueryStringCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -11972,8 +12133,9 @@ func (condition *DeliveryRuleRemoteAddressCondition) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleRemoteAddressCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRemoteAddressCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -12102,8 +12264,9 @@ func (condition *DeliveryRuleRemoteAddressCondition_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRemoteAddressCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRemoteAddressCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -12231,8 +12394,9 @@ func (condition *DeliveryRuleRequestBodyCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleRequestBodyCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestBodyCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -12361,8 +12525,9 @@ func (condition *DeliveryRuleRequestBodyCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleRequestBodyCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestBodyCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -12490,8 +12655,9 @@ func (action *DeliveryRuleRequestHeaderAction) AssignProperties_From_DeliveryRul // Name if source.Name != nil { - name := DeliveryRuleRequestHeaderAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestHeaderAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -12620,8 +12786,9 @@ func (action *DeliveryRuleRequestHeaderAction_STATUS) AssignProperties_From_Deli // Name if source.Name != nil { - name := DeliveryRuleRequestHeaderAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestHeaderAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -12749,8 +12916,9 @@ func (condition *DeliveryRuleRequestHeaderCondition) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleRequestHeaderCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestHeaderCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -12879,8 +13047,9 @@ func (condition *DeliveryRuleRequestHeaderCondition_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRequestHeaderCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestHeaderCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -13008,8 +13177,9 @@ func (condition *DeliveryRuleRequestMethodCondition) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleRequestMethodCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestMethodCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -13138,8 +13308,9 @@ func (condition *DeliveryRuleRequestMethodCondition_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRequestMethodCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestMethodCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -13267,8 +13438,9 @@ func (condition *DeliveryRuleRequestSchemeCondition) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleRequestSchemeCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestSchemeCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -13397,8 +13569,9 @@ func (condition *DeliveryRuleRequestSchemeCondition_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRequestSchemeCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestSchemeCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -13526,8 +13699,9 @@ func (condition *DeliveryRuleRequestUriCondition) AssignProperties_From_Delivery // Name if source.Name != nil { - name := DeliveryRuleRequestUriCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestUriCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -13656,8 +13830,9 @@ func (condition *DeliveryRuleRequestUriCondition_STATUS) AssignProperties_From_D // Name if source.Name != nil { - name := DeliveryRuleRequestUriCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestUriCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -13785,8 +13960,9 @@ func (action *DeliveryRuleResponseHeaderAction) AssignProperties_From_DeliveryRu // Name if source.Name != nil { - name := DeliveryRuleResponseHeaderAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleResponseHeaderAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -13915,8 +14091,9 @@ func (action *DeliveryRuleResponseHeaderAction_STATUS) AssignProperties_From_Del // Name if source.Name != nil { - name := DeliveryRuleResponseHeaderAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleResponseHeaderAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -14044,8 +14221,9 @@ func (action *DeliveryRuleRouteConfigurationOverrideAction) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRouteConfigurationOverrideAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRouteConfigurationOverrideAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -14174,8 +14352,9 @@ func (action *DeliveryRuleRouteConfigurationOverrideAction_STATUS) AssignPropert // Name if source.Name != nil { - name := DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRouteConfigurationOverrideAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -14303,8 +14482,9 @@ func (condition *DeliveryRuleServerPortCondition) AssignProperties_From_Delivery // Name if source.Name != nil { - name := DeliveryRuleServerPortCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleServerPortCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -14433,8 +14613,9 @@ func (condition *DeliveryRuleServerPortCondition_STATUS) AssignProperties_From_D // Name if source.Name != nil { - name := DeliveryRuleServerPortCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleServerPortCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -14562,8 +14743,9 @@ func (condition *DeliveryRuleSocketAddrCondition) AssignProperties_From_Delivery // Name if source.Name != nil { - name := DeliveryRuleSocketAddrCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleSocketAddrCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -14692,8 +14874,9 @@ func (condition *DeliveryRuleSocketAddrCondition_STATUS) AssignProperties_From_D // Name if source.Name != nil { - name := DeliveryRuleSocketAddrCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleSocketAddrCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -14821,8 +15004,9 @@ func (condition *DeliveryRuleSslProtocolCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleSslProtocolCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleSslProtocolCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -14951,8 +15135,9 @@ func (condition *DeliveryRuleSslProtocolCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleSslProtocolCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleSslProtocolCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -15080,8 +15265,9 @@ func (condition *DeliveryRuleUrlFileExtensionCondition) AssignProperties_From_De // Name if source.Name != nil { - name := DeliveryRuleUrlFileExtensionCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlFileExtensionCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -15210,8 +15396,9 @@ func (condition *DeliveryRuleUrlFileExtensionCondition_STATUS) AssignProperties_ // Name if source.Name != nil { - name := DeliveryRuleUrlFileExtensionCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlFileExtensionCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -15339,8 +15526,9 @@ func (condition *DeliveryRuleUrlFileNameCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleUrlFileNameCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlFileNameCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -15469,8 +15657,9 @@ func (condition *DeliveryRuleUrlFileNameCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleUrlFileNameCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlFileNameCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -15598,8 +15787,9 @@ func (condition *DeliveryRuleUrlPathCondition) AssignProperties_From_DeliveryRul // Name if source.Name != nil { - name := DeliveryRuleUrlPathCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlPathCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -15728,8 +15918,9 @@ func (condition *DeliveryRuleUrlPathCondition_STATUS) AssignProperties_From_Deli // Name if source.Name != nil { - name := DeliveryRuleUrlPathCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlPathCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -15857,8 +16048,9 @@ func (action *OriginGroupOverrideAction) AssignProperties_From_OriginGroupOverri // Name if source.Name != nil { - name := OriginGroupOverrideAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, originGroupOverrideAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -15987,8 +16179,9 @@ func (action *OriginGroupOverrideAction_STATUS) AssignProperties_From_OriginGrou // Name if source.Name != nil { - name := OriginGroupOverrideAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, originGroupOverrideAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -16116,8 +16309,9 @@ func (action *UrlRedirectAction) AssignProperties_From_UrlRedirectAction(source // Name if source.Name != nil { - name := UrlRedirectAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlRedirectAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -16246,8 +16440,9 @@ func (action *UrlRedirectAction_STATUS) AssignProperties_From_UrlRedirectAction_ // Name if source.Name != nil { - name := UrlRedirectAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlRedirectAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -16375,8 +16570,9 @@ func (action *UrlRewriteAction) AssignProperties_From_UrlRewriteAction(source *v // Name if source.Name != nil { - name := UrlRewriteAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlRewriteAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -16505,8 +16701,9 @@ func (action *UrlRewriteAction_STATUS) AssignProperties_From_UrlRewriteAction_ST // Name if source.Name != nil { - name := UrlRewriteAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlRewriteAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -16634,8 +16831,9 @@ func (action *UrlSigningAction) AssignProperties_From_UrlSigningAction(source *v // Name if source.Name != nil { - name := UrlSigningAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlSigningAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -16764,8 +16962,9 @@ func (action *UrlSigningAction_STATUS) AssignProperties_From_UrlSigningAction_ST // Name if source.Name != nil { - name := UrlSigningAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlSigningAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -16919,8 +17118,9 @@ func (parameters *CacheExpirationActionParameters) AssignProperties_From_CacheEx // CacheBehavior if source.CacheBehavior != nil { - cacheBehavior := CacheExpirationActionParameters_CacheBehavior(*source.CacheBehavior) - parameters.CacheBehavior = &cacheBehavior + cacheBehavior := *source.CacheBehavior + cacheBehaviorTemp := genruntime.ToEnum(cacheBehavior, cacheExpirationActionParameters_CacheBehavior_Values) + parameters.CacheBehavior = &cacheBehaviorTemp } else { parameters.CacheBehavior = nil } @@ -16930,16 +17130,18 @@ func (parameters *CacheExpirationActionParameters) AssignProperties_From_CacheEx // CacheType if source.CacheType != nil { - cacheType := CacheExpirationActionParameters_CacheType(*source.CacheType) - parameters.CacheType = &cacheType + cacheType := *source.CacheType + cacheTypeTemp := genruntime.ToEnum(cacheType, cacheExpirationActionParameters_CacheType_Values) + parameters.CacheType = &cacheTypeTemp } else { parameters.CacheType = nil } // TypeName if source.TypeName != nil { - typeName := CacheExpirationActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cacheExpirationActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17085,8 +17287,9 @@ func (parameters *CacheExpirationActionParameters_STATUS) AssignProperties_From_ // CacheBehavior if source.CacheBehavior != nil { - cacheBehavior := CacheExpirationActionParameters_CacheBehavior_STATUS(*source.CacheBehavior) - parameters.CacheBehavior = &cacheBehavior + cacheBehavior := *source.CacheBehavior + cacheBehaviorTemp := genruntime.ToEnum(cacheBehavior, cacheExpirationActionParameters_CacheBehavior_STATUS_Values) + parameters.CacheBehavior = &cacheBehaviorTemp } else { parameters.CacheBehavior = nil } @@ -17096,16 +17299,18 @@ func (parameters *CacheExpirationActionParameters_STATUS) AssignProperties_From_ // CacheType if source.CacheType != nil { - cacheType := CacheExpirationActionParameters_CacheType_STATUS(*source.CacheType) - parameters.CacheType = &cacheType + cacheType := *source.CacheType + cacheTypeTemp := genruntime.ToEnum(cacheType, cacheExpirationActionParameters_CacheType_STATUS_Values) + parameters.CacheType = &cacheTypeTemp } else { parameters.CacheType = nil } // TypeName if source.TypeName != nil { - typeName := CacheExpirationActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cacheExpirationActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17241,16 +17446,18 @@ func (parameters *CacheKeyQueryStringActionParameters) AssignProperties_From_Cac // QueryStringBehavior if source.QueryStringBehavior != nil { - queryStringBehavior := CacheKeyQueryStringActionParameters_QueryStringBehavior(*source.QueryStringBehavior) - parameters.QueryStringBehavior = &queryStringBehavior + queryStringBehavior := *source.QueryStringBehavior + queryStringBehaviorTemp := genruntime.ToEnum(queryStringBehavior, cacheKeyQueryStringActionParameters_QueryStringBehavior_Values) + parameters.QueryStringBehavior = &queryStringBehaviorTemp } else { parameters.QueryStringBehavior = nil } // TypeName if source.TypeName != nil { - typeName := CacheKeyQueryStringActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cacheKeyQueryStringActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17374,16 +17581,18 @@ func (parameters *CacheKeyQueryStringActionParameters_STATUS) AssignProperties_F // QueryStringBehavior if source.QueryStringBehavior != nil { - queryStringBehavior := CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS(*source.QueryStringBehavior) - parameters.QueryStringBehavior = &queryStringBehavior + queryStringBehavior := *source.QueryStringBehavior + queryStringBehaviorTemp := genruntime.ToEnum(queryStringBehavior, cacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_Values) + parameters.QueryStringBehavior = &queryStringBehaviorTemp } else { parameters.QueryStringBehavior = nil } // TypeName if source.TypeName != nil { - typeName := CacheKeyQueryStringActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cacheKeyQueryStringActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17545,8 +17754,9 @@ func (parameters *ClientPortMatchConditionParameters) AssignProperties_From_Clie // Operator if source.Operator != nil { - operator := ClientPortMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, clientPortMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -17557,7 +17767,7 @@ func (parameters *ClientPortMatchConditionParameters) AssignProperties_From_Clie for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -17566,8 +17776,9 @@ func (parameters *ClientPortMatchConditionParameters) AssignProperties_From_Clie // TypeName if source.TypeName != nil { - typeName := ClientPortMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, clientPortMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17758,8 +17969,9 @@ func (parameters *ClientPortMatchConditionParameters_STATUS) AssignProperties_Fr // Operator if source.Operator != nil { - operator := ClientPortMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, clientPortMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -17770,7 +17982,7 @@ func (parameters *ClientPortMatchConditionParameters_STATUS) AssignProperties_Fr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -17779,8 +17991,9 @@ func (parameters *ClientPortMatchConditionParameters_STATUS) AssignProperties_Fr // TypeName if source.TypeName != nil { - typeName := ClientPortMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, clientPortMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17978,8 +18191,9 @@ func (parameters *CookiesMatchConditionParameters) AssignProperties_From_Cookies // Operator if source.Operator != nil { - operator := CookiesMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, cookiesMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -17993,7 +18207,7 @@ func (parameters *CookiesMatchConditionParameters) AssignProperties_From_Cookies for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -18002,8 +18216,9 @@ func (parameters *CookiesMatchConditionParameters) AssignProperties_From_Cookies // TypeName if source.TypeName != nil { - typeName := CookiesMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cookiesMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18209,8 +18424,9 @@ func (parameters *CookiesMatchConditionParameters_STATUS) AssignProperties_From_ // Operator if source.Operator != nil { - operator := CookiesMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, cookiesMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -18224,7 +18440,7 @@ func (parameters *CookiesMatchConditionParameters_STATUS) AssignProperties_From_ for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -18233,8 +18449,9 @@ func (parameters *CookiesMatchConditionParameters_STATUS) AssignProperties_From_ // TypeName if source.TypeName != nil { - typeName := CookiesMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cookiesMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18307,217 +18524,457 @@ type DeliveryRuleCacheExpirationAction_Name string const DeliveryRuleCacheExpirationAction_Name_CacheExpiration = DeliveryRuleCacheExpirationAction_Name("CacheExpiration") +// Mapping from string to DeliveryRuleCacheExpirationAction_Name +var deliveryRuleCacheExpirationAction_Name_Values = map[string]DeliveryRuleCacheExpirationAction_Name{ + "cacheexpiration": DeliveryRuleCacheExpirationAction_Name_CacheExpiration, +} + type DeliveryRuleCacheExpirationAction_Name_STATUS string const DeliveryRuleCacheExpirationAction_Name_STATUS_CacheExpiration = DeliveryRuleCacheExpirationAction_Name_STATUS("CacheExpiration") +// Mapping from string to DeliveryRuleCacheExpirationAction_Name_STATUS +var deliveryRuleCacheExpirationAction_Name_STATUS_Values = map[string]DeliveryRuleCacheExpirationAction_Name_STATUS{ + "cacheexpiration": DeliveryRuleCacheExpirationAction_Name_STATUS_CacheExpiration, +} + // +kubebuilder:validation:Enum={"CacheKeyQueryString"} type DeliveryRuleCacheKeyQueryStringAction_Name string const DeliveryRuleCacheKeyQueryStringAction_Name_CacheKeyQueryString = DeliveryRuleCacheKeyQueryStringAction_Name("CacheKeyQueryString") +// Mapping from string to DeliveryRuleCacheKeyQueryStringAction_Name +var deliveryRuleCacheKeyQueryStringAction_Name_Values = map[string]DeliveryRuleCacheKeyQueryStringAction_Name{ + "cachekeyquerystring": DeliveryRuleCacheKeyQueryStringAction_Name_CacheKeyQueryString, +} + type DeliveryRuleCacheKeyQueryStringAction_Name_STATUS string const DeliveryRuleCacheKeyQueryStringAction_Name_STATUS_CacheKeyQueryString = DeliveryRuleCacheKeyQueryStringAction_Name_STATUS("CacheKeyQueryString") +// Mapping from string to DeliveryRuleCacheKeyQueryStringAction_Name_STATUS +var deliveryRuleCacheKeyQueryStringAction_Name_STATUS_Values = map[string]DeliveryRuleCacheKeyQueryStringAction_Name_STATUS{ + "cachekeyquerystring": DeliveryRuleCacheKeyQueryStringAction_Name_STATUS_CacheKeyQueryString, +} + // +kubebuilder:validation:Enum={"ClientPort"} type DeliveryRuleClientPortCondition_Name string const DeliveryRuleClientPortCondition_Name_ClientPort = DeliveryRuleClientPortCondition_Name("ClientPort") +// Mapping from string to DeliveryRuleClientPortCondition_Name +var deliveryRuleClientPortCondition_Name_Values = map[string]DeliveryRuleClientPortCondition_Name{ + "clientport": DeliveryRuleClientPortCondition_Name_ClientPort, +} + type DeliveryRuleClientPortCondition_Name_STATUS string const DeliveryRuleClientPortCondition_Name_STATUS_ClientPort = DeliveryRuleClientPortCondition_Name_STATUS("ClientPort") +// Mapping from string to DeliveryRuleClientPortCondition_Name_STATUS +var deliveryRuleClientPortCondition_Name_STATUS_Values = map[string]DeliveryRuleClientPortCondition_Name_STATUS{ + "clientport": DeliveryRuleClientPortCondition_Name_STATUS_ClientPort, +} + // +kubebuilder:validation:Enum={"Cookies"} type DeliveryRuleCookiesCondition_Name string const DeliveryRuleCookiesCondition_Name_Cookies = DeliveryRuleCookiesCondition_Name("Cookies") +// Mapping from string to DeliveryRuleCookiesCondition_Name +var deliveryRuleCookiesCondition_Name_Values = map[string]DeliveryRuleCookiesCondition_Name{ + "cookies": DeliveryRuleCookiesCondition_Name_Cookies, +} + type DeliveryRuleCookiesCondition_Name_STATUS string const DeliveryRuleCookiesCondition_Name_STATUS_Cookies = DeliveryRuleCookiesCondition_Name_STATUS("Cookies") +// Mapping from string to DeliveryRuleCookiesCondition_Name_STATUS +var deliveryRuleCookiesCondition_Name_STATUS_Values = map[string]DeliveryRuleCookiesCondition_Name_STATUS{ + "cookies": DeliveryRuleCookiesCondition_Name_STATUS_Cookies, +} + // +kubebuilder:validation:Enum={"HostName"} type DeliveryRuleHostNameCondition_Name string const DeliveryRuleHostNameCondition_Name_HostName = DeliveryRuleHostNameCondition_Name("HostName") +// Mapping from string to DeliveryRuleHostNameCondition_Name +var deliveryRuleHostNameCondition_Name_Values = map[string]DeliveryRuleHostNameCondition_Name{ + "hostname": DeliveryRuleHostNameCondition_Name_HostName, +} + type DeliveryRuleHostNameCondition_Name_STATUS string const DeliveryRuleHostNameCondition_Name_STATUS_HostName = DeliveryRuleHostNameCondition_Name_STATUS("HostName") +// Mapping from string to DeliveryRuleHostNameCondition_Name_STATUS +var deliveryRuleHostNameCondition_Name_STATUS_Values = map[string]DeliveryRuleHostNameCondition_Name_STATUS{ + "hostname": DeliveryRuleHostNameCondition_Name_STATUS_HostName, +} + // +kubebuilder:validation:Enum={"HttpVersion"} type DeliveryRuleHttpVersionCondition_Name string const DeliveryRuleHttpVersionCondition_Name_HttpVersion = DeliveryRuleHttpVersionCondition_Name("HttpVersion") +// Mapping from string to DeliveryRuleHttpVersionCondition_Name +var deliveryRuleHttpVersionCondition_Name_Values = map[string]DeliveryRuleHttpVersionCondition_Name{ + "httpversion": DeliveryRuleHttpVersionCondition_Name_HttpVersion, +} + type DeliveryRuleHttpVersionCondition_Name_STATUS string const DeliveryRuleHttpVersionCondition_Name_STATUS_HttpVersion = DeliveryRuleHttpVersionCondition_Name_STATUS("HttpVersion") +// Mapping from string to DeliveryRuleHttpVersionCondition_Name_STATUS +var deliveryRuleHttpVersionCondition_Name_STATUS_Values = map[string]DeliveryRuleHttpVersionCondition_Name_STATUS{ + "httpversion": DeliveryRuleHttpVersionCondition_Name_STATUS_HttpVersion, +} + // +kubebuilder:validation:Enum={"IsDevice"} type DeliveryRuleIsDeviceCondition_Name string const DeliveryRuleIsDeviceCondition_Name_IsDevice = DeliveryRuleIsDeviceCondition_Name("IsDevice") +// Mapping from string to DeliveryRuleIsDeviceCondition_Name +var deliveryRuleIsDeviceCondition_Name_Values = map[string]DeliveryRuleIsDeviceCondition_Name{ + "isdevice": DeliveryRuleIsDeviceCondition_Name_IsDevice, +} + type DeliveryRuleIsDeviceCondition_Name_STATUS string const DeliveryRuleIsDeviceCondition_Name_STATUS_IsDevice = DeliveryRuleIsDeviceCondition_Name_STATUS("IsDevice") +// Mapping from string to DeliveryRuleIsDeviceCondition_Name_STATUS +var deliveryRuleIsDeviceCondition_Name_STATUS_Values = map[string]DeliveryRuleIsDeviceCondition_Name_STATUS{ + "isdevice": DeliveryRuleIsDeviceCondition_Name_STATUS_IsDevice, +} + // +kubebuilder:validation:Enum={"PostArgs"} type DeliveryRulePostArgsCondition_Name string const DeliveryRulePostArgsCondition_Name_PostArgs = DeliveryRulePostArgsCondition_Name("PostArgs") +// Mapping from string to DeliveryRulePostArgsCondition_Name +var deliveryRulePostArgsCondition_Name_Values = map[string]DeliveryRulePostArgsCondition_Name{ + "postargs": DeliveryRulePostArgsCondition_Name_PostArgs, +} + type DeliveryRulePostArgsCondition_Name_STATUS string const DeliveryRulePostArgsCondition_Name_STATUS_PostArgs = DeliveryRulePostArgsCondition_Name_STATUS("PostArgs") +// Mapping from string to DeliveryRulePostArgsCondition_Name_STATUS +var deliveryRulePostArgsCondition_Name_STATUS_Values = map[string]DeliveryRulePostArgsCondition_Name_STATUS{ + "postargs": DeliveryRulePostArgsCondition_Name_STATUS_PostArgs, +} + // +kubebuilder:validation:Enum={"QueryString"} type DeliveryRuleQueryStringCondition_Name string const DeliveryRuleQueryStringCondition_Name_QueryString = DeliveryRuleQueryStringCondition_Name("QueryString") +// Mapping from string to DeliveryRuleQueryStringCondition_Name +var deliveryRuleQueryStringCondition_Name_Values = map[string]DeliveryRuleQueryStringCondition_Name{ + "querystring": DeliveryRuleQueryStringCondition_Name_QueryString, +} + type DeliveryRuleQueryStringCondition_Name_STATUS string const DeliveryRuleQueryStringCondition_Name_STATUS_QueryString = DeliveryRuleQueryStringCondition_Name_STATUS("QueryString") +// Mapping from string to DeliveryRuleQueryStringCondition_Name_STATUS +var deliveryRuleQueryStringCondition_Name_STATUS_Values = map[string]DeliveryRuleQueryStringCondition_Name_STATUS{ + "querystring": DeliveryRuleQueryStringCondition_Name_STATUS_QueryString, +} + // +kubebuilder:validation:Enum={"RemoteAddress"} type DeliveryRuleRemoteAddressCondition_Name string const DeliveryRuleRemoteAddressCondition_Name_RemoteAddress = DeliveryRuleRemoteAddressCondition_Name("RemoteAddress") +// Mapping from string to DeliveryRuleRemoteAddressCondition_Name +var deliveryRuleRemoteAddressCondition_Name_Values = map[string]DeliveryRuleRemoteAddressCondition_Name{ + "remoteaddress": DeliveryRuleRemoteAddressCondition_Name_RemoteAddress, +} + type DeliveryRuleRemoteAddressCondition_Name_STATUS string const DeliveryRuleRemoteAddressCondition_Name_STATUS_RemoteAddress = DeliveryRuleRemoteAddressCondition_Name_STATUS("RemoteAddress") +// Mapping from string to DeliveryRuleRemoteAddressCondition_Name_STATUS +var deliveryRuleRemoteAddressCondition_Name_STATUS_Values = map[string]DeliveryRuleRemoteAddressCondition_Name_STATUS{ + "remoteaddress": DeliveryRuleRemoteAddressCondition_Name_STATUS_RemoteAddress, +} + // +kubebuilder:validation:Enum={"RequestBody"} type DeliveryRuleRequestBodyCondition_Name string const DeliveryRuleRequestBodyCondition_Name_RequestBody = DeliveryRuleRequestBodyCondition_Name("RequestBody") +// Mapping from string to DeliveryRuleRequestBodyCondition_Name +var deliveryRuleRequestBodyCondition_Name_Values = map[string]DeliveryRuleRequestBodyCondition_Name{ + "requestbody": DeliveryRuleRequestBodyCondition_Name_RequestBody, +} + type DeliveryRuleRequestBodyCondition_Name_STATUS string const DeliveryRuleRequestBodyCondition_Name_STATUS_RequestBody = DeliveryRuleRequestBodyCondition_Name_STATUS("RequestBody") +// Mapping from string to DeliveryRuleRequestBodyCondition_Name_STATUS +var deliveryRuleRequestBodyCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestBodyCondition_Name_STATUS{ + "requestbody": DeliveryRuleRequestBodyCondition_Name_STATUS_RequestBody, +} + // +kubebuilder:validation:Enum={"ModifyRequestHeader"} type DeliveryRuleRequestHeaderAction_Name string const DeliveryRuleRequestHeaderAction_Name_ModifyRequestHeader = DeliveryRuleRequestHeaderAction_Name("ModifyRequestHeader") +// Mapping from string to DeliveryRuleRequestHeaderAction_Name +var deliveryRuleRequestHeaderAction_Name_Values = map[string]DeliveryRuleRequestHeaderAction_Name{ + "modifyrequestheader": DeliveryRuleRequestHeaderAction_Name_ModifyRequestHeader, +} + type DeliveryRuleRequestHeaderAction_Name_STATUS string const DeliveryRuleRequestHeaderAction_Name_STATUS_ModifyRequestHeader = DeliveryRuleRequestHeaderAction_Name_STATUS("ModifyRequestHeader") +// Mapping from string to DeliveryRuleRequestHeaderAction_Name_STATUS +var deliveryRuleRequestHeaderAction_Name_STATUS_Values = map[string]DeliveryRuleRequestHeaderAction_Name_STATUS{ + "modifyrequestheader": DeliveryRuleRequestHeaderAction_Name_STATUS_ModifyRequestHeader, +} + // +kubebuilder:validation:Enum={"RequestHeader"} type DeliveryRuleRequestHeaderCondition_Name string const DeliveryRuleRequestHeaderCondition_Name_RequestHeader = DeliveryRuleRequestHeaderCondition_Name("RequestHeader") +// Mapping from string to DeliveryRuleRequestHeaderCondition_Name +var deliveryRuleRequestHeaderCondition_Name_Values = map[string]DeliveryRuleRequestHeaderCondition_Name{ + "requestheader": DeliveryRuleRequestHeaderCondition_Name_RequestHeader, +} + type DeliveryRuleRequestHeaderCondition_Name_STATUS string const DeliveryRuleRequestHeaderCondition_Name_STATUS_RequestHeader = DeliveryRuleRequestHeaderCondition_Name_STATUS("RequestHeader") +// Mapping from string to DeliveryRuleRequestHeaderCondition_Name_STATUS +var deliveryRuleRequestHeaderCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestHeaderCondition_Name_STATUS{ + "requestheader": DeliveryRuleRequestHeaderCondition_Name_STATUS_RequestHeader, +} + // +kubebuilder:validation:Enum={"RequestMethod"} type DeliveryRuleRequestMethodCondition_Name string const DeliveryRuleRequestMethodCondition_Name_RequestMethod = DeliveryRuleRequestMethodCondition_Name("RequestMethod") +// Mapping from string to DeliveryRuleRequestMethodCondition_Name +var deliveryRuleRequestMethodCondition_Name_Values = map[string]DeliveryRuleRequestMethodCondition_Name{ + "requestmethod": DeliveryRuleRequestMethodCondition_Name_RequestMethod, +} + type DeliveryRuleRequestMethodCondition_Name_STATUS string const DeliveryRuleRequestMethodCondition_Name_STATUS_RequestMethod = DeliveryRuleRequestMethodCondition_Name_STATUS("RequestMethod") +// Mapping from string to DeliveryRuleRequestMethodCondition_Name_STATUS +var deliveryRuleRequestMethodCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestMethodCondition_Name_STATUS{ + "requestmethod": DeliveryRuleRequestMethodCondition_Name_STATUS_RequestMethod, +} + // +kubebuilder:validation:Enum={"RequestScheme"} type DeliveryRuleRequestSchemeCondition_Name string const DeliveryRuleRequestSchemeCondition_Name_RequestScheme = DeliveryRuleRequestSchemeCondition_Name("RequestScheme") +// Mapping from string to DeliveryRuleRequestSchemeCondition_Name +var deliveryRuleRequestSchemeCondition_Name_Values = map[string]DeliveryRuleRequestSchemeCondition_Name{ + "requestscheme": DeliveryRuleRequestSchemeCondition_Name_RequestScheme, +} + type DeliveryRuleRequestSchemeCondition_Name_STATUS string const DeliveryRuleRequestSchemeCondition_Name_STATUS_RequestScheme = DeliveryRuleRequestSchemeCondition_Name_STATUS("RequestScheme") +// Mapping from string to DeliveryRuleRequestSchemeCondition_Name_STATUS +var deliveryRuleRequestSchemeCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestSchemeCondition_Name_STATUS{ + "requestscheme": DeliveryRuleRequestSchemeCondition_Name_STATUS_RequestScheme, +} + // +kubebuilder:validation:Enum={"RequestUri"} type DeliveryRuleRequestUriCondition_Name string const DeliveryRuleRequestUriCondition_Name_RequestUri = DeliveryRuleRequestUriCondition_Name("RequestUri") +// Mapping from string to DeliveryRuleRequestUriCondition_Name +var deliveryRuleRequestUriCondition_Name_Values = map[string]DeliveryRuleRequestUriCondition_Name{ + "requesturi": DeliveryRuleRequestUriCondition_Name_RequestUri, +} + type DeliveryRuleRequestUriCondition_Name_STATUS string const DeliveryRuleRequestUriCondition_Name_STATUS_RequestUri = DeliveryRuleRequestUriCondition_Name_STATUS("RequestUri") +// Mapping from string to DeliveryRuleRequestUriCondition_Name_STATUS +var deliveryRuleRequestUriCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestUriCondition_Name_STATUS{ + "requesturi": DeliveryRuleRequestUriCondition_Name_STATUS_RequestUri, +} + // +kubebuilder:validation:Enum={"ModifyResponseHeader"} type DeliveryRuleResponseHeaderAction_Name string const DeliveryRuleResponseHeaderAction_Name_ModifyResponseHeader = DeliveryRuleResponseHeaderAction_Name("ModifyResponseHeader") +// Mapping from string to DeliveryRuleResponseHeaderAction_Name +var deliveryRuleResponseHeaderAction_Name_Values = map[string]DeliveryRuleResponseHeaderAction_Name{ + "modifyresponseheader": DeliveryRuleResponseHeaderAction_Name_ModifyResponseHeader, +} + type DeliveryRuleResponseHeaderAction_Name_STATUS string const DeliveryRuleResponseHeaderAction_Name_STATUS_ModifyResponseHeader = DeliveryRuleResponseHeaderAction_Name_STATUS("ModifyResponseHeader") +// Mapping from string to DeliveryRuleResponseHeaderAction_Name_STATUS +var deliveryRuleResponseHeaderAction_Name_STATUS_Values = map[string]DeliveryRuleResponseHeaderAction_Name_STATUS{ + "modifyresponseheader": DeliveryRuleResponseHeaderAction_Name_STATUS_ModifyResponseHeader, +} + // +kubebuilder:validation:Enum={"RouteConfigurationOverride"} type DeliveryRuleRouteConfigurationOverrideAction_Name string const DeliveryRuleRouteConfigurationOverrideAction_Name_RouteConfigurationOverride = DeliveryRuleRouteConfigurationOverrideAction_Name("RouteConfigurationOverride") +// Mapping from string to DeliveryRuleRouteConfigurationOverrideAction_Name +var deliveryRuleRouteConfigurationOverrideAction_Name_Values = map[string]DeliveryRuleRouteConfigurationOverrideAction_Name{ + "routeconfigurationoverride": DeliveryRuleRouteConfigurationOverrideAction_Name_RouteConfigurationOverride, +} + type DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS string const DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS_RouteConfigurationOverride = DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS("RouteConfigurationOverride") +// Mapping from string to DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS +var deliveryRuleRouteConfigurationOverrideAction_Name_STATUS_Values = map[string]DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS{ + "routeconfigurationoverride": DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS_RouteConfigurationOverride, +} + // +kubebuilder:validation:Enum={"ServerPort"} type DeliveryRuleServerPortCondition_Name string const DeliveryRuleServerPortCondition_Name_ServerPort = DeliveryRuleServerPortCondition_Name("ServerPort") +// Mapping from string to DeliveryRuleServerPortCondition_Name +var deliveryRuleServerPortCondition_Name_Values = map[string]DeliveryRuleServerPortCondition_Name{ + "serverport": DeliveryRuleServerPortCondition_Name_ServerPort, +} + type DeliveryRuleServerPortCondition_Name_STATUS string const DeliveryRuleServerPortCondition_Name_STATUS_ServerPort = DeliveryRuleServerPortCondition_Name_STATUS("ServerPort") +// Mapping from string to DeliveryRuleServerPortCondition_Name_STATUS +var deliveryRuleServerPortCondition_Name_STATUS_Values = map[string]DeliveryRuleServerPortCondition_Name_STATUS{ + "serverport": DeliveryRuleServerPortCondition_Name_STATUS_ServerPort, +} + // +kubebuilder:validation:Enum={"SocketAddr"} type DeliveryRuleSocketAddrCondition_Name string const DeliveryRuleSocketAddrCondition_Name_SocketAddr = DeliveryRuleSocketAddrCondition_Name("SocketAddr") +// Mapping from string to DeliveryRuleSocketAddrCondition_Name +var deliveryRuleSocketAddrCondition_Name_Values = map[string]DeliveryRuleSocketAddrCondition_Name{ + "socketaddr": DeliveryRuleSocketAddrCondition_Name_SocketAddr, +} + type DeliveryRuleSocketAddrCondition_Name_STATUS string const DeliveryRuleSocketAddrCondition_Name_STATUS_SocketAddr = DeliveryRuleSocketAddrCondition_Name_STATUS("SocketAddr") +// Mapping from string to DeliveryRuleSocketAddrCondition_Name_STATUS +var deliveryRuleSocketAddrCondition_Name_STATUS_Values = map[string]DeliveryRuleSocketAddrCondition_Name_STATUS{ + "socketaddr": DeliveryRuleSocketAddrCondition_Name_STATUS_SocketAddr, +} + // +kubebuilder:validation:Enum={"SslProtocol"} type DeliveryRuleSslProtocolCondition_Name string const DeliveryRuleSslProtocolCondition_Name_SslProtocol = DeliveryRuleSslProtocolCondition_Name("SslProtocol") +// Mapping from string to DeliveryRuleSslProtocolCondition_Name +var deliveryRuleSslProtocolCondition_Name_Values = map[string]DeliveryRuleSslProtocolCondition_Name{ + "sslprotocol": DeliveryRuleSslProtocolCondition_Name_SslProtocol, +} + type DeliveryRuleSslProtocolCondition_Name_STATUS string const DeliveryRuleSslProtocolCondition_Name_STATUS_SslProtocol = DeliveryRuleSslProtocolCondition_Name_STATUS("SslProtocol") +// Mapping from string to DeliveryRuleSslProtocolCondition_Name_STATUS +var deliveryRuleSslProtocolCondition_Name_STATUS_Values = map[string]DeliveryRuleSslProtocolCondition_Name_STATUS{ + "sslprotocol": DeliveryRuleSslProtocolCondition_Name_STATUS_SslProtocol, +} + // +kubebuilder:validation:Enum={"UrlFileExtension"} type DeliveryRuleUrlFileExtensionCondition_Name string const DeliveryRuleUrlFileExtensionCondition_Name_UrlFileExtension = DeliveryRuleUrlFileExtensionCondition_Name("UrlFileExtension") +// Mapping from string to DeliveryRuleUrlFileExtensionCondition_Name +var deliveryRuleUrlFileExtensionCondition_Name_Values = map[string]DeliveryRuleUrlFileExtensionCondition_Name{ + "urlfileextension": DeliveryRuleUrlFileExtensionCondition_Name_UrlFileExtension, +} + type DeliveryRuleUrlFileExtensionCondition_Name_STATUS string const DeliveryRuleUrlFileExtensionCondition_Name_STATUS_UrlFileExtension = DeliveryRuleUrlFileExtensionCondition_Name_STATUS("UrlFileExtension") +// Mapping from string to DeliveryRuleUrlFileExtensionCondition_Name_STATUS +var deliveryRuleUrlFileExtensionCondition_Name_STATUS_Values = map[string]DeliveryRuleUrlFileExtensionCondition_Name_STATUS{ + "urlfileextension": DeliveryRuleUrlFileExtensionCondition_Name_STATUS_UrlFileExtension, +} + // +kubebuilder:validation:Enum={"UrlFileName"} type DeliveryRuleUrlFileNameCondition_Name string const DeliveryRuleUrlFileNameCondition_Name_UrlFileName = DeliveryRuleUrlFileNameCondition_Name("UrlFileName") +// Mapping from string to DeliveryRuleUrlFileNameCondition_Name +var deliveryRuleUrlFileNameCondition_Name_Values = map[string]DeliveryRuleUrlFileNameCondition_Name{ + "urlfilename": DeliveryRuleUrlFileNameCondition_Name_UrlFileName, +} + type DeliveryRuleUrlFileNameCondition_Name_STATUS string const DeliveryRuleUrlFileNameCondition_Name_STATUS_UrlFileName = DeliveryRuleUrlFileNameCondition_Name_STATUS("UrlFileName") +// Mapping from string to DeliveryRuleUrlFileNameCondition_Name_STATUS +var deliveryRuleUrlFileNameCondition_Name_STATUS_Values = map[string]DeliveryRuleUrlFileNameCondition_Name_STATUS{ + "urlfilename": DeliveryRuleUrlFileNameCondition_Name_STATUS_UrlFileName, +} + // +kubebuilder:validation:Enum={"UrlPath"} type DeliveryRuleUrlPathCondition_Name string const DeliveryRuleUrlPathCondition_Name_UrlPath = DeliveryRuleUrlPathCondition_Name("UrlPath") +// Mapping from string to DeliveryRuleUrlPathCondition_Name +var deliveryRuleUrlPathCondition_Name_Values = map[string]DeliveryRuleUrlPathCondition_Name{ + "urlpath": DeliveryRuleUrlPathCondition_Name_UrlPath, +} + type DeliveryRuleUrlPathCondition_Name_STATUS string const DeliveryRuleUrlPathCondition_Name_STATUS_UrlPath = DeliveryRuleUrlPathCondition_Name_STATUS("UrlPath") +// Mapping from string to DeliveryRuleUrlPathCondition_Name_STATUS +var deliveryRuleUrlPathCondition_Name_STATUS_Values = map[string]DeliveryRuleUrlPathCondition_Name_STATUS{ + "urlpath": DeliveryRuleUrlPathCondition_Name_STATUS_UrlPath, +} + // Defines the parameters for the request header action. type HeaderActionParameters struct { // +kubebuilder:validation:Required @@ -18615,8 +19072,9 @@ func (parameters *HeaderActionParameters) AssignProperties_From_HeaderActionPara // HeaderAction if source.HeaderAction != nil { - headerAction := HeaderActionParameters_HeaderAction(*source.HeaderAction) - parameters.HeaderAction = &headerAction + headerAction := *source.HeaderAction + headerActionTemp := genruntime.ToEnum(headerAction, headerActionParameters_HeaderAction_Values) + parameters.HeaderAction = &headerActionTemp } else { parameters.HeaderAction = nil } @@ -18626,8 +19084,9 @@ func (parameters *HeaderActionParameters) AssignProperties_From_HeaderActionPara // TypeName if source.TypeName != nil { - typeName := HeaderActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, headerActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18766,8 +19225,9 @@ func (parameters *HeaderActionParameters_STATUS) AssignProperties_From_HeaderAct // HeaderAction if source.HeaderAction != nil { - headerAction := HeaderActionParameters_HeaderAction_STATUS(*source.HeaderAction) - parameters.HeaderAction = &headerAction + headerAction := *source.HeaderAction + headerActionTemp := genruntime.ToEnum(headerAction, headerActionParameters_HeaderAction_STATUS_Values) + parameters.HeaderAction = &headerActionTemp } else { parameters.HeaderAction = nil } @@ -18777,8 +19237,9 @@ func (parameters *HeaderActionParameters_STATUS) AssignProperties_From_HeaderAct // TypeName if source.TypeName != nil { - typeName := HeaderActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, headerActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18946,8 +19407,9 @@ func (parameters *HostNameMatchConditionParameters) AssignProperties_From_HostNa // Operator if source.Operator != nil { - operator := HostNameMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, hostNameMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -18958,7 +19420,7 @@ func (parameters *HostNameMatchConditionParameters) AssignProperties_From_HostNa for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -18967,8 +19429,9 @@ func (parameters *HostNameMatchConditionParameters) AssignProperties_From_HostNa // TypeName if source.TypeName != nil { - typeName := HostNameMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, hostNameMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -19159,8 +19622,9 @@ func (parameters *HostNameMatchConditionParameters_STATUS) AssignProperties_From // Operator if source.Operator != nil { - operator := HostNameMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, hostNameMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -19171,7 +19635,7 @@ func (parameters *HostNameMatchConditionParameters_STATUS) AssignProperties_From for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -19180,8 +19644,9 @@ func (parameters *HostNameMatchConditionParameters_STATUS) AssignProperties_From // TypeName if source.TypeName != nil { - typeName := HostNameMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, hostNameMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -19364,8 +19829,9 @@ func (parameters *HttpVersionMatchConditionParameters) AssignProperties_From_Htt // Operator if source.Operator != nil { - operator := HttpVersionMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, httpVersionMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -19376,7 +19842,7 @@ func (parameters *HttpVersionMatchConditionParameters) AssignProperties_From_Htt for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -19385,8 +19851,9 @@ func (parameters *HttpVersionMatchConditionParameters) AssignProperties_From_Htt // TypeName if source.TypeName != nil { - typeName := HttpVersionMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, httpVersionMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -19577,8 +20044,9 @@ func (parameters *HttpVersionMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := HttpVersionMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, httpVersionMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -19589,7 +20057,7 @@ func (parameters *HttpVersionMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -19598,8 +20066,9 @@ func (parameters *HttpVersionMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := HttpVersionMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, httpVersionMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -19775,7 +20244,7 @@ func (parameters *IsDeviceMatchConditionParameters) AssignProperties_From_IsDevi for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = IsDeviceMatchConditionParameters_MatchValues(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, isDeviceMatchConditionParameters_MatchValues_Values) } parameters.MatchValues = matchValueList } else { @@ -19792,8 +20261,9 @@ func (parameters *IsDeviceMatchConditionParameters) AssignProperties_From_IsDevi // Operator if source.Operator != nil { - operator := IsDeviceMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, isDeviceMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -19804,7 +20274,7 @@ func (parameters *IsDeviceMatchConditionParameters) AssignProperties_From_IsDevi for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -19813,8 +20283,9 @@ func (parameters *IsDeviceMatchConditionParameters) AssignProperties_From_IsDevi // TypeName if source.TypeName != nil { - typeName := IsDeviceMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, isDeviceMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20019,7 +20490,7 @@ func (parameters *IsDeviceMatchConditionParameters_STATUS) AssignProperties_From for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = IsDeviceMatchConditionParameters_MatchValues_STATUS(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, isDeviceMatchConditionParameters_MatchValues_STATUS_Values) } parameters.MatchValues = matchValueList } else { @@ -20036,8 +20507,9 @@ func (parameters *IsDeviceMatchConditionParameters_STATUS) AssignProperties_From // Operator if source.Operator != nil { - operator := IsDeviceMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, isDeviceMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20048,7 +20520,7 @@ func (parameters *IsDeviceMatchConditionParameters_STATUS) AssignProperties_From for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -20057,8 +20529,9 @@ func (parameters *IsDeviceMatchConditionParameters_STATUS) AssignProperties_From // TypeName if source.TypeName != nil { - typeName := IsDeviceMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, isDeviceMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20138,10 +20611,20 @@ type OriginGroupOverrideAction_Name string const OriginGroupOverrideAction_Name_OriginGroupOverride = OriginGroupOverrideAction_Name("OriginGroupOverride") +// Mapping from string to OriginGroupOverrideAction_Name +var originGroupOverrideAction_Name_Values = map[string]OriginGroupOverrideAction_Name{ + "origingroupoverride": OriginGroupOverrideAction_Name_OriginGroupOverride, +} + type OriginGroupOverrideAction_Name_STATUS string const OriginGroupOverrideAction_Name_STATUS_OriginGroupOverride = OriginGroupOverrideAction_Name_STATUS("OriginGroupOverride") +// Mapping from string to OriginGroupOverrideAction_Name_STATUS +var originGroupOverrideAction_Name_STATUS_Values = map[string]OriginGroupOverrideAction_Name_STATUS{ + "origingroupoverride": OriginGroupOverrideAction_Name_STATUS_OriginGroupOverride, +} + // Defines the parameters for the origin group override action. type OriginGroupOverrideActionParameters struct { // +kubebuilder:validation:Required @@ -20229,8 +20712,9 @@ func (parameters *OriginGroupOverrideActionParameters) AssignProperties_From_Ori // TypeName if source.TypeName != nil { - typeName := OriginGroupOverrideActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, originGroupOverrideActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20361,8 +20845,9 @@ func (parameters *OriginGroupOverrideActionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := OriginGroupOverrideActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, originGroupOverrideActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20540,8 +21025,9 @@ func (parameters *PostArgsMatchConditionParameters) AssignProperties_From_PostAr // Operator if source.Operator != nil { - operator := PostArgsMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, postArgsMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20555,7 +21041,7 @@ func (parameters *PostArgsMatchConditionParameters) AssignProperties_From_PostAr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -20564,8 +21050,9 @@ func (parameters *PostArgsMatchConditionParameters) AssignProperties_From_PostAr // TypeName if source.TypeName != nil { - typeName := PostArgsMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, postArgsMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20771,8 +21258,9 @@ func (parameters *PostArgsMatchConditionParameters_STATUS) AssignProperties_From // Operator if source.Operator != nil { - operator := PostArgsMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, postArgsMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20786,7 +21274,7 @@ func (parameters *PostArgsMatchConditionParameters_STATUS) AssignProperties_From for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -20795,8 +21283,9 @@ func (parameters *PostArgsMatchConditionParameters_STATUS) AssignProperties_From // TypeName if source.TypeName != nil { - typeName := PostArgsMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, postArgsMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20982,8 +21471,9 @@ func (parameters *QueryStringMatchConditionParameters) AssignProperties_From_Que // Operator if source.Operator != nil { - operator := QueryStringMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, queryStringMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20994,7 +21484,7 @@ func (parameters *QueryStringMatchConditionParameters) AssignProperties_From_Que for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -21003,8 +21493,9 @@ func (parameters *QueryStringMatchConditionParameters) AssignProperties_From_Que // TypeName if source.TypeName != nil { - typeName := QueryStringMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, queryStringMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21195,8 +21686,9 @@ func (parameters *QueryStringMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := QueryStringMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, queryStringMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -21207,7 +21699,7 @@ func (parameters *QueryStringMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -21216,8 +21708,9 @@ func (parameters *QueryStringMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := QueryStringMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, queryStringMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21401,8 +21894,9 @@ func (parameters *RemoteAddressMatchConditionParameters) AssignProperties_From_R // Operator if source.Operator != nil { - operator := RemoteAddressMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, remoteAddressMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -21413,7 +21907,7 @@ func (parameters *RemoteAddressMatchConditionParameters) AssignProperties_From_R for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -21422,8 +21916,9 @@ func (parameters *RemoteAddressMatchConditionParameters) AssignProperties_From_R // TypeName if source.TypeName != nil { - typeName := RemoteAddressMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, remoteAddressMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21615,8 +22110,9 @@ func (parameters *RemoteAddressMatchConditionParameters_STATUS) AssignProperties // Operator if source.Operator != nil { - operator := RemoteAddressMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, remoteAddressMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -21627,7 +22123,7 @@ func (parameters *RemoteAddressMatchConditionParameters_STATUS) AssignProperties for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -21636,8 +22132,9 @@ func (parameters *RemoteAddressMatchConditionParameters_STATUS) AssignProperties // TypeName if source.TypeName != nil { - typeName := RemoteAddressMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, remoteAddressMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21820,8 +22317,9 @@ func (parameters *RequestBodyMatchConditionParameters) AssignProperties_From_Req // Operator if source.Operator != nil { - operator := RequestBodyMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestBodyMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -21832,7 +22330,7 @@ func (parameters *RequestBodyMatchConditionParameters) AssignProperties_From_Req for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -21841,8 +22339,9 @@ func (parameters *RequestBodyMatchConditionParameters) AssignProperties_From_Req // TypeName if source.TypeName != nil { - typeName := RequestBodyMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestBodyMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -22033,8 +22532,9 @@ func (parameters *RequestBodyMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := RequestBodyMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestBodyMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -22045,7 +22545,7 @@ func (parameters *RequestBodyMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -22054,8 +22554,9 @@ func (parameters *RequestBodyMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := RequestBodyMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestBodyMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -22253,8 +22754,9 @@ func (parameters *RequestHeaderMatchConditionParameters) AssignProperties_From_R // Operator if source.Operator != nil { - operator := RequestHeaderMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestHeaderMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -22268,7 +22770,7 @@ func (parameters *RequestHeaderMatchConditionParameters) AssignProperties_From_R for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -22277,8 +22779,9 @@ func (parameters *RequestHeaderMatchConditionParameters) AssignProperties_From_R // TypeName if source.TypeName != nil { - typeName := RequestHeaderMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestHeaderMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -22484,8 +22987,9 @@ func (parameters *RequestHeaderMatchConditionParameters_STATUS) AssignProperties // Operator if source.Operator != nil { - operator := RequestHeaderMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestHeaderMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -22499,7 +23003,7 @@ func (parameters *RequestHeaderMatchConditionParameters_STATUS) AssignProperties for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -22508,8 +23012,9 @@ func (parameters *RequestHeaderMatchConditionParameters_STATUS) AssignProperties // TypeName if source.TypeName != nil { - typeName := RequestHeaderMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestHeaderMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -22688,7 +23193,7 @@ func (parameters *RequestMethodMatchConditionParameters) AssignProperties_From_R for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = RequestMethodMatchConditionParameters_MatchValues(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, requestMethodMatchConditionParameters_MatchValues_Values) } parameters.MatchValues = matchValueList } else { @@ -22705,8 +23210,9 @@ func (parameters *RequestMethodMatchConditionParameters) AssignProperties_From_R // Operator if source.Operator != nil { - operator := RequestMethodMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestMethodMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -22717,7 +23223,7 @@ func (parameters *RequestMethodMatchConditionParameters) AssignProperties_From_R for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -22726,8 +23232,9 @@ func (parameters *RequestMethodMatchConditionParameters) AssignProperties_From_R // TypeName if source.TypeName != nil { - typeName := RequestMethodMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestMethodMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -22932,7 +23439,7 @@ func (parameters *RequestMethodMatchConditionParameters_STATUS) AssignProperties for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = RequestMethodMatchConditionParameters_MatchValues_STATUS(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, requestMethodMatchConditionParameters_MatchValues_STATUS_Values) } parameters.MatchValues = matchValueList } else { @@ -22949,8 +23456,9 @@ func (parameters *RequestMethodMatchConditionParameters_STATUS) AssignProperties // Operator if source.Operator != nil { - operator := RequestMethodMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestMethodMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -22961,7 +23469,7 @@ func (parameters *RequestMethodMatchConditionParameters_STATUS) AssignProperties for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -22970,8 +23478,9 @@ func (parameters *RequestMethodMatchConditionParameters_STATUS) AssignProperties // TypeName if source.TypeName != nil { - typeName := RequestMethodMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestMethodMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -23157,7 +23666,7 @@ func (parameters *RequestSchemeMatchConditionParameters) AssignProperties_From_R for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = RequestSchemeMatchConditionParameters_MatchValues(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, requestSchemeMatchConditionParameters_MatchValues_Values) } parameters.MatchValues = matchValueList } else { @@ -23174,8 +23683,9 @@ func (parameters *RequestSchemeMatchConditionParameters) AssignProperties_From_R // Operator if source.Operator != nil { - operator := RequestSchemeMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestSchemeMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -23186,7 +23696,7 @@ func (parameters *RequestSchemeMatchConditionParameters) AssignProperties_From_R for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -23195,8 +23705,9 @@ func (parameters *RequestSchemeMatchConditionParameters) AssignProperties_From_R // TypeName if source.TypeName != nil { - typeName := RequestSchemeMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestSchemeMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -23401,7 +23912,7 @@ func (parameters *RequestSchemeMatchConditionParameters_STATUS) AssignProperties for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = RequestSchemeMatchConditionParameters_MatchValues_STATUS(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, requestSchemeMatchConditionParameters_MatchValues_STATUS_Values) } parameters.MatchValues = matchValueList } else { @@ -23418,8 +23929,9 @@ func (parameters *RequestSchemeMatchConditionParameters_STATUS) AssignProperties // Operator if source.Operator != nil { - operator := RequestSchemeMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestSchemeMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -23430,7 +23942,7 @@ func (parameters *RequestSchemeMatchConditionParameters_STATUS) AssignProperties for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -23439,8 +23951,9 @@ func (parameters *RequestSchemeMatchConditionParameters_STATUS) AssignProperties // TypeName if source.TypeName != nil { - typeName := RequestSchemeMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestSchemeMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -23633,8 +24146,9 @@ func (parameters *RequestUriMatchConditionParameters) AssignProperties_From_Requ // Operator if source.Operator != nil { - operator := RequestUriMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestUriMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -23645,7 +24159,7 @@ func (parameters *RequestUriMatchConditionParameters) AssignProperties_From_Requ for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -23654,8 +24168,9 @@ func (parameters *RequestUriMatchConditionParameters) AssignProperties_From_Requ // TypeName if source.TypeName != nil { - typeName := RequestUriMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestUriMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -23846,8 +24361,9 @@ func (parameters *RequestUriMatchConditionParameters_STATUS) AssignProperties_Fr // Operator if source.Operator != nil { - operator := RequestUriMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestUriMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -23858,7 +24374,7 @@ func (parameters *RequestUriMatchConditionParameters_STATUS) AssignProperties_Fr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -23867,8 +24383,9 @@ func (parameters *RequestUriMatchConditionParameters_STATUS) AssignProperties_Fr // TypeName if source.TypeName != nil { - typeName := RequestUriMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestUriMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -24057,8 +24574,9 @@ func (parameters *RouteConfigurationOverrideActionParameters) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := RouteConfigurationOverrideActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, routeConfigurationOverrideActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -24241,8 +24759,9 @@ func (parameters *RouteConfigurationOverrideActionParameters_STATUS) AssignPrope // TypeName if source.TypeName != nil { - typeName := RouteConfigurationOverrideActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, routeConfigurationOverrideActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -24417,8 +24936,9 @@ func (parameters *ServerPortMatchConditionParameters) AssignProperties_From_Serv // Operator if source.Operator != nil { - operator := ServerPortMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, serverPortMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -24429,7 +24949,7 @@ func (parameters *ServerPortMatchConditionParameters) AssignProperties_From_Serv for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -24438,8 +24958,9 @@ func (parameters *ServerPortMatchConditionParameters) AssignProperties_From_Serv // TypeName if source.TypeName != nil { - typeName := ServerPortMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, serverPortMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -24630,8 +25151,9 @@ func (parameters *ServerPortMatchConditionParameters_STATUS) AssignProperties_Fr // Operator if source.Operator != nil { - operator := ServerPortMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, serverPortMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -24642,7 +25164,7 @@ func (parameters *ServerPortMatchConditionParameters_STATUS) AssignProperties_Fr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -24651,8 +25173,9 @@ func (parameters *ServerPortMatchConditionParameters_STATUS) AssignProperties_Fr // TypeName if source.TypeName != nil { - typeName := ServerPortMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, serverPortMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -24835,8 +25358,9 @@ func (parameters *SocketAddrMatchConditionParameters) AssignProperties_From_Sock // Operator if source.Operator != nil { - operator := SocketAddrMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, socketAddrMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -24847,7 +25371,7 @@ func (parameters *SocketAddrMatchConditionParameters) AssignProperties_From_Sock for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -24856,8 +25380,9 @@ func (parameters *SocketAddrMatchConditionParameters) AssignProperties_From_Sock // TypeName if source.TypeName != nil { - typeName := SocketAddrMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, socketAddrMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -25048,8 +25573,9 @@ func (parameters *SocketAddrMatchConditionParameters_STATUS) AssignProperties_Fr // Operator if source.Operator != nil { - operator := SocketAddrMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, socketAddrMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -25060,7 +25586,7 @@ func (parameters *SocketAddrMatchConditionParameters_STATUS) AssignProperties_Fr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -25069,8 +25595,9 @@ func (parameters *SocketAddrMatchConditionParameters_STATUS) AssignProperties_Fr // TypeName if source.TypeName != nil { - typeName := SocketAddrMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, socketAddrMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -25246,7 +25773,7 @@ func (parameters *SslProtocolMatchConditionParameters) AssignProperties_From_Ssl for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = SslProtocol(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, sslProtocol_Values) } parameters.MatchValues = matchValueList } else { @@ -25263,8 +25790,9 @@ func (parameters *SslProtocolMatchConditionParameters) AssignProperties_From_Ssl // Operator if source.Operator != nil { - operator := SslProtocolMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, sslProtocolMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -25275,7 +25803,7 @@ func (parameters *SslProtocolMatchConditionParameters) AssignProperties_From_Ssl for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -25284,8 +25812,9 @@ func (parameters *SslProtocolMatchConditionParameters) AssignProperties_From_Ssl // TypeName if source.TypeName != nil { - typeName := SslProtocolMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, sslProtocolMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -25490,7 +26019,7 @@ func (parameters *SslProtocolMatchConditionParameters_STATUS) AssignProperties_F for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = SslProtocol_STATUS(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, sslProtocol_STATUS_Values) } parameters.MatchValues = matchValueList } else { @@ -25507,8 +26036,9 @@ func (parameters *SslProtocolMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := SslProtocolMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, sslProtocolMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -25519,7 +26049,7 @@ func (parameters *SslProtocolMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -25528,8 +26058,9 @@ func (parameters *SslProtocolMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := SslProtocolMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, sslProtocolMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -25722,8 +26253,9 @@ func (parameters *UrlFileExtensionMatchConditionParameters) AssignProperties_Fro // Operator if source.Operator != nil { - operator := UrlFileExtensionMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlFileExtensionMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -25734,7 +26266,7 @@ func (parameters *UrlFileExtensionMatchConditionParameters) AssignProperties_Fro for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -25743,8 +26275,9 @@ func (parameters *UrlFileExtensionMatchConditionParameters) AssignProperties_Fro // TypeName if source.TypeName != nil { - typeName := UrlFileExtensionMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlFileExtensionMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -25935,8 +26468,9 @@ func (parameters *UrlFileExtensionMatchConditionParameters_STATUS) AssignPropert // Operator if source.Operator != nil { - operator := UrlFileExtensionMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlFileExtensionMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -25947,7 +26481,7 @@ func (parameters *UrlFileExtensionMatchConditionParameters_STATUS) AssignPropert for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -25956,8 +26490,9 @@ func (parameters *UrlFileExtensionMatchConditionParameters_STATUS) AssignPropert // TypeName if source.TypeName != nil { - typeName := UrlFileExtensionMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlFileExtensionMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -26140,8 +26675,9 @@ func (parameters *UrlFileNameMatchConditionParameters) AssignProperties_From_Url // Operator if source.Operator != nil { - operator := UrlFileNameMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlFileNameMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -26152,7 +26688,7 @@ func (parameters *UrlFileNameMatchConditionParameters) AssignProperties_From_Url for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -26161,8 +26697,9 @@ func (parameters *UrlFileNameMatchConditionParameters) AssignProperties_From_Url // TypeName if source.TypeName != nil { - typeName := UrlFileNameMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlFileNameMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -26353,8 +26890,9 @@ func (parameters *UrlFileNameMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := UrlFileNameMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlFileNameMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -26365,7 +26903,7 @@ func (parameters *UrlFileNameMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -26374,8 +26912,9 @@ func (parameters *UrlFileNameMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := UrlFileNameMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlFileNameMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -26558,8 +27097,9 @@ func (parameters *UrlPathMatchConditionParameters) AssignProperties_From_UrlPath // Operator if source.Operator != nil { - operator := UrlPathMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlPathMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -26570,7 +27110,7 @@ func (parameters *UrlPathMatchConditionParameters) AssignProperties_From_UrlPath for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -26579,8 +27119,9 @@ func (parameters *UrlPathMatchConditionParameters) AssignProperties_From_UrlPath // TypeName if source.TypeName != nil { - typeName := UrlPathMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlPathMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -26771,8 +27312,9 @@ func (parameters *UrlPathMatchConditionParameters_STATUS) AssignProperties_From_ // Operator if source.Operator != nil { - operator := UrlPathMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlPathMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -26783,7 +27325,7 @@ func (parameters *UrlPathMatchConditionParameters_STATUS) AssignProperties_From_ for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -26792,8 +27334,9 @@ func (parameters *UrlPathMatchConditionParameters_STATUS) AssignProperties_From_ // TypeName if source.TypeName != nil { - typeName := UrlPathMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlPathMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -26863,10 +27406,20 @@ type UrlRedirectAction_Name string const UrlRedirectAction_Name_UrlRedirect = UrlRedirectAction_Name("UrlRedirect") +// Mapping from string to UrlRedirectAction_Name +var urlRedirectAction_Name_Values = map[string]UrlRedirectAction_Name{ + "urlredirect": UrlRedirectAction_Name_UrlRedirect, +} + type UrlRedirectAction_Name_STATUS string const UrlRedirectAction_Name_STATUS_UrlRedirect = UrlRedirectAction_Name_STATUS("UrlRedirect") +// Mapping from string to UrlRedirectAction_Name_STATUS +var urlRedirectAction_Name_STATUS_Values = map[string]UrlRedirectAction_Name_STATUS{ + "urlredirect": UrlRedirectAction_Name_STATUS_UrlRedirect, +} + // Defines the parameters for the url redirect action. type UrlRedirectActionParameters struct { // CustomFragment: Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include @@ -27024,24 +27577,27 @@ func (parameters *UrlRedirectActionParameters) AssignProperties_From_UrlRedirect // DestinationProtocol if source.DestinationProtocol != nil { - destinationProtocol := UrlRedirectActionParameters_DestinationProtocol(*source.DestinationProtocol) - parameters.DestinationProtocol = &destinationProtocol + destinationProtocol := *source.DestinationProtocol + destinationProtocolTemp := genruntime.ToEnum(destinationProtocol, urlRedirectActionParameters_DestinationProtocol_Values) + parameters.DestinationProtocol = &destinationProtocolTemp } else { parameters.DestinationProtocol = nil } // RedirectType if source.RedirectType != nil { - redirectType := UrlRedirectActionParameters_RedirectType(*source.RedirectType) - parameters.RedirectType = &redirectType + redirectType := *source.RedirectType + redirectTypeTemp := genruntime.ToEnum(redirectType, urlRedirectActionParameters_RedirectType_Values) + parameters.RedirectType = &redirectTypeTemp } else { parameters.RedirectType = nil } // TypeName if source.TypeName != nil { - typeName := UrlRedirectActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlRedirectActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -27248,24 +27804,27 @@ func (parameters *UrlRedirectActionParameters_STATUS) AssignProperties_From_UrlR // DestinationProtocol if source.DestinationProtocol != nil { - destinationProtocol := UrlRedirectActionParameters_DestinationProtocol_STATUS(*source.DestinationProtocol) - parameters.DestinationProtocol = &destinationProtocol + destinationProtocol := *source.DestinationProtocol + destinationProtocolTemp := genruntime.ToEnum(destinationProtocol, urlRedirectActionParameters_DestinationProtocol_STATUS_Values) + parameters.DestinationProtocol = &destinationProtocolTemp } else { parameters.DestinationProtocol = nil } // RedirectType if source.RedirectType != nil { - redirectType := UrlRedirectActionParameters_RedirectType_STATUS(*source.RedirectType) - parameters.RedirectType = &redirectType + redirectType := *source.RedirectType + redirectTypeTemp := genruntime.ToEnum(redirectType, urlRedirectActionParameters_RedirectType_STATUS_Values) + parameters.RedirectType = &redirectTypeTemp } else { parameters.RedirectType = nil } // TypeName if source.TypeName != nil { - typeName := UrlRedirectActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlRedirectActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -27331,10 +27890,20 @@ type UrlRewriteAction_Name string const UrlRewriteAction_Name_UrlRewrite = UrlRewriteAction_Name("UrlRewrite") +// Mapping from string to UrlRewriteAction_Name +var urlRewriteAction_Name_Values = map[string]UrlRewriteAction_Name{ + "urlrewrite": UrlRewriteAction_Name_UrlRewrite, +} + type UrlRewriteAction_Name_STATUS string const UrlRewriteAction_Name_STATUS_UrlRewrite = UrlRewriteAction_Name_STATUS("UrlRewrite") +// Mapping from string to UrlRewriteAction_Name_STATUS +var urlRewriteAction_Name_STATUS_Values = map[string]UrlRewriteAction_Name_STATUS{ + "urlrewrite": UrlRewriteAction_Name_STATUS_UrlRewrite, +} + // Defines the parameters for the url rewrite action. type UrlRewriteActionParameters struct { // +kubebuilder:validation:Required @@ -27447,8 +28016,9 @@ func (parameters *UrlRewriteActionParameters) AssignProperties_From_UrlRewriteAc // TypeName if source.TypeName != nil { - typeName := UrlRewriteActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlRewriteActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -27599,8 +28169,9 @@ func (parameters *UrlRewriteActionParameters_STATUS) AssignProperties_From_UrlRe // TypeName if source.TypeName != nil { - typeName := UrlRewriteActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlRewriteActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -27652,10 +28223,20 @@ type UrlSigningAction_Name string const UrlSigningAction_Name_UrlSigning = UrlSigningAction_Name("UrlSigning") +// Mapping from string to UrlSigningAction_Name +var urlSigningAction_Name_Values = map[string]UrlSigningAction_Name{ + "urlsigning": UrlSigningAction_Name_UrlSigning, +} + type UrlSigningAction_Name_STATUS string const UrlSigningAction_Name_STATUS_UrlSigning = UrlSigningAction_Name_STATUS("UrlSigning") +// Mapping from string to UrlSigningAction_Name_STATUS +var urlSigningAction_Name_STATUS_Values = map[string]UrlSigningAction_Name_STATUS{ + "urlsigning": UrlSigningAction_Name_STATUS_UrlSigning, +} + // Defines the parameters for the Url Signing action. type UrlSigningActionParameters struct { // Algorithm: Algorithm to use for URL signing @@ -27743,8 +28324,9 @@ func (parameters *UrlSigningActionParameters) AssignProperties_From_UrlSigningAc // Algorithm if source.Algorithm != nil { - algorithm := UrlSigningActionParameters_Algorithm(*source.Algorithm) - parameters.Algorithm = &algorithm + algorithm := *source.Algorithm + algorithmTemp := genruntime.ToEnum(algorithm, urlSigningActionParameters_Algorithm_Values) + parameters.Algorithm = &algorithmTemp } else { parameters.Algorithm = nil } @@ -27769,8 +28351,9 @@ func (parameters *UrlSigningActionParameters) AssignProperties_From_UrlSigningAc // TypeName if source.TypeName != nil { - typeName := UrlSigningActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlSigningActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -27925,8 +28508,9 @@ func (parameters *UrlSigningActionParameters_STATUS) AssignProperties_From_UrlSi // Algorithm if source.Algorithm != nil { - algorithm := UrlSigningActionParameters_Algorithm_STATUS(*source.Algorithm) - parameters.Algorithm = &algorithm + algorithm := *source.Algorithm + algorithmTemp := genruntime.ToEnum(algorithm, urlSigningActionParameters_Algorithm_STATUS_Values) + parameters.Algorithm = &algorithmTemp } else { parameters.Algorithm = nil } @@ -27951,8 +28535,9 @@ func (parameters *UrlSigningActionParameters_STATUS) AssignProperties_From_UrlSi // TypeName if source.TypeName != nil { - typeName := UrlSigningActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlSigningActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -28125,8 +28710,9 @@ func (configuration *CacheConfiguration) AssignProperties_From_CacheConfiguratio // CacheBehavior if source.CacheBehavior != nil { - cacheBehavior := CacheConfiguration_CacheBehavior(*source.CacheBehavior) - configuration.CacheBehavior = &cacheBehavior + cacheBehavior := *source.CacheBehavior + cacheBehaviorTemp := genruntime.ToEnum(cacheBehavior, cacheConfiguration_CacheBehavior_Values) + configuration.CacheBehavior = &cacheBehaviorTemp } else { configuration.CacheBehavior = nil } @@ -28136,8 +28722,9 @@ func (configuration *CacheConfiguration) AssignProperties_From_CacheConfiguratio // IsCompressionEnabled if source.IsCompressionEnabled != nil { - isCompressionEnabled := CacheConfiguration_IsCompressionEnabled(*source.IsCompressionEnabled) - configuration.IsCompressionEnabled = &isCompressionEnabled + isCompressionEnabled := *source.IsCompressionEnabled + isCompressionEnabledTemp := genruntime.ToEnum(isCompressionEnabled, cacheConfiguration_IsCompressionEnabled_Values) + configuration.IsCompressionEnabled = &isCompressionEnabledTemp } else { configuration.IsCompressionEnabled = nil } @@ -28147,8 +28734,9 @@ func (configuration *CacheConfiguration) AssignProperties_From_CacheConfiguratio // QueryStringCachingBehavior if source.QueryStringCachingBehavior != nil { - queryStringCachingBehavior := CacheConfiguration_QueryStringCachingBehavior(*source.QueryStringCachingBehavior) - configuration.QueryStringCachingBehavior = &queryStringCachingBehavior + queryStringCachingBehavior := *source.QueryStringCachingBehavior + queryStringCachingBehaviorTemp := genruntime.ToEnum(queryStringCachingBehavior, cacheConfiguration_QueryStringCachingBehavior_Values) + configuration.QueryStringCachingBehavior = &queryStringCachingBehaviorTemp } else { configuration.QueryStringCachingBehavior = nil } @@ -28315,8 +28903,9 @@ func (configuration *CacheConfiguration_STATUS) AssignProperties_From_CacheConfi // CacheBehavior if source.CacheBehavior != nil { - cacheBehavior := CacheConfiguration_CacheBehavior_STATUS(*source.CacheBehavior) - configuration.CacheBehavior = &cacheBehavior + cacheBehavior := *source.CacheBehavior + cacheBehaviorTemp := genruntime.ToEnum(cacheBehavior, cacheConfiguration_CacheBehavior_STATUS_Values) + configuration.CacheBehavior = &cacheBehaviorTemp } else { configuration.CacheBehavior = nil } @@ -28326,8 +28915,9 @@ func (configuration *CacheConfiguration_STATUS) AssignProperties_From_CacheConfi // IsCompressionEnabled if source.IsCompressionEnabled != nil { - isCompressionEnabled := CacheConfiguration_IsCompressionEnabled_STATUS(*source.IsCompressionEnabled) - configuration.IsCompressionEnabled = &isCompressionEnabled + isCompressionEnabled := *source.IsCompressionEnabled + isCompressionEnabledTemp := genruntime.ToEnum(isCompressionEnabled, cacheConfiguration_IsCompressionEnabled_STATUS_Values) + configuration.IsCompressionEnabled = &isCompressionEnabledTemp } else { configuration.IsCompressionEnabled = nil } @@ -28337,8 +28927,9 @@ func (configuration *CacheConfiguration_STATUS) AssignProperties_From_CacheConfi // QueryStringCachingBehavior if source.QueryStringCachingBehavior != nil { - queryStringCachingBehavior := CacheConfiguration_QueryStringCachingBehavior_STATUS(*source.QueryStringCachingBehavior) - configuration.QueryStringCachingBehavior = &queryStringCachingBehavior + queryStringCachingBehavior := *source.QueryStringCachingBehavior + queryStringCachingBehaviorTemp := genruntime.ToEnum(queryStringCachingBehavior, cacheConfiguration_QueryStringCachingBehavior_STATUS_Values) + configuration.QueryStringCachingBehavior = &queryStringCachingBehaviorTemp } else { configuration.QueryStringCachingBehavior = nil } @@ -28402,6 +28993,13 @@ const ( CacheExpirationActionParameters_CacheBehavior_SetIfMissing = CacheExpirationActionParameters_CacheBehavior("SetIfMissing") ) +// Mapping from string to CacheExpirationActionParameters_CacheBehavior +var cacheExpirationActionParameters_CacheBehavior_Values = map[string]CacheExpirationActionParameters_CacheBehavior{ + "bypasscache": CacheExpirationActionParameters_CacheBehavior_BypassCache, + "override": CacheExpirationActionParameters_CacheBehavior_Override, + "setifmissing": CacheExpirationActionParameters_CacheBehavior_SetIfMissing, +} + type CacheExpirationActionParameters_CacheBehavior_STATUS string const ( @@ -28410,24 +29008,51 @@ const ( CacheExpirationActionParameters_CacheBehavior_STATUS_SetIfMissing = CacheExpirationActionParameters_CacheBehavior_STATUS("SetIfMissing") ) +// Mapping from string to CacheExpirationActionParameters_CacheBehavior_STATUS +var cacheExpirationActionParameters_CacheBehavior_STATUS_Values = map[string]CacheExpirationActionParameters_CacheBehavior_STATUS{ + "bypasscache": CacheExpirationActionParameters_CacheBehavior_STATUS_BypassCache, + "override": CacheExpirationActionParameters_CacheBehavior_STATUS_Override, + "setifmissing": CacheExpirationActionParameters_CacheBehavior_STATUS_SetIfMissing, +} + // +kubebuilder:validation:Enum={"All"} type CacheExpirationActionParameters_CacheType string const CacheExpirationActionParameters_CacheType_All = CacheExpirationActionParameters_CacheType("All") +// Mapping from string to CacheExpirationActionParameters_CacheType +var cacheExpirationActionParameters_CacheType_Values = map[string]CacheExpirationActionParameters_CacheType{ + "all": CacheExpirationActionParameters_CacheType_All, +} + type CacheExpirationActionParameters_CacheType_STATUS string const CacheExpirationActionParameters_CacheType_STATUS_All = CacheExpirationActionParameters_CacheType_STATUS("All") +// Mapping from string to CacheExpirationActionParameters_CacheType_STATUS +var cacheExpirationActionParameters_CacheType_STATUS_Values = map[string]CacheExpirationActionParameters_CacheType_STATUS{ + "all": CacheExpirationActionParameters_CacheType_STATUS_All, +} + // +kubebuilder:validation:Enum={"DeliveryRuleCacheExpirationActionParameters"} type CacheExpirationActionParameters_TypeName string const CacheExpirationActionParameters_TypeName_DeliveryRuleCacheExpirationActionParameters = CacheExpirationActionParameters_TypeName("DeliveryRuleCacheExpirationActionParameters") +// Mapping from string to CacheExpirationActionParameters_TypeName +var cacheExpirationActionParameters_TypeName_Values = map[string]CacheExpirationActionParameters_TypeName{ + "deliveryrulecacheexpirationactionparameters": CacheExpirationActionParameters_TypeName_DeliveryRuleCacheExpirationActionParameters, +} + type CacheExpirationActionParameters_TypeName_STATUS string const CacheExpirationActionParameters_TypeName_STATUS_DeliveryRuleCacheExpirationActionParameters = CacheExpirationActionParameters_TypeName_STATUS("DeliveryRuleCacheExpirationActionParameters") +// Mapping from string to CacheExpirationActionParameters_TypeName_STATUS +var cacheExpirationActionParameters_TypeName_STATUS_Values = map[string]CacheExpirationActionParameters_TypeName_STATUS{ + "deliveryrulecacheexpirationactionparameters": CacheExpirationActionParameters_TypeName_STATUS_DeliveryRuleCacheExpirationActionParameters, +} + // +kubebuilder:validation:Enum={"Exclude","ExcludeAll","Include","IncludeAll"} type CacheKeyQueryStringActionParameters_QueryStringBehavior string @@ -28438,6 +29063,14 @@ const ( CacheKeyQueryStringActionParameters_QueryStringBehavior_IncludeAll = CacheKeyQueryStringActionParameters_QueryStringBehavior("IncludeAll") ) +// Mapping from string to CacheKeyQueryStringActionParameters_QueryStringBehavior +var cacheKeyQueryStringActionParameters_QueryStringBehavior_Values = map[string]CacheKeyQueryStringActionParameters_QueryStringBehavior{ + "exclude": CacheKeyQueryStringActionParameters_QueryStringBehavior_Exclude, + "excludeall": CacheKeyQueryStringActionParameters_QueryStringBehavior_ExcludeAll, + "include": CacheKeyQueryStringActionParameters_QueryStringBehavior_Include, + "includeall": CacheKeyQueryStringActionParameters_QueryStringBehavior_IncludeAll, +} + type CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS string const ( @@ -28447,15 +29080,33 @@ const ( CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_IncludeAll = CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS("IncludeAll") ) +// Mapping from string to CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS +var cacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_Values = map[string]CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS{ + "exclude": CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_Exclude, + "excludeall": CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_ExcludeAll, + "include": CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_Include, + "includeall": CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_IncludeAll, +} + // +kubebuilder:validation:Enum={"DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"} type CacheKeyQueryStringActionParameters_TypeName string const CacheKeyQueryStringActionParameters_TypeName_DeliveryRuleCacheKeyQueryStringBehaviorActionParameters = CacheKeyQueryStringActionParameters_TypeName("DeliveryRuleCacheKeyQueryStringBehaviorActionParameters") +// Mapping from string to CacheKeyQueryStringActionParameters_TypeName +var cacheKeyQueryStringActionParameters_TypeName_Values = map[string]CacheKeyQueryStringActionParameters_TypeName{ + "deliveryrulecachekeyquerystringbehavioractionparameters": CacheKeyQueryStringActionParameters_TypeName_DeliveryRuleCacheKeyQueryStringBehaviorActionParameters, +} + type CacheKeyQueryStringActionParameters_TypeName_STATUS string const CacheKeyQueryStringActionParameters_TypeName_STATUS_DeliveryRuleCacheKeyQueryStringBehaviorActionParameters = CacheKeyQueryStringActionParameters_TypeName_STATUS("DeliveryRuleCacheKeyQueryStringBehaviorActionParameters") +// Mapping from string to CacheKeyQueryStringActionParameters_TypeName_STATUS +var cacheKeyQueryStringActionParameters_TypeName_STATUS_Values = map[string]CacheKeyQueryStringActionParameters_TypeName_STATUS{ + "deliveryrulecachekeyquerystringbehavioractionparameters": CacheKeyQueryStringActionParameters_TypeName_STATUS_DeliveryRuleCacheKeyQueryStringBehaviorActionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type ClientPortMatchConditionParameters_Operator string @@ -28472,6 +29123,20 @@ const ( ClientPortMatchConditionParameters_Operator_RegEx = ClientPortMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to ClientPortMatchConditionParameters_Operator +var clientPortMatchConditionParameters_Operator_Values = map[string]ClientPortMatchConditionParameters_Operator{ + "any": ClientPortMatchConditionParameters_Operator_Any, + "beginswith": ClientPortMatchConditionParameters_Operator_BeginsWith, + "contains": ClientPortMatchConditionParameters_Operator_Contains, + "endswith": ClientPortMatchConditionParameters_Operator_EndsWith, + "equal": ClientPortMatchConditionParameters_Operator_Equal, + "greaterthan": ClientPortMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": ClientPortMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": ClientPortMatchConditionParameters_Operator_LessThan, + "lessthanorequal": ClientPortMatchConditionParameters_Operator_LessThanOrEqual, + "regex": ClientPortMatchConditionParameters_Operator_RegEx, +} + type ClientPortMatchConditionParameters_Operator_STATUS string const ( @@ -28487,15 +29152,39 @@ const ( ClientPortMatchConditionParameters_Operator_STATUS_RegEx = ClientPortMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to ClientPortMatchConditionParameters_Operator_STATUS +var clientPortMatchConditionParameters_Operator_STATUS_Values = map[string]ClientPortMatchConditionParameters_Operator_STATUS{ + "any": ClientPortMatchConditionParameters_Operator_STATUS_Any, + "beginswith": ClientPortMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": ClientPortMatchConditionParameters_Operator_STATUS_Contains, + "endswith": ClientPortMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": ClientPortMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": ClientPortMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": ClientPortMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": ClientPortMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": ClientPortMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": ClientPortMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleClientPortConditionParameters"} type ClientPortMatchConditionParameters_TypeName string const ClientPortMatchConditionParameters_TypeName_DeliveryRuleClientPortConditionParameters = ClientPortMatchConditionParameters_TypeName("DeliveryRuleClientPortConditionParameters") +// Mapping from string to ClientPortMatchConditionParameters_TypeName +var clientPortMatchConditionParameters_TypeName_Values = map[string]ClientPortMatchConditionParameters_TypeName{ + "deliveryruleclientportconditionparameters": ClientPortMatchConditionParameters_TypeName_DeliveryRuleClientPortConditionParameters, +} + type ClientPortMatchConditionParameters_TypeName_STATUS string const ClientPortMatchConditionParameters_TypeName_STATUS_DeliveryRuleClientPortConditionParameters = ClientPortMatchConditionParameters_TypeName_STATUS("DeliveryRuleClientPortConditionParameters") +// Mapping from string to ClientPortMatchConditionParameters_TypeName_STATUS +var clientPortMatchConditionParameters_TypeName_STATUS_Values = map[string]ClientPortMatchConditionParameters_TypeName_STATUS{ + "deliveryruleclientportconditionparameters": ClientPortMatchConditionParameters_TypeName_STATUS_DeliveryRuleClientPortConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type CookiesMatchConditionParameters_Operator string @@ -28512,6 +29201,20 @@ const ( CookiesMatchConditionParameters_Operator_RegEx = CookiesMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to CookiesMatchConditionParameters_Operator +var cookiesMatchConditionParameters_Operator_Values = map[string]CookiesMatchConditionParameters_Operator{ + "any": CookiesMatchConditionParameters_Operator_Any, + "beginswith": CookiesMatchConditionParameters_Operator_BeginsWith, + "contains": CookiesMatchConditionParameters_Operator_Contains, + "endswith": CookiesMatchConditionParameters_Operator_EndsWith, + "equal": CookiesMatchConditionParameters_Operator_Equal, + "greaterthan": CookiesMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": CookiesMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": CookiesMatchConditionParameters_Operator_LessThan, + "lessthanorequal": CookiesMatchConditionParameters_Operator_LessThanOrEqual, + "regex": CookiesMatchConditionParameters_Operator_RegEx, +} + type CookiesMatchConditionParameters_Operator_STATUS string const ( @@ -28527,15 +29230,39 @@ const ( CookiesMatchConditionParameters_Operator_STATUS_RegEx = CookiesMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to CookiesMatchConditionParameters_Operator_STATUS +var cookiesMatchConditionParameters_Operator_STATUS_Values = map[string]CookiesMatchConditionParameters_Operator_STATUS{ + "any": CookiesMatchConditionParameters_Operator_STATUS_Any, + "beginswith": CookiesMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": CookiesMatchConditionParameters_Operator_STATUS_Contains, + "endswith": CookiesMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": CookiesMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": CookiesMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": CookiesMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": CookiesMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": CookiesMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": CookiesMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleCookiesConditionParameters"} type CookiesMatchConditionParameters_TypeName string const CookiesMatchConditionParameters_TypeName_DeliveryRuleCookiesConditionParameters = CookiesMatchConditionParameters_TypeName("DeliveryRuleCookiesConditionParameters") +// Mapping from string to CookiesMatchConditionParameters_TypeName +var cookiesMatchConditionParameters_TypeName_Values = map[string]CookiesMatchConditionParameters_TypeName{ + "deliveryrulecookiesconditionparameters": CookiesMatchConditionParameters_TypeName_DeliveryRuleCookiesConditionParameters, +} + type CookiesMatchConditionParameters_TypeName_STATUS string const CookiesMatchConditionParameters_TypeName_STATUS_DeliveryRuleCookiesConditionParameters = CookiesMatchConditionParameters_TypeName_STATUS("DeliveryRuleCookiesConditionParameters") +// Mapping from string to CookiesMatchConditionParameters_TypeName_STATUS +var cookiesMatchConditionParameters_TypeName_STATUS_Values = map[string]CookiesMatchConditionParameters_TypeName_STATUS{ + "deliveryrulecookiesconditionparameters": CookiesMatchConditionParameters_TypeName_STATUS_DeliveryRuleCookiesConditionParameters, +} + // +kubebuilder:validation:Enum={"Append","Delete","Overwrite"} type HeaderActionParameters_HeaderAction string @@ -28545,6 +29272,13 @@ const ( HeaderActionParameters_HeaderAction_Overwrite = HeaderActionParameters_HeaderAction("Overwrite") ) +// Mapping from string to HeaderActionParameters_HeaderAction +var headerActionParameters_HeaderAction_Values = map[string]HeaderActionParameters_HeaderAction{ + "append": HeaderActionParameters_HeaderAction_Append, + "delete": HeaderActionParameters_HeaderAction_Delete, + "overwrite": HeaderActionParameters_HeaderAction_Overwrite, +} + type HeaderActionParameters_HeaderAction_STATUS string const ( @@ -28553,15 +29287,32 @@ const ( HeaderActionParameters_HeaderAction_STATUS_Overwrite = HeaderActionParameters_HeaderAction_STATUS("Overwrite") ) +// Mapping from string to HeaderActionParameters_HeaderAction_STATUS +var headerActionParameters_HeaderAction_STATUS_Values = map[string]HeaderActionParameters_HeaderAction_STATUS{ + "append": HeaderActionParameters_HeaderAction_STATUS_Append, + "delete": HeaderActionParameters_HeaderAction_STATUS_Delete, + "overwrite": HeaderActionParameters_HeaderAction_STATUS_Overwrite, +} + // +kubebuilder:validation:Enum={"DeliveryRuleHeaderActionParameters"} type HeaderActionParameters_TypeName string const HeaderActionParameters_TypeName_DeliveryRuleHeaderActionParameters = HeaderActionParameters_TypeName("DeliveryRuleHeaderActionParameters") +// Mapping from string to HeaderActionParameters_TypeName +var headerActionParameters_TypeName_Values = map[string]HeaderActionParameters_TypeName{ + "deliveryruleheaderactionparameters": HeaderActionParameters_TypeName_DeliveryRuleHeaderActionParameters, +} + type HeaderActionParameters_TypeName_STATUS string const HeaderActionParameters_TypeName_STATUS_DeliveryRuleHeaderActionParameters = HeaderActionParameters_TypeName_STATUS("DeliveryRuleHeaderActionParameters") +// Mapping from string to HeaderActionParameters_TypeName_STATUS +var headerActionParameters_TypeName_STATUS_Values = map[string]HeaderActionParameters_TypeName_STATUS{ + "deliveryruleheaderactionparameters": HeaderActionParameters_TypeName_STATUS_DeliveryRuleHeaderActionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type HostNameMatchConditionParameters_Operator string @@ -28578,6 +29329,20 @@ const ( HostNameMatchConditionParameters_Operator_RegEx = HostNameMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to HostNameMatchConditionParameters_Operator +var hostNameMatchConditionParameters_Operator_Values = map[string]HostNameMatchConditionParameters_Operator{ + "any": HostNameMatchConditionParameters_Operator_Any, + "beginswith": HostNameMatchConditionParameters_Operator_BeginsWith, + "contains": HostNameMatchConditionParameters_Operator_Contains, + "endswith": HostNameMatchConditionParameters_Operator_EndsWith, + "equal": HostNameMatchConditionParameters_Operator_Equal, + "greaterthan": HostNameMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": HostNameMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": HostNameMatchConditionParameters_Operator_LessThan, + "lessthanorequal": HostNameMatchConditionParameters_Operator_LessThanOrEqual, + "regex": HostNameMatchConditionParameters_Operator_RegEx, +} + type HostNameMatchConditionParameters_Operator_STATUS string const ( @@ -28593,33 +29358,77 @@ const ( HostNameMatchConditionParameters_Operator_STATUS_RegEx = HostNameMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to HostNameMatchConditionParameters_Operator_STATUS +var hostNameMatchConditionParameters_Operator_STATUS_Values = map[string]HostNameMatchConditionParameters_Operator_STATUS{ + "any": HostNameMatchConditionParameters_Operator_STATUS_Any, + "beginswith": HostNameMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": HostNameMatchConditionParameters_Operator_STATUS_Contains, + "endswith": HostNameMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": HostNameMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": HostNameMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": HostNameMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": HostNameMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": HostNameMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": HostNameMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleHostNameConditionParameters"} type HostNameMatchConditionParameters_TypeName string const HostNameMatchConditionParameters_TypeName_DeliveryRuleHostNameConditionParameters = HostNameMatchConditionParameters_TypeName("DeliveryRuleHostNameConditionParameters") +// Mapping from string to HostNameMatchConditionParameters_TypeName +var hostNameMatchConditionParameters_TypeName_Values = map[string]HostNameMatchConditionParameters_TypeName{ + "deliveryrulehostnameconditionparameters": HostNameMatchConditionParameters_TypeName_DeliveryRuleHostNameConditionParameters, +} + type HostNameMatchConditionParameters_TypeName_STATUS string const HostNameMatchConditionParameters_TypeName_STATUS_DeliveryRuleHostNameConditionParameters = HostNameMatchConditionParameters_TypeName_STATUS("DeliveryRuleHostNameConditionParameters") +// Mapping from string to HostNameMatchConditionParameters_TypeName_STATUS +var hostNameMatchConditionParameters_TypeName_STATUS_Values = map[string]HostNameMatchConditionParameters_TypeName_STATUS{ + "deliveryrulehostnameconditionparameters": HostNameMatchConditionParameters_TypeName_STATUS_DeliveryRuleHostNameConditionParameters, +} + // +kubebuilder:validation:Enum={"Equal"} type HttpVersionMatchConditionParameters_Operator string const HttpVersionMatchConditionParameters_Operator_Equal = HttpVersionMatchConditionParameters_Operator("Equal") +// Mapping from string to HttpVersionMatchConditionParameters_Operator +var httpVersionMatchConditionParameters_Operator_Values = map[string]HttpVersionMatchConditionParameters_Operator{ + "equal": HttpVersionMatchConditionParameters_Operator_Equal, +} + type HttpVersionMatchConditionParameters_Operator_STATUS string const HttpVersionMatchConditionParameters_Operator_STATUS_Equal = HttpVersionMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to HttpVersionMatchConditionParameters_Operator_STATUS +var httpVersionMatchConditionParameters_Operator_STATUS_Values = map[string]HttpVersionMatchConditionParameters_Operator_STATUS{ + "equal": HttpVersionMatchConditionParameters_Operator_STATUS_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleHttpVersionConditionParameters"} type HttpVersionMatchConditionParameters_TypeName string const HttpVersionMatchConditionParameters_TypeName_DeliveryRuleHttpVersionConditionParameters = HttpVersionMatchConditionParameters_TypeName("DeliveryRuleHttpVersionConditionParameters") +// Mapping from string to HttpVersionMatchConditionParameters_TypeName +var httpVersionMatchConditionParameters_TypeName_Values = map[string]HttpVersionMatchConditionParameters_TypeName{ + "deliveryrulehttpversionconditionparameters": HttpVersionMatchConditionParameters_TypeName_DeliveryRuleHttpVersionConditionParameters, +} + type HttpVersionMatchConditionParameters_TypeName_STATUS string const HttpVersionMatchConditionParameters_TypeName_STATUS_DeliveryRuleHttpVersionConditionParameters = HttpVersionMatchConditionParameters_TypeName_STATUS("DeliveryRuleHttpVersionConditionParameters") +// Mapping from string to HttpVersionMatchConditionParameters_TypeName_STATUS +var httpVersionMatchConditionParameters_TypeName_STATUS_Values = map[string]HttpVersionMatchConditionParameters_TypeName_STATUS{ + "deliveryrulehttpversionconditionparameters": HttpVersionMatchConditionParameters_TypeName_STATUS_DeliveryRuleHttpVersionConditionParameters, +} + // +kubebuilder:validation:Enum={"Desktop","Mobile"} type IsDeviceMatchConditionParameters_MatchValues string @@ -28628,6 +29437,12 @@ const ( IsDeviceMatchConditionParameters_MatchValues_Mobile = IsDeviceMatchConditionParameters_MatchValues("Mobile") ) +// Mapping from string to IsDeviceMatchConditionParameters_MatchValues +var isDeviceMatchConditionParameters_MatchValues_Values = map[string]IsDeviceMatchConditionParameters_MatchValues{ + "desktop": IsDeviceMatchConditionParameters_MatchValues_Desktop, + "mobile": IsDeviceMatchConditionParameters_MatchValues_Mobile, +} + type IsDeviceMatchConditionParameters_MatchValues_STATUS string const ( @@ -28635,24 +29450,50 @@ const ( IsDeviceMatchConditionParameters_MatchValues_STATUS_Mobile = IsDeviceMatchConditionParameters_MatchValues_STATUS("Mobile") ) +// Mapping from string to IsDeviceMatchConditionParameters_MatchValues_STATUS +var isDeviceMatchConditionParameters_MatchValues_STATUS_Values = map[string]IsDeviceMatchConditionParameters_MatchValues_STATUS{ + "desktop": IsDeviceMatchConditionParameters_MatchValues_STATUS_Desktop, + "mobile": IsDeviceMatchConditionParameters_MatchValues_STATUS_Mobile, +} + // +kubebuilder:validation:Enum={"Equal"} type IsDeviceMatchConditionParameters_Operator string const IsDeviceMatchConditionParameters_Operator_Equal = IsDeviceMatchConditionParameters_Operator("Equal") +// Mapping from string to IsDeviceMatchConditionParameters_Operator +var isDeviceMatchConditionParameters_Operator_Values = map[string]IsDeviceMatchConditionParameters_Operator{ + "equal": IsDeviceMatchConditionParameters_Operator_Equal, +} + type IsDeviceMatchConditionParameters_Operator_STATUS string const IsDeviceMatchConditionParameters_Operator_STATUS_Equal = IsDeviceMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to IsDeviceMatchConditionParameters_Operator_STATUS +var isDeviceMatchConditionParameters_Operator_STATUS_Values = map[string]IsDeviceMatchConditionParameters_Operator_STATUS{ + "equal": IsDeviceMatchConditionParameters_Operator_STATUS_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleIsDeviceConditionParameters"} type IsDeviceMatchConditionParameters_TypeName string const IsDeviceMatchConditionParameters_TypeName_DeliveryRuleIsDeviceConditionParameters = IsDeviceMatchConditionParameters_TypeName("DeliveryRuleIsDeviceConditionParameters") +// Mapping from string to IsDeviceMatchConditionParameters_TypeName +var isDeviceMatchConditionParameters_TypeName_Values = map[string]IsDeviceMatchConditionParameters_TypeName{ + "deliveryruleisdeviceconditionparameters": IsDeviceMatchConditionParameters_TypeName_DeliveryRuleIsDeviceConditionParameters, +} + type IsDeviceMatchConditionParameters_TypeName_STATUS string const IsDeviceMatchConditionParameters_TypeName_STATUS_DeliveryRuleIsDeviceConditionParameters = IsDeviceMatchConditionParameters_TypeName_STATUS("DeliveryRuleIsDeviceConditionParameters") +// Mapping from string to IsDeviceMatchConditionParameters_TypeName_STATUS +var isDeviceMatchConditionParameters_TypeName_STATUS_Values = map[string]IsDeviceMatchConditionParameters_TypeName_STATUS{ + "deliveryruleisdeviceconditionparameters": IsDeviceMatchConditionParameters_TypeName_STATUS_DeliveryRuleIsDeviceConditionParameters, +} + // Defines the parameters for the origin group override configuration. type OriginGroupOverride struct { // ForwardingProtocol: Protocol this rule will use when forwarding traffic to backends. @@ -28727,8 +29568,9 @@ func (override *OriginGroupOverride) AssignProperties_From_OriginGroupOverride(s // ForwardingProtocol if source.ForwardingProtocol != nil { - forwardingProtocol := OriginGroupOverride_ForwardingProtocol(*source.ForwardingProtocol) - override.ForwardingProtocol = &forwardingProtocol + forwardingProtocol := *source.ForwardingProtocol + forwardingProtocolTemp := genruntime.ToEnum(forwardingProtocol, originGroupOverride_ForwardingProtocol_Values) + override.ForwardingProtocol = &forwardingProtocolTemp } else { override.ForwardingProtocol = nil } @@ -28861,8 +29703,9 @@ func (override *OriginGroupOverride_STATUS) AssignProperties_From_OriginGroupOve // ForwardingProtocol if source.ForwardingProtocol != nil { - forwardingProtocol := OriginGroupOverride_ForwardingProtocol_STATUS(*source.ForwardingProtocol) - override.ForwardingProtocol = &forwardingProtocol + forwardingProtocol := *source.ForwardingProtocol + forwardingProtocolTemp := genruntime.ToEnum(forwardingProtocol, originGroupOverride_ForwardingProtocol_STATUS_Values) + override.ForwardingProtocol = &forwardingProtocolTemp } else { override.ForwardingProtocol = nil } @@ -28924,10 +29767,20 @@ type OriginGroupOverrideActionParameters_TypeName string const OriginGroupOverrideActionParameters_TypeName_DeliveryRuleOriginGroupOverrideActionParameters = OriginGroupOverrideActionParameters_TypeName("DeliveryRuleOriginGroupOverrideActionParameters") +// Mapping from string to OriginGroupOverrideActionParameters_TypeName +var originGroupOverrideActionParameters_TypeName_Values = map[string]OriginGroupOverrideActionParameters_TypeName{ + "deliveryruleorigingroupoverrideactionparameters": OriginGroupOverrideActionParameters_TypeName_DeliveryRuleOriginGroupOverrideActionParameters, +} + type OriginGroupOverrideActionParameters_TypeName_STATUS string const OriginGroupOverrideActionParameters_TypeName_STATUS_DeliveryRuleOriginGroupOverrideActionParameters = OriginGroupOverrideActionParameters_TypeName_STATUS("DeliveryRuleOriginGroupOverrideActionParameters") +// Mapping from string to OriginGroupOverrideActionParameters_TypeName_STATUS +var originGroupOverrideActionParameters_TypeName_STATUS_Values = map[string]OriginGroupOverrideActionParameters_TypeName_STATUS{ + "deliveryruleorigingroupoverrideactionparameters": OriginGroupOverrideActionParameters_TypeName_STATUS_DeliveryRuleOriginGroupOverrideActionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type PostArgsMatchConditionParameters_Operator string @@ -28944,6 +29797,20 @@ const ( PostArgsMatchConditionParameters_Operator_RegEx = PostArgsMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to PostArgsMatchConditionParameters_Operator +var postArgsMatchConditionParameters_Operator_Values = map[string]PostArgsMatchConditionParameters_Operator{ + "any": PostArgsMatchConditionParameters_Operator_Any, + "beginswith": PostArgsMatchConditionParameters_Operator_BeginsWith, + "contains": PostArgsMatchConditionParameters_Operator_Contains, + "endswith": PostArgsMatchConditionParameters_Operator_EndsWith, + "equal": PostArgsMatchConditionParameters_Operator_Equal, + "greaterthan": PostArgsMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": PostArgsMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": PostArgsMatchConditionParameters_Operator_LessThan, + "lessthanorequal": PostArgsMatchConditionParameters_Operator_LessThanOrEqual, + "regex": PostArgsMatchConditionParameters_Operator_RegEx, +} + type PostArgsMatchConditionParameters_Operator_STATUS string const ( @@ -28959,15 +29826,39 @@ const ( PostArgsMatchConditionParameters_Operator_STATUS_RegEx = PostArgsMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to PostArgsMatchConditionParameters_Operator_STATUS +var postArgsMatchConditionParameters_Operator_STATUS_Values = map[string]PostArgsMatchConditionParameters_Operator_STATUS{ + "any": PostArgsMatchConditionParameters_Operator_STATUS_Any, + "beginswith": PostArgsMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": PostArgsMatchConditionParameters_Operator_STATUS_Contains, + "endswith": PostArgsMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": PostArgsMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": PostArgsMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": PostArgsMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": PostArgsMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": PostArgsMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": PostArgsMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRulePostArgsConditionParameters"} type PostArgsMatchConditionParameters_TypeName string const PostArgsMatchConditionParameters_TypeName_DeliveryRulePostArgsConditionParameters = PostArgsMatchConditionParameters_TypeName("DeliveryRulePostArgsConditionParameters") +// Mapping from string to PostArgsMatchConditionParameters_TypeName +var postArgsMatchConditionParameters_TypeName_Values = map[string]PostArgsMatchConditionParameters_TypeName{ + "deliveryrulepostargsconditionparameters": PostArgsMatchConditionParameters_TypeName_DeliveryRulePostArgsConditionParameters, +} + type PostArgsMatchConditionParameters_TypeName_STATUS string const PostArgsMatchConditionParameters_TypeName_STATUS_DeliveryRulePostArgsConditionParameters = PostArgsMatchConditionParameters_TypeName_STATUS("DeliveryRulePostArgsConditionParameters") +// Mapping from string to PostArgsMatchConditionParameters_TypeName_STATUS +var postArgsMatchConditionParameters_TypeName_STATUS_Values = map[string]PostArgsMatchConditionParameters_TypeName_STATUS{ + "deliveryrulepostargsconditionparameters": PostArgsMatchConditionParameters_TypeName_STATUS_DeliveryRulePostArgsConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type QueryStringMatchConditionParameters_Operator string @@ -28984,6 +29875,20 @@ const ( QueryStringMatchConditionParameters_Operator_RegEx = QueryStringMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to QueryStringMatchConditionParameters_Operator +var queryStringMatchConditionParameters_Operator_Values = map[string]QueryStringMatchConditionParameters_Operator{ + "any": QueryStringMatchConditionParameters_Operator_Any, + "beginswith": QueryStringMatchConditionParameters_Operator_BeginsWith, + "contains": QueryStringMatchConditionParameters_Operator_Contains, + "endswith": QueryStringMatchConditionParameters_Operator_EndsWith, + "equal": QueryStringMatchConditionParameters_Operator_Equal, + "greaterthan": QueryStringMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": QueryStringMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": QueryStringMatchConditionParameters_Operator_LessThan, + "lessthanorequal": QueryStringMatchConditionParameters_Operator_LessThanOrEqual, + "regex": QueryStringMatchConditionParameters_Operator_RegEx, +} + type QueryStringMatchConditionParameters_Operator_STATUS string const ( @@ -28999,15 +29904,39 @@ const ( QueryStringMatchConditionParameters_Operator_STATUS_RegEx = QueryStringMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to QueryStringMatchConditionParameters_Operator_STATUS +var queryStringMatchConditionParameters_Operator_STATUS_Values = map[string]QueryStringMatchConditionParameters_Operator_STATUS{ + "any": QueryStringMatchConditionParameters_Operator_STATUS_Any, + "beginswith": QueryStringMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": QueryStringMatchConditionParameters_Operator_STATUS_Contains, + "endswith": QueryStringMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": QueryStringMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": QueryStringMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": QueryStringMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": QueryStringMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": QueryStringMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": QueryStringMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleQueryStringConditionParameters"} type QueryStringMatchConditionParameters_TypeName string const QueryStringMatchConditionParameters_TypeName_DeliveryRuleQueryStringConditionParameters = QueryStringMatchConditionParameters_TypeName("DeliveryRuleQueryStringConditionParameters") +// Mapping from string to QueryStringMatchConditionParameters_TypeName +var queryStringMatchConditionParameters_TypeName_Values = map[string]QueryStringMatchConditionParameters_TypeName{ + "deliveryrulequerystringconditionparameters": QueryStringMatchConditionParameters_TypeName_DeliveryRuleQueryStringConditionParameters, +} + type QueryStringMatchConditionParameters_TypeName_STATUS string const QueryStringMatchConditionParameters_TypeName_STATUS_DeliveryRuleQueryStringConditionParameters = QueryStringMatchConditionParameters_TypeName_STATUS("DeliveryRuleQueryStringConditionParameters") +// Mapping from string to QueryStringMatchConditionParameters_TypeName_STATUS +var queryStringMatchConditionParameters_TypeName_STATUS_Values = map[string]QueryStringMatchConditionParameters_TypeName_STATUS{ + "deliveryrulequerystringconditionparameters": QueryStringMatchConditionParameters_TypeName_STATUS_DeliveryRuleQueryStringConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","GeoMatch","IPMatch"} type RemoteAddressMatchConditionParameters_Operator string @@ -29017,6 +29946,13 @@ const ( RemoteAddressMatchConditionParameters_Operator_IPMatch = RemoteAddressMatchConditionParameters_Operator("IPMatch") ) +// Mapping from string to RemoteAddressMatchConditionParameters_Operator +var remoteAddressMatchConditionParameters_Operator_Values = map[string]RemoteAddressMatchConditionParameters_Operator{ + "any": RemoteAddressMatchConditionParameters_Operator_Any, + "geomatch": RemoteAddressMatchConditionParameters_Operator_GeoMatch, + "ipmatch": RemoteAddressMatchConditionParameters_Operator_IPMatch, +} + type RemoteAddressMatchConditionParameters_Operator_STATUS string const ( @@ -29025,15 +29961,32 @@ const ( RemoteAddressMatchConditionParameters_Operator_STATUS_IPMatch = RemoteAddressMatchConditionParameters_Operator_STATUS("IPMatch") ) +// Mapping from string to RemoteAddressMatchConditionParameters_Operator_STATUS +var remoteAddressMatchConditionParameters_Operator_STATUS_Values = map[string]RemoteAddressMatchConditionParameters_Operator_STATUS{ + "any": RemoteAddressMatchConditionParameters_Operator_STATUS_Any, + "geomatch": RemoteAddressMatchConditionParameters_Operator_STATUS_GeoMatch, + "ipmatch": RemoteAddressMatchConditionParameters_Operator_STATUS_IPMatch, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRemoteAddressConditionParameters"} type RemoteAddressMatchConditionParameters_TypeName string const RemoteAddressMatchConditionParameters_TypeName_DeliveryRuleRemoteAddressConditionParameters = RemoteAddressMatchConditionParameters_TypeName("DeliveryRuleRemoteAddressConditionParameters") +// Mapping from string to RemoteAddressMatchConditionParameters_TypeName +var remoteAddressMatchConditionParameters_TypeName_Values = map[string]RemoteAddressMatchConditionParameters_TypeName{ + "deliveryruleremoteaddressconditionparameters": RemoteAddressMatchConditionParameters_TypeName_DeliveryRuleRemoteAddressConditionParameters, +} + type RemoteAddressMatchConditionParameters_TypeName_STATUS string const RemoteAddressMatchConditionParameters_TypeName_STATUS_DeliveryRuleRemoteAddressConditionParameters = RemoteAddressMatchConditionParameters_TypeName_STATUS("DeliveryRuleRemoteAddressConditionParameters") +// Mapping from string to RemoteAddressMatchConditionParameters_TypeName_STATUS +var remoteAddressMatchConditionParameters_TypeName_STATUS_Values = map[string]RemoteAddressMatchConditionParameters_TypeName_STATUS{ + "deliveryruleremoteaddressconditionparameters": RemoteAddressMatchConditionParameters_TypeName_STATUS_DeliveryRuleRemoteAddressConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type RequestBodyMatchConditionParameters_Operator string @@ -29050,6 +30003,20 @@ const ( RequestBodyMatchConditionParameters_Operator_RegEx = RequestBodyMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to RequestBodyMatchConditionParameters_Operator +var requestBodyMatchConditionParameters_Operator_Values = map[string]RequestBodyMatchConditionParameters_Operator{ + "any": RequestBodyMatchConditionParameters_Operator_Any, + "beginswith": RequestBodyMatchConditionParameters_Operator_BeginsWith, + "contains": RequestBodyMatchConditionParameters_Operator_Contains, + "endswith": RequestBodyMatchConditionParameters_Operator_EndsWith, + "equal": RequestBodyMatchConditionParameters_Operator_Equal, + "greaterthan": RequestBodyMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": RequestBodyMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": RequestBodyMatchConditionParameters_Operator_LessThan, + "lessthanorequal": RequestBodyMatchConditionParameters_Operator_LessThanOrEqual, + "regex": RequestBodyMatchConditionParameters_Operator_RegEx, +} + type RequestBodyMatchConditionParameters_Operator_STATUS string const ( @@ -29065,15 +30032,39 @@ const ( RequestBodyMatchConditionParameters_Operator_STATUS_RegEx = RequestBodyMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to RequestBodyMatchConditionParameters_Operator_STATUS +var requestBodyMatchConditionParameters_Operator_STATUS_Values = map[string]RequestBodyMatchConditionParameters_Operator_STATUS{ + "any": RequestBodyMatchConditionParameters_Operator_STATUS_Any, + "beginswith": RequestBodyMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": RequestBodyMatchConditionParameters_Operator_STATUS_Contains, + "endswith": RequestBodyMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": RequestBodyMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": RequestBodyMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": RequestBodyMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": RequestBodyMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": RequestBodyMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": RequestBodyMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestBodyConditionParameters"} type RequestBodyMatchConditionParameters_TypeName string const RequestBodyMatchConditionParameters_TypeName_DeliveryRuleRequestBodyConditionParameters = RequestBodyMatchConditionParameters_TypeName("DeliveryRuleRequestBodyConditionParameters") +// Mapping from string to RequestBodyMatchConditionParameters_TypeName +var requestBodyMatchConditionParameters_TypeName_Values = map[string]RequestBodyMatchConditionParameters_TypeName{ + "deliveryrulerequestbodyconditionparameters": RequestBodyMatchConditionParameters_TypeName_DeliveryRuleRequestBodyConditionParameters, +} + type RequestBodyMatchConditionParameters_TypeName_STATUS string const RequestBodyMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestBodyConditionParameters = RequestBodyMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestBodyConditionParameters") +// Mapping from string to RequestBodyMatchConditionParameters_TypeName_STATUS +var requestBodyMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestBodyMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequestbodyconditionparameters": RequestBodyMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestBodyConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type RequestHeaderMatchConditionParameters_Operator string @@ -29090,6 +30081,20 @@ const ( RequestHeaderMatchConditionParameters_Operator_RegEx = RequestHeaderMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to RequestHeaderMatchConditionParameters_Operator +var requestHeaderMatchConditionParameters_Operator_Values = map[string]RequestHeaderMatchConditionParameters_Operator{ + "any": RequestHeaderMatchConditionParameters_Operator_Any, + "beginswith": RequestHeaderMatchConditionParameters_Operator_BeginsWith, + "contains": RequestHeaderMatchConditionParameters_Operator_Contains, + "endswith": RequestHeaderMatchConditionParameters_Operator_EndsWith, + "equal": RequestHeaderMatchConditionParameters_Operator_Equal, + "greaterthan": RequestHeaderMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": RequestHeaderMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": RequestHeaderMatchConditionParameters_Operator_LessThan, + "lessthanorequal": RequestHeaderMatchConditionParameters_Operator_LessThanOrEqual, + "regex": RequestHeaderMatchConditionParameters_Operator_RegEx, +} + type RequestHeaderMatchConditionParameters_Operator_STATUS string const ( @@ -29105,15 +30110,39 @@ const ( RequestHeaderMatchConditionParameters_Operator_STATUS_RegEx = RequestHeaderMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to RequestHeaderMatchConditionParameters_Operator_STATUS +var requestHeaderMatchConditionParameters_Operator_STATUS_Values = map[string]RequestHeaderMatchConditionParameters_Operator_STATUS{ + "any": RequestHeaderMatchConditionParameters_Operator_STATUS_Any, + "beginswith": RequestHeaderMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": RequestHeaderMatchConditionParameters_Operator_STATUS_Contains, + "endswith": RequestHeaderMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": RequestHeaderMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": RequestHeaderMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": RequestHeaderMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": RequestHeaderMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": RequestHeaderMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": RequestHeaderMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestHeaderConditionParameters"} type RequestHeaderMatchConditionParameters_TypeName string const RequestHeaderMatchConditionParameters_TypeName_DeliveryRuleRequestHeaderConditionParameters = RequestHeaderMatchConditionParameters_TypeName("DeliveryRuleRequestHeaderConditionParameters") +// Mapping from string to RequestHeaderMatchConditionParameters_TypeName +var requestHeaderMatchConditionParameters_TypeName_Values = map[string]RequestHeaderMatchConditionParameters_TypeName{ + "deliveryrulerequestheaderconditionparameters": RequestHeaderMatchConditionParameters_TypeName_DeliveryRuleRequestHeaderConditionParameters, +} + type RequestHeaderMatchConditionParameters_TypeName_STATUS string const RequestHeaderMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestHeaderConditionParameters = RequestHeaderMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestHeaderConditionParameters") +// Mapping from string to RequestHeaderMatchConditionParameters_TypeName_STATUS +var requestHeaderMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestHeaderMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequestheaderconditionparameters": RequestHeaderMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestHeaderConditionParameters, +} + // +kubebuilder:validation:Enum={"DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE"} type RequestMethodMatchConditionParameters_MatchValues string @@ -29127,6 +30156,17 @@ const ( RequestMethodMatchConditionParameters_MatchValues_TRACE = RequestMethodMatchConditionParameters_MatchValues("TRACE") ) +// Mapping from string to RequestMethodMatchConditionParameters_MatchValues +var requestMethodMatchConditionParameters_MatchValues_Values = map[string]RequestMethodMatchConditionParameters_MatchValues{ + "delete": RequestMethodMatchConditionParameters_MatchValues_DELETE, + "get": RequestMethodMatchConditionParameters_MatchValues_GET, + "head": RequestMethodMatchConditionParameters_MatchValues_HEAD, + "options": RequestMethodMatchConditionParameters_MatchValues_OPTIONS, + "post": RequestMethodMatchConditionParameters_MatchValues_POST, + "put": RequestMethodMatchConditionParameters_MatchValues_PUT, + "trace": RequestMethodMatchConditionParameters_MatchValues_TRACE, +} + type RequestMethodMatchConditionParameters_MatchValues_STATUS string const ( @@ -29139,24 +30179,55 @@ const ( RequestMethodMatchConditionParameters_MatchValues_STATUS_TRACE = RequestMethodMatchConditionParameters_MatchValues_STATUS("TRACE") ) +// Mapping from string to RequestMethodMatchConditionParameters_MatchValues_STATUS +var requestMethodMatchConditionParameters_MatchValues_STATUS_Values = map[string]RequestMethodMatchConditionParameters_MatchValues_STATUS{ + "delete": RequestMethodMatchConditionParameters_MatchValues_STATUS_DELETE, + "get": RequestMethodMatchConditionParameters_MatchValues_STATUS_GET, + "head": RequestMethodMatchConditionParameters_MatchValues_STATUS_HEAD, + "options": RequestMethodMatchConditionParameters_MatchValues_STATUS_OPTIONS, + "post": RequestMethodMatchConditionParameters_MatchValues_STATUS_POST, + "put": RequestMethodMatchConditionParameters_MatchValues_STATUS_PUT, + "trace": RequestMethodMatchConditionParameters_MatchValues_STATUS_TRACE, +} + // +kubebuilder:validation:Enum={"Equal"} type RequestMethodMatchConditionParameters_Operator string const RequestMethodMatchConditionParameters_Operator_Equal = RequestMethodMatchConditionParameters_Operator("Equal") +// Mapping from string to RequestMethodMatchConditionParameters_Operator +var requestMethodMatchConditionParameters_Operator_Values = map[string]RequestMethodMatchConditionParameters_Operator{ + "equal": RequestMethodMatchConditionParameters_Operator_Equal, +} + type RequestMethodMatchConditionParameters_Operator_STATUS string const RequestMethodMatchConditionParameters_Operator_STATUS_Equal = RequestMethodMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to RequestMethodMatchConditionParameters_Operator_STATUS +var requestMethodMatchConditionParameters_Operator_STATUS_Values = map[string]RequestMethodMatchConditionParameters_Operator_STATUS{ + "equal": RequestMethodMatchConditionParameters_Operator_STATUS_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestMethodConditionParameters"} type RequestMethodMatchConditionParameters_TypeName string const RequestMethodMatchConditionParameters_TypeName_DeliveryRuleRequestMethodConditionParameters = RequestMethodMatchConditionParameters_TypeName("DeliveryRuleRequestMethodConditionParameters") +// Mapping from string to RequestMethodMatchConditionParameters_TypeName +var requestMethodMatchConditionParameters_TypeName_Values = map[string]RequestMethodMatchConditionParameters_TypeName{ + "deliveryrulerequestmethodconditionparameters": RequestMethodMatchConditionParameters_TypeName_DeliveryRuleRequestMethodConditionParameters, +} + type RequestMethodMatchConditionParameters_TypeName_STATUS string const RequestMethodMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestMethodConditionParameters = RequestMethodMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestMethodConditionParameters") +// Mapping from string to RequestMethodMatchConditionParameters_TypeName_STATUS +var requestMethodMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestMethodMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequestmethodconditionparameters": RequestMethodMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestMethodConditionParameters, +} + // +kubebuilder:validation:Enum={"HTTP","HTTPS"} type RequestSchemeMatchConditionParameters_MatchValues string @@ -29165,6 +30236,12 @@ const ( RequestSchemeMatchConditionParameters_MatchValues_HTTPS = RequestSchemeMatchConditionParameters_MatchValues("HTTPS") ) +// Mapping from string to RequestSchemeMatchConditionParameters_MatchValues +var requestSchemeMatchConditionParameters_MatchValues_Values = map[string]RequestSchemeMatchConditionParameters_MatchValues{ + "http": RequestSchemeMatchConditionParameters_MatchValues_HTTP, + "https": RequestSchemeMatchConditionParameters_MatchValues_HTTPS, +} + type RequestSchemeMatchConditionParameters_MatchValues_STATUS string const ( @@ -29172,24 +30249,50 @@ const ( RequestSchemeMatchConditionParameters_MatchValues_STATUS_HTTPS = RequestSchemeMatchConditionParameters_MatchValues_STATUS("HTTPS") ) +// Mapping from string to RequestSchemeMatchConditionParameters_MatchValues_STATUS +var requestSchemeMatchConditionParameters_MatchValues_STATUS_Values = map[string]RequestSchemeMatchConditionParameters_MatchValues_STATUS{ + "http": RequestSchemeMatchConditionParameters_MatchValues_STATUS_HTTP, + "https": RequestSchemeMatchConditionParameters_MatchValues_STATUS_HTTPS, +} + // +kubebuilder:validation:Enum={"Equal"} type RequestSchemeMatchConditionParameters_Operator string const RequestSchemeMatchConditionParameters_Operator_Equal = RequestSchemeMatchConditionParameters_Operator("Equal") +// Mapping from string to RequestSchemeMatchConditionParameters_Operator +var requestSchemeMatchConditionParameters_Operator_Values = map[string]RequestSchemeMatchConditionParameters_Operator{ + "equal": RequestSchemeMatchConditionParameters_Operator_Equal, +} + type RequestSchemeMatchConditionParameters_Operator_STATUS string const RequestSchemeMatchConditionParameters_Operator_STATUS_Equal = RequestSchemeMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to RequestSchemeMatchConditionParameters_Operator_STATUS +var requestSchemeMatchConditionParameters_Operator_STATUS_Values = map[string]RequestSchemeMatchConditionParameters_Operator_STATUS{ + "equal": RequestSchemeMatchConditionParameters_Operator_STATUS_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestSchemeConditionParameters"} type RequestSchemeMatchConditionParameters_TypeName string const RequestSchemeMatchConditionParameters_TypeName_DeliveryRuleRequestSchemeConditionParameters = RequestSchemeMatchConditionParameters_TypeName("DeliveryRuleRequestSchemeConditionParameters") +// Mapping from string to RequestSchemeMatchConditionParameters_TypeName +var requestSchemeMatchConditionParameters_TypeName_Values = map[string]RequestSchemeMatchConditionParameters_TypeName{ + "deliveryrulerequestschemeconditionparameters": RequestSchemeMatchConditionParameters_TypeName_DeliveryRuleRequestSchemeConditionParameters, +} + type RequestSchemeMatchConditionParameters_TypeName_STATUS string const RequestSchemeMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestSchemeConditionParameters = RequestSchemeMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestSchemeConditionParameters") +// Mapping from string to RequestSchemeMatchConditionParameters_TypeName_STATUS +var requestSchemeMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestSchemeMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequestschemeconditionparameters": RequestSchemeMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestSchemeConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type RequestUriMatchConditionParameters_Operator string @@ -29206,6 +30309,20 @@ const ( RequestUriMatchConditionParameters_Operator_RegEx = RequestUriMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to RequestUriMatchConditionParameters_Operator +var requestUriMatchConditionParameters_Operator_Values = map[string]RequestUriMatchConditionParameters_Operator{ + "any": RequestUriMatchConditionParameters_Operator_Any, + "beginswith": RequestUriMatchConditionParameters_Operator_BeginsWith, + "contains": RequestUriMatchConditionParameters_Operator_Contains, + "endswith": RequestUriMatchConditionParameters_Operator_EndsWith, + "equal": RequestUriMatchConditionParameters_Operator_Equal, + "greaterthan": RequestUriMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": RequestUriMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": RequestUriMatchConditionParameters_Operator_LessThan, + "lessthanorequal": RequestUriMatchConditionParameters_Operator_LessThanOrEqual, + "regex": RequestUriMatchConditionParameters_Operator_RegEx, +} + type RequestUriMatchConditionParameters_Operator_STATUS string const ( @@ -29221,24 +30338,58 @@ const ( RequestUriMatchConditionParameters_Operator_STATUS_RegEx = RequestUriMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to RequestUriMatchConditionParameters_Operator_STATUS +var requestUriMatchConditionParameters_Operator_STATUS_Values = map[string]RequestUriMatchConditionParameters_Operator_STATUS{ + "any": RequestUriMatchConditionParameters_Operator_STATUS_Any, + "beginswith": RequestUriMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": RequestUriMatchConditionParameters_Operator_STATUS_Contains, + "endswith": RequestUriMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": RequestUriMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": RequestUriMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": RequestUriMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": RequestUriMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": RequestUriMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": RequestUriMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestUriConditionParameters"} type RequestUriMatchConditionParameters_TypeName string const RequestUriMatchConditionParameters_TypeName_DeliveryRuleRequestUriConditionParameters = RequestUriMatchConditionParameters_TypeName("DeliveryRuleRequestUriConditionParameters") +// Mapping from string to RequestUriMatchConditionParameters_TypeName +var requestUriMatchConditionParameters_TypeName_Values = map[string]RequestUriMatchConditionParameters_TypeName{ + "deliveryrulerequesturiconditionparameters": RequestUriMatchConditionParameters_TypeName_DeliveryRuleRequestUriConditionParameters, +} + type RequestUriMatchConditionParameters_TypeName_STATUS string const RequestUriMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestUriConditionParameters = RequestUriMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestUriConditionParameters") +// Mapping from string to RequestUriMatchConditionParameters_TypeName_STATUS +var requestUriMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestUriMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequesturiconditionparameters": RequestUriMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestUriConditionParameters, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRouteConfigurationOverrideActionParameters"} type RouteConfigurationOverrideActionParameters_TypeName string const RouteConfigurationOverrideActionParameters_TypeName_DeliveryRuleRouteConfigurationOverrideActionParameters = RouteConfigurationOverrideActionParameters_TypeName("DeliveryRuleRouteConfigurationOverrideActionParameters") +// Mapping from string to RouteConfigurationOverrideActionParameters_TypeName +var routeConfigurationOverrideActionParameters_TypeName_Values = map[string]RouteConfigurationOverrideActionParameters_TypeName{ + "deliveryrulerouteconfigurationoverrideactionparameters": RouteConfigurationOverrideActionParameters_TypeName_DeliveryRuleRouteConfigurationOverrideActionParameters, +} + type RouteConfigurationOverrideActionParameters_TypeName_STATUS string const RouteConfigurationOverrideActionParameters_TypeName_STATUS_DeliveryRuleRouteConfigurationOverrideActionParameters = RouteConfigurationOverrideActionParameters_TypeName_STATUS("DeliveryRuleRouteConfigurationOverrideActionParameters") +// Mapping from string to RouteConfigurationOverrideActionParameters_TypeName_STATUS +var routeConfigurationOverrideActionParameters_TypeName_STATUS_Values = map[string]RouteConfigurationOverrideActionParameters_TypeName_STATUS{ + "deliveryrulerouteconfigurationoverrideactionparameters": RouteConfigurationOverrideActionParameters_TypeName_STATUS_DeliveryRuleRouteConfigurationOverrideActionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type ServerPortMatchConditionParameters_Operator string @@ -29255,6 +30406,20 @@ const ( ServerPortMatchConditionParameters_Operator_RegEx = ServerPortMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to ServerPortMatchConditionParameters_Operator +var serverPortMatchConditionParameters_Operator_Values = map[string]ServerPortMatchConditionParameters_Operator{ + "any": ServerPortMatchConditionParameters_Operator_Any, + "beginswith": ServerPortMatchConditionParameters_Operator_BeginsWith, + "contains": ServerPortMatchConditionParameters_Operator_Contains, + "endswith": ServerPortMatchConditionParameters_Operator_EndsWith, + "equal": ServerPortMatchConditionParameters_Operator_Equal, + "greaterthan": ServerPortMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": ServerPortMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": ServerPortMatchConditionParameters_Operator_LessThan, + "lessthanorequal": ServerPortMatchConditionParameters_Operator_LessThanOrEqual, + "regex": ServerPortMatchConditionParameters_Operator_RegEx, +} + type ServerPortMatchConditionParameters_Operator_STATUS string const ( @@ -29270,15 +30435,39 @@ const ( ServerPortMatchConditionParameters_Operator_STATUS_RegEx = ServerPortMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to ServerPortMatchConditionParameters_Operator_STATUS +var serverPortMatchConditionParameters_Operator_STATUS_Values = map[string]ServerPortMatchConditionParameters_Operator_STATUS{ + "any": ServerPortMatchConditionParameters_Operator_STATUS_Any, + "beginswith": ServerPortMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": ServerPortMatchConditionParameters_Operator_STATUS_Contains, + "endswith": ServerPortMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": ServerPortMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": ServerPortMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": ServerPortMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": ServerPortMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": ServerPortMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": ServerPortMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleServerPortConditionParameters"} type ServerPortMatchConditionParameters_TypeName string const ServerPortMatchConditionParameters_TypeName_DeliveryRuleServerPortConditionParameters = ServerPortMatchConditionParameters_TypeName("DeliveryRuleServerPortConditionParameters") +// Mapping from string to ServerPortMatchConditionParameters_TypeName +var serverPortMatchConditionParameters_TypeName_Values = map[string]ServerPortMatchConditionParameters_TypeName{ + "deliveryruleserverportconditionparameters": ServerPortMatchConditionParameters_TypeName_DeliveryRuleServerPortConditionParameters, +} + type ServerPortMatchConditionParameters_TypeName_STATUS string const ServerPortMatchConditionParameters_TypeName_STATUS_DeliveryRuleServerPortConditionParameters = ServerPortMatchConditionParameters_TypeName_STATUS("DeliveryRuleServerPortConditionParameters") +// Mapping from string to ServerPortMatchConditionParameters_TypeName_STATUS +var serverPortMatchConditionParameters_TypeName_STATUS_Values = map[string]ServerPortMatchConditionParameters_TypeName_STATUS{ + "deliveryruleserverportconditionparameters": ServerPortMatchConditionParameters_TypeName_STATUS_DeliveryRuleServerPortConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","IPMatch"} type SocketAddrMatchConditionParameters_Operator string @@ -29287,6 +30476,12 @@ const ( SocketAddrMatchConditionParameters_Operator_IPMatch = SocketAddrMatchConditionParameters_Operator("IPMatch") ) +// Mapping from string to SocketAddrMatchConditionParameters_Operator +var socketAddrMatchConditionParameters_Operator_Values = map[string]SocketAddrMatchConditionParameters_Operator{ + "any": SocketAddrMatchConditionParameters_Operator_Any, + "ipmatch": SocketAddrMatchConditionParameters_Operator_IPMatch, +} + type SocketAddrMatchConditionParameters_Operator_STATUS string const ( @@ -29294,15 +30489,31 @@ const ( SocketAddrMatchConditionParameters_Operator_STATUS_IPMatch = SocketAddrMatchConditionParameters_Operator_STATUS("IPMatch") ) +// Mapping from string to SocketAddrMatchConditionParameters_Operator_STATUS +var socketAddrMatchConditionParameters_Operator_STATUS_Values = map[string]SocketAddrMatchConditionParameters_Operator_STATUS{ + "any": SocketAddrMatchConditionParameters_Operator_STATUS_Any, + "ipmatch": SocketAddrMatchConditionParameters_Operator_STATUS_IPMatch, +} + // +kubebuilder:validation:Enum={"DeliveryRuleSocketAddrConditionParameters"} type SocketAddrMatchConditionParameters_TypeName string const SocketAddrMatchConditionParameters_TypeName_DeliveryRuleSocketAddrConditionParameters = SocketAddrMatchConditionParameters_TypeName("DeliveryRuleSocketAddrConditionParameters") +// Mapping from string to SocketAddrMatchConditionParameters_TypeName +var socketAddrMatchConditionParameters_TypeName_Values = map[string]SocketAddrMatchConditionParameters_TypeName{ + "deliveryrulesocketaddrconditionparameters": SocketAddrMatchConditionParameters_TypeName_DeliveryRuleSocketAddrConditionParameters, +} + type SocketAddrMatchConditionParameters_TypeName_STATUS string const SocketAddrMatchConditionParameters_TypeName_STATUS_DeliveryRuleSocketAddrConditionParameters = SocketAddrMatchConditionParameters_TypeName_STATUS("DeliveryRuleSocketAddrConditionParameters") +// Mapping from string to SocketAddrMatchConditionParameters_TypeName_STATUS +var socketAddrMatchConditionParameters_TypeName_STATUS_Values = map[string]SocketAddrMatchConditionParameters_TypeName_STATUS{ + "deliveryrulesocketaddrconditionparameters": SocketAddrMatchConditionParameters_TypeName_STATUS_DeliveryRuleSocketAddrConditionParameters, +} + // The protocol of an established TLS connection. // +kubebuilder:validation:Enum={"TLSv1","TLSv1.1","TLSv1.2"} type SslProtocol string @@ -29313,6 +30524,13 @@ const ( SslProtocol_TLSv12 = SslProtocol("TLSv1.2") ) +// Mapping from string to SslProtocol +var sslProtocol_Values = map[string]SslProtocol{ + "tlsv1": SslProtocol_TLSv1, + "tlsv1.1": SslProtocol_TLSv11, + "tlsv1.2": SslProtocol_TLSv12, +} + // The protocol of an established TLS connection. type SslProtocol_STATUS string @@ -29322,24 +30540,51 @@ const ( SslProtocol_STATUS_TLSv12 = SslProtocol_STATUS("TLSv1.2") ) +// Mapping from string to SslProtocol_STATUS +var sslProtocol_STATUS_Values = map[string]SslProtocol_STATUS{ + "tlsv1": SslProtocol_STATUS_TLSv1, + "tlsv1.1": SslProtocol_STATUS_TLSv11, + "tlsv1.2": SslProtocol_STATUS_TLSv12, +} + // +kubebuilder:validation:Enum={"Equal"} type SslProtocolMatchConditionParameters_Operator string const SslProtocolMatchConditionParameters_Operator_Equal = SslProtocolMatchConditionParameters_Operator("Equal") +// Mapping from string to SslProtocolMatchConditionParameters_Operator +var sslProtocolMatchConditionParameters_Operator_Values = map[string]SslProtocolMatchConditionParameters_Operator{ + "equal": SslProtocolMatchConditionParameters_Operator_Equal, +} + type SslProtocolMatchConditionParameters_Operator_STATUS string const SslProtocolMatchConditionParameters_Operator_STATUS_Equal = SslProtocolMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to SslProtocolMatchConditionParameters_Operator_STATUS +var sslProtocolMatchConditionParameters_Operator_STATUS_Values = map[string]SslProtocolMatchConditionParameters_Operator_STATUS{ + "equal": SslProtocolMatchConditionParameters_Operator_STATUS_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleSslProtocolConditionParameters"} type SslProtocolMatchConditionParameters_TypeName string const SslProtocolMatchConditionParameters_TypeName_DeliveryRuleSslProtocolConditionParameters = SslProtocolMatchConditionParameters_TypeName("DeliveryRuleSslProtocolConditionParameters") +// Mapping from string to SslProtocolMatchConditionParameters_TypeName +var sslProtocolMatchConditionParameters_TypeName_Values = map[string]SslProtocolMatchConditionParameters_TypeName{ + "deliveryrulesslprotocolconditionparameters": SslProtocolMatchConditionParameters_TypeName_DeliveryRuleSslProtocolConditionParameters, +} + type SslProtocolMatchConditionParameters_TypeName_STATUS string const SslProtocolMatchConditionParameters_TypeName_STATUS_DeliveryRuleSslProtocolConditionParameters = SslProtocolMatchConditionParameters_TypeName_STATUS("DeliveryRuleSslProtocolConditionParameters") +// Mapping from string to SslProtocolMatchConditionParameters_TypeName_STATUS +var sslProtocolMatchConditionParameters_TypeName_STATUS_Values = map[string]SslProtocolMatchConditionParameters_TypeName_STATUS{ + "deliveryrulesslprotocolconditionparameters": SslProtocolMatchConditionParameters_TypeName_STATUS_DeliveryRuleSslProtocolConditionParameters, +} + // Describes what transforms are applied before matching // +kubebuilder:validation:Enum={"Lowercase","RemoveNulls","Trim","Uppercase","UrlDecode","UrlEncode"} type Transform string @@ -29353,6 +30598,16 @@ const ( Transform_UrlEncode = Transform("UrlEncode") ) +// Mapping from string to Transform +var transform_Values = map[string]Transform{ + "lowercase": Transform_Lowercase, + "removenulls": Transform_RemoveNulls, + "trim": Transform_Trim, + "uppercase": Transform_Uppercase, + "urldecode": Transform_UrlDecode, + "urlencode": Transform_UrlEncode, +} + // Describes what transforms are applied before matching type Transform_STATUS string @@ -29365,6 +30620,16 @@ const ( Transform_STATUS_UrlEncode = Transform_STATUS("UrlEncode") ) +// Mapping from string to Transform_STATUS +var transform_STATUS_Values = map[string]Transform_STATUS{ + "lowercase": Transform_STATUS_Lowercase, + "removenulls": Transform_STATUS_RemoveNulls, + "trim": Transform_STATUS_Trim, + "uppercase": Transform_STATUS_Uppercase, + "urldecode": Transform_STATUS_UrlDecode, + "urlencode": Transform_STATUS_UrlEncode, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type UrlFileExtensionMatchConditionParameters_Operator string @@ -29381,6 +30646,20 @@ const ( UrlFileExtensionMatchConditionParameters_Operator_RegEx = UrlFileExtensionMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to UrlFileExtensionMatchConditionParameters_Operator +var urlFileExtensionMatchConditionParameters_Operator_Values = map[string]UrlFileExtensionMatchConditionParameters_Operator{ + "any": UrlFileExtensionMatchConditionParameters_Operator_Any, + "beginswith": UrlFileExtensionMatchConditionParameters_Operator_BeginsWith, + "contains": UrlFileExtensionMatchConditionParameters_Operator_Contains, + "endswith": UrlFileExtensionMatchConditionParameters_Operator_EndsWith, + "equal": UrlFileExtensionMatchConditionParameters_Operator_Equal, + "greaterthan": UrlFileExtensionMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": UrlFileExtensionMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": UrlFileExtensionMatchConditionParameters_Operator_LessThan, + "lessthanorequal": UrlFileExtensionMatchConditionParameters_Operator_LessThanOrEqual, + "regex": UrlFileExtensionMatchConditionParameters_Operator_RegEx, +} + type UrlFileExtensionMatchConditionParameters_Operator_STATUS string const ( @@ -29396,15 +30675,39 @@ const ( UrlFileExtensionMatchConditionParameters_Operator_STATUS_RegEx = UrlFileExtensionMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to UrlFileExtensionMatchConditionParameters_Operator_STATUS +var urlFileExtensionMatchConditionParameters_Operator_STATUS_Values = map[string]UrlFileExtensionMatchConditionParameters_Operator_STATUS{ + "any": UrlFileExtensionMatchConditionParameters_Operator_STATUS_Any, + "beginswith": UrlFileExtensionMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": UrlFileExtensionMatchConditionParameters_Operator_STATUS_Contains, + "endswith": UrlFileExtensionMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": UrlFileExtensionMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": UrlFileExtensionMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": UrlFileExtensionMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": UrlFileExtensionMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": UrlFileExtensionMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": UrlFileExtensionMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlFileExtensionMatchConditionParameters"} type UrlFileExtensionMatchConditionParameters_TypeName string const UrlFileExtensionMatchConditionParameters_TypeName_DeliveryRuleUrlFileExtensionMatchConditionParameters = UrlFileExtensionMatchConditionParameters_TypeName("DeliveryRuleUrlFileExtensionMatchConditionParameters") +// Mapping from string to UrlFileExtensionMatchConditionParameters_TypeName +var urlFileExtensionMatchConditionParameters_TypeName_Values = map[string]UrlFileExtensionMatchConditionParameters_TypeName{ + "deliveryruleurlfileextensionmatchconditionparameters": UrlFileExtensionMatchConditionParameters_TypeName_DeliveryRuleUrlFileExtensionMatchConditionParameters, +} + type UrlFileExtensionMatchConditionParameters_TypeName_STATUS string const UrlFileExtensionMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlFileExtensionMatchConditionParameters = UrlFileExtensionMatchConditionParameters_TypeName_STATUS("DeliveryRuleUrlFileExtensionMatchConditionParameters") +// Mapping from string to UrlFileExtensionMatchConditionParameters_TypeName_STATUS +var urlFileExtensionMatchConditionParameters_TypeName_STATUS_Values = map[string]UrlFileExtensionMatchConditionParameters_TypeName_STATUS{ + "deliveryruleurlfileextensionmatchconditionparameters": UrlFileExtensionMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlFileExtensionMatchConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type UrlFileNameMatchConditionParameters_Operator string @@ -29421,6 +30724,20 @@ const ( UrlFileNameMatchConditionParameters_Operator_RegEx = UrlFileNameMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to UrlFileNameMatchConditionParameters_Operator +var urlFileNameMatchConditionParameters_Operator_Values = map[string]UrlFileNameMatchConditionParameters_Operator{ + "any": UrlFileNameMatchConditionParameters_Operator_Any, + "beginswith": UrlFileNameMatchConditionParameters_Operator_BeginsWith, + "contains": UrlFileNameMatchConditionParameters_Operator_Contains, + "endswith": UrlFileNameMatchConditionParameters_Operator_EndsWith, + "equal": UrlFileNameMatchConditionParameters_Operator_Equal, + "greaterthan": UrlFileNameMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": UrlFileNameMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": UrlFileNameMatchConditionParameters_Operator_LessThan, + "lessthanorequal": UrlFileNameMatchConditionParameters_Operator_LessThanOrEqual, + "regex": UrlFileNameMatchConditionParameters_Operator_RegEx, +} + type UrlFileNameMatchConditionParameters_Operator_STATUS string const ( @@ -29436,15 +30753,39 @@ const ( UrlFileNameMatchConditionParameters_Operator_STATUS_RegEx = UrlFileNameMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to UrlFileNameMatchConditionParameters_Operator_STATUS +var urlFileNameMatchConditionParameters_Operator_STATUS_Values = map[string]UrlFileNameMatchConditionParameters_Operator_STATUS{ + "any": UrlFileNameMatchConditionParameters_Operator_STATUS_Any, + "beginswith": UrlFileNameMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": UrlFileNameMatchConditionParameters_Operator_STATUS_Contains, + "endswith": UrlFileNameMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": UrlFileNameMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": UrlFileNameMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": UrlFileNameMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": UrlFileNameMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": UrlFileNameMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": UrlFileNameMatchConditionParameters_Operator_STATUS_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlFilenameConditionParameters"} type UrlFileNameMatchConditionParameters_TypeName string const UrlFileNameMatchConditionParameters_TypeName_DeliveryRuleUrlFilenameConditionParameters = UrlFileNameMatchConditionParameters_TypeName("DeliveryRuleUrlFilenameConditionParameters") +// Mapping from string to UrlFileNameMatchConditionParameters_TypeName +var urlFileNameMatchConditionParameters_TypeName_Values = map[string]UrlFileNameMatchConditionParameters_TypeName{ + "deliveryruleurlfilenameconditionparameters": UrlFileNameMatchConditionParameters_TypeName_DeliveryRuleUrlFilenameConditionParameters, +} + type UrlFileNameMatchConditionParameters_TypeName_STATUS string const UrlFileNameMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlFilenameConditionParameters = UrlFileNameMatchConditionParameters_TypeName_STATUS("DeliveryRuleUrlFilenameConditionParameters") +// Mapping from string to UrlFileNameMatchConditionParameters_TypeName_STATUS +var urlFileNameMatchConditionParameters_TypeName_STATUS_Values = map[string]UrlFileNameMatchConditionParameters_TypeName_STATUS{ + "deliveryruleurlfilenameconditionparameters": UrlFileNameMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlFilenameConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx","Wildcard"} type UrlPathMatchConditionParameters_Operator string @@ -29462,6 +30803,21 @@ const ( UrlPathMatchConditionParameters_Operator_Wildcard = UrlPathMatchConditionParameters_Operator("Wildcard") ) +// Mapping from string to UrlPathMatchConditionParameters_Operator +var urlPathMatchConditionParameters_Operator_Values = map[string]UrlPathMatchConditionParameters_Operator{ + "any": UrlPathMatchConditionParameters_Operator_Any, + "beginswith": UrlPathMatchConditionParameters_Operator_BeginsWith, + "contains": UrlPathMatchConditionParameters_Operator_Contains, + "endswith": UrlPathMatchConditionParameters_Operator_EndsWith, + "equal": UrlPathMatchConditionParameters_Operator_Equal, + "greaterthan": UrlPathMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": UrlPathMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": UrlPathMatchConditionParameters_Operator_LessThan, + "lessthanorequal": UrlPathMatchConditionParameters_Operator_LessThanOrEqual, + "regex": UrlPathMatchConditionParameters_Operator_RegEx, + "wildcard": UrlPathMatchConditionParameters_Operator_Wildcard, +} + type UrlPathMatchConditionParameters_Operator_STATUS string const ( @@ -29478,15 +30834,40 @@ const ( UrlPathMatchConditionParameters_Operator_STATUS_Wildcard = UrlPathMatchConditionParameters_Operator_STATUS("Wildcard") ) +// Mapping from string to UrlPathMatchConditionParameters_Operator_STATUS +var urlPathMatchConditionParameters_Operator_STATUS_Values = map[string]UrlPathMatchConditionParameters_Operator_STATUS{ + "any": UrlPathMatchConditionParameters_Operator_STATUS_Any, + "beginswith": UrlPathMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": UrlPathMatchConditionParameters_Operator_STATUS_Contains, + "endswith": UrlPathMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": UrlPathMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": UrlPathMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": UrlPathMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": UrlPathMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": UrlPathMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": UrlPathMatchConditionParameters_Operator_STATUS_RegEx, + "wildcard": UrlPathMatchConditionParameters_Operator_STATUS_Wildcard, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlPathMatchConditionParameters"} type UrlPathMatchConditionParameters_TypeName string const UrlPathMatchConditionParameters_TypeName_DeliveryRuleUrlPathMatchConditionParameters = UrlPathMatchConditionParameters_TypeName("DeliveryRuleUrlPathMatchConditionParameters") +// Mapping from string to UrlPathMatchConditionParameters_TypeName +var urlPathMatchConditionParameters_TypeName_Values = map[string]UrlPathMatchConditionParameters_TypeName{ + "deliveryruleurlpathmatchconditionparameters": UrlPathMatchConditionParameters_TypeName_DeliveryRuleUrlPathMatchConditionParameters, +} + type UrlPathMatchConditionParameters_TypeName_STATUS string const UrlPathMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlPathMatchConditionParameters = UrlPathMatchConditionParameters_TypeName_STATUS("DeliveryRuleUrlPathMatchConditionParameters") +// Mapping from string to UrlPathMatchConditionParameters_TypeName_STATUS +var urlPathMatchConditionParameters_TypeName_STATUS_Values = map[string]UrlPathMatchConditionParameters_TypeName_STATUS{ + "deliveryruleurlpathmatchconditionparameters": UrlPathMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlPathMatchConditionParameters, +} + // +kubebuilder:validation:Enum={"Http","Https","MatchRequest"} type UrlRedirectActionParameters_DestinationProtocol string @@ -29496,6 +30877,13 @@ const ( UrlRedirectActionParameters_DestinationProtocol_MatchRequest = UrlRedirectActionParameters_DestinationProtocol("MatchRequest") ) +// Mapping from string to UrlRedirectActionParameters_DestinationProtocol +var urlRedirectActionParameters_DestinationProtocol_Values = map[string]UrlRedirectActionParameters_DestinationProtocol{ + "http": UrlRedirectActionParameters_DestinationProtocol_Http, + "https": UrlRedirectActionParameters_DestinationProtocol_Https, + "matchrequest": UrlRedirectActionParameters_DestinationProtocol_MatchRequest, +} + type UrlRedirectActionParameters_DestinationProtocol_STATUS string const ( @@ -29504,6 +30892,13 @@ const ( UrlRedirectActionParameters_DestinationProtocol_STATUS_MatchRequest = UrlRedirectActionParameters_DestinationProtocol_STATUS("MatchRequest") ) +// Mapping from string to UrlRedirectActionParameters_DestinationProtocol_STATUS +var urlRedirectActionParameters_DestinationProtocol_STATUS_Values = map[string]UrlRedirectActionParameters_DestinationProtocol_STATUS{ + "http": UrlRedirectActionParameters_DestinationProtocol_STATUS_Http, + "https": UrlRedirectActionParameters_DestinationProtocol_STATUS_Https, + "matchrequest": UrlRedirectActionParameters_DestinationProtocol_STATUS_MatchRequest, +} + // +kubebuilder:validation:Enum={"Found","Moved","PermanentRedirect","TemporaryRedirect"} type UrlRedirectActionParameters_RedirectType string @@ -29514,6 +30909,14 @@ const ( UrlRedirectActionParameters_RedirectType_TemporaryRedirect = UrlRedirectActionParameters_RedirectType("TemporaryRedirect") ) +// Mapping from string to UrlRedirectActionParameters_RedirectType +var urlRedirectActionParameters_RedirectType_Values = map[string]UrlRedirectActionParameters_RedirectType{ + "found": UrlRedirectActionParameters_RedirectType_Found, + "moved": UrlRedirectActionParameters_RedirectType_Moved, + "permanentredirect": UrlRedirectActionParameters_RedirectType_PermanentRedirect, + "temporaryredirect": UrlRedirectActionParameters_RedirectType_TemporaryRedirect, +} + type UrlRedirectActionParameters_RedirectType_STATUS string const ( @@ -29523,42 +30926,90 @@ const ( UrlRedirectActionParameters_RedirectType_STATUS_TemporaryRedirect = UrlRedirectActionParameters_RedirectType_STATUS("TemporaryRedirect") ) +// Mapping from string to UrlRedirectActionParameters_RedirectType_STATUS +var urlRedirectActionParameters_RedirectType_STATUS_Values = map[string]UrlRedirectActionParameters_RedirectType_STATUS{ + "found": UrlRedirectActionParameters_RedirectType_STATUS_Found, + "moved": UrlRedirectActionParameters_RedirectType_STATUS_Moved, + "permanentredirect": UrlRedirectActionParameters_RedirectType_STATUS_PermanentRedirect, + "temporaryredirect": UrlRedirectActionParameters_RedirectType_STATUS_TemporaryRedirect, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlRedirectActionParameters"} type UrlRedirectActionParameters_TypeName string const UrlRedirectActionParameters_TypeName_DeliveryRuleUrlRedirectActionParameters = UrlRedirectActionParameters_TypeName("DeliveryRuleUrlRedirectActionParameters") +// Mapping from string to UrlRedirectActionParameters_TypeName +var urlRedirectActionParameters_TypeName_Values = map[string]UrlRedirectActionParameters_TypeName{ + "deliveryruleurlredirectactionparameters": UrlRedirectActionParameters_TypeName_DeliveryRuleUrlRedirectActionParameters, +} + type UrlRedirectActionParameters_TypeName_STATUS string const UrlRedirectActionParameters_TypeName_STATUS_DeliveryRuleUrlRedirectActionParameters = UrlRedirectActionParameters_TypeName_STATUS("DeliveryRuleUrlRedirectActionParameters") +// Mapping from string to UrlRedirectActionParameters_TypeName_STATUS +var urlRedirectActionParameters_TypeName_STATUS_Values = map[string]UrlRedirectActionParameters_TypeName_STATUS{ + "deliveryruleurlredirectactionparameters": UrlRedirectActionParameters_TypeName_STATUS_DeliveryRuleUrlRedirectActionParameters, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlRewriteActionParameters"} type UrlRewriteActionParameters_TypeName string const UrlRewriteActionParameters_TypeName_DeliveryRuleUrlRewriteActionParameters = UrlRewriteActionParameters_TypeName("DeliveryRuleUrlRewriteActionParameters") +// Mapping from string to UrlRewriteActionParameters_TypeName +var urlRewriteActionParameters_TypeName_Values = map[string]UrlRewriteActionParameters_TypeName{ + "deliveryruleurlrewriteactionparameters": UrlRewriteActionParameters_TypeName_DeliveryRuleUrlRewriteActionParameters, +} + type UrlRewriteActionParameters_TypeName_STATUS string const UrlRewriteActionParameters_TypeName_STATUS_DeliveryRuleUrlRewriteActionParameters = UrlRewriteActionParameters_TypeName_STATUS("DeliveryRuleUrlRewriteActionParameters") +// Mapping from string to UrlRewriteActionParameters_TypeName_STATUS +var urlRewriteActionParameters_TypeName_STATUS_Values = map[string]UrlRewriteActionParameters_TypeName_STATUS{ + "deliveryruleurlrewriteactionparameters": UrlRewriteActionParameters_TypeName_STATUS_DeliveryRuleUrlRewriteActionParameters, +} + // +kubebuilder:validation:Enum={"SHA256"} type UrlSigningActionParameters_Algorithm string const UrlSigningActionParameters_Algorithm_SHA256 = UrlSigningActionParameters_Algorithm("SHA256") +// Mapping from string to UrlSigningActionParameters_Algorithm +var urlSigningActionParameters_Algorithm_Values = map[string]UrlSigningActionParameters_Algorithm{ + "sha256": UrlSigningActionParameters_Algorithm_SHA256, +} + type UrlSigningActionParameters_Algorithm_STATUS string const UrlSigningActionParameters_Algorithm_STATUS_SHA256 = UrlSigningActionParameters_Algorithm_STATUS("SHA256") +// Mapping from string to UrlSigningActionParameters_Algorithm_STATUS +var urlSigningActionParameters_Algorithm_STATUS_Values = map[string]UrlSigningActionParameters_Algorithm_STATUS{ + "sha256": UrlSigningActionParameters_Algorithm_STATUS_SHA256, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlSigningActionParameters"} type UrlSigningActionParameters_TypeName string const UrlSigningActionParameters_TypeName_DeliveryRuleUrlSigningActionParameters = UrlSigningActionParameters_TypeName("DeliveryRuleUrlSigningActionParameters") +// Mapping from string to UrlSigningActionParameters_TypeName +var urlSigningActionParameters_TypeName_Values = map[string]UrlSigningActionParameters_TypeName{ + "deliveryruleurlsigningactionparameters": UrlSigningActionParameters_TypeName_DeliveryRuleUrlSigningActionParameters, +} + type UrlSigningActionParameters_TypeName_STATUS string const UrlSigningActionParameters_TypeName_STATUS_DeliveryRuleUrlSigningActionParameters = UrlSigningActionParameters_TypeName_STATUS("DeliveryRuleUrlSigningActionParameters") +// Mapping from string to UrlSigningActionParameters_TypeName_STATUS +var urlSigningActionParameters_TypeName_STATUS_Values = map[string]UrlSigningActionParameters_TypeName_STATUS{ + "deliveryruleurlsigningactionparameters": UrlSigningActionParameters_TypeName_STATUS_DeliveryRuleUrlSigningActionParameters, +} + // Defines how to identify a parameter for a specific purpose e.g. expires type UrlSigningParamIdentifier struct { // +kubebuilder:validation:Required @@ -29626,8 +31077,9 @@ func (identifier *UrlSigningParamIdentifier) AssignProperties_From_UrlSigningPar // ParamIndicator if source.ParamIndicator != nil { - paramIndicator := UrlSigningParamIdentifier_ParamIndicator(*source.ParamIndicator) - identifier.ParamIndicator = ¶mIndicator + paramIndicator := *source.ParamIndicator + paramIndicatorTemp := genruntime.ToEnum(paramIndicator, urlSigningParamIdentifier_ParamIndicator_Values) + identifier.ParamIndicator = ¶mIndicatorTemp } else { identifier.ParamIndicator = nil } @@ -29728,8 +31180,9 @@ func (identifier *UrlSigningParamIdentifier_STATUS) AssignProperties_From_UrlSig // ParamIndicator if source.ParamIndicator != nil { - paramIndicator := UrlSigningParamIdentifier_ParamIndicator_STATUS(*source.ParamIndicator) - identifier.ParamIndicator = ¶mIndicator + paramIndicator := *source.ParamIndicator + paramIndicatorTemp := genruntime.ToEnum(paramIndicator, urlSigningParamIdentifier_ParamIndicator_STATUS_Values) + identifier.ParamIndicator = ¶mIndicatorTemp } else { identifier.ParamIndicator = nil } @@ -29777,6 +31230,13 @@ const ( CacheConfiguration_CacheBehavior_OverrideIfOriginMissing = CacheConfiguration_CacheBehavior("OverrideIfOriginMissing") ) +// Mapping from string to CacheConfiguration_CacheBehavior +var cacheConfiguration_CacheBehavior_Values = map[string]CacheConfiguration_CacheBehavior{ + "honororigin": CacheConfiguration_CacheBehavior_HonorOrigin, + "overridealways": CacheConfiguration_CacheBehavior_OverrideAlways, + "overrideiforiginmissing": CacheConfiguration_CacheBehavior_OverrideIfOriginMissing, +} + type CacheConfiguration_CacheBehavior_STATUS string const ( @@ -29785,6 +31245,13 @@ const ( CacheConfiguration_CacheBehavior_STATUS_OverrideIfOriginMissing = CacheConfiguration_CacheBehavior_STATUS("OverrideIfOriginMissing") ) +// Mapping from string to CacheConfiguration_CacheBehavior_STATUS +var cacheConfiguration_CacheBehavior_STATUS_Values = map[string]CacheConfiguration_CacheBehavior_STATUS{ + "honororigin": CacheConfiguration_CacheBehavior_STATUS_HonorOrigin, + "overridealways": CacheConfiguration_CacheBehavior_STATUS_OverrideAlways, + "overrideiforiginmissing": CacheConfiguration_CacheBehavior_STATUS_OverrideIfOriginMissing, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type CacheConfiguration_IsCompressionEnabled string @@ -29793,6 +31260,12 @@ const ( CacheConfiguration_IsCompressionEnabled_Enabled = CacheConfiguration_IsCompressionEnabled("Enabled") ) +// Mapping from string to CacheConfiguration_IsCompressionEnabled +var cacheConfiguration_IsCompressionEnabled_Values = map[string]CacheConfiguration_IsCompressionEnabled{ + "disabled": CacheConfiguration_IsCompressionEnabled_Disabled, + "enabled": CacheConfiguration_IsCompressionEnabled_Enabled, +} + type CacheConfiguration_IsCompressionEnabled_STATUS string const ( @@ -29800,6 +31273,12 @@ const ( CacheConfiguration_IsCompressionEnabled_STATUS_Enabled = CacheConfiguration_IsCompressionEnabled_STATUS("Enabled") ) +// Mapping from string to CacheConfiguration_IsCompressionEnabled_STATUS +var cacheConfiguration_IsCompressionEnabled_STATUS_Values = map[string]CacheConfiguration_IsCompressionEnabled_STATUS{ + "disabled": CacheConfiguration_IsCompressionEnabled_STATUS_Disabled, + "enabled": CacheConfiguration_IsCompressionEnabled_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"IgnoreQueryString","IgnoreSpecifiedQueryStrings","IncludeSpecifiedQueryStrings","UseQueryString"} type CacheConfiguration_QueryStringCachingBehavior string @@ -29810,6 +31289,14 @@ const ( CacheConfiguration_QueryStringCachingBehavior_UseQueryString = CacheConfiguration_QueryStringCachingBehavior("UseQueryString") ) +// Mapping from string to CacheConfiguration_QueryStringCachingBehavior +var cacheConfiguration_QueryStringCachingBehavior_Values = map[string]CacheConfiguration_QueryStringCachingBehavior{ + "ignorequerystring": CacheConfiguration_QueryStringCachingBehavior_IgnoreQueryString, + "ignorespecifiedquerystrings": CacheConfiguration_QueryStringCachingBehavior_IgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": CacheConfiguration_QueryStringCachingBehavior_IncludeSpecifiedQueryStrings, + "usequerystring": CacheConfiguration_QueryStringCachingBehavior_UseQueryString, +} + type CacheConfiguration_QueryStringCachingBehavior_STATUS string const ( @@ -29819,6 +31306,14 @@ const ( CacheConfiguration_QueryStringCachingBehavior_STATUS_UseQueryString = CacheConfiguration_QueryStringCachingBehavior_STATUS("UseQueryString") ) +// Mapping from string to CacheConfiguration_QueryStringCachingBehavior_STATUS +var cacheConfiguration_QueryStringCachingBehavior_STATUS_Values = map[string]CacheConfiguration_QueryStringCachingBehavior_STATUS{ + "ignorequerystring": CacheConfiguration_QueryStringCachingBehavior_STATUS_IgnoreQueryString, + "ignorespecifiedquerystrings": CacheConfiguration_QueryStringCachingBehavior_STATUS_IgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": CacheConfiguration_QueryStringCachingBehavior_STATUS_IncludeSpecifiedQueryStrings, + "usequerystring": CacheConfiguration_QueryStringCachingBehavior_STATUS_UseQueryString, +} + // +kubebuilder:validation:Enum={"HttpOnly","HttpsOnly","MatchRequest"} type OriginGroupOverride_ForwardingProtocol string @@ -29828,6 +31323,13 @@ const ( OriginGroupOverride_ForwardingProtocol_MatchRequest = OriginGroupOverride_ForwardingProtocol("MatchRequest") ) +// Mapping from string to OriginGroupOverride_ForwardingProtocol +var originGroupOverride_ForwardingProtocol_Values = map[string]OriginGroupOverride_ForwardingProtocol{ + "httponly": OriginGroupOverride_ForwardingProtocol_HttpOnly, + "httpsonly": OriginGroupOverride_ForwardingProtocol_HttpsOnly, + "matchrequest": OriginGroupOverride_ForwardingProtocol_MatchRequest, +} + type OriginGroupOverride_ForwardingProtocol_STATUS string const ( @@ -29836,6 +31338,13 @@ const ( OriginGroupOverride_ForwardingProtocol_STATUS_MatchRequest = OriginGroupOverride_ForwardingProtocol_STATUS("MatchRequest") ) +// Mapping from string to OriginGroupOverride_ForwardingProtocol_STATUS +var originGroupOverride_ForwardingProtocol_STATUS_Values = map[string]OriginGroupOverride_ForwardingProtocol_STATUS{ + "httponly": OriginGroupOverride_ForwardingProtocol_STATUS_HttpOnly, + "httpsonly": OriginGroupOverride_ForwardingProtocol_STATUS_HttpsOnly, + "matchrequest": OriginGroupOverride_ForwardingProtocol_STATUS_MatchRequest, +} + // +kubebuilder:validation:Enum={"Expires","KeyId","Signature"} type UrlSigningParamIdentifier_ParamIndicator string @@ -29845,6 +31354,13 @@ const ( UrlSigningParamIdentifier_ParamIndicator_Signature = UrlSigningParamIdentifier_ParamIndicator("Signature") ) +// Mapping from string to UrlSigningParamIdentifier_ParamIndicator +var urlSigningParamIdentifier_ParamIndicator_Values = map[string]UrlSigningParamIdentifier_ParamIndicator{ + "expires": UrlSigningParamIdentifier_ParamIndicator_Expires, + "keyid": UrlSigningParamIdentifier_ParamIndicator_KeyId, + "signature": UrlSigningParamIdentifier_ParamIndicator_Signature, +} + type UrlSigningParamIdentifier_ParamIndicator_STATUS string const ( @@ -29853,6 +31369,13 @@ const ( UrlSigningParamIdentifier_ParamIndicator_STATUS_Signature = UrlSigningParamIdentifier_ParamIndicator_STATUS("Signature") ) +// Mapping from string to UrlSigningParamIdentifier_ParamIndicator_STATUS +var urlSigningParamIdentifier_ParamIndicator_STATUS_Values = map[string]UrlSigningParamIdentifier_ParamIndicator_STATUS{ + "expires": UrlSigningParamIdentifier_ParamIndicator_STATUS_Expires, + "keyid": UrlSigningParamIdentifier_ParamIndicator_STATUS_KeyId, + "signature": UrlSigningParamIdentifier_ParamIndicator_STATUS_Signature, +} + func init() { SchemeBuilder.Register(&ProfilesEndpoint{}, &ProfilesEndpointList{}) } diff --git a/v2/api/cdn/v1api20230501/afd_custom_domain_types_gen.go b/v2/api/cdn/v1api20230501/afd_custom_domain_types_gen.go index 757d2463aad..2175378ad7b 100644 --- a/v2/api/cdn/v1api20230501/afd_custom_domain_types_gen.go +++ b/v2/api/cdn/v1api20230501/afd_custom_domain_types_gen.go @@ -1023,16 +1023,18 @@ func (domain *Profiles_CustomDomain_STATUS) AssignProperties_From_Profiles_Custo // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := AFDDomainProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - domain.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, aFDDomainProperties_DeploymentStatus_STATUS_Values) + domain.DeploymentStatus = &deploymentStatusTemp } else { domain.DeploymentStatus = nil } // DomainValidationState if source.DomainValidationState != nil { - domainValidationState := AFDDomainProperties_DomainValidationState_STATUS(*source.DomainValidationState) - domain.DomainValidationState = &domainValidationState + domainValidationState := *source.DomainValidationState + domainValidationStateTemp := genruntime.ToEnum(domainValidationState, aFDDomainProperties_DomainValidationState_STATUS_Values) + domain.DomainValidationState = &domainValidationStateTemp } else { domain.DomainValidationState = nil } @@ -1066,8 +1068,9 @@ func (domain *Profiles_CustomDomain_STATUS) AssignProperties_From_Profiles_Custo // ProvisioningState if source.ProvisioningState != nil { - provisioningState := AFDDomainProperties_ProvisioningState_STATUS(*source.ProvisioningState) - domain.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, aFDDomainProperties_ProvisioningState_STATUS_Values) + domain.ProvisioningState = &provisioningStateTemp } else { domain.ProvisioningState = nil } @@ -1326,16 +1329,18 @@ func (parameters *AFDDomainHttpsParameters) AssignProperties_From_AFDDomainHttps // CertificateType if source.CertificateType != nil { - certificateType := AFDDomainHttpsParameters_CertificateType(*source.CertificateType) - parameters.CertificateType = &certificateType + certificateType := *source.CertificateType + certificateTypeTemp := genruntime.ToEnum(certificateType, aFDDomainHttpsParameters_CertificateType_Values) + parameters.CertificateType = &certificateTypeTemp } else { parameters.CertificateType = nil } // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := AFDDomainHttpsParameters_MinimumTlsVersion(*source.MinimumTlsVersion) - parameters.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, aFDDomainHttpsParameters_MinimumTlsVersion_Values) + parameters.MinimumTlsVersion = &minimumTlsVersionTemp } else { parameters.MinimumTlsVersion = nil } @@ -1493,16 +1498,18 @@ func (parameters *AFDDomainHttpsParameters_STATUS) AssignProperties_From_AFDDoma // CertificateType if source.CertificateType != nil { - certificateType := AFDDomainHttpsParameters_CertificateType_STATUS(*source.CertificateType) - parameters.CertificateType = &certificateType + certificateType := *source.CertificateType + certificateTypeTemp := genruntime.ToEnum(certificateType, aFDDomainHttpsParameters_CertificateType_STATUS_Values) + parameters.CertificateType = &certificateTypeTemp } else { parameters.CertificateType = nil } // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := AFDDomainHttpsParameters_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - parameters.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, aFDDomainHttpsParameters_MinimumTlsVersion_STATUS_Values) + parameters.MinimumTlsVersion = &minimumTlsVersionTemp } else { parameters.MinimumTlsVersion = nil } @@ -1576,6 +1583,14 @@ const ( AFDDomainProperties_DeploymentStatus_STATUS_Succeeded = AFDDomainProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to AFDDomainProperties_DeploymentStatus_STATUS +var aFDDomainProperties_DeploymentStatus_STATUS_Values = map[string]AFDDomainProperties_DeploymentStatus_STATUS{ + "failed": AFDDomainProperties_DeploymentStatus_STATUS_Failed, + "inprogress": AFDDomainProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": AFDDomainProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": AFDDomainProperties_DeploymentStatus_STATUS_Succeeded, +} + type AFDDomainProperties_DomainValidationState_STATUS string const ( @@ -1590,6 +1605,19 @@ const ( AFDDomainProperties_DomainValidationState_STATUS_Unknown = AFDDomainProperties_DomainValidationState_STATUS("Unknown") ) +// Mapping from string to AFDDomainProperties_DomainValidationState_STATUS +var aFDDomainProperties_DomainValidationState_STATUS_Values = map[string]AFDDomainProperties_DomainValidationState_STATUS{ + "approved": AFDDomainProperties_DomainValidationState_STATUS_Approved, + "internalerror": AFDDomainProperties_DomainValidationState_STATUS_InternalError, + "pending": AFDDomainProperties_DomainValidationState_STATUS_Pending, + "pendingrevalidation": AFDDomainProperties_DomainValidationState_STATUS_PendingRevalidation, + "refreshingvalidationtoken": AFDDomainProperties_DomainValidationState_STATUS_RefreshingValidationToken, + "rejected": AFDDomainProperties_DomainValidationState_STATUS_Rejected, + "submitting": AFDDomainProperties_DomainValidationState_STATUS_Submitting, + "timedout": AFDDomainProperties_DomainValidationState_STATUS_TimedOut, + "unknown": AFDDomainProperties_DomainValidationState_STATUS_Unknown, +} + type AFDDomainProperties_ProvisioningState_STATUS string const ( @@ -1600,6 +1628,15 @@ const ( AFDDomainProperties_ProvisioningState_STATUS_Updating = AFDDomainProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to AFDDomainProperties_ProvisioningState_STATUS +var aFDDomainProperties_ProvisioningState_STATUS_Values = map[string]AFDDomainProperties_ProvisioningState_STATUS{ + "creating": AFDDomainProperties_ProvisioningState_STATUS_Creating, + "deleting": AFDDomainProperties_ProvisioningState_STATUS_Deleting, + "failed": AFDDomainProperties_ProvisioningState_STATUS_Failed, + "succeeded": AFDDomainProperties_ProvisioningState_STATUS_Succeeded, + "updating": AFDDomainProperties_ProvisioningState_STATUS_Updating, +} + // The JSON object that contains the properties to validate a domain. type DomainValidationProperties_STATUS struct { // ExpirationDate: The date time that the token expires @@ -1918,8 +1955,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := IdentityType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, identityType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -1932,8 +1970,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := IdentityType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, identityType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -1995,6 +2034,13 @@ const ( AFDDomainHttpsParameters_CertificateType_ManagedCertificate = AFDDomainHttpsParameters_CertificateType("ManagedCertificate") ) +// Mapping from string to AFDDomainHttpsParameters_CertificateType +var aFDDomainHttpsParameters_CertificateType_Values = map[string]AFDDomainHttpsParameters_CertificateType{ + "azurefirstpartymanagedcertificate": AFDDomainHttpsParameters_CertificateType_AzureFirstPartyManagedCertificate, + "customercertificate": AFDDomainHttpsParameters_CertificateType_CustomerCertificate, + "managedcertificate": AFDDomainHttpsParameters_CertificateType_ManagedCertificate, +} + type AFDDomainHttpsParameters_CertificateType_STATUS string const ( @@ -2003,6 +2049,13 @@ const ( AFDDomainHttpsParameters_CertificateType_STATUS_ManagedCertificate = AFDDomainHttpsParameters_CertificateType_STATUS("ManagedCertificate") ) +// Mapping from string to AFDDomainHttpsParameters_CertificateType_STATUS +var aFDDomainHttpsParameters_CertificateType_STATUS_Values = map[string]AFDDomainHttpsParameters_CertificateType_STATUS{ + "azurefirstpartymanagedcertificate": AFDDomainHttpsParameters_CertificateType_STATUS_AzureFirstPartyManagedCertificate, + "customercertificate": AFDDomainHttpsParameters_CertificateType_STATUS_CustomerCertificate, + "managedcertificate": AFDDomainHttpsParameters_CertificateType_STATUS_ManagedCertificate, +} + // +kubebuilder:validation:Enum={"TLS10","TLS12"} type AFDDomainHttpsParameters_MinimumTlsVersion string @@ -2011,6 +2064,12 @@ const ( AFDDomainHttpsParameters_MinimumTlsVersion_TLS12 = AFDDomainHttpsParameters_MinimumTlsVersion("TLS12") ) +// Mapping from string to AFDDomainHttpsParameters_MinimumTlsVersion +var aFDDomainHttpsParameters_MinimumTlsVersion_Values = map[string]AFDDomainHttpsParameters_MinimumTlsVersion{ + "tls10": AFDDomainHttpsParameters_MinimumTlsVersion_TLS10, + "tls12": AFDDomainHttpsParameters_MinimumTlsVersion_TLS12, +} + type AFDDomainHttpsParameters_MinimumTlsVersion_STATUS string const ( @@ -2018,6 +2077,12 @@ const ( AFDDomainHttpsParameters_MinimumTlsVersion_STATUS_TLS12 = AFDDomainHttpsParameters_MinimumTlsVersion_STATUS("TLS12") ) +// Mapping from string to AFDDomainHttpsParameters_MinimumTlsVersion_STATUS +var aFDDomainHttpsParameters_MinimumTlsVersion_STATUS_Values = map[string]AFDDomainHttpsParameters_MinimumTlsVersion_STATUS{ + "tls10": AFDDomainHttpsParameters_MinimumTlsVersion_STATUS_TLS10, + "tls12": AFDDomainHttpsParameters_MinimumTlsVersion_STATUS_TLS12, +} + func init() { SchemeBuilder.Register(&AfdCustomDomain{}, &AfdCustomDomainList{}) } diff --git a/v2/api/cdn/v1api20230501/afd_endpoint_types_gen.go b/v2/api/cdn/v1api20230501/afd_endpoint_types_gen.go index b3267a2bcbd..1736a2463e6 100644 --- a/v2/api/cdn/v1api20230501/afd_endpoint_types_gen.go +++ b/v2/api/cdn/v1api20230501/afd_endpoint_types_gen.go @@ -502,8 +502,9 @@ func (endpoint *Profiles_AfdEndpoint_Spec) AssignProperties_From_Profiles_AfdEnd // AutoGeneratedDomainNameLabelScope if source.AutoGeneratedDomainNameLabelScope != nil { - autoGeneratedDomainNameLabelScope := AutoGeneratedDomainNameLabelScope(*source.AutoGeneratedDomainNameLabelScope) - endpoint.AutoGeneratedDomainNameLabelScope = &autoGeneratedDomainNameLabelScope + autoGeneratedDomainNameLabelScope := *source.AutoGeneratedDomainNameLabelScope + autoGeneratedDomainNameLabelScopeTemp := genruntime.ToEnum(autoGeneratedDomainNameLabelScope, autoGeneratedDomainNameLabelScope_Values) + endpoint.AutoGeneratedDomainNameLabelScope = &autoGeneratedDomainNameLabelScopeTemp } else { endpoint.AutoGeneratedDomainNameLabelScope = nil } @@ -513,8 +514,9 @@ func (endpoint *Profiles_AfdEndpoint_Spec) AssignProperties_From_Profiles_AfdEnd // EnabledState if source.EnabledState != nil { - enabledState := AFDEndpointProperties_EnabledState(*source.EnabledState) - endpoint.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, aFDEndpointProperties_EnabledState_Values) + endpoint.EnabledState = &enabledStateTemp } else { endpoint.EnabledState = nil } @@ -839,8 +841,9 @@ func (endpoint *Profiles_AfdEndpoint_STATUS) AssignProperties_From_Profiles_AfdE // AutoGeneratedDomainNameLabelScope if source.AutoGeneratedDomainNameLabelScope != nil { - autoGeneratedDomainNameLabelScope := AutoGeneratedDomainNameLabelScope_STATUS(*source.AutoGeneratedDomainNameLabelScope) - endpoint.AutoGeneratedDomainNameLabelScope = &autoGeneratedDomainNameLabelScope + autoGeneratedDomainNameLabelScope := *source.AutoGeneratedDomainNameLabelScope + autoGeneratedDomainNameLabelScopeTemp := genruntime.ToEnum(autoGeneratedDomainNameLabelScope, autoGeneratedDomainNameLabelScope_STATUS_Values) + endpoint.AutoGeneratedDomainNameLabelScope = &autoGeneratedDomainNameLabelScopeTemp } else { endpoint.AutoGeneratedDomainNameLabelScope = nil } @@ -850,16 +853,18 @@ func (endpoint *Profiles_AfdEndpoint_STATUS) AssignProperties_From_Profiles_AfdE // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := AFDEndpointProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - endpoint.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, aFDEndpointProperties_DeploymentStatus_STATUS_Values) + endpoint.DeploymentStatus = &deploymentStatusTemp } else { endpoint.DeploymentStatus = nil } // EnabledState if source.EnabledState != nil { - enabledState := AFDEndpointProperties_EnabledState_STATUS(*source.EnabledState) - endpoint.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, aFDEndpointProperties_EnabledState_STATUS_Values) + endpoint.EnabledState = &enabledStateTemp } else { endpoint.EnabledState = nil } @@ -881,8 +886,9 @@ func (endpoint *Profiles_AfdEndpoint_STATUS) AssignProperties_From_Profiles_AfdE // ProvisioningState if source.ProvisioningState != nil { - provisioningState := AFDEndpointProperties_ProvisioningState_STATUS(*source.ProvisioningState) - endpoint.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, aFDEndpointProperties_ProvisioningState_STATUS_Values) + endpoint.ProvisioningState = &provisioningStateTemp } else { endpoint.ProvisioningState = nil } @@ -1002,6 +1008,14 @@ const ( AFDEndpointProperties_DeploymentStatus_STATUS_Succeeded = AFDEndpointProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to AFDEndpointProperties_DeploymentStatus_STATUS +var aFDEndpointProperties_DeploymentStatus_STATUS_Values = map[string]AFDEndpointProperties_DeploymentStatus_STATUS{ + "failed": AFDEndpointProperties_DeploymentStatus_STATUS_Failed, + "inprogress": AFDEndpointProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": AFDEndpointProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": AFDEndpointProperties_DeploymentStatus_STATUS_Succeeded, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type AFDEndpointProperties_EnabledState string @@ -1010,6 +1024,12 @@ const ( AFDEndpointProperties_EnabledState_Enabled = AFDEndpointProperties_EnabledState("Enabled") ) +// Mapping from string to AFDEndpointProperties_EnabledState +var aFDEndpointProperties_EnabledState_Values = map[string]AFDEndpointProperties_EnabledState{ + "disabled": AFDEndpointProperties_EnabledState_Disabled, + "enabled": AFDEndpointProperties_EnabledState_Enabled, +} + type AFDEndpointProperties_EnabledState_STATUS string const ( @@ -1017,6 +1037,12 @@ const ( AFDEndpointProperties_EnabledState_STATUS_Enabled = AFDEndpointProperties_EnabledState_STATUS("Enabled") ) +// Mapping from string to AFDEndpointProperties_EnabledState_STATUS +var aFDEndpointProperties_EnabledState_STATUS_Values = map[string]AFDEndpointProperties_EnabledState_STATUS{ + "disabled": AFDEndpointProperties_EnabledState_STATUS_Disabled, + "enabled": AFDEndpointProperties_EnabledState_STATUS_Enabled, +} + type AFDEndpointProperties_ProvisioningState_STATUS string const ( @@ -1027,6 +1053,15 @@ const ( AFDEndpointProperties_ProvisioningState_STATUS_Updating = AFDEndpointProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to AFDEndpointProperties_ProvisioningState_STATUS +var aFDEndpointProperties_ProvisioningState_STATUS_Values = map[string]AFDEndpointProperties_ProvisioningState_STATUS{ + "creating": AFDEndpointProperties_ProvisioningState_STATUS_Creating, + "deleting": AFDEndpointProperties_ProvisioningState_STATUS_Deleting, + "failed": AFDEndpointProperties_ProvisioningState_STATUS_Failed, + "succeeded": AFDEndpointProperties_ProvisioningState_STATUS_Succeeded, + "updating": AFDEndpointProperties_ProvisioningState_STATUS_Updating, +} + // Indicates the endpoint name reuse scope. The default value is TenantReuse. // +kubebuilder:validation:Enum={"NoReuse","ResourceGroupReuse","SubscriptionReuse","TenantReuse"} type AutoGeneratedDomainNameLabelScope string @@ -1038,6 +1073,14 @@ const ( AutoGeneratedDomainNameLabelScope_TenantReuse = AutoGeneratedDomainNameLabelScope("TenantReuse") ) +// Mapping from string to AutoGeneratedDomainNameLabelScope +var autoGeneratedDomainNameLabelScope_Values = map[string]AutoGeneratedDomainNameLabelScope{ + "noreuse": AutoGeneratedDomainNameLabelScope_NoReuse, + "resourcegroupreuse": AutoGeneratedDomainNameLabelScope_ResourceGroupReuse, + "subscriptionreuse": AutoGeneratedDomainNameLabelScope_SubscriptionReuse, + "tenantreuse": AutoGeneratedDomainNameLabelScope_TenantReuse, +} + // Indicates the endpoint name reuse scope. The default value is TenantReuse. type AutoGeneratedDomainNameLabelScope_STATUS string @@ -1048,6 +1091,14 @@ const ( AutoGeneratedDomainNameLabelScope_STATUS_TenantReuse = AutoGeneratedDomainNameLabelScope_STATUS("TenantReuse") ) +// Mapping from string to AutoGeneratedDomainNameLabelScope_STATUS +var autoGeneratedDomainNameLabelScope_STATUS_Values = map[string]AutoGeneratedDomainNameLabelScope_STATUS{ + "noreuse": AutoGeneratedDomainNameLabelScope_STATUS_NoReuse, + "resourcegroupreuse": AutoGeneratedDomainNameLabelScope_STATUS_ResourceGroupReuse, + "subscriptionreuse": AutoGeneratedDomainNameLabelScope_STATUS_SubscriptionReuse, + "tenantreuse": AutoGeneratedDomainNameLabelScope_STATUS_TenantReuse, +} + func init() { SchemeBuilder.Register(&AfdEndpoint{}, &AfdEndpointList{}) } diff --git a/v2/api/cdn/v1api20230501/afd_origin_group_types_gen.go b/v2/api/cdn/v1api20230501/afd_origin_group_types_gen.go index a411c92d578..92bf378d692 100644 --- a/v2/api/cdn/v1api20230501/afd_origin_group_types_gen.go +++ b/v2/api/cdn/v1api20230501/afd_origin_group_types_gen.go @@ -559,8 +559,9 @@ func (group *Profiles_OriginGroup_Spec) AssignProperties_From_Profiles_OriginGro // SessionAffinityState if source.SessionAffinityState != nil { - sessionAffinityState := AFDOriginGroupProperties_SessionAffinityState(*source.SessionAffinityState) - group.SessionAffinityState = &sessionAffinityState + sessionAffinityState := *source.SessionAffinityState + sessionAffinityStateTemp := genruntime.ToEnum(sessionAffinityState, aFDOriginGroupProperties_SessionAffinityState_Values) + group.SessionAffinityState = &sessionAffinityStateTemp } else { group.SessionAffinityState = nil } @@ -920,8 +921,9 @@ func (group *Profiles_OriginGroup_STATUS) AssignProperties_From_Profiles_OriginG // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := AFDOriginGroupProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - group.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, aFDOriginGroupProperties_DeploymentStatus_STATUS_Values) + group.DeploymentStatus = &deploymentStatusTemp } else { group.DeploymentStatus = nil } @@ -961,16 +963,18 @@ func (group *Profiles_OriginGroup_STATUS) AssignProperties_From_Profiles_OriginG // ProvisioningState if source.ProvisioningState != nil { - provisioningState := AFDOriginGroupProperties_ProvisioningState_STATUS(*source.ProvisioningState) - group.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, aFDOriginGroupProperties_ProvisioningState_STATUS_Values) + group.ProvisioningState = &provisioningStateTemp } else { group.ProvisioningState = nil } // SessionAffinityState if source.SessionAffinityState != nil { - sessionAffinityState := AFDOriginGroupProperties_SessionAffinityState_STATUS(*source.SessionAffinityState) - group.SessionAffinityState = &sessionAffinityState + sessionAffinityState := *source.SessionAffinityState + sessionAffinityStateTemp := genruntime.ToEnum(sessionAffinityState, aFDOriginGroupProperties_SessionAffinityState_STATUS_Values) + group.SessionAffinityState = &sessionAffinityStateTemp } else { group.SessionAffinityState = nil } @@ -1100,6 +1104,14 @@ const ( AFDOriginGroupProperties_DeploymentStatus_STATUS_Succeeded = AFDOriginGroupProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to AFDOriginGroupProperties_DeploymentStatus_STATUS +var aFDOriginGroupProperties_DeploymentStatus_STATUS_Values = map[string]AFDOriginGroupProperties_DeploymentStatus_STATUS{ + "failed": AFDOriginGroupProperties_DeploymentStatus_STATUS_Failed, + "inprogress": AFDOriginGroupProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": AFDOriginGroupProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": AFDOriginGroupProperties_DeploymentStatus_STATUS_Succeeded, +} + type AFDOriginGroupProperties_ProvisioningState_STATUS string const ( @@ -1110,6 +1122,15 @@ const ( AFDOriginGroupProperties_ProvisioningState_STATUS_Updating = AFDOriginGroupProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to AFDOriginGroupProperties_ProvisioningState_STATUS +var aFDOriginGroupProperties_ProvisioningState_STATUS_Values = map[string]AFDOriginGroupProperties_ProvisioningState_STATUS{ + "creating": AFDOriginGroupProperties_ProvisioningState_STATUS_Creating, + "deleting": AFDOriginGroupProperties_ProvisioningState_STATUS_Deleting, + "failed": AFDOriginGroupProperties_ProvisioningState_STATUS_Failed, + "succeeded": AFDOriginGroupProperties_ProvisioningState_STATUS_Succeeded, + "updating": AFDOriginGroupProperties_ProvisioningState_STATUS_Updating, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type AFDOriginGroupProperties_SessionAffinityState string @@ -1118,6 +1139,12 @@ const ( AFDOriginGroupProperties_SessionAffinityState_Enabled = AFDOriginGroupProperties_SessionAffinityState("Enabled") ) +// Mapping from string to AFDOriginGroupProperties_SessionAffinityState +var aFDOriginGroupProperties_SessionAffinityState_Values = map[string]AFDOriginGroupProperties_SessionAffinityState{ + "disabled": AFDOriginGroupProperties_SessionAffinityState_Disabled, + "enabled": AFDOriginGroupProperties_SessionAffinityState_Enabled, +} + type AFDOriginGroupProperties_SessionAffinityState_STATUS string const ( @@ -1125,6 +1152,12 @@ const ( AFDOriginGroupProperties_SessionAffinityState_STATUS_Enabled = AFDOriginGroupProperties_SessionAffinityState_STATUS("Enabled") ) +// Mapping from string to AFDOriginGroupProperties_SessionAffinityState_STATUS +var aFDOriginGroupProperties_SessionAffinityState_STATUS_Values = map[string]AFDOriginGroupProperties_SessionAffinityState_STATUS{ + "disabled": AFDOriginGroupProperties_SessionAffinityState_STATUS_Disabled, + "enabled": AFDOriginGroupProperties_SessionAffinityState_STATUS_Enabled, +} + // The JSON object that contains the properties to send health probes to origin. type HealthProbeParameters struct { // +kubebuilder:validation:Maximum=255 @@ -1233,16 +1266,18 @@ func (parameters *HealthProbeParameters) AssignProperties_From_HealthProbeParame // ProbeProtocol if source.ProbeProtocol != nil { - probeProtocol := HealthProbeParameters_ProbeProtocol(*source.ProbeProtocol) - parameters.ProbeProtocol = &probeProtocol + probeProtocol := *source.ProbeProtocol + probeProtocolTemp := genruntime.ToEnum(probeProtocol, healthProbeParameters_ProbeProtocol_Values) + parameters.ProbeProtocol = &probeProtocolTemp } else { parameters.ProbeProtocol = nil } // ProbeRequestType if source.ProbeRequestType != nil { - probeRequestType := HealthProbeParameters_ProbeRequestType(*source.ProbeRequestType) - parameters.ProbeRequestType = &probeRequestType + probeRequestType := *source.ProbeRequestType + probeRequestTypeTemp := genruntime.ToEnum(probeRequestType, healthProbeParameters_ProbeRequestType_Values) + parameters.ProbeRequestType = &probeRequestTypeTemp } else { parameters.ProbeRequestType = nil } @@ -1396,16 +1431,18 @@ func (parameters *HealthProbeParameters_STATUS) AssignProperties_From_HealthProb // ProbeProtocol if source.ProbeProtocol != nil { - probeProtocol := HealthProbeParameters_ProbeProtocol_STATUS(*source.ProbeProtocol) - parameters.ProbeProtocol = &probeProtocol + probeProtocol := *source.ProbeProtocol + probeProtocolTemp := genruntime.ToEnum(probeProtocol, healthProbeParameters_ProbeProtocol_STATUS_Values) + parameters.ProbeProtocol = &probeProtocolTemp } else { parameters.ProbeProtocol = nil } // ProbeRequestType if source.ProbeRequestType != nil { - probeRequestType := HealthProbeParameters_ProbeRequestType_STATUS(*source.ProbeRequestType) - parameters.ProbeRequestType = &probeRequestType + probeRequestType := *source.ProbeRequestType + probeRequestTypeTemp := genruntime.ToEnum(probeRequestType, healthProbeParameters_ProbeRequestType_STATUS_Values) + parameters.ProbeRequestType = &probeRequestTypeTemp } else { parameters.ProbeRequestType = nil } @@ -1682,6 +1719,13 @@ const ( HealthProbeParameters_ProbeProtocol_NotSet = HealthProbeParameters_ProbeProtocol("NotSet") ) +// Mapping from string to HealthProbeParameters_ProbeProtocol +var healthProbeParameters_ProbeProtocol_Values = map[string]HealthProbeParameters_ProbeProtocol{ + "http": HealthProbeParameters_ProbeProtocol_Http, + "https": HealthProbeParameters_ProbeProtocol_Https, + "notset": HealthProbeParameters_ProbeProtocol_NotSet, +} + type HealthProbeParameters_ProbeProtocol_STATUS string const ( @@ -1690,6 +1734,13 @@ const ( HealthProbeParameters_ProbeProtocol_STATUS_NotSet = HealthProbeParameters_ProbeProtocol_STATUS("NotSet") ) +// Mapping from string to HealthProbeParameters_ProbeProtocol_STATUS +var healthProbeParameters_ProbeProtocol_STATUS_Values = map[string]HealthProbeParameters_ProbeProtocol_STATUS{ + "http": HealthProbeParameters_ProbeProtocol_STATUS_Http, + "https": HealthProbeParameters_ProbeProtocol_STATUS_Https, + "notset": HealthProbeParameters_ProbeProtocol_STATUS_NotSet, +} + // +kubebuilder:validation:Enum={"GET","HEAD","NotSet"} type HealthProbeParameters_ProbeRequestType string @@ -1699,6 +1750,13 @@ const ( HealthProbeParameters_ProbeRequestType_NotSet = HealthProbeParameters_ProbeRequestType("NotSet") ) +// Mapping from string to HealthProbeParameters_ProbeRequestType +var healthProbeParameters_ProbeRequestType_Values = map[string]HealthProbeParameters_ProbeRequestType{ + "get": HealthProbeParameters_ProbeRequestType_GET, + "head": HealthProbeParameters_ProbeRequestType_HEAD, + "notset": HealthProbeParameters_ProbeRequestType_NotSet, +} + type HealthProbeParameters_ProbeRequestType_STATUS string const ( @@ -1707,6 +1765,13 @@ const ( HealthProbeParameters_ProbeRequestType_STATUS_NotSet = HealthProbeParameters_ProbeRequestType_STATUS("NotSet") ) +// Mapping from string to HealthProbeParameters_ProbeRequestType_STATUS +var healthProbeParameters_ProbeRequestType_STATUS_Values = map[string]HealthProbeParameters_ProbeRequestType_STATUS{ + "get": HealthProbeParameters_ProbeRequestType_STATUS_GET, + "head": HealthProbeParameters_ProbeRequestType_STATUS_HEAD, + "notset": HealthProbeParameters_ProbeRequestType_STATUS_NotSet, +} + func init() { SchemeBuilder.Register(&AfdOriginGroup{}, &AfdOriginGroupList{}) } diff --git a/v2/api/cdn/v1api20230501/afd_origin_types_gen.go b/v2/api/cdn/v1api20230501/afd_origin_types_gen.go index 38226a3f0ff..30f118761bd 100644 --- a/v2/api/cdn/v1api20230501/afd_origin_types_gen.go +++ b/v2/api/cdn/v1api20230501/afd_origin_types_gen.go @@ -650,8 +650,9 @@ func (origin *Profiles_OriginGroups_Origin_Spec) AssignProperties_From_Profiles_ // EnabledState if source.EnabledState != nil { - enabledState := AFDOriginProperties_EnabledState(*source.EnabledState) - origin.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, aFDOriginProperties_EnabledState_Values) + origin.EnabledState = &enabledStateTemp } else { origin.EnabledState = nil } @@ -1234,16 +1235,18 @@ func (origin *Profiles_OriginGroups_Origin_STATUS) AssignProperties_From_Profile // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := AFDOriginProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - origin.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, aFDOriginProperties_DeploymentStatus_STATUS_Values) + origin.DeploymentStatus = &deploymentStatusTemp } else { origin.DeploymentStatus = nil } // EnabledState if source.EnabledState != nil { - enabledState := AFDOriginProperties_EnabledState_STATUS(*source.EnabledState) - origin.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, aFDOriginProperties_EnabledState_STATUS_Values) + origin.EnabledState = &enabledStateTemp } else { origin.EnabledState = nil } @@ -1282,8 +1285,9 @@ func (origin *Profiles_OriginGroups_Origin_STATUS) AssignProperties_From_Profile // ProvisioningState if source.ProvisioningState != nil { - provisioningState := AFDOriginProperties_ProvisioningState_STATUS(*source.ProvisioningState) - origin.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, aFDOriginProperties_ProvisioningState_STATUS_Values) + origin.ProvisioningState = &provisioningStateTemp } else { origin.ProvisioningState = nil } @@ -1448,6 +1452,14 @@ const ( AFDOriginProperties_DeploymentStatus_STATUS_Succeeded = AFDOriginProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to AFDOriginProperties_DeploymentStatus_STATUS +var aFDOriginProperties_DeploymentStatus_STATUS_Values = map[string]AFDOriginProperties_DeploymentStatus_STATUS{ + "failed": AFDOriginProperties_DeploymentStatus_STATUS_Failed, + "inprogress": AFDOriginProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": AFDOriginProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": AFDOriginProperties_DeploymentStatus_STATUS_Succeeded, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type AFDOriginProperties_EnabledState string @@ -1456,6 +1468,12 @@ const ( AFDOriginProperties_EnabledState_Enabled = AFDOriginProperties_EnabledState("Enabled") ) +// Mapping from string to AFDOriginProperties_EnabledState +var aFDOriginProperties_EnabledState_Values = map[string]AFDOriginProperties_EnabledState{ + "disabled": AFDOriginProperties_EnabledState_Disabled, + "enabled": AFDOriginProperties_EnabledState_Enabled, +} + type AFDOriginProperties_EnabledState_STATUS string const ( @@ -1463,6 +1481,12 @@ const ( AFDOriginProperties_EnabledState_STATUS_Enabled = AFDOriginProperties_EnabledState_STATUS("Enabled") ) +// Mapping from string to AFDOriginProperties_EnabledState_STATUS +var aFDOriginProperties_EnabledState_STATUS_Values = map[string]AFDOriginProperties_EnabledState_STATUS{ + "disabled": AFDOriginProperties_EnabledState_STATUS_Disabled, + "enabled": AFDOriginProperties_EnabledState_STATUS_Enabled, +} + type AFDOriginProperties_ProvisioningState_STATUS string const ( @@ -1473,6 +1497,15 @@ const ( AFDOriginProperties_ProvisioningState_STATUS_Updating = AFDOriginProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to AFDOriginProperties_ProvisioningState_STATUS +var aFDOriginProperties_ProvisioningState_STATUS_Values = map[string]AFDOriginProperties_ProvisioningState_STATUS{ + "creating": AFDOriginProperties_ProvisioningState_STATUS_Creating, + "deleting": AFDOriginProperties_ProvisioningState_STATUS_Deleting, + "failed": AFDOriginProperties_ProvisioningState_STATUS_Failed, + "succeeded": AFDOriginProperties_ProvisioningState_STATUS_Succeeded, + "updating": AFDOriginProperties_ProvisioningState_STATUS_Updating, +} + // Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. type SharedPrivateLinkResourceProperties struct { // GroupId: The group id from the provider of resource the shared private link resource is for. @@ -1613,8 +1646,9 @@ func (properties *SharedPrivateLinkResourceProperties) AssignProperties_From_Sha // Status if source.Status != nil { - status := SharedPrivateLinkResourceProperties_Status(*source.Status) - properties.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, sharedPrivateLinkResourceProperties_Status_Values) + properties.Status = &statusTemp } else { properties.Status = nil } @@ -1801,8 +1835,9 @@ func (properties *SharedPrivateLinkResourceProperties_STATUS) AssignProperties_F // Status if source.Status != nil { - status := SharedPrivateLinkResourceProperties_Status_STATUS(*source.Status) - properties.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, sharedPrivateLinkResourceProperties_Status_STATUS_Values) + properties.Status = &statusTemp } else { properties.Status = nil } @@ -1867,6 +1902,15 @@ const ( SharedPrivateLinkResourceProperties_Status_Timeout = SharedPrivateLinkResourceProperties_Status("Timeout") ) +// Mapping from string to SharedPrivateLinkResourceProperties_Status +var sharedPrivateLinkResourceProperties_Status_Values = map[string]SharedPrivateLinkResourceProperties_Status{ + "approved": SharedPrivateLinkResourceProperties_Status_Approved, + "disconnected": SharedPrivateLinkResourceProperties_Status_Disconnected, + "pending": SharedPrivateLinkResourceProperties_Status_Pending, + "rejected": SharedPrivateLinkResourceProperties_Status_Rejected, + "timeout": SharedPrivateLinkResourceProperties_Status_Timeout, +} + type SharedPrivateLinkResourceProperties_Status_STATUS string const ( @@ -1877,6 +1921,15 @@ const ( SharedPrivateLinkResourceProperties_Status_STATUS_Timeout = SharedPrivateLinkResourceProperties_Status_STATUS("Timeout") ) +// Mapping from string to SharedPrivateLinkResourceProperties_Status_STATUS +var sharedPrivateLinkResourceProperties_Status_STATUS_Values = map[string]SharedPrivateLinkResourceProperties_Status_STATUS{ + "approved": SharedPrivateLinkResourceProperties_Status_STATUS_Approved, + "disconnected": SharedPrivateLinkResourceProperties_Status_STATUS_Disconnected, + "pending": SharedPrivateLinkResourceProperties_Status_STATUS_Pending, + "rejected": SharedPrivateLinkResourceProperties_Status_STATUS_Rejected, + "timeout": SharedPrivateLinkResourceProperties_Status_STATUS_Timeout, +} + func init() { SchemeBuilder.Register(&AfdOrigin{}, &AfdOriginList{}) } diff --git a/v2/api/cdn/v1api20230501/profile_spec_arm_types_gen.go b/v2/api/cdn/v1api20230501/profile_spec_arm_types_gen.go index 35a18ec7d14..ea74cdb742f 100644 --- a/v2/api/cdn/v1api20230501/profile_spec_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profile_spec_arm_types_gen.go @@ -95,6 +95,14 @@ const ( ManagedServiceIdentityType_UserAssigned = ManagedServiceIdentityType("UserAssigned") ) +// Mapping from string to ManagedServiceIdentityType +var managedServiceIdentityType_Values = map[string]ManagedServiceIdentityType{ + "none": ManagedServiceIdentityType_None, + "systemassigned": ManagedServiceIdentityType_SystemAssigned, + "systemassigned, userassigned": ManagedServiceIdentityType_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentityType_UserAssigned, +} + // +kubebuilder:validation:Enum={"Custom_Verizon","Premium_AzureFrontDoor","Premium_Verizon","StandardPlus_955BandWidth_ChinaCdn","StandardPlus_AvgBandWidth_ChinaCdn","StandardPlus_ChinaCdn","Standard_955BandWidth_ChinaCdn","Standard_Akamai","Standard_AvgBandWidth_ChinaCdn","Standard_AzureFrontDoor","Standard_ChinaCdn","Standard_Microsoft","Standard_Verizon"} type Sku_Name string @@ -114,6 +122,23 @@ const ( Sku_Name_Standard_Verizon = Sku_Name("Standard_Verizon") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "custom_verizon": Sku_Name_Custom_Verizon, + "premium_azurefrontdoor": Sku_Name_Premium_AzureFrontDoor, + "premium_verizon": Sku_Name_Premium_Verizon, + "standardplus_955bandwidth_chinacdn": Sku_Name_StandardPlus_955BandWidth_ChinaCdn, + "standardplus_avgbandwidth_chinacdn": Sku_Name_StandardPlus_AvgBandWidth_ChinaCdn, + "standardplus_chinacdn": Sku_Name_StandardPlus_ChinaCdn, + "standard_955bandwidth_chinacdn": Sku_Name_Standard_955BandWidth_ChinaCdn, + "standard_akamai": Sku_Name_Standard_Akamai, + "standard_avgbandwidth_chinacdn": Sku_Name_Standard_AvgBandWidth_ChinaCdn, + "standard_azurefrontdoor": Sku_Name_Standard_AzureFrontDoor, + "standard_chinacdn": Sku_Name_Standard_ChinaCdn, + "standard_microsoft": Sku_Name_Standard_Microsoft, + "standard_verizon": Sku_Name_Standard_Verizon, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/cdn/v1api20230501/profile_status_arm_types_gen.go b/v2/api/cdn/v1api20230501/profile_status_arm_types_gen.go index c66ba01152c..cb000b964b9 100644 --- a/v2/api/cdn/v1api20230501/profile_status_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profile_status_arm_types_gen.go @@ -131,6 +131,14 @@ const ( IdentityType_STATUS_User = IdentityType_STATUS("user") ) +// Mapping from string to IdentityType_STATUS +var identityType_STATUS_Values = map[string]IdentityType_STATUS{ + "application": IdentityType_STATUS_Application, + "key": IdentityType_STATUS_Key, + "managedidentity": IdentityType_STATUS_ManagedIdentity, + "user": IdentityType_STATUS_User, +} + // Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). type ManagedServiceIdentityType_STATUS string @@ -141,6 +149,14 @@ const ( ManagedServiceIdentityType_STATUS_UserAssigned = ManagedServiceIdentityType_STATUS("UserAssigned") ) +// Mapping from string to ManagedServiceIdentityType_STATUS +var managedServiceIdentityType_STATUS_Values = map[string]ManagedServiceIdentityType_STATUS{ + "none": ManagedServiceIdentityType_STATUS_None, + "systemassigned": ManagedServiceIdentityType_STATUS_SystemAssigned, + "systemassigned, userassigned": ManagedServiceIdentityType_STATUS_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentityType_STATUS_UserAssigned, +} + type Sku_Name_STATUS string const ( @@ -159,6 +175,23 @@ const ( Sku_Name_STATUS_Standard_Verizon = Sku_Name_STATUS("Standard_Verizon") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "custom_verizon": Sku_Name_STATUS_Custom_Verizon, + "premium_azurefrontdoor": Sku_Name_STATUS_Premium_AzureFrontDoor, + "premium_verizon": Sku_Name_STATUS_Premium_Verizon, + "standardplus_955bandwidth_chinacdn": Sku_Name_STATUS_StandardPlus_955BandWidth_ChinaCdn, + "standardplus_avgbandwidth_chinacdn": Sku_Name_STATUS_StandardPlus_AvgBandWidth_ChinaCdn, + "standardplus_chinacdn": Sku_Name_STATUS_StandardPlus_ChinaCdn, + "standard_955bandwidth_chinacdn": Sku_Name_STATUS_Standard_955BandWidth_ChinaCdn, + "standard_akamai": Sku_Name_STATUS_Standard_Akamai, + "standard_avgbandwidth_chinacdn": Sku_Name_STATUS_Standard_AvgBandWidth_ChinaCdn, + "standard_azurefrontdoor": Sku_Name_STATUS_Standard_AzureFrontDoor, + "standard_chinacdn": Sku_Name_STATUS_Standard_ChinaCdn, + "standard_microsoft": Sku_Name_STATUS_Standard_Microsoft, + "standard_verizon": Sku_Name_STATUS_Standard_Verizon, +} + // User assigned identity properties type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The client ID of the assigned identity. diff --git a/v2/api/cdn/v1api20230501/profile_types_gen.go b/v2/api/cdn/v1api20230501/profile_types_gen.go index c49d69231a9..9334189f386 100644 --- a/v2/api/cdn/v1api20230501/profile_types_gen.go +++ b/v2/api/cdn/v1api20230501/profile_types_gen.go @@ -989,16 +989,18 @@ func (profile *Profile_STATUS) AssignProperties_From_Profile_STATUS(source *v202 // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProfileProperties_ProvisioningState_STATUS(*source.ProvisioningState) - profile.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, profileProperties_ProvisioningState_STATUS_Values) + profile.ProvisioningState = &provisioningStateTemp } else { profile.ProvisioningState = nil } // ResourceState if source.ResourceState != nil { - resourceState := ProfileProperties_ResourceState_STATUS(*source.ResourceState) - profile.ResourceState = &resourceState + resourceState := *source.ResourceState + resourceStateTemp := genruntime.ToEnum(resourceState, profileProperties_ResourceState_STATUS_Values) + profile.ResourceState = &resourceStateTemp } else { profile.ResourceState = nil } @@ -1200,8 +1202,9 @@ func (identity *ManagedServiceIdentity) AssignProperties_From_ManagedServiceIden // Type if source.Type != nil { - typeVar := ManagedServiceIdentityType(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentityType_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1372,8 +1375,9 @@ func (identity *ManagedServiceIdentity_STATUS) AssignProperties_From_ManagedServ // Type if source.Type != nil { - typeVar := ManagedServiceIdentityType_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentityType_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1458,6 +1462,15 @@ const ( ProfileProperties_ProvisioningState_STATUS_Updating = ProfileProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ProfileProperties_ProvisioningState_STATUS +var profileProperties_ProvisioningState_STATUS_Values = map[string]ProfileProperties_ProvisioningState_STATUS{ + "creating": ProfileProperties_ProvisioningState_STATUS_Creating, + "deleting": ProfileProperties_ProvisioningState_STATUS_Deleting, + "failed": ProfileProperties_ProvisioningState_STATUS_Failed, + "succeeded": ProfileProperties_ProvisioningState_STATUS_Succeeded, + "updating": ProfileProperties_ProvisioningState_STATUS_Updating, +} + type ProfileProperties_ResourceState_STATUS string const ( @@ -1472,6 +1485,19 @@ const ( ProfileProperties_ResourceState_STATUS_PendingMigrationCommit = ProfileProperties_ResourceState_STATUS("PendingMigrationCommit") ) +// Mapping from string to ProfileProperties_ResourceState_STATUS +var profileProperties_ResourceState_STATUS_Values = map[string]ProfileProperties_ResourceState_STATUS{ + "abortingmigration": ProfileProperties_ResourceState_STATUS_AbortingMigration, + "active": ProfileProperties_ResourceState_STATUS_Active, + "committingmigration": ProfileProperties_ResourceState_STATUS_CommittingMigration, + "creating": ProfileProperties_ResourceState_STATUS_Creating, + "deleting": ProfileProperties_ResourceState_STATUS_Deleting, + "disabled": ProfileProperties_ResourceState_STATUS_Disabled, + "migrated": ProfileProperties_ResourceState_STATUS_Migrated, + "migrating": ProfileProperties_ResourceState_STATUS_Migrating, + "pendingmigrationcommit": ProfileProperties_ResourceState_STATUS_PendingMigrationCommit, +} + // Standard_Verizon = The SKU name for a Standard Verizon CDN profile. // Premium_Verizon = The SKU name for a Premium Verizon // CDN profile. @@ -1545,8 +1571,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20230501s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -1652,8 +1679,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20230501s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } diff --git a/v2/api/cdn/v1api20230501/profiles_afd_endpoints_route_spec_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_afd_endpoints_route_spec_arm_types_gen.go index ad314f2d0e1..7a20cba96cb 100644 --- a/v2/api/cdn/v1api20230501/profiles_afd_endpoints_route_spec_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_afd_endpoints_route_spec_arm_types_gen.go @@ -82,6 +82,12 @@ const ( AFDEndpointProtocols_Https = AFDEndpointProtocols("Https") ) +// Mapping from string to AFDEndpointProtocols +var aFDEndpointProtocols_Values = map[string]AFDEndpointProtocols{ + "http": AFDEndpointProtocols_Http, + "https": AFDEndpointProtocols_Https, +} + // Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. type AfdRouteCacheConfiguration_ARM struct { // CompressionSettings: compression settings. @@ -109,6 +115,12 @@ const ( RouteProperties_EnabledState_Enabled = RouteProperties_EnabledState("Enabled") ) +// Mapping from string to RouteProperties_EnabledState +var routeProperties_EnabledState_Values = map[string]RouteProperties_EnabledState{ + "disabled": RouteProperties_EnabledState_Disabled, + "enabled": RouteProperties_EnabledState_Enabled, +} + // +kubebuilder:validation:Enum={"HttpOnly","HttpsOnly","MatchRequest"} type RouteProperties_ForwardingProtocol string @@ -118,6 +130,13 @@ const ( RouteProperties_ForwardingProtocol_MatchRequest = RouteProperties_ForwardingProtocol("MatchRequest") ) +// Mapping from string to RouteProperties_ForwardingProtocol +var routeProperties_ForwardingProtocol_Values = map[string]RouteProperties_ForwardingProtocol{ + "httponly": RouteProperties_ForwardingProtocol_HttpOnly, + "httpsonly": RouteProperties_ForwardingProtocol_HttpsOnly, + "matchrequest": RouteProperties_ForwardingProtocol_MatchRequest, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type RouteProperties_HttpsRedirect string @@ -126,6 +145,12 @@ const ( RouteProperties_HttpsRedirect_Enabled = RouteProperties_HttpsRedirect("Enabled") ) +// Mapping from string to RouteProperties_HttpsRedirect +var routeProperties_HttpsRedirect_Values = map[string]RouteProperties_HttpsRedirect{ + "disabled": RouteProperties_HttpsRedirect_Disabled, + "enabled": RouteProperties_HttpsRedirect_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type RouteProperties_LinkToDefaultDomain string @@ -134,6 +159,12 @@ const ( RouteProperties_LinkToDefaultDomain_Enabled = RouteProperties_LinkToDefaultDomain("Enabled") ) +// Mapping from string to RouteProperties_LinkToDefaultDomain +var routeProperties_LinkToDefaultDomain_Values = map[string]RouteProperties_LinkToDefaultDomain{ + "disabled": RouteProperties_LinkToDefaultDomain_Disabled, + "enabled": RouteProperties_LinkToDefaultDomain_Enabled, +} + // +kubebuilder:validation:Enum={"IgnoreQueryString","IgnoreSpecifiedQueryStrings","IncludeSpecifiedQueryStrings","UseQueryString"} type AfdRouteCacheConfiguration_QueryStringCachingBehavior string @@ -144,6 +175,14 @@ const ( AfdRouteCacheConfiguration_QueryStringCachingBehavior_UseQueryString = AfdRouteCacheConfiguration_QueryStringCachingBehavior("UseQueryString") ) +// Mapping from string to AfdRouteCacheConfiguration_QueryStringCachingBehavior +var afdRouteCacheConfiguration_QueryStringCachingBehavior_Values = map[string]AfdRouteCacheConfiguration_QueryStringCachingBehavior{ + "ignorequerystring": AfdRouteCacheConfiguration_QueryStringCachingBehavior_IgnoreQueryString, + "ignorespecifiedquerystrings": AfdRouteCacheConfiguration_QueryStringCachingBehavior_IgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": AfdRouteCacheConfiguration_QueryStringCachingBehavior_IncludeSpecifiedQueryStrings, + "usequerystring": AfdRouteCacheConfiguration_QueryStringCachingBehavior_UseQueryString, +} + // settings for compression. type CompressionSettings_ARM struct { // ContentTypesToCompress: List of content types on which compression applies. The value should be a valid MIME type. diff --git a/v2/api/cdn/v1api20230501/profiles_afd_endpoints_route_status_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_afd_endpoints_route_status_arm_types_gen.go index 3e80c042bc9..5c74d160a79 100644 --- a/v2/api/cdn/v1api20230501/profiles_afd_endpoints_route_status_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_afd_endpoints_route_status_arm_types_gen.go @@ -80,6 +80,12 @@ const ( AFDEndpointProtocols_STATUS_Https = AFDEndpointProtocols_STATUS("Https") ) +// Mapping from string to AFDEndpointProtocols_STATUS +var aFDEndpointProtocols_STATUS_Values = map[string]AFDEndpointProtocols_STATUS{ + "http": AFDEndpointProtocols_STATUS_Http, + "https": AFDEndpointProtocols_STATUS_Https, +} + // Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. type AfdRouteCacheConfiguration_STATUS_ARM struct { // CompressionSettings: compression settings. @@ -109,6 +115,14 @@ const ( RouteProperties_DeploymentStatus_STATUS_Succeeded = RouteProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to RouteProperties_DeploymentStatus_STATUS +var routeProperties_DeploymentStatus_STATUS_Values = map[string]RouteProperties_DeploymentStatus_STATUS{ + "failed": RouteProperties_DeploymentStatus_STATUS_Failed, + "inprogress": RouteProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": RouteProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": RouteProperties_DeploymentStatus_STATUS_Succeeded, +} + type RouteProperties_EnabledState_STATUS string const ( @@ -116,6 +130,12 @@ const ( RouteProperties_EnabledState_STATUS_Enabled = RouteProperties_EnabledState_STATUS("Enabled") ) +// Mapping from string to RouteProperties_EnabledState_STATUS +var routeProperties_EnabledState_STATUS_Values = map[string]RouteProperties_EnabledState_STATUS{ + "disabled": RouteProperties_EnabledState_STATUS_Disabled, + "enabled": RouteProperties_EnabledState_STATUS_Enabled, +} + type RouteProperties_ForwardingProtocol_STATUS string const ( @@ -124,6 +144,13 @@ const ( RouteProperties_ForwardingProtocol_STATUS_MatchRequest = RouteProperties_ForwardingProtocol_STATUS("MatchRequest") ) +// Mapping from string to RouteProperties_ForwardingProtocol_STATUS +var routeProperties_ForwardingProtocol_STATUS_Values = map[string]RouteProperties_ForwardingProtocol_STATUS{ + "httponly": RouteProperties_ForwardingProtocol_STATUS_HttpOnly, + "httpsonly": RouteProperties_ForwardingProtocol_STATUS_HttpsOnly, + "matchrequest": RouteProperties_ForwardingProtocol_STATUS_MatchRequest, +} + type RouteProperties_HttpsRedirect_STATUS string const ( @@ -131,6 +158,12 @@ const ( RouteProperties_HttpsRedirect_STATUS_Enabled = RouteProperties_HttpsRedirect_STATUS("Enabled") ) +// Mapping from string to RouteProperties_HttpsRedirect_STATUS +var routeProperties_HttpsRedirect_STATUS_Values = map[string]RouteProperties_HttpsRedirect_STATUS{ + "disabled": RouteProperties_HttpsRedirect_STATUS_Disabled, + "enabled": RouteProperties_HttpsRedirect_STATUS_Enabled, +} + type RouteProperties_LinkToDefaultDomain_STATUS string const ( @@ -138,6 +171,12 @@ const ( RouteProperties_LinkToDefaultDomain_STATUS_Enabled = RouteProperties_LinkToDefaultDomain_STATUS("Enabled") ) +// Mapping from string to RouteProperties_LinkToDefaultDomain_STATUS +var routeProperties_LinkToDefaultDomain_STATUS_Values = map[string]RouteProperties_LinkToDefaultDomain_STATUS{ + "disabled": RouteProperties_LinkToDefaultDomain_STATUS_Disabled, + "enabled": RouteProperties_LinkToDefaultDomain_STATUS_Enabled, +} + type RouteProperties_ProvisioningState_STATUS string const ( @@ -148,6 +187,15 @@ const ( RouteProperties_ProvisioningState_STATUS_Updating = RouteProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to RouteProperties_ProvisioningState_STATUS +var routeProperties_ProvisioningState_STATUS_Values = map[string]RouteProperties_ProvisioningState_STATUS{ + "creating": RouteProperties_ProvisioningState_STATUS_Creating, + "deleting": RouteProperties_ProvisioningState_STATUS_Deleting, + "failed": RouteProperties_ProvisioningState_STATUS_Failed, + "succeeded": RouteProperties_ProvisioningState_STATUS_Succeeded, + "updating": RouteProperties_ProvisioningState_STATUS_Updating, +} + type AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS string const ( @@ -157,6 +205,14 @@ const ( AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS_UseQueryString = AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS("UseQueryString") ) +// Mapping from string to AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS +var afdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS_Values = map[string]AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS{ + "ignorequerystring": AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS_IgnoreQueryString, + "ignorespecifiedquerystrings": AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS_IgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS_IncludeSpecifiedQueryStrings, + "usequerystring": AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS_UseQueryString, +} + // settings for compression. type CompressionSettings_STATUS_ARM struct { // ContentTypesToCompress: List of content types on which compression applies. The value should be a valid MIME type. diff --git a/v2/api/cdn/v1api20230501/profiles_rule_set_status_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_rule_set_status_arm_types_gen.go index 9a70688c5f3..a5677e7dbfe 100644 --- a/v2/api/cdn/v1api20230501/profiles_rule_set_status_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_rule_set_status_arm_types_gen.go @@ -40,6 +40,14 @@ const ( RuleSetProperties_DeploymentStatus_STATUS_Succeeded = RuleSetProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to RuleSetProperties_DeploymentStatus_STATUS +var ruleSetProperties_DeploymentStatus_STATUS_Values = map[string]RuleSetProperties_DeploymentStatus_STATUS{ + "failed": RuleSetProperties_DeploymentStatus_STATUS_Failed, + "inprogress": RuleSetProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": RuleSetProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": RuleSetProperties_DeploymentStatus_STATUS_Succeeded, +} + type RuleSetProperties_ProvisioningState_STATUS string const ( @@ -49,3 +57,12 @@ const ( RuleSetProperties_ProvisioningState_STATUS_Succeeded = RuleSetProperties_ProvisioningState_STATUS("Succeeded") RuleSetProperties_ProvisioningState_STATUS_Updating = RuleSetProperties_ProvisioningState_STATUS("Updating") ) + +// Mapping from string to RuleSetProperties_ProvisioningState_STATUS +var ruleSetProperties_ProvisioningState_STATUS_Values = map[string]RuleSetProperties_ProvisioningState_STATUS{ + "creating": RuleSetProperties_ProvisioningState_STATUS_Creating, + "deleting": RuleSetProperties_ProvisioningState_STATUS_Deleting, + "failed": RuleSetProperties_ProvisioningState_STATUS_Failed, + "succeeded": RuleSetProperties_ProvisioningState_STATUS_Succeeded, + "updating": RuleSetProperties_ProvisioningState_STATUS_Updating, +} diff --git a/v2/api/cdn/v1api20230501/profiles_rule_sets_rule_spec_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_rule_sets_rule_spec_arm_types_gen.go index 655e656694c..414466fb794 100644 --- a/v2/api/cdn/v1api20230501/profiles_rule_sets_rule_spec_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_rule_sets_rule_spec_arm_types_gen.go @@ -380,6 +380,12 @@ const ( RuleProperties_MatchProcessingBehavior_Stop = RuleProperties_MatchProcessingBehavior("Stop") ) +// Mapping from string to RuleProperties_MatchProcessingBehavior +var ruleProperties_MatchProcessingBehavior_Values = map[string]RuleProperties_MatchProcessingBehavior{ + "continue": RuleProperties_MatchProcessingBehavior_Continue, + "stop": RuleProperties_MatchProcessingBehavior_Stop, +} + type DeliveryRuleCacheExpirationAction_ARM struct { // Name: The name of the action for the delivery rule. Name DeliveryRuleCacheExpirationAction_Name `json:"name,omitempty"` @@ -667,121 +673,241 @@ type DeliveryRuleCacheExpirationAction_Name string const DeliveryRuleCacheExpirationAction_Name_CacheExpiration = DeliveryRuleCacheExpirationAction_Name("CacheExpiration") +// Mapping from string to DeliveryRuleCacheExpirationAction_Name +var deliveryRuleCacheExpirationAction_Name_Values = map[string]DeliveryRuleCacheExpirationAction_Name{ + "cacheexpiration": DeliveryRuleCacheExpirationAction_Name_CacheExpiration, +} + // +kubebuilder:validation:Enum={"CacheKeyQueryString"} type DeliveryRuleCacheKeyQueryStringAction_Name string const DeliveryRuleCacheKeyQueryStringAction_Name_CacheKeyQueryString = DeliveryRuleCacheKeyQueryStringAction_Name("CacheKeyQueryString") +// Mapping from string to DeliveryRuleCacheKeyQueryStringAction_Name +var deliveryRuleCacheKeyQueryStringAction_Name_Values = map[string]DeliveryRuleCacheKeyQueryStringAction_Name{ + "cachekeyquerystring": DeliveryRuleCacheKeyQueryStringAction_Name_CacheKeyQueryString, +} + // +kubebuilder:validation:Enum={"ClientPort"} type DeliveryRuleClientPortCondition_Name string const DeliveryRuleClientPortCondition_Name_ClientPort = DeliveryRuleClientPortCondition_Name("ClientPort") +// Mapping from string to DeliveryRuleClientPortCondition_Name +var deliveryRuleClientPortCondition_Name_Values = map[string]DeliveryRuleClientPortCondition_Name{ + "clientport": DeliveryRuleClientPortCondition_Name_ClientPort, +} + // +kubebuilder:validation:Enum={"Cookies"} type DeliveryRuleCookiesCondition_Name string const DeliveryRuleCookiesCondition_Name_Cookies = DeliveryRuleCookiesCondition_Name("Cookies") +// Mapping from string to DeliveryRuleCookiesCondition_Name +var deliveryRuleCookiesCondition_Name_Values = map[string]DeliveryRuleCookiesCondition_Name{ + "cookies": DeliveryRuleCookiesCondition_Name_Cookies, +} + // +kubebuilder:validation:Enum={"HostName"} type DeliveryRuleHostNameCondition_Name string const DeliveryRuleHostNameCondition_Name_HostName = DeliveryRuleHostNameCondition_Name("HostName") +// Mapping from string to DeliveryRuleHostNameCondition_Name +var deliveryRuleHostNameCondition_Name_Values = map[string]DeliveryRuleHostNameCondition_Name{ + "hostname": DeliveryRuleHostNameCondition_Name_HostName, +} + // +kubebuilder:validation:Enum={"HttpVersion"} type DeliveryRuleHttpVersionCondition_Name string const DeliveryRuleHttpVersionCondition_Name_HttpVersion = DeliveryRuleHttpVersionCondition_Name("HttpVersion") +// Mapping from string to DeliveryRuleHttpVersionCondition_Name +var deliveryRuleHttpVersionCondition_Name_Values = map[string]DeliveryRuleHttpVersionCondition_Name{ + "httpversion": DeliveryRuleHttpVersionCondition_Name_HttpVersion, +} + // +kubebuilder:validation:Enum={"IsDevice"} type DeliveryRuleIsDeviceCondition_Name string const DeliveryRuleIsDeviceCondition_Name_IsDevice = DeliveryRuleIsDeviceCondition_Name("IsDevice") +// Mapping from string to DeliveryRuleIsDeviceCondition_Name +var deliveryRuleIsDeviceCondition_Name_Values = map[string]DeliveryRuleIsDeviceCondition_Name{ + "isdevice": DeliveryRuleIsDeviceCondition_Name_IsDevice, +} + // +kubebuilder:validation:Enum={"PostArgs"} type DeliveryRulePostArgsCondition_Name string const DeliveryRulePostArgsCondition_Name_PostArgs = DeliveryRulePostArgsCondition_Name("PostArgs") +// Mapping from string to DeliveryRulePostArgsCondition_Name +var deliveryRulePostArgsCondition_Name_Values = map[string]DeliveryRulePostArgsCondition_Name{ + "postargs": DeliveryRulePostArgsCondition_Name_PostArgs, +} + // +kubebuilder:validation:Enum={"QueryString"} type DeliveryRuleQueryStringCondition_Name string const DeliveryRuleQueryStringCondition_Name_QueryString = DeliveryRuleQueryStringCondition_Name("QueryString") +// Mapping from string to DeliveryRuleQueryStringCondition_Name +var deliveryRuleQueryStringCondition_Name_Values = map[string]DeliveryRuleQueryStringCondition_Name{ + "querystring": DeliveryRuleQueryStringCondition_Name_QueryString, +} + // +kubebuilder:validation:Enum={"RemoteAddress"} type DeliveryRuleRemoteAddressCondition_Name string const DeliveryRuleRemoteAddressCondition_Name_RemoteAddress = DeliveryRuleRemoteAddressCondition_Name("RemoteAddress") +// Mapping from string to DeliveryRuleRemoteAddressCondition_Name +var deliveryRuleRemoteAddressCondition_Name_Values = map[string]DeliveryRuleRemoteAddressCondition_Name{ + "remoteaddress": DeliveryRuleRemoteAddressCondition_Name_RemoteAddress, +} + // +kubebuilder:validation:Enum={"RequestBody"} type DeliveryRuleRequestBodyCondition_Name string const DeliveryRuleRequestBodyCondition_Name_RequestBody = DeliveryRuleRequestBodyCondition_Name("RequestBody") +// Mapping from string to DeliveryRuleRequestBodyCondition_Name +var deliveryRuleRequestBodyCondition_Name_Values = map[string]DeliveryRuleRequestBodyCondition_Name{ + "requestbody": DeliveryRuleRequestBodyCondition_Name_RequestBody, +} + // +kubebuilder:validation:Enum={"ModifyRequestHeader"} type DeliveryRuleRequestHeaderAction_Name string const DeliveryRuleRequestHeaderAction_Name_ModifyRequestHeader = DeliveryRuleRequestHeaderAction_Name("ModifyRequestHeader") +// Mapping from string to DeliveryRuleRequestHeaderAction_Name +var deliveryRuleRequestHeaderAction_Name_Values = map[string]DeliveryRuleRequestHeaderAction_Name{ + "modifyrequestheader": DeliveryRuleRequestHeaderAction_Name_ModifyRequestHeader, +} + // +kubebuilder:validation:Enum={"RequestHeader"} type DeliveryRuleRequestHeaderCondition_Name string const DeliveryRuleRequestHeaderCondition_Name_RequestHeader = DeliveryRuleRequestHeaderCondition_Name("RequestHeader") +// Mapping from string to DeliveryRuleRequestHeaderCondition_Name +var deliveryRuleRequestHeaderCondition_Name_Values = map[string]DeliveryRuleRequestHeaderCondition_Name{ + "requestheader": DeliveryRuleRequestHeaderCondition_Name_RequestHeader, +} + // +kubebuilder:validation:Enum={"RequestMethod"} type DeliveryRuleRequestMethodCondition_Name string const DeliveryRuleRequestMethodCondition_Name_RequestMethod = DeliveryRuleRequestMethodCondition_Name("RequestMethod") +// Mapping from string to DeliveryRuleRequestMethodCondition_Name +var deliveryRuleRequestMethodCondition_Name_Values = map[string]DeliveryRuleRequestMethodCondition_Name{ + "requestmethod": DeliveryRuleRequestMethodCondition_Name_RequestMethod, +} + // +kubebuilder:validation:Enum={"RequestScheme"} type DeliveryRuleRequestSchemeCondition_Name string const DeliveryRuleRequestSchemeCondition_Name_RequestScheme = DeliveryRuleRequestSchemeCondition_Name("RequestScheme") +// Mapping from string to DeliveryRuleRequestSchemeCondition_Name +var deliveryRuleRequestSchemeCondition_Name_Values = map[string]DeliveryRuleRequestSchemeCondition_Name{ + "requestscheme": DeliveryRuleRequestSchemeCondition_Name_RequestScheme, +} + // +kubebuilder:validation:Enum={"RequestUri"} type DeliveryRuleRequestUriCondition_Name string const DeliveryRuleRequestUriCondition_Name_RequestUri = DeliveryRuleRequestUriCondition_Name("RequestUri") +// Mapping from string to DeliveryRuleRequestUriCondition_Name +var deliveryRuleRequestUriCondition_Name_Values = map[string]DeliveryRuleRequestUriCondition_Name{ + "requesturi": DeliveryRuleRequestUriCondition_Name_RequestUri, +} + // +kubebuilder:validation:Enum={"ModifyResponseHeader"} type DeliveryRuleResponseHeaderAction_Name string const DeliveryRuleResponseHeaderAction_Name_ModifyResponseHeader = DeliveryRuleResponseHeaderAction_Name("ModifyResponseHeader") +// Mapping from string to DeliveryRuleResponseHeaderAction_Name +var deliveryRuleResponseHeaderAction_Name_Values = map[string]DeliveryRuleResponseHeaderAction_Name{ + "modifyresponseheader": DeliveryRuleResponseHeaderAction_Name_ModifyResponseHeader, +} + // +kubebuilder:validation:Enum={"RouteConfigurationOverride"} type DeliveryRuleRouteConfigurationOverrideAction_Name string const DeliveryRuleRouteConfigurationOverrideAction_Name_RouteConfigurationOverride = DeliveryRuleRouteConfigurationOverrideAction_Name("RouteConfigurationOverride") +// Mapping from string to DeliveryRuleRouteConfigurationOverrideAction_Name +var deliveryRuleRouteConfigurationOverrideAction_Name_Values = map[string]DeliveryRuleRouteConfigurationOverrideAction_Name{ + "routeconfigurationoverride": DeliveryRuleRouteConfigurationOverrideAction_Name_RouteConfigurationOverride, +} + // +kubebuilder:validation:Enum={"ServerPort"} type DeliveryRuleServerPortCondition_Name string const DeliveryRuleServerPortCondition_Name_ServerPort = DeliveryRuleServerPortCondition_Name("ServerPort") +// Mapping from string to DeliveryRuleServerPortCondition_Name +var deliveryRuleServerPortCondition_Name_Values = map[string]DeliveryRuleServerPortCondition_Name{ + "serverport": DeliveryRuleServerPortCondition_Name_ServerPort, +} + // +kubebuilder:validation:Enum={"SocketAddr"} type DeliveryRuleSocketAddrCondition_Name string const DeliveryRuleSocketAddrCondition_Name_SocketAddr = DeliveryRuleSocketAddrCondition_Name("SocketAddr") +// Mapping from string to DeliveryRuleSocketAddrCondition_Name +var deliveryRuleSocketAddrCondition_Name_Values = map[string]DeliveryRuleSocketAddrCondition_Name{ + "socketaddr": DeliveryRuleSocketAddrCondition_Name_SocketAddr, +} + // +kubebuilder:validation:Enum={"SslProtocol"} type DeliveryRuleSslProtocolCondition_Name string const DeliveryRuleSslProtocolCondition_Name_SslProtocol = DeliveryRuleSslProtocolCondition_Name("SslProtocol") +// Mapping from string to DeliveryRuleSslProtocolCondition_Name +var deliveryRuleSslProtocolCondition_Name_Values = map[string]DeliveryRuleSslProtocolCondition_Name{ + "sslprotocol": DeliveryRuleSslProtocolCondition_Name_SslProtocol, +} + // +kubebuilder:validation:Enum={"UrlFileExtension"} type DeliveryRuleUrlFileExtensionCondition_Name string const DeliveryRuleUrlFileExtensionCondition_Name_UrlFileExtension = DeliveryRuleUrlFileExtensionCondition_Name("UrlFileExtension") +// Mapping from string to DeliveryRuleUrlFileExtensionCondition_Name +var deliveryRuleUrlFileExtensionCondition_Name_Values = map[string]DeliveryRuleUrlFileExtensionCondition_Name{ + "urlfileextension": DeliveryRuleUrlFileExtensionCondition_Name_UrlFileExtension, +} + // +kubebuilder:validation:Enum={"UrlFileName"} type DeliveryRuleUrlFileNameCondition_Name string const DeliveryRuleUrlFileNameCondition_Name_UrlFileName = DeliveryRuleUrlFileNameCondition_Name("UrlFileName") +// Mapping from string to DeliveryRuleUrlFileNameCondition_Name +var deliveryRuleUrlFileNameCondition_Name_Values = map[string]DeliveryRuleUrlFileNameCondition_Name{ + "urlfilename": DeliveryRuleUrlFileNameCondition_Name_UrlFileName, +} + // +kubebuilder:validation:Enum={"UrlPath"} type DeliveryRuleUrlPathCondition_Name string const DeliveryRuleUrlPathCondition_Name_UrlPath = DeliveryRuleUrlPathCondition_Name("UrlPath") +// Mapping from string to DeliveryRuleUrlPathCondition_Name +var deliveryRuleUrlPathCondition_Name_Values = map[string]DeliveryRuleUrlPathCondition_Name{ + "urlpath": DeliveryRuleUrlPathCondition_Name_UrlPath, +} + // Defines the parameters for the request header action. type HeaderActionParameters_ARM struct { // HeaderAction: Action to perform @@ -848,6 +974,11 @@ type OriginGroupOverrideAction_Name string const OriginGroupOverrideAction_Name_OriginGroupOverride = OriginGroupOverrideAction_Name("OriginGroupOverride") +// Mapping from string to OriginGroupOverrideAction_Name +var originGroupOverrideAction_Name_Values = map[string]OriginGroupOverrideAction_Name{ + "origingroupoverride": OriginGroupOverrideAction_Name_OriginGroupOverride, +} + // Defines the parameters for the origin group override action. type OriginGroupOverrideActionParameters_ARM struct { // OriginGroup: defines the OriginGroup that would override the DefaultOriginGroup. @@ -1103,6 +1234,11 @@ type UrlRedirectAction_Name string const UrlRedirectAction_Name_UrlRedirect = UrlRedirectAction_Name("UrlRedirect") +// Mapping from string to UrlRedirectAction_Name +var urlRedirectAction_Name_Values = map[string]UrlRedirectAction_Name{ + "urlredirect": UrlRedirectAction_Name_UrlRedirect, +} + // Defines the parameters for the url redirect action. type UrlRedirectActionParameters_ARM struct { // CustomFragment: Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include @@ -1134,6 +1270,11 @@ type UrlRewriteAction_Name string const UrlRewriteAction_Name_UrlRewrite = UrlRewriteAction_Name("UrlRewrite") +// Mapping from string to UrlRewriteAction_Name +var urlRewriteAction_Name_Values = map[string]UrlRewriteAction_Name{ + "urlrewrite": UrlRewriteAction_Name_UrlRewrite, +} + // Defines the parameters for the url rewrite action. type UrlRewriteActionParameters_ARM struct { // Destination: Define the relative URL to which the above requests will be rewritten by. @@ -1153,6 +1294,11 @@ type UrlSigningAction_Name string const UrlSigningAction_Name_UrlSigning = UrlSigningAction_Name("UrlSigning") +// Mapping from string to UrlSigningAction_Name +var urlSigningAction_Name_Values = map[string]UrlSigningAction_Name{ + "urlsigning": UrlSigningAction_Name_UrlSigning, +} + // Defines the parameters for the Url Signing action. type UrlSigningActionParameters_ARM struct { // Algorithm: Algorithm to use for URL signing @@ -1194,16 +1340,33 @@ const ( CacheExpirationActionParameters_CacheBehavior_SetIfMissing = CacheExpirationActionParameters_CacheBehavior("SetIfMissing") ) +// Mapping from string to CacheExpirationActionParameters_CacheBehavior +var cacheExpirationActionParameters_CacheBehavior_Values = map[string]CacheExpirationActionParameters_CacheBehavior{ + "bypasscache": CacheExpirationActionParameters_CacheBehavior_BypassCache, + "override": CacheExpirationActionParameters_CacheBehavior_Override, + "setifmissing": CacheExpirationActionParameters_CacheBehavior_SetIfMissing, +} + // +kubebuilder:validation:Enum={"All"} type CacheExpirationActionParameters_CacheType string const CacheExpirationActionParameters_CacheType_All = CacheExpirationActionParameters_CacheType("All") +// Mapping from string to CacheExpirationActionParameters_CacheType +var cacheExpirationActionParameters_CacheType_Values = map[string]CacheExpirationActionParameters_CacheType{ + "all": CacheExpirationActionParameters_CacheType_All, +} + // +kubebuilder:validation:Enum={"DeliveryRuleCacheExpirationActionParameters"} type CacheExpirationActionParameters_TypeName string const CacheExpirationActionParameters_TypeName_DeliveryRuleCacheExpirationActionParameters = CacheExpirationActionParameters_TypeName("DeliveryRuleCacheExpirationActionParameters") +// Mapping from string to CacheExpirationActionParameters_TypeName +var cacheExpirationActionParameters_TypeName_Values = map[string]CacheExpirationActionParameters_TypeName{ + "deliveryrulecacheexpirationactionparameters": CacheExpirationActionParameters_TypeName_DeliveryRuleCacheExpirationActionParameters, +} + // +kubebuilder:validation:Enum={"Exclude","ExcludeAll","Include","IncludeAll"} type CacheKeyQueryStringActionParameters_QueryStringBehavior string @@ -1214,11 +1377,24 @@ const ( CacheKeyQueryStringActionParameters_QueryStringBehavior_IncludeAll = CacheKeyQueryStringActionParameters_QueryStringBehavior("IncludeAll") ) +// Mapping from string to CacheKeyQueryStringActionParameters_QueryStringBehavior +var cacheKeyQueryStringActionParameters_QueryStringBehavior_Values = map[string]CacheKeyQueryStringActionParameters_QueryStringBehavior{ + "exclude": CacheKeyQueryStringActionParameters_QueryStringBehavior_Exclude, + "excludeall": CacheKeyQueryStringActionParameters_QueryStringBehavior_ExcludeAll, + "include": CacheKeyQueryStringActionParameters_QueryStringBehavior_Include, + "includeall": CacheKeyQueryStringActionParameters_QueryStringBehavior_IncludeAll, +} + // +kubebuilder:validation:Enum={"DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"} type CacheKeyQueryStringActionParameters_TypeName string const CacheKeyQueryStringActionParameters_TypeName_DeliveryRuleCacheKeyQueryStringBehaviorActionParameters = CacheKeyQueryStringActionParameters_TypeName("DeliveryRuleCacheKeyQueryStringBehaviorActionParameters") +// Mapping from string to CacheKeyQueryStringActionParameters_TypeName +var cacheKeyQueryStringActionParameters_TypeName_Values = map[string]CacheKeyQueryStringActionParameters_TypeName{ + "deliveryrulecachekeyquerystringbehavioractionparameters": CacheKeyQueryStringActionParameters_TypeName_DeliveryRuleCacheKeyQueryStringBehaviorActionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type ClientPortMatchConditionParameters_Operator string @@ -1235,11 +1411,30 @@ const ( ClientPortMatchConditionParameters_Operator_RegEx = ClientPortMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to ClientPortMatchConditionParameters_Operator +var clientPortMatchConditionParameters_Operator_Values = map[string]ClientPortMatchConditionParameters_Operator{ + "any": ClientPortMatchConditionParameters_Operator_Any, + "beginswith": ClientPortMatchConditionParameters_Operator_BeginsWith, + "contains": ClientPortMatchConditionParameters_Operator_Contains, + "endswith": ClientPortMatchConditionParameters_Operator_EndsWith, + "equal": ClientPortMatchConditionParameters_Operator_Equal, + "greaterthan": ClientPortMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": ClientPortMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": ClientPortMatchConditionParameters_Operator_LessThan, + "lessthanorequal": ClientPortMatchConditionParameters_Operator_LessThanOrEqual, + "regex": ClientPortMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleClientPortConditionParameters"} type ClientPortMatchConditionParameters_TypeName string const ClientPortMatchConditionParameters_TypeName_DeliveryRuleClientPortConditionParameters = ClientPortMatchConditionParameters_TypeName("DeliveryRuleClientPortConditionParameters") +// Mapping from string to ClientPortMatchConditionParameters_TypeName +var clientPortMatchConditionParameters_TypeName_Values = map[string]ClientPortMatchConditionParameters_TypeName{ + "deliveryruleclientportconditionparameters": ClientPortMatchConditionParameters_TypeName_DeliveryRuleClientPortConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type CookiesMatchConditionParameters_Operator string @@ -1256,11 +1451,30 @@ const ( CookiesMatchConditionParameters_Operator_RegEx = CookiesMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to CookiesMatchConditionParameters_Operator +var cookiesMatchConditionParameters_Operator_Values = map[string]CookiesMatchConditionParameters_Operator{ + "any": CookiesMatchConditionParameters_Operator_Any, + "beginswith": CookiesMatchConditionParameters_Operator_BeginsWith, + "contains": CookiesMatchConditionParameters_Operator_Contains, + "endswith": CookiesMatchConditionParameters_Operator_EndsWith, + "equal": CookiesMatchConditionParameters_Operator_Equal, + "greaterthan": CookiesMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": CookiesMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": CookiesMatchConditionParameters_Operator_LessThan, + "lessthanorequal": CookiesMatchConditionParameters_Operator_LessThanOrEqual, + "regex": CookiesMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleCookiesConditionParameters"} type CookiesMatchConditionParameters_TypeName string const CookiesMatchConditionParameters_TypeName_DeliveryRuleCookiesConditionParameters = CookiesMatchConditionParameters_TypeName("DeliveryRuleCookiesConditionParameters") +// Mapping from string to CookiesMatchConditionParameters_TypeName +var cookiesMatchConditionParameters_TypeName_Values = map[string]CookiesMatchConditionParameters_TypeName{ + "deliveryrulecookiesconditionparameters": CookiesMatchConditionParameters_TypeName_DeliveryRuleCookiesConditionParameters, +} + // +kubebuilder:validation:Enum={"Append","Delete","Overwrite"} type HeaderActionParameters_HeaderAction string @@ -1270,11 +1484,23 @@ const ( HeaderActionParameters_HeaderAction_Overwrite = HeaderActionParameters_HeaderAction("Overwrite") ) +// Mapping from string to HeaderActionParameters_HeaderAction +var headerActionParameters_HeaderAction_Values = map[string]HeaderActionParameters_HeaderAction{ + "append": HeaderActionParameters_HeaderAction_Append, + "delete": HeaderActionParameters_HeaderAction_Delete, + "overwrite": HeaderActionParameters_HeaderAction_Overwrite, +} + // +kubebuilder:validation:Enum={"DeliveryRuleHeaderActionParameters"} type HeaderActionParameters_TypeName string const HeaderActionParameters_TypeName_DeliveryRuleHeaderActionParameters = HeaderActionParameters_TypeName("DeliveryRuleHeaderActionParameters") +// Mapping from string to HeaderActionParameters_TypeName +var headerActionParameters_TypeName_Values = map[string]HeaderActionParameters_TypeName{ + "deliveryruleheaderactionparameters": HeaderActionParameters_TypeName_DeliveryRuleHeaderActionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type HostNameMatchConditionParameters_Operator string @@ -1291,21 +1517,50 @@ const ( HostNameMatchConditionParameters_Operator_RegEx = HostNameMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to HostNameMatchConditionParameters_Operator +var hostNameMatchConditionParameters_Operator_Values = map[string]HostNameMatchConditionParameters_Operator{ + "any": HostNameMatchConditionParameters_Operator_Any, + "beginswith": HostNameMatchConditionParameters_Operator_BeginsWith, + "contains": HostNameMatchConditionParameters_Operator_Contains, + "endswith": HostNameMatchConditionParameters_Operator_EndsWith, + "equal": HostNameMatchConditionParameters_Operator_Equal, + "greaterthan": HostNameMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": HostNameMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": HostNameMatchConditionParameters_Operator_LessThan, + "lessthanorequal": HostNameMatchConditionParameters_Operator_LessThanOrEqual, + "regex": HostNameMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleHostNameConditionParameters"} type HostNameMatchConditionParameters_TypeName string const HostNameMatchConditionParameters_TypeName_DeliveryRuleHostNameConditionParameters = HostNameMatchConditionParameters_TypeName("DeliveryRuleHostNameConditionParameters") +// Mapping from string to HostNameMatchConditionParameters_TypeName +var hostNameMatchConditionParameters_TypeName_Values = map[string]HostNameMatchConditionParameters_TypeName{ + "deliveryrulehostnameconditionparameters": HostNameMatchConditionParameters_TypeName_DeliveryRuleHostNameConditionParameters, +} + // +kubebuilder:validation:Enum={"Equal"} type HttpVersionMatchConditionParameters_Operator string const HttpVersionMatchConditionParameters_Operator_Equal = HttpVersionMatchConditionParameters_Operator("Equal") +// Mapping from string to HttpVersionMatchConditionParameters_Operator +var httpVersionMatchConditionParameters_Operator_Values = map[string]HttpVersionMatchConditionParameters_Operator{ + "equal": HttpVersionMatchConditionParameters_Operator_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleHttpVersionConditionParameters"} type HttpVersionMatchConditionParameters_TypeName string const HttpVersionMatchConditionParameters_TypeName_DeliveryRuleHttpVersionConditionParameters = HttpVersionMatchConditionParameters_TypeName("DeliveryRuleHttpVersionConditionParameters") +// Mapping from string to HttpVersionMatchConditionParameters_TypeName +var httpVersionMatchConditionParameters_TypeName_Values = map[string]HttpVersionMatchConditionParameters_TypeName{ + "deliveryrulehttpversionconditionparameters": HttpVersionMatchConditionParameters_TypeName_DeliveryRuleHttpVersionConditionParameters, +} + // +kubebuilder:validation:Enum={"Desktop","Mobile"} type IsDeviceMatchConditionParameters_MatchValues string @@ -1314,16 +1569,32 @@ const ( IsDeviceMatchConditionParameters_MatchValues_Mobile = IsDeviceMatchConditionParameters_MatchValues("Mobile") ) +// Mapping from string to IsDeviceMatchConditionParameters_MatchValues +var isDeviceMatchConditionParameters_MatchValues_Values = map[string]IsDeviceMatchConditionParameters_MatchValues{ + "desktop": IsDeviceMatchConditionParameters_MatchValues_Desktop, + "mobile": IsDeviceMatchConditionParameters_MatchValues_Mobile, +} + // +kubebuilder:validation:Enum={"Equal"} type IsDeviceMatchConditionParameters_Operator string const IsDeviceMatchConditionParameters_Operator_Equal = IsDeviceMatchConditionParameters_Operator("Equal") +// Mapping from string to IsDeviceMatchConditionParameters_Operator +var isDeviceMatchConditionParameters_Operator_Values = map[string]IsDeviceMatchConditionParameters_Operator{ + "equal": IsDeviceMatchConditionParameters_Operator_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleIsDeviceConditionParameters"} type IsDeviceMatchConditionParameters_TypeName string const IsDeviceMatchConditionParameters_TypeName_DeliveryRuleIsDeviceConditionParameters = IsDeviceMatchConditionParameters_TypeName("DeliveryRuleIsDeviceConditionParameters") +// Mapping from string to IsDeviceMatchConditionParameters_TypeName +var isDeviceMatchConditionParameters_TypeName_Values = map[string]IsDeviceMatchConditionParameters_TypeName{ + "deliveryruleisdeviceconditionparameters": IsDeviceMatchConditionParameters_TypeName_DeliveryRuleIsDeviceConditionParameters, +} + // Defines the parameters for the origin group override configuration. type OriginGroupOverride_ARM struct { // ForwardingProtocol: Protocol this rule will use when forwarding traffic to backends. @@ -1338,6 +1609,11 @@ type OriginGroupOverrideActionParameters_TypeName string const OriginGroupOverrideActionParameters_TypeName_DeliveryRuleOriginGroupOverrideActionParameters = OriginGroupOverrideActionParameters_TypeName("DeliveryRuleOriginGroupOverrideActionParameters") +// Mapping from string to OriginGroupOverrideActionParameters_TypeName +var originGroupOverrideActionParameters_TypeName_Values = map[string]OriginGroupOverrideActionParameters_TypeName{ + "deliveryruleorigingroupoverrideactionparameters": OriginGroupOverrideActionParameters_TypeName_DeliveryRuleOriginGroupOverrideActionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type PostArgsMatchConditionParameters_Operator string @@ -1354,11 +1630,30 @@ const ( PostArgsMatchConditionParameters_Operator_RegEx = PostArgsMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to PostArgsMatchConditionParameters_Operator +var postArgsMatchConditionParameters_Operator_Values = map[string]PostArgsMatchConditionParameters_Operator{ + "any": PostArgsMatchConditionParameters_Operator_Any, + "beginswith": PostArgsMatchConditionParameters_Operator_BeginsWith, + "contains": PostArgsMatchConditionParameters_Operator_Contains, + "endswith": PostArgsMatchConditionParameters_Operator_EndsWith, + "equal": PostArgsMatchConditionParameters_Operator_Equal, + "greaterthan": PostArgsMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": PostArgsMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": PostArgsMatchConditionParameters_Operator_LessThan, + "lessthanorequal": PostArgsMatchConditionParameters_Operator_LessThanOrEqual, + "regex": PostArgsMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRulePostArgsConditionParameters"} type PostArgsMatchConditionParameters_TypeName string const PostArgsMatchConditionParameters_TypeName_DeliveryRulePostArgsConditionParameters = PostArgsMatchConditionParameters_TypeName("DeliveryRulePostArgsConditionParameters") +// Mapping from string to PostArgsMatchConditionParameters_TypeName +var postArgsMatchConditionParameters_TypeName_Values = map[string]PostArgsMatchConditionParameters_TypeName{ + "deliveryrulepostargsconditionparameters": PostArgsMatchConditionParameters_TypeName_DeliveryRulePostArgsConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type QueryStringMatchConditionParameters_Operator string @@ -1375,11 +1670,30 @@ const ( QueryStringMatchConditionParameters_Operator_RegEx = QueryStringMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to QueryStringMatchConditionParameters_Operator +var queryStringMatchConditionParameters_Operator_Values = map[string]QueryStringMatchConditionParameters_Operator{ + "any": QueryStringMatchConditionParameters_Operator_Any, + "beginswith": QueryStringMatchConditionParameters_Operator_BeginsWith, + "contains": QueryStringMatchConditionParameters_Operator_Contains, + "endswith": QueryStringMatchConditionParameters_Operator_EndsWith, + "equal": QueryStringMatchConditionParameters_Operator_Equal, + "greaterthan": QueryStringMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": QueryStringMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": QueryStringMatchConditionParameters_Operator_LessThan, + "lessthanorequal": QueryStringMatchConditionParameters_Operator_LessThanOrEqual, + "regex": QueryStringMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleQueryStringConditionParameters"} type QueryStringMatchConditionParameters_TypeName string const QueryStringMatchConditionParameters_TypeName_DeliveryRuleQueryStringConditionParameters = QueryStringMatchConditionParameters_TypeName("DeliveryRuleQueryStringConditionParameters") +// Mapping from string to QueryStringMatchConditionParameters_TypeName +var queryStringMatchConditionParameters_TypeName_Values = map[string]QueryStringMatchConditionParameters_TypeName{ + "deliveryrulequerystringconditionparameters": QueryStringMatchConditionParameters_TypeName_DeliveryRuleQueryStringConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","GeoMatch","IPMatch"} type RemoteAddressMatchConditionParameters_Operator string @@ -1389,11 +1703,23 @@ const ( RemoteAddressMatchConditionParameters_Operator_IPMatch = RemoteAddressMatchConditionParameters_Operator("IPMatch") ) +// Mapping from string to RemoteAddressMatchConditionParameters_Operator +var remoteAddressMatchConditionParameters_Operator_Values = map[string]RemoteAddressMatchConditionParameters_Operator{ + "any": RemoteAddressMatchConditionParameters_Operator_Any, + "geomatch": RemoteAddressMatchConditionParameters_Operator_GeoMatch, + "ipmatch": RemoteAddressMatchConditionParameters_Operator_IPMatch, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRemoteAddressConditionParameters"} type RemoteAddressMatchConditionParameters_TypeName string const RemoteAddressMatchConditionParameters_TypeName_DeliveryRuleRemoteAddressConditionParameters = RemoteAddressMatchConditionParameters_TypeName("DeliveryRuleRemoteAddressConditionParameters") +// Mapping from string to RemoteAddressMatchConditionParameters_TypeName +var remoteAddressMatchConditionParameters_TypeName_Values = map[string]RemoteAddressMatchConditionParameters_TypeName{ + "deliveryruleremoteaddressconditionparameters": RemoteAddressMatchConditionParameters_TypeName_DeliveryRuleRemoteAddressConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type RequestBodyMatchConditionParameters_Operator string @@ -1410,11 +1736,30 @@ const ( RequestBodyMatchConditionParameters_Operator_RegEx = RequestBodyMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to RequestBodyMatchConditionParameters_Operator +var requestBodyMatchConditionParameters_Operator_Values = map[string]RequestBodyMatchConditionParameters_Operator{ + "any": RequestBodyMatchConditionParameters_Operator_Any, + "beginswith": RequestBodyMatchConditionParameters_Operator_BeginsWith, + "contains": RequestBodyMatchConditionParameters_Operator_Contains, + "endswith": RequestBodyMatchConditionParameters_Operator_EndsWith, + "equal": RequestBodyMatchConditionParameters_Operator_Equal, + "greaterthan": RequestBodyMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": RequestBodyMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": RequestBodyMatchConditionParameters_Operator_LessThan, + "lessthanorequal": RequestBodyMatchConditionParameters_Operator_LessThanOrEqual, + "regex": RequestBodyMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestBodyConditionParameters"} type RequestBodyMatchConditionParameters_TypeName string const RequestBodyMatchConditionParameters_TypeName_DeliveryRuleRequestBodyConditionParameters = RequestBodyMatchConditionParameters_TypeName("DeliveryRuleRequestBodyConditionParameters") +// Mapping from string to RequestBodyMatchConditionParameters_TypeName +var requestBodyMatchConditionParameters_TypeName_Values = map[string]RequestBodyMatchConditionParameters_TypeName{ + "deliveryrulerequestbodyconditionparameters": RequestBodyMatchConditionParameters_TypeName_DeliveryRuleRequestBodyConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type RequestHeaderMatchConditionParameters_Operator string @@ -1431,11 +1776,30 @@ const ( RequestHeaderMatchConditionParameters_Operator_RegEx = RequestHeaderMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to RequestHeaderMatchConditionParameters_Operator +var requestHeaderMatchConditionParameters_Operator_Values = map[string]RequestHeaderMatchConditionParameters_Operator{ + "any": RequestHeaderMatchConditionParameters_Operator_Any, + "beginswith": RequestHeaderMatchConditionParameters_Operator_BeginsWith, + "contains": RequestHeaderMatchConditionParameters_Operator_Contains, + "endswith": RequestHeaderMatchConditionParameters_Operator_EndsWith, + "equal": RequestHeaderMatchConditionParameters_Operator_Equal, + "greaterthan": RequestHeaderMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": RequestHeaderMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": RequestHeaderMatchConditionParameters_Operator_LessThan, + "lessthanorequal": RequestHeaderMatchConditionParameters_Operator_LessThanOrEqual, + "regex": RequestHeaderMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestHeaderConditionParameters"} type RequestHeaderMatchConditionParameters_TypeName string const RequestHeaderMatchConditionParameters_TypeName_DeliveryRuleRequestHeaderConditionParameters = RequestHeaderMatchConditionParameters_TypeName("DeliveryRuleRequestHeaderConditionParameters") +// Mapping from string to RequestHeaderMatchConditionParameters_TypeName +var requestHeaderMatchConditionParameters_TypeName_Values = map[string]RequestHeaderMatchConditionParameters_TypeName{ + "deliveryrulerequestheaderconditionparameters": RequestHeaderMatchConditionParameters_TypeName_DeliveryRuleRequestHeaderConditionParameters, +} + // +kubebuilder:validation:Enum={"DELETE","GET","HEAD","OPTIONS","POST","PUT","TRACE"} type RequestMethodMatchConditionParameters_MatchValues string @@ -1449,16 +1813,37 @@ const ( RequestMethodMatchConditionParameters_MatchValues_TRACE = RequestMethodMatchConditionParameters_MatchValues("TRACE") ) +// Mapping from string to RequestMethodMatchConditionParameters_MatchValues +var requestMethodMatchConditionParameters_MatchValues_Values = map[string]RequestMethodMatchConditionParameters_MatchValues{ + "delete": RequestMethodMatchConditionParameters_MatchValues_DELETE, + "get": RequestMethodMatchConditionParameters_MatchValues_GET, + "head": RequestMethodMatchConditionParameters_MatchValues_HEAD, + "options": RequestMethodMatchConditionParameters_MatchValues_OPTIONS, + "post": RequestMethodMatchConditionParameters_MatchValues_POST, + "put": RequestMethodMatchConditionParameters_MatchValues_PUT, + "trace": RequestMethodMatchConditionParameters_MatchValues_TRACE, +} + // +kubebuilder:validation:Enum={"Equal"} type RequestMethodMatchConditionParameters_Operator string const RequestMethodMatchConditionParameters_Operator_Equal = RequestMethodMatchConditionParameters_Operator("Equal") +// Mapping from string to RequestMethodMatchConditionParameters_Operator +var requestMethodMatchConditionParameters_Operator_Values = map[string]RequestMethodMatchConditionParameters_Operator{ + "equal": RequestMethodMatchConditionParameters_Operator_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestMethodConditionParameters"} type RequestMethodMatchConditionParameters_TypeName string const RequestMethodMatchConditionParameters_TypeName_DeliveryRuleRequestMethodConditionParameters = RequestMethodMatchConditionParameters_TypeName("DeliveryRuleRequestMethodConditionParameters") +// Mapping from string to RequestMethodMatchConditionParameters_TypeName +var requestMethodMatchConditionParameters_TypeName_Values = map[string]RequestMethodMatchConditionParameters_TypeName{ + "deliveryrulerequestmethodconditionparameters": RequestMethodMatchConditionParameters_TypeName_DeliveryRuleRequestMethodConditionParameters, +} + // +kubebuilder:validation:Enum={"HTTP","HTTPS"} type RequestSchemeMatchConditionParameters_MatchValues string @@ -1467,16 +1852,32 @@ const ( RequestSchemeMatchConditionParameters_MatchValues_HTTPS = RequestSchemeMatchConditionParameters_MatchValues("HTTPS") ) +// Mapping from string to RequestSchemeMatchConditionParameters_MatchValues +var requestSchemeMatchConditionParameters_MatchValues_Values = map[string]RequestSchemeMatchConditionParameters_MatchValues{ + "http": RequestSchemeMatchConditionParameters_MatchValues_HTTP, + "https": RequestSchemeMatchConditionParameters_MatchValues_HTTPS, +} + // +kubebuilder:validation:Enum={"Equal"} type RequestSchemeMatchConditionParameters_Operator string const RequestSchemeMatchConditionParameters_Operator_Equal = RequestSchemeMatchConditionParameters_Operator("Equal") +// Mapping from string to RequestSchemeMatchConditionParameters_Operator +var requestSchemeMatchConditionParameters_Operator_Values = map[string]RequestSchemeMatchConditionParameters_Operator{ + "equal": RequestSchemeMatchConditionParameters_Operator_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestSchemeConditionParameters"} type RequestSchemeMatchConditionParameters_TypeName string const RequestSchemeMatchConditionParameters_TypeName_DeliveryRuleRequestSchemeConditionParameters = RequestSchemeMatchConditionParameters_TypeName("DeliveryRuleRequestSchemeConditionParameters") +// Mapping from string to RequestSchemeMatchConditionParameters_TypeName +var requestSchemeMatchConditionParameters_TypeName_Values = map[string]RequestSchemeMatchConditionParameters_TypeName{ + "deliveryrulerequestschemeconditionparameters": RequestSchemeMatchConditionParameters_TypeName_DeliveryRuleRequestSchemeConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type RequestUriMatchConditionParameters_Operator string @@ -1493,16 +1894,40 @@ const ( RequestUriMatchConditionParameters_Operator_RegEx = RequestUriMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to RequestUriMatchConditionParameters_Operator +var requestUriMatchConditionParameters_Operator_Values = map[string]RequestUriMatchConditionParameters_Operator{ + "any": RequestUriMatchConditionParameters_Operator_Any, + "beginswith": RequestUriMatchConditionParameters_Operator_BeginsWith, + "contains": RequestUriMatchConditionParameters_Operator_Contains, + "endswith": RequestUriMatchConditionParameters_Operator_EndsWith, + "equal": RequestUriMatchConditionParameters_Operator_Equal, + "greaterthan": RequestUriMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": RequestUriMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": RequestUriMatchConditionParameters_Operator_LessThan, + "lessthanorequal": RequestUriMatchConditionParameters_Operator_LessThanOrEqual, + "regex": RequestUriMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRequestUriConditionParameters"} type RequestUriMatchConditionParameters_TypeName string const RequestUriMatchConditionParameters_TypeName_DeliveryRuleRequestUriConditionParameters = RequestUriMatchConditionParameters_TypeName("DeliveryRuleRequestUriConditionParameters") +// Mapping from string to RequestUriMatchConditionParameters_TypeName +var requestUriMatchConditionParameters_TypeName_Values = map[string]RequestUriMatchConditionParameters_TypeName{ + "deliveryrulerequesturiconditionparameters": RequestUriMatchConditionParameters_TypeName_DeliveryRuleRequestUriConditionParameters, +} + // +kubebuilder:validation:Enum={"DeliveryRuleRouteConfigurationOverrideActionParameters"} type RouteConfigurationOverrideActionParameters_TypeName string const RouteConfigurationOverrideActionParameters_TypeName_DeliveryRuleRouteConfigurationOverrideActionParameters = RouteConfigurationOverrideActionParameters_TypeName("DeliveryRuleRouteConfigurationOverrideActionParameters") +// Mapping from string to RouteConfigurationOverrideActionParameters_TypeName +var routeConfigurationOverrideActionParameters_TypeName_Values = map[string]RouteConfigurationOverrideActionParameters_TypeName{ + "deliveryrulerouteconfigurationoverrideactionparameters": RouteConfigurationOverrideActionParameters_TypeName_DeliveryRuleRouteConfigurationOverrideActionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type ServerPortMatchConditionParameters_Operator string @@ -1519,11 +1944,30 @@ const ( ServerPortMatchConditionParameters_Operator_RegEx = ServerPortMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to ServerPortMatchConditionParameters_Operator +var serverPortMatchConditionParameters_Operator_Values = map[string]ServerPortMatchConditionParameters_Operator{ + "any": ServerPortMatchConditionParameters_Operator_Any, + "beginswith": ServerPortMatchConditionParameters_Operator_BeginsWith, + "contains": ServerPortMatchConditionParameters_Operator_Contains, + "endswith": ServerPortMatchConditionParameters_Operator_EndsWith, + "equal": ServerPortMatchConditionParameters_Operator_Equal, + "greaterthan": ServerPortMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": ServerPortMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": ServerPortMatchConditionParameters_Operator_LessThan, + "lessthanorequal": ServerPortMatchConditionParameters_Operator_LessThanOrEqual, + "regex": ServerPortMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleServerPortConditionParameters"} type ServerPortMatchConditionParameters_TypeName string const ServerPortMatchConditionParameters_TypeName_DeliveryRuleServerPortConditionParameters = ServerPortMatchConditionParameters_TypeName("DeliveryRuleServerPortConditionParameters") +// Mapping from string to ServerPortMatchConditionParameters_TypeName +var serverPortMatchConditionParameters_TypeName_Values = map[string]ServerPortMatchConditionParameters_TypeName{ + "deliveryruleserverportconditionparameters": ServerPortMatchConditionParameters_TypeName_DeliveryRuleServerPortConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","IPMatch"} type SocketAddrMatchConditionParameters_Operator string @@ -1532,11 +1976,22 @@ const ( SocketAddrMatchConditionParameters_Operator_IPMatch = SocketAddrMatchConditionParameters_Operator("IPMatch") ) +// Mapping from string to SocketAddrMatchConditionParameters_Operator +var socketAddrMatchConditionParameters_Operator_Values = map[string]SocketAddrMatchConditionParameters_Operator{ + "any": SocketAddrMatchConditionParameters_Operator_Any, + "ipmatch": SocketAddrMatchConditionParameters_Operator_IPMatch, +} + // +kubebuilder:validation:Enum={"DeliveryRuleSocketAddrConditionParameters"} type SocketAddrMatchConditionParameters_TypeName string const SocketAddrMatchConditionParameters_TypeName_DeliveryRuleSocketAddrConditionParameters = SocketAddrMatchConditionParameters_TypeName("DeliveryRuleSocketAddrConditionParameters") +// Mapping from string to SocketAddrMatchConditionParameters_TypeName +var socketAddrMatchConditionParameters_TypeName_Values = map[string]SocketAddrMatchConditionParameters_TypeName{ + "deliveryrulesocketaddrconditionparameters": SocketAddrMatchConditionParameters_TypeName_DeliveryRuleSocketAddrConditionParameters, +} + // The protocol of an established TLS connection. // +kubebuilder:validation:Enum={"TLSv1","TLSv1.1","TLSv1.2"} type SslProtocol string @@ -1547,16 +2002,33 @@ const ( SslProtocol_TLSv12 = SslProtocol("TLSv1.2") ) +// Mapping from string to SslProtocol +var sslProtocol_Values = map[string]SslProtocol{ + "tlsv1": SslProtocol_TLSv1, + "tlsv1.1": SslProtocol_TLSv11, + "tlsv1.2": SslProtocol_TLSv12, +} + // +kubebuilder:validation:Enum={"Equal"} type SslProtocolMatchConditionParameters_Operator string const SslProtocolMatchConditionParameters_Operator_Equal = SslProtocolMatchConditionParameters_Operator("Equal") +// Mapping from string to SslProtocolMatchConditionParameters_Operator +var sslProtocolMatchConditionParameters_Operator_Values = map[string]SslProtocolMatchConditionParameters_Operator{ + "equal": SslProtocolMatchConditionParameters_Operator_Equal, +} + // +kubebuilder:validation:Enum={"DeliveryRuleSslProtocolConditionParameters"} type SslProtocolMatchConditionParameters_TypeName string const SslProtocolMatchConditionParameters_TypeName_DeliveryRuleSslProtocolConditionParameters = SslProtocolMatchConditionParameters_TypeName("DeliveryRuleSslProtocolConditionParameters") +// Mapping from string to SslProtocolMatchConditionParameters_TypeName +var sslProtocolMatchConditionParameters_TypeName_Values = map[string]SslProtocolMatchConditionParameters_TypeName{ + "deliveryrulesslprotocolconditionparameters": SslProtocolMatchConditionParameters_TypeName_DeliveryRuleSslProtocolConditionParameters, +} + // Describes what transforms are applied before matching // +kubebuilder:validation:Enum={"Lowercase","RemoveNulls","Trim","Uppercase","UrlDecode","UrlEncode"} type Transform string @@ -1570,6 +2042,16 @@ const ( Transform_UrlEncode = Transform("UrlEncode") ) +// Mapping from string to Transform +var transform_Values = map[string]Transform{ + "lowercase": Transform_Lowercase, + "removenulls": Transform_RemoveNulls, + "trim": Transform_Trim, + "uppercase": Transform_Uppercase, + "urldecode": Transform_UrlDecode, + "urlencode": Transform_UrlEncode, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type UrlFileExtensionMatchConditionParameters_Operator string @@ -1586,11 +2068,30 @@ const ( UrlFileExtensionMatchConditionParameters_Operator_RegEx = UrlFileExtensionMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to UrlFileExtensionMatchConditionParameters_Operator +var urlFileExtensionMatchConditionParameters_Operator_Values = map[string]UrlFileExtensionMatchConditionParameters_Operator{ + "any": UrlFileExtensionMatchConditionParameters_Operator_Any, + "beginswith": UrlFileExtensionMatchConditionParameters_Operator_BeginsWith, + "contains": UrlFileExtensionMatchConditionParameters_Operator_Contains, + "endswith": UrlFileExtensionMatchConditionParameters_Operator_EndsWith, + "equal": UrlFileExtensionMatchConditionParameters_Operator_Equal, + "greaterthan": UrlFileExtensionMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": UrlFileExtensionMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": UrlFileExtensionMatchConditionParameters_Operator_LessThan, + "lessthanorequal": UrlFileExtensionMatchConditionParameters_Operator_LessThanOrEqual, + "regex": UrlFileExtensionMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlFileExtensionMatchConditionParameters"} type UrlFileExtensionMatchConditionParameters_TypeName string const UrlFileExtensionMatchConditionParameters_TypeName_DeliveryRuleUrlFileExtensionMatchConditionParameters = UrlFileExtensionMatchConditionParameters_TypeName("DeliveryRuleUrlFileExtensionMatchConditionParameters") +// Mapping from string to UrlFileExtensionMatchConditionParameters_TypeName +var urlFileExtensionMatchConditionParameters_TypeName_Values = map[string]UrlFileExtensionMatchConditionParameters_TypeName{ + "deliveryruleurlfileextensionmatchconditionparameters": UrlFileExtensionMatchConditionParameters_TypeName_DeliveryRuleUrlFileExtensionMatchConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx"} type UrlFileNameMatchConditionParameters_Operator string @@ -1607,11 +2108,30 @@ const ( UrlFileNameMatchConditionParameters_Operator_RegEx = UrlFileNameMatchConditionParameters_Operator("RegEx") ) +// Mapping from string to UrlFileNameMatchConditionParameters_Operator +var urlFileNameMatchConditionParameters_Operator_Values = map[string]UrlFileNameMatchConditionParameters_Operator{ + "any": UrlFileNameMatchConditionParameters_Operator_Any, + "beginswith": UrlFileNameMatchConditionParameters_Operator_BeginsWith, + "contains": UrlFileNameMatchConditionParameters_Operator_Contains, + "endswith": UrlFileNameMatchConditionParameters_Operator_EndsWith, + "equal": UrlFileNameMatchConditionParameters_Operator_Equal, + "greaterthan": UrlFileNameMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": UrlFileNameMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": UrlFileNameMatchConditionParameters_Operator_LessThan, + "lessthanorequal": UrlFileNameMatchConditionParameters_Operator_LessThanOrEqual, + "regex": UrlFileNameMatchConditionParameters_Operator_RegEx, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlFilenameConditionParameters"} type UrlFileNameMatchConditionParameters_TypeName string const UrlFileNameMatchConditionParameters_TypeName_DeliveryRuleUrlFilenameConditionParameters = UrlFileNameMatchConditionParameters_TypeName("DeliveryRuleUrlFilenameConditionParameters") +// Mapping from string to UrlFileNameMatchConditionParameters_TypeName +var urlFileNameMatchConditionParameters_TypeName_Values = map[string]UrlFileNameMatchConditionParameters_TypeName{ + "deliveryruleurlfilenameconditionparameters": UrlFileNameMatchConditionParameters_TypeName_DeliveryRuleUrlFilenameConditionParameters, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","RegEx","Wildcard"} type UrlPathMatchConditionParameters_Operator string @@ -1629,11 +2149,31 @@ const ( UrlPathMatchConditionParameters_Operator_Wildcard = UrlPathMatchConditionParameters_Operator("Wildcard") ) +// Mapping from string to UrlPathMatchConditionParameters_Operator +var urlPathMatchConditionParameters_Operator_Values = map[string]UrlPathMatchConditionParameters_Operator{ + "any": UrlPathMatchConditionParameters_Operator_Any, + "beginswith": UrlPathMatchConditionParameters_Operator_BeginsWith, + "contains": UrlPathMatchConditionParameters_Operator_Contains, + "endswith": UrlPathMatchConditionParameters_Operator_EndsWith, + "equal": UrlPathMatchConditionParameters_Operator_Equal, + "greaterthan": UrlPathMatchConditionParameters_Operator_GreaterThan, + "greaterthanorequal": UrlPathMatchConditionParameters_Operator_GreaterThanOrEqual, + "lessthan": UrlPathMatchConditionParameters_Operator_LessThan, + "lessthanorequal": UrlPathMatchConditionParameters_Operator_LessThanOrEqual, + "regex": UrlPathMatchConditionParameters_Operator_RegEx, + "wildcard": UrlPathMatchConditionParameters_Operator_Wildcard, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlPathMatchConditionParameters"} type UrlPathMatchConditionParameters_TypeName string const UrlPathMatchConditionParameters_TypeName_DeliveryRuleUrlPathMatchConditionParameters = UrlPathMatchConditionParameters_TypeName("DeliveryRuleUrlPathMatchConditionParameters") +// Mapping from string to UrlPathMatchConditionParameters_TypeName +var urlPathMatchConditionParameters_TypeName_Values = map[string]UrlPathMatchConditionParameters_TypeName{ + "deliveryruleurlpathmatchconditionparameters": UrlPathMatchConditionParameters_TypeName_DeliveryRuleUrlPathMatchConditionParameters, +} + // +kubebuilder:validation:Enum={"Http","Https","MatchRequest"} type UrlRedirectActionParameters_DestinationProtocol string @@ -1643,6 +2183,13 @@ const ( UrlRedirectActionParameters_DestinationProtocol_MatchRequest = UrlRedirectActionParameters_DestinationProtocol("MatchRequest") ) +// Mapping from string to UrlRedirectActionParameters_DestinationProtocol +var urlRedirectActionParameters_DestinationProtocol_Values = map[string]UrlRedirectActionParameters_DestinationProtocol{ + "http": UrlRedirectActionParameters_DestinationProtocol_Http, + "https": UrlRedirectActionParameters_DestinationProtocol_Https, + "matchrequest": UrlRedirectActionParameters_DestinationProtocol_MatchRequest, +} + // +kubebuilder:validation:Enum={"Found","Moved","PermanentRedirect","TemporaryRedirect"} type UrlRedirectActionParameters_RedirectType string @@ -1653,26 +2200,54 @@ const ( UrlRedirectActionParameters_RedirectType_TemporaryRedirect = UrlRedirectActionParameters_RedirectType("TemporaryRedirect") ) +// Mapping from string to UrlRedirectActionParameters_RedirectType +var urlRedirectActionParameters_RedirectType_Values = map[string]UrlRedirectActionParameters_RedirectType{ + "found": UrlRedirectActionParameters_RedirectType_Found, + "moved": UrlRedirectActionParameters_RedirectType_Moved, + "permanentredirect": UrlRedirectActionParameters_RedirectType_PermanentRedirect, + "temporaryredirect": UrlRedirectActionParameters_RedirectType_TemporaryRedirect, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlRedirectActionParameters"} type UrlRedirectActionParameters_TypeName string const UrlRedirectActionParameters_TypeName_DeliveryRuleUrlRedirectActionParameters = UrlRedirectActionParameters_TypeName("DeliveryRuleUrlRedirectActionParameters") +// Mapping from string to UrlRedirectActionParameters_TypeName +var urlRedirectActionParameters_TypeName_Values = map[string]UrlRedirectActionParameters_TypeName{ + "deliveryruleurlredirectactionparameters": UrlRedirectActionParameters_TypeName_DeliveryRuleUrlRedirectActionParameters, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlRewriteActionParameters"} type UrlRewriteActionParameters_TypeName string const UrlRewriteActionParameters_TypeName_DeliveryRuleUrlRewriteActionParameters = UrlRewriteActionParameters_TypeName("DeliveryRuleUrlRewriteActionParameters") +// Mapping from string to UrlRewriteActionParameters_TypeName +var urlRewriteActionParameters_TypeName_Values = map[string]UrlRewriteActionParameters_TypeName{ + "deliveryruleurlrewriteactionparameters": UrlRewriteActionParameters_TypeName_DeliveryRuleUrlRewriteActionParameters, +} + // +kubebuilder:validation:Enum={"SHA256"} type UrlSigningActionParameters_Algorithm string const UrlSigningActionParameters_Algorithm_SHA256 = UrlSigningActionParameters_Algorithm("SHA256") +// Mapping from string to UrlSigningActionParameters_Algorithm +var urlSigningActionParameters_Algorithm_Values = map[string]UrlSigningActionParameters_Algorithm{ + "sha256": UrlSigningActionParameters_Algorithm_SHA256, +} + // +kubebuilder:validation:Enum={"DeliveryRuleUrlSigningActionParameters"} type UrlSigningActionParameters_TypeName string const UrlSigningActionParameters_TypeName_DeliveryRuleUrlSigningActionParameters = UrlSigningActionParameters_TypeName("DeliveryRuleUrlSigningActionParameters") +// Mapping from string to UrlSigningActionParameters_TypeName +var urlSigningActionParameters_TypeName_Values = map[string]UrlSigningActionParameters_TypeName{ + "deliveryruleurlsigningactionparameters": UrlSigningActionParameters_TypeName_DeliveryRuleUrlSigningActionParameters, +} + // Defines how to identify a parameter for a specific purpose e.g. expires type UrlSigningParamIdentifier_ARM struct { // ParamIndicator: Indicates the purpose of the parameter @@ -1691,6 +2266,13 @@ const ( CacheConfiguration_CacheBehavior_OverrideIfOriginMissing = CacheConfiguration_CacheBehavior("OverrideIfOriginMissing") ) +// Mapping from string to CacheConfiguration_CacheBehavior +var cacheConfiguration_CacheBehavior_Values = map[string]CacheConfiguration_CacheBehavior{ + "honororigin": CacheConfiguration_CacheBehavior_HonorOrigin, + "overridealways": CacheConfiguration_CacheBehavior_OverrideAlways, + "overrideiforiginmissing": CacheConfiguration_CacheBehavior_OverrideIfOriginMissing, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type CacheConfiguration_IsCompressionEnabled string @@ -1699,6 +2281,12 @@ const ( CacheConfiguration_IsCompressionEnabled_Enabled = CacheConfiguration_IsCompressionEnabled("Enabled") ) +// Mapping from string to CacheConfiguration_IsCompressionEnabled +var cacheConfiguration_IsCompressionEnabled_Values = map[string]CacheConfiguration_IsCompressionEnabled{ + "disabled": CacheConfiguration_IsCompressionEnabled_Disabled, + "enabled": CacheConfiguration_IsCompressionEnabled_Enabled, +} + // +kubebuilder:validation:Enum={"IgnoreQueryString","IgnoreSpecifiedQueryStrings","IncludeSpecifiedQueryStrings","UseQueryString"} type CacheConfiguration_QueryStringCachingBehavior string @@ -1709,6 +2297,14 @@ const ( CacheConfiguration_QueryStringCachingBehavior_UseQueryString = CacheConfiguration_QueryStringCachingBehavior("UseQueryString") ) +// Mapping from string to CacheConfiguration_QueryStringCachingBehavior +var cacheConfiguration_QueryStringCachingBehavior_Values = map[string]CacheConfiguration_QueryStringCachingBehavior{ + "ignorequerystring": CacheConfiguration_QueryStringCachingBehavior_IgnoreQueryString, + "ignorespecifiedquerystrings": CacheConfiguration_QueryStringCachingBehavior_IgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": CacheConfiguration_QueryStringCachingBehavior_IncludeSpecifiedQueryStrings, + "usequerystring": CacheConfiguration_QueryStringCachingBehavior_UseQueryString, +} + // +kubebuilder:validation:Enum={"HttpOnly","HttpsOnly","MatchRequest"} type OriginGroupOverride_ForwardingProtocol string @@ -1718,6 +2314,13 @@ const ( OriginGroupOverride_ForwardingProtocol_MatchRequest = OriginGroupOverride_ForwardingProtocol("MatchRequest") ) +// Mapping from string to OriginGroupOverride_ForwardingProtocol +var originGroupOverride_ForwardingProtocol_Values = map[string]OriginGroupOverride_ForwardingProtocol{ + "httponly": OriginGroupOverride_ForwardingProtocol_HttpOnly, + "httpsonly": OriginGroupOverride_ForwardingProtocol_HttpsOnly, + "matchrequest": OriginGroupOverride_ForwardingProtocol_MatchRequest, +} + // +kubebuilder:validation:Enum={"Expires","KeyId","Signature"} type UrlSigningParamIdentifier_ParamIndicator string @@ -1726,3 +2329,10 @@ const ( UrlSigningParamIdentifier_ParamIndicator_KeyId = UrlSigningParamIdentifier_ParamIndicator("KeyId") UrlSigningParamIdentifier_ParamIndicator_Signature = UrlSigningParamIdentifier_ParamIndicator("Signature") ) + +// Mapping from string to UrlSigningParamIdentifier_ParamIndicator +var urlSigningParamIdentifier_ParamIndicator_Values = map[string]UrlSigningParamIdentifier_ParamIndicator{ + "expires": UrlSigningParamIdentifier_ParamIndicator_Expires, + "keyid": UrlSigningParamIdentifier_ParamIndicator_KeyId, + "signature": UrlSigningParamIdentifier_ParamIndicator_Signature, +} diff --git a/v2/api/cdn/v1api20230501/profiles_rule_sets_rule_status_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_rule_sets_rule_status_arm_types_gen.go index f5bb32a8c1a..84fc545900b 100644 --- a/v2/api/cdn/v1api20230501/profiles_rule_sets_rule_status_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_rule_sets_rule_status_arm_types_gen.go @@ -378,6 +378,14 @@ const ( RuleProperties_DeploymentStatus_STATUS_Succeeded = RuleProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to RuleProperties_DeploymentStatus_STATUS +var ruleProperties_DeploymentStatus_STATUS_Values = map[string]RuleProperties_DeploymentStatus_STATUS{ + "failed": RuleProperties_DeploymentStatus_STATUS_Failed, + "inprogress": RuleProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": RuleProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": RuleProperties_DeploymentStatus_STATUS_Succeeded, +} + type RuleProperties_MatchProcessingBehavior_STATUS string const ( @@ -385,6 +393,12 @@ const ( RuleProperties_MatchProcessingBehavior_STATUS_Stop = RuleProperties_MatchProcessingBehavior_STATUS("Stop") ) +// Mapping from string to RuleProperties_MatchProcessingBehavior_STATUS +var ruleProperties_MatchProcessingBehavior_STATUS_Values = map[string]RuleProperties_MatchProcessingBehavior_STATUS{ + "continue": RuleProperties_MatchProcessingBehavior_STATUS_Continue, + "stop": RuleProperties_MatchProcessingBehavior_STATUS_Stop, +} + type RuleProperties_ProvisioningState_STATUS string const ( @@ -395,6 +409,15 @@ const ( RuleProperties_ProvisioningState_STATUS_Updating = RuleProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to RuleProperties_ProvisioningState_STATUS +var ruleProperties_ProvisioningState_STATUS_Values = map[string]RuleProperties_ProvisioningState_STATUS{ + "creating": RuleProperties_ProvisioningState_STATUS_Creating, + "deleting": RuleProperties_ProvisioningState_STATUS_Deleting, + "failed": RuleProperties_ProvisioningState_STATUS_Failed, + "succeeded": RuleProperties_ProvisioningState_STATUS_Succeeded, + "updating": RuleProperties_ProvisioningState_STATUS_Updating, +} + type DeliveryRuleCacheExpirationAction_STATUS_ARM struct { // Name: The name of the action for the delivery rule. Name DeliveryRuleCacheExpirationAction_Name_STATUS `json:"name,omitempty"` @@ -681,98 +704,218 @@ type DeliveryRuleCacheExpirationAction_Name_STATUS string const DeliveryRuleCacheExpirationAction_Name_STATUS_CacheExpiration = DeliveryRuleCacheExpirationAction_Name_STATUS("CacheExpiration") +// Mapping from string to DeliveryRuleCacheExpirationAction_Name_STATUS +var deliveryRuleCacheExpirationAction_Name_STATUS_Values = map[string]DeliveryRuleCacheExpirationAction_Name_STATUS{ + "cacheexpiration": DeliveryRuleCacheExpirationAction_Name_STATUS_CacheExpiration, +} + type DeliveryRuleCacheKeyQueryStringAction_Name_STATUS string const DeliveryRuleCacheKeyQueryStringAction_Name_STATUS_CacheKeyQueryString = DeliveryRuleCacheKeyQueryStringAction_Name_STATUS("CacheKeyQueryString") +// Mapping from string to DeliveryRuleCacheKeyQueryStringAction_Name_STATUS +var deliveryRuleCacheKeyQueryStringAction_Name_STATUS_Values = map[string]DeliveryRuleCacheKeyQueryStringAction_Name_STATUS{ + "cachekeyquerystring": DeliveryRuleCacheKeyQueryStringAction_Name_STATUS_CacheKeyQueryString, +} + type DeliveryRuleClientPortCondition_Name_STATUS string const DeliveryRuleClientPortCondition_Name_STATUS_ClientPort = DeliveryRuleClientPortCondition_Name_STATUS("ClientPort") +// Mapping from string to DeliveryRuleClientPortCondition_Name_STATUS +var deliveryRuleClientPortCondition_Name_STATUS_Values = map[string]DeliveryRuleClientPortCondition_Name_STATUS{ + "clientport": DeliveryRuleClientPortCondition_Name_STATUS_ClientPort, +} + type DeliveryRuleCookiesCondition_Name_STATUS string const DeliveryRuleCookiesCondition_Name_STATUS_Cookies = DeliveryRuleCookiesCondition_Name_STATUS("Cookies") +// Mapping from string to DeliveryRuleCookiesCondition_Name_STATUS +var deliveryRuleCookiesCondition_Name_STATUS_Values = map[string]DeliveryRuleCookiesCondition_Name_STATUS{ + "cookies": DeliveryRuleCookiesCondition_Name_STATUS_Cookies, +} + type DeliveryRuleHostNameCondition_Name_STATUS string const DeliveryRuleHostNameCondition_Name_STATUS_HostName = DeliveryRuleHostNameCondition_Name_STATUS("HostName") +// Mapping from string to DeliveryRuleHostNameCondition_Name_STATUS +var deliveryRuleHostNameCondition_Name_STATUS_Values = map[string]DeliveryRuleHostNameCondition_Name_STATUS{ + "hostname": DeliveryRuleHostNameCondition_Name_STATUS_HostName, +} + type DeliveryRuleHttpVersionCondition_Name_STATUS string const DeliveryRuleHttpVersionCondition_Name_STATUS_HttpVersion = DeliveryRuleHttpVersionCondition_Name_STATUS("HttpVersion") +// Mapping from string to DeliveryRuleHttpVersionCondition_Name_STATUS +var deliveryRuleHttpVersionCondition_Name_STATUS_Values = map[string]DeliveryRuleHttpVersionCondition_Name_STATUS{ + "httpversion": DeliveryRuleHttpVersionCondition_Name_STATUS_HttpVersion, +} + type DeliveryRuleIsDeviceCondition_Name_STATUS string const DeliveryRuleIsDeviceCondition_Name_STATUS_IsDevice = DeliveryRuleIsDeviceCondition_Name_STATUS("IsDevice") +// Mapping from string to DeliveryRuleIsDeviceCondition_Name_STATUS +var deliveryRuleIsDeviceCondition_Name_STATUS_Values = map[string]DeliveryRuleIsDeviceCondition_Name_STATUS{ + "isdevice": DeliveryRuleIsDeviceCondition_Name_STATUS_IsDevice, +} + type DeliveryRulePostArgsCondition_Name_STATUS string const DeliveryRulePostArgsCondition_Name_STATUS_PostArgs = DeliveryRulePostArgsCondition_Name_STATUS("PostArgs") +// Mapping from string to DeliveryRulePostArgsCondition_Name_STATUS +var deliveryRulePostArgsCondition_Name_STATUS_Values = map[string]DeliveryRulePostArgsCondition_Name_STATUS{ + "postargs": DeliveryRulePostArgsCondition_Name_STATUS_PostArgs, +} + type DeliveryRuleQueryStringCondition_Name_STATUS string const DeliveryRuleQueryStringCondition_Name_STATUS_QueryString = DeliveryRuleQueryStringCondition_Name_STATUS("QueryString") +// Mapping from string to DeliveryRuleQueryStringCondition_Name_STATUS +var deliveryRuleQueryStringCondition_Name_STATUS_Values = map[string]DeliveryRuleQueryStringCondition_Name_STATUS{ + "querystring": DeliveryRuleQueryStringCondition_Name_STATUS_QueryString, +} + type DeliveryRuleRemoteAddressCondition_Name_STATUS string const DeliveryRuleRemoteAddressCondition_Name_STATUS_RemoteAddress = DeliveryRuleRemoteAddressCondition_Name_STATUS("RemoteAddress") +// Mapping from string to DeliveryRuleRemoteAddressCondition_Name_STATUS +var deliveryRuleRemoteAddressCondition_Name_STATUS_Values = map[string]DeliveryRuleRemoteAddressCondition_Name_STATUS{ + "remoteaddress": DeliveryRuleRemoteAddressCondition_Name_STATUS_RemoteAddress, +} + type DeliveryRuleRequestBodyCondition_Name_STATUS string const DeliveryRuleRequestBodyCondition_Name_STATUS_RequestBody = DeliveryRuleRequestBodyCondition_Name_STATUS("RequestBody") +// Mapping from string to DeliveryRuleRequestBodyCondition_Name_STATUS +var deliveryRuleRequestBodyCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestBodyCondition_Name_STATUS{ + "requestbody": DeliveryRuleRequestBodyCondition_Name_STATUS_RequestBody, +} + type DeliveryRuleRequestHeaderAction_Name_STATUS string const DeliveryRuleRequestHeaderAction_Name_STATUS_ModifyRequestHeader = DeliveryRuleRequestHeaderAction_Name_STATUS("ModifyRequestHeader") +// Mapping from string to DeliveryRuleRequestHeaderAction_Name_STATUS +var deliveryRuleRequestHeaderAction_Name_STATUS_Values = map[string]DeliveryRuleRequestHeaderAction_Name_STATUS{ + "modifyrequestheader": DeliveryRuleRequestHeaderAction_Name_STATUS_ModifyRequestHeader, +} + type DeliveryRuleRequestHeaderCondition_Name_STATUS string const DeliveryRuleRequestHeaderCondition_Name_STATUS_RequestHeader = DeliveryRuleRequestHeaderCondition_Name_STATUS("RequestHeader") +// Mapping from string to DeliveryRuleRequestHeaderCondition_Name_STATUS +var deliveryRuleRequestHeaderCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestHeaderCondition_Name_STATUS{ + "requestheader": DeliveryRuleRequestHeaderCondition_Name_STATUS_RequestHeader, +} + type DeliveryRuleRequestMethodCondition_Name_STATUS string const DeliveryRuleRequestMethodCondition_Name_STATUS_RequestMethod = DeliveryRuleRequestMethodCondition_Name_STATUS("RequestMethod") +// Mapping from string to DeliveryRuleRequestMethodCondition_Name_STATUS +var deliveryRuleRequestMethodCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestMethodCondition_Name_STATUS{ + "requestmethod": DeliveryRuleRequestMethodCondition_Name_STATUS_RequestMethod, +} + type DeliveryRuleRequestSchemeCondition_Name_STATUS string const DeliveryRuleRequestSchemeCondition_Name_STATUS_RequestScheme = DeliveryRuleRequestSchemeCondition_Name_STATUS("RequestScheme") +// Mapping from string to DeliveryRuleRequestSchemeCondition_Name_STATUS +var deliveryRuleRequestSchemeCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestSchemeCondition_Name_STATUS{ + "requestscheme": DeliveryRuleRequestSchemeCondition_Name_STATUS_RequestScheme, +} + type DeliveryRuleRequestUriCondition_Name_STATUS string const DeliveryRuleRequestUriCondition_Name_STATUS_RequestUri = DeliveryRuleRequestUriCondition_Name_STATUS("RequestUri") +// Mapping from string to DeliveryRuleRequestUriCondition_Name_STATUS +var deliveryRuleRequestUriCondition_Name_STATUS_Values = map[string]DeliveryRuleRequestUriCondition_Name_STATUS{ + "requesturi": DeliveryRuleRequestUriCondition_Name_STATUS_RequestUri, +} + type DeliveryRuleResponseHeaderAction_Name_STATUS string const DeliveryRuleResponseHeaderAction_Name_STATUS_ModifyResponseHeader = DeliveryRuleResponseHeaderAction_Name_STATUS("ModifyResponseHeader") +// Mapping from string to DeliveryRuleResponseHeaderAction_Name_STATUS +var deliveryRuleResponseHeaderAction_Name_STATUS_Values = map[string]DeliveryRuleResponseHeaderAction_Name_STATUS{ + "modifyresponseheader": DeliveryRuleResponseHeaderAction_Name_STATUS_ModifyResponseHeader, +} + type DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS string const DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS_RouteConfigurationOverride = DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS("RouteConfigurationOverride") +// Mapping from string to DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS +var deliveryRuleRouteConfigurationOverrideAction_Name_STATUS_Values = map[string]DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS{ + "routeconfigurationoverride": DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS_RouteConfigurationOverride, +} + type DeliveryRuleServerPortCondition_Name_STATUS string const DeliveryRuleServerPortCondition_Name_STATUS_ServerPort = DeliveryRuleServerPortCondition_Name_STATUS("ServerPort") +// Mapping from string to DeliveryRuleServerPortCondition_Name_STATUS +var deliveryRuleServerPortCondition_Name_STATUS_Values = map[string]DeliveryRuleServerPortCondition_Name_STATUS{ + "serverport": DeliveryRuleServerPortCondition_Name_STATUS_ServerPort, +} + type DeliveryRuleSocketAddrCondition_Name_STATUS string const DeliveryRuleSocketAddrCondition_Name_STATUS_SocketAddr = DeliveryRuleSocketAddrCondition_Name_STATUS("SocketAddr") +// Mapping from string to DeliveryRuleSocketAddrCondition_Name_STATUS +var deliveryRuleSocketAddrCondition_Name_STATUS_Values = map[string]DeliveryRuleSocketAddrCondition_Name_STATUS{ + "socketaddr": DeliveryRuleSocketAddrCondition_Name_STATUS_SocketAddr, +} + type DeliveryRuleSslProtocolCondition_Name_STATUS string const DeliveryRuleSslProtocolCondition_Name_STATUS_SslProtocol = DeliveryRuleSslProtocolCondition_Name_STATUS("SslProtocol") +// Mapping from string to DeliveryRuleSslProtocolCondition_Name_STATUS +var deliveryRuleSslProtocolCondition_Name_STATUS_Values = map[string]DeliveryRuleSslProtocolCondition_Name_STATUS{ + "sslprotocol": DeliveryRuleSslProtocolCondition_Name_STATUS_SslProtocol, +} + type DeliveryRuleUrlFileExtensionCondition_Name_STATUS string const DeliveryRuleUrlFileExtensionCondition_Name_STATUS_UrlFileExtension = DeliveryRuleUrlFileExtensionCondition_Name_STATUS("UrlFileExtension") +// Mapping from string to DeliveryRuleUrlFileExtensionCondition_Name_STATUS +var deliveryRuleUrlFileExtensionCondition_Name_STATUS_Values = map[string]DeliveryRuleUrlFileExtensionCondition_Name_STATUS{ + "urlfileextension": DeliveryRuleUrlFileExtensionCondition_Name_STATUS_UrlFileExtension, +} + type DeliveryRuleUrlFileNameCondition_Name_STATUS string const DeliveryRuleUrlFileNameCondition_Name_STATUS_UrlFileName = DeliveryRuleUrlFileNameCondition_Name_STATUS("UrlFileName") +// Mapping from string to DeliveryRuleUrlFileNameCondition_Name_STATUS +var deliveryRuleUrlFileNameCondition_Name_STATUS_Values = map[string]DeliveryRuleUrlFileNameCondition_Name_STATUS{ + "urlfilename": DeliveryRuleUrlFileNameCondition_Name_STATUS_UrlFileName, +} + type DeliveryRuleUrlPathCondition_Name_STATUS string const DeliveryRuleUrlPathCondition_Name_STATUS_UrlPath = DeliveryRuleUrlPathCondition_Name_STATUS("UrlPath") +// Mapping from string to DeliveryRuleUrlPathCondition_Name_STATUS +var deliveryRuleUrlPathCondition_Name_STATUS_Values = map[string]DeliveryRuleUrlPathCondition_Name_STATUS{ + "urlpath": DeliveryRuleUrlPathCondition_Name_STATUS_UrlPath, +} + // Defines the parameters for the request header action. type HeaderActionParameters_STATUS_ARM struct { // HeaderAction: Action to perform @@ -838,6 +981,11 @@ type OriginGroupOverrideAction_Name_STATUS string const OriginGroupOverrideAction_Name_STATUS_OriginGroupOverride = OriginGroupOverrideAction_Name_STATUS("OriginGroupOverride") +// Mapping from string to OriginGroupOverrideAction_Name_STATUS +var originGroupOverrideAction_Name_STATUS_Values = map[string]OriginGroupOverrideAction_Name_STATUS{ + "origingroupoverride": OriginGroupOverrideAction_Name_STATUS_OriginGroupOverride, +} + // Defines the parameters for the origin group override action. type OriginGroupOverrideActionParameters_STATUS_ARM struct { // OriginGroup: defines the OriginGroup that would override the DefaultOriginGroup. @@ -1092,6 +1240,11 @@ type UrlRedirectAction_Name_STATUS string const UrlRedirectAction_Name_STATUS_UrlRedirect = UrlRedirectAction_Name_STATUS("UrlRedirect") +// Mapping from string to UrlRedirectAction_Name_STATUS +var urlRedirectAction_Name_STATUS_Values = map[string]UrlRedirectAction_Name_STATUS{ + "urlredirect": UrlRedirectAction_Name_STATUS_UrlRedirect, +} + // Defines the parameters for the url redirect action. type UrlRedirectActionParameters_STATUS_ARM struct { // CustomFragment: Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include @@ -1122,6 +1275,11 @@ type UrlRewriteAction_Name_STATUS string const UrlRewriteAction_Name_STATUS_UrlRewrite = UrlRewriteAction_Name_STATUS("UrlRewrite") +// Mapping from string to UrlRewriteAction_Name_STATUS +var urlRewriteAction_Name_STATUS_Values = map[string]UrlRewriteAction_Name_STATUS{ + "urlrewrite": UrlRewriteAction_Name_STATUS_UrlRewrite, +} + // Defines the parameters for the url rewrite action. type UrlRewriteActionParameters_STATUS_ARM struct { // Destination: Define the relative URL to which the above requests will be rewritten by. @@ -1140,6 +1298,11 @@ type UrlSigningAction_Name_STATUS string const UrlSigningAction_Name_STATUS_UrlSigning = UrlSigningAction_Name_STATUS("UrlSigning") +// Mapping from string to UrlSigningAction_Name_STATUS +var urlSigningAction_Name_STATUS_Values = map[string]UrlSigningAction_Name_STATUS{ + "urlsigning": UrlSigningAction_Name_STATUS_UrlSigning, +} + // Defines the parameters for the Url Signing action. type UrlSigningActionParameters_STATUS_ARM struct { // Algorithm: Algorithm to use for URL signing @@ -1180,14 +1343,31 @@ const ( CacheExpirationActionParameters_CacheBehavior_STATUS_SetIfMissing = CacheExpirationActionParameters_CacheBehavior_STATUS("SetIfMissing") ) +// Mapping from string to CacheExpirationActionParameters_CacheBehavior_STATUS +var cacheExpirationActionParameters_CacheBehavior_STATUS_Values = map[string]CacheExpirationActionParameters_CacheBehavior_STATUS{ + "bypasscache": CacheExpirationActionParameters_CacheBehavior_STATUS_BypassCache, + "override": CacheExpirationActionParameters_CacheBehavior_STATUS_Override, + "setifmissing": CacheExpirationActionParameters_CacheBehavior_STATUS_SetIfMissing, +} + type CacheExpirationActionParameters_CacheType_STATUS string const CacheExpirationActionParameters_CacheType_STATUS_All = CacheExpirationActionParameters_CacheType_STATUS("All") +// Mapping from string to CacheExpirationActionParameters_CacheType_STATUS +var cacheExpirationActionParameters_CacheType_STATUS_Values = map[string]CacheExpirationActionParameters_CacheType_STATUS{ + "all": CacheExpirationActionParameters_CacheType_STATUS_All, +} + type CacheExpirationActionParameters_TypeName_STATUS string const CacheExpirationActionParameters_TypeName_STATUS_DeliveryRuleCacheExpirationActionParameters = CacheExpirationActionParameters_TypeName_STATUS("DeliveryRuleCacheExpirationActionParameters") +// Mapping from string to CacheExpirationActionParameters_TypeName_STATUS +var cacheExpirationActionParameters_TypeName_STATUS_Values = map[string]CacheExpirationActionParameters_TypeName_STATUS{ + "deliveryrulecacheexpirationactionparameters": CacheExpirationActionParameters_TypeName_STATUS_DeliveryRuleCacheExpirationActionParameters, +} + type CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS string const ( @@ -1197,10 +1377,23 @@ const ( CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_IncludeAll = CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS("IncludeAll") ) +// Mapping from string to CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS +var cacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_Values = map[string]CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS{ + "exclude": CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_Exclude, + "excludeall": CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_ExcludeAll, + "include": CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_Include, + "includeall": CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_IncludeAll, +} + type CacheKeyQueryStringActionParameters_TypeName_STATUS string const CacheKeyQueryStringActionParameters_TypeName_STATUS_DeliveryRuleCacheKeyQueryStringBehaviorActionParameters = CacheKeyQueryStringActionParameters_TypeName_STATUS("DeliveryRuleCacheKeyQueryStringBehaviorActionParameters") +// Mapping from string to CacheKeyQueryStringActionParameters_TypeName_STATUS +var cacheKeyQueryStringActionParameters_TypeName_STATUS_Values = map[string]CacheKeyQueryStringActionParameters_TypeName_STATUS{ + "deliveryrulecachekeyquerystringbehavioractionparameters": CacheKeyQueryStringActionParameters_TypeName_STATUS_DeliveryRuleCacheKeyQueryStringBehaviorActionParameters, +} + type ClientPortMatchConditionParameters_Operator_STATUS string const ( @@ -1216,10 +1409,29 @@ const ( ClientPortMatchConditionParameters_Operator_STATUS_RegEx = ClientPortMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to ClientPortMatchConditionParameters_Operator_STATUS +var clientPortMatchConditionParameters_Operator_STATUS_Values = map[string]ClientPortMatchConditionParameters_Operator_STATUS{ + "any": ClientPortMatchConditionParameters_Operator_STATUS_Any, + "beginswith": ClientPortMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": ClientPortMatchConditionParameters_Operator_STATUS_Contains, + "endswith": ClientPortMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": ClientPortMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": ClientPortMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": ClientPortMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": ClientPortMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": ClientPortMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": ClientPortMatchConditionParameters_Operator_STATUS_RegEx, +} + type ClientPortMatchConditionParameters_TypeName_STATUS string const ClientPortMatchConditionParameters_TypeName_STATUS_DeliveryRuleClientPortConditionParameters = ClientPortMatchConditionParameters_TypeName_STATUS("DeliveryRuleClientPortConditionParameters") +// Mapping from string to ClientPortMatchConditionParameters_TypeName_STATUS +var clientPortMatchConditionParameters_TypeName_STATUS_Values = map[string]ClientPortMatchConditionParameters_TypeName_STATUS{ + "deliveryruleclientportconditionparameters": ClientPortMatchConditionParameters_TypeName_STATUS_DeliveryRuleClientPortConditionParameters, +} + type CookiesMatchConditionParameters_Operator_STATUS string const ( @@ -1235,10 +1447,29 @@ const ( CookiesMatchConditionParameters_Operator_STATUS_RegEx = CookiesMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to CookiesMatchConditionParameters_Operator_STATUS +var cookiesMatchConditionParameters_Operator_STATUS_Values = map[string]CookiesMatchConditionParameters_Operator_STATUS{ + "any": CookiesMatchConditionParameters_Operator_STATUS_Any, + "beginswith": CookiesMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": CookiesMatchConditionParameters_Operator_STATUS_Contains, + "endswith": CookiesMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": CookiesMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": CookiesMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": CookiesMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": CookiesMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": CookiesMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": CookiesMatchConditionParameters_Operator_STATUS_RegEx, +} + type CookiesMatchConditionParameters_TypeName_STATUS string const CookiesMatchConditionParameters_TypeName_STATUS_DeliveryRuleCookiesConditionParameters = CookiesMatchConditionParameters_TypeName_STATUS("DeliveryRuleCookiesConditionParameters") +// Mapping from string to CookiesMatchConditionParameters_TypeName_STATUS +var cookiesMatchConditionParameters_TypeName_STATUS_Values = map[string]CookiesMatchConditionParameters_TypeName_STATUS{ + "deliveryrulecookiesconditionparameters": CookiesMatchConditionParameters_TypeName_STATUS_DeliveryRuleCookiesConditionParameters, +} + type HeaderActionParameters_HeaderAction_STATUS string const ( @@ -1247,10 +1478,22 @@ const ( HeaderActionParameters_HeaderAction_STATUS_Overwrite = HeaderActionParameters_HeaderAction_STATUS("Overwrite") ) +// Mapping from string to HeaderActionParameters_HeaderAction_STATUS +var headerActionParameters_HeaderAction_STATUS_Values = map[string]HeaderActionParameters_HeaderAction_STATUS{ + "append": HeaderActionParameters_HeaderAction_STATUS_Append, + "delete": HeaderActionParameters_HeaderAction_STATUS_Delete, + "overwrite": HeaderActionParameters_HeaderAction_STATUS_Overwrite, +} + type HeaderActionParameters_TypeName_STATUS string const HeaderActionParameters_TypeName_STATUS_DeliveryRuleHeaderActionParameters = HeaderActionParameters_TypeName_STATUS("DeliveryRuleHeaderActionParameters") +// Mapping from string to HeaderActionParameters_TypeName_STATUS +var headerActionParameters_TypeName_STATUS_Values = map[string]HeaderActionParameters_TypeName_STATUS{ + "deliveryruleheaderactionparameters": HeaderActionParameters_TypeName_STATUS_DeliveryRuleHeaderActionParameters, +} + type HostNameMatchConditionParameters_Operator_STATUS string const ( @@ -1266,18 +1509,47 @@ const ( HostNameMatchConditionParameters_Operator_STATUS_RegEx = HostNameMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to HostNameMatchConditionParameters_Operator_STATUS +var hostNameMatchConditionParameters_Operator_STATUS_Values = map[string]HostNameMatchConditionParameters_Operator_STATUS{ + "any": HostNameMatchConditionParameters_Operator_STATUS_Any, + "beginswith": HostNameMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": HostNameMatchConditionParameters_Operator_STATUS_Contains, + "endswith": HostNameMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": HostNameMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": HostNameMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": HostNameMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": HostNameMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": HostNameMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": HostNameMatchConditionParameters_Operator_STATUS_RegEx, +} + type HostNameMatchConditionParameters_TypeName_STATUS string const HostNameMatchConditionParameters_TypeName_STATUS_DeliveryRuleHostNameConditionParameters = HostNameMatchConditionParameters_TypeName_STATUS("DeliveryRuleHostNameConditionParameters") +// Mapping from string to HostNameMatchConditionParameters_TypeName_STATUS +var hostNameMatchConditionParameters_TypeName_STATUS_Values = map[string]HostNameMatchConditionParameters_TypeName_STATUS{ + "deliveryrulehostnameconditionparameters": HostNameMatchConditionParameters_TypeName_STATUS_DeliveryRuleHostNameConditionParameters, +} + type HttpVersionMatchConditionParameters_Operator_STATUS string const HttpVersionMatchConditionParameters_Operator_STATUS_Equal = HttpVersionMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to HttpVersionMatchConditionParameters_Operator_STATUS +var httpVersionMatchConditionParameters_Operator_STATUS_Values = map[string]HttpVersionMatchConditionParameters_Operator_STATUS{ + "equal": HttpVersionMatchConditionParameters_Operator_STATUS_Equal, +} + type HttpVersionMatchConditionParameters_TypeName_STATUS string const HttpVersionMatchConditionParameters_TypeName_STATUS_DeliveryRuleHttpVersionConditionParameters = HttpVersionMatchConditionParameters_TypeName_STATUS("DeliveryRuleHttpVersionConditionParameters") +// Mapping from string to HttpVersionMatchConditionParameters_TypeName_STATUS +var httpVersionMatchConditionParameters_TypeName_STATUS_Values = map[string]HttpVersionMatchConditionParameters_TypeName_STATUS{ + "deliveryrulehttpversionconditionparameters": HttpVersionMatchConditionParameters_TypeName_STATUS_DeliveryRuleHttpVersionConditionParameters, +} + type IsDeviceMatchConditionParameters_MatchValues_STATUS string const ( @@ -1285,14 +1557,30 @@ const ( IsDeviceMatchConditionParameters_MatchValues_STATUS_Mobile = IsDeviceMatchConditionParameters_MatchValues_STATUS("Mobile") ) +// Mapping from string to IsDeviceMatchConditionParameters_MatchValues_STATUS +var isDeviceMatchConditionParameters_MatchValues_STATUS_Values = map[string]IsDeviceMatchConditionParameters_MatchValues_STATUS{ + "desktop": IsDeviceMatchConditionParameters_MatchValues_STATUS_Desktop, + "mobile": IsDeviceMatchConditionParameters_MatchValues_STATUS_Mobile, +} + type IsDeviceMatchConditionParameters_Operator_STATUS string const IsDeviceMatchConditionParameters_Operator_STATUS_Equal = IsDeviceMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to IsDeviceMatchConditionParameters_Operator_STATUS +var isDeviceMatchConditionParameters_Operator_STATUS_Values = map[string]IsDeviceMatchConditionParameters_Operator_STATUS{ + "equal": IsDeviceMatchConditionParameters_Operator_STATUS_Equal, +} + type IsDeviceMatchConditionParameters_TypeName_STATUS string const IsDeviceMatchConditionParameters_TypeName_STATUS_DeliveryRuleIsDeviceConditionParameters = IsDeviceMatchConditionParameters_TypeName_STATUS("DeliveryRuleIsDeviceConditionParameters") +// Mapping from string to IsDeviceMatchConditionParameters_TypeName_STATUS +var isDeviceMatchConditionParameters_TypeName_STATUS_Values = map[string]IsDeviceMatchConditionParameters_TypeName_STATUS{ + "deliveryruleisdeviceconditionparameters": IsDeviceMatchConditionParameters_TypeName_STATUS_DeliveryRuleIsDeviceConditionParameters, +} + // Defines the parameters for the origin group override configuration. type OriginGroupOverride_STATUS_ARM struct { // ForwardingProtocol: Protocol this rule will use when forwarding traffic to backends. @@ -1306,6 +1594,11 @@ type OriginGroupOverrideActionParameters_TypeName_STATUS string const OriginGroupOverrideActionParameters_TypeName_STATUS_DeliveryRuleOriginGroupOverrideActionParameters = OriginGroupOverrideActionParameters_TypeName_STATUS("DeliveryRuleOriginGroupOverrideActionParameters") +// Mapping from string to OriginGroupOverrideActionParameters_TypeName_STATUS +var originGroupOverrideActionParameters_TypeName_STATUS_Values = map[string]OriginGroupOverrideActionParameters_TypeName_STATUS{ + "deliveryruleorigingroupoverrideactionparameters": OriginGroupOverrideActionParameters_TypeName_STATUS_DeliveryRuleOriginGroupOverrideActionParameters, +} + type PostArgsMatchConditionParameters_Operator_STATUS string const ( @@ -1321,10 +1614,29 @@ const ( PostArgsMatchConditionParameters_Operator_STATUS_RegEx = PostArgsMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to PostArgsMatchConditionParameters_Operator_STATUS +var postArgsMatchConditionParameters_Operator_STATUS_Values = map[string]PostArgsMatchConditionParameters_Operator_STATUS{ + "any": PostArgsMatchConditionParameters_Operator_STATUS_Any, + "beginswith": PostArgsMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": PostArgsMatchConditionParameters_Operator_STATUS_Contains, + "endswith": PostArgsMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": PostArgsMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": PostArgsMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": PostArgsMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": PostArgsMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": PostArgsMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": PostArgsMatchConditionParameters_Operator_STATUS_RegEx, +} + type PostArgsMatchConditionParameters_TypeName_STATUS string const PostArgsMatchConditionParameters_TypeName_STATUS_DeliveryRulePostArgsConditionParameters = PostArgsMatchConditionParameters_TypeName_STATUS("DeliveryRulePostArgsConditionParameters") +// Mapping from string to PostArgsMatchConditionParameters_TypeName_STATUS +var postArgsMatchConditionParameters_TypeName_STATUS_Values = map[string]PostArgsMatchConditionParameters_TypeName_STATUS{ + "deliveryrulepostargsconditionparameters": PostArgsMatchConditionParameters_TypeName_STATUS_DeliveryRulePostArgsConditionParameters, +} + type QueryStringMatchConditionParameters_Operator_STATUS string const ( @@ -1340,10 +1652,29 @@ const ( QueryStringMatchConditionParameters_Operator_STATUS_RegEx = QueryStringMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to QueryStringMatchConditionParameters_Operator_STATUS +var queryStringMatchConditionParameters_Operator_STATUS_Values = map[string]QueryStringMatchConditionParameters_Operator_STATUS{ + "any": QueryStringMatchConditionParameters_Operator_STATUS_Any, + "beginswith": QueryStringMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": QueryStringMatchConditionParameters_Operator_STATUS_Contains, + "endswith": QueryStringMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": QueryStringMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": QueryStringMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": QueryStringMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": QueryStringMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": QueryStringMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": QueryStringMatchConditionParameters_Operator_STATUS_RegEx, +} + type QueryStringMatchConditionParameters_TypeName_STATUS string const QueryStringMatchConditionParameters_TypeName_STATUS_DeliveryRuleQueryStringConditionParameters = QueryStringMatchConditionParameters_TypeName_STATUS("DeliveryRuleQueryStringConditionParameters") +// Mapping from string to QueryStringMatchConditionParameters_TypeName_STATUS +var queryStringMatchConditionParameters_TypeName_STATUS_Values = map[string]QueryStringMatchConditionParameters_TypeName_STATUS{ + "deliveryrulequerystringconditionparameters": QueryStringMatchConditionParameters_TypeName_STATUS_DeliveryRuleQueryStringConditionParameters, +} + type RemoteAddressMatchConditionParameters_Operator_STATUS string const ( @@ -1352,10 +1683,22 @@ const ( RemoteAddressMatchConditionParameters_Operator_STATUS_IPMatch = RemoteAddressMatchConditionParameters_Operator_STATUS("IPMatch") ) +// Mapping from string to RemoteAddressMatchConditionParameters_Operator_STATUS +var remoteAddressMatchConditionParameters_Operator_STATUS_Values = map[string]RemoteAddressMatchConditionParameters_Operator_STATUS{ + "any": RemoteAddressMatchConditionParameters_Operator_STATUS_Any, + "geomatch": RemoteAddressMatchConditionParameters_Operator_STATUS_GeoMatch, + "ipmatch": RemoteAddressMatchConditionParameters_Operator_STATUS_IPMatch, +} + type RemoteAddressMatchConditionParameters_TypeName_STATUS string const RemoteAddressMatchConditionParameters_TypeName_STATUS_DeliveryRuleRemoteAddressConditionParameters = RemoteAddressMatchConditionParameters_TypeName_STATUS("DeliveryRuleRemoteAddressConditionParameters") +// Mapping from string to RemoteAddressMatchConditionParameters_TypeName_STATUS +var remoteAddressMatchConditionParameters_TypeName_STATUS_Values = map[string]RemoteAddressMatchConditionParameters_TypeName_STATUS{ + "deliveryruleremoteaddressconditionparameters": RemoteAddressMatchConditionParameters_TypeName_STATUS_DeliveryRuleRemoteAddressConditionParameters, +} + type RequestBodyMatchConditionParameters_Operator_STATUS string const ( @@ -1371,10 +1714,29 @@ const ( RequestBodyMatchConditionParameters_Operator_STATUS_RegEx = RequestBodyMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to RequestBodyMatchConditionParameters_Operator_STATUS +var requestBodyMatchConditionParameters_Operator_STATUS_Values = map[string]RequestBodyMatchConditionParameters_Operator_STATUS{ + "any": RequestBodyMatchConditionParameters_Operator_STATUS_Any, + "beginswith": RequestBodyMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": RequestBodyMatchConditionParameters_Operator_STATUS_Contains, + "endswith": RequestBodyMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": RequestBodyMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": RequestBodyMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": RequestBodyMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": RequestBodyMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": RequestBodyMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": RequestBodyMatchConditionParameters_Operator_STATUS_RegEx, +} + type RequestBodyMatchConditionParameters_TypeName_STATUS string const RequestBodyMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestBodyConditionParameters = RequestBodyMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestBodyConditionParameters") +// Mapping from string to RequestBodyMatchConditionParameters_TypeName_STATUS +var requestBodyMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestBodyMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequestbodyconditionparameters": RequestBodyMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestBodyConditionParameters, +} + type RequestHeaderMatchConditionParameters_Operator_STATUS string const ( @@ -1390,10 +1752,29 @@ const ( RequestHeaderMatchConditionParameters_Operator_STATUS_RegEx = RequestHeaderMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to RequestHeaderMatchConditionParameters_Operator_STATUS +var requestHeaderMatchConditionParameters_Operator_STATUS_Values = map[string]RequestHeaderMatchConditionParameters_Operator_STATUS{ + "any": RequestHeaderMatchConditionParameters_Operator_STATUS_Any, + "beginswith": RequestHeaderMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": RequestHeaderMatchConditionParameters_Operator_STATUS_Contains, + "endswith": RequestHeaderMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": RequestHeaderMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": RequestHeaderMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": RequestHeaderMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": RequestHeaderMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": RequestHeaderMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": RequestHeaderMatchConditionParameters_Operator_STATUS_RegEx, +} + type RequestHeaderMatchConditionParameters_TypeName_STATUS string const RequestHeaderMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestHeaderConditionParameters = RequestHeaderMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestHeaderConditionParameters") +// Mapping from string to RequestHeaderMatchConditionParameters_TypeName_STATUS +var requestHeaderMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestHeaderMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequestheaderconditionparameters": RequestHeaderMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestHeaderConditionParameters, +} + type RequestMethodMatchConditionParameters_MatchValues_STATUS string const ( @@ -1406,14 +1787,35 @@ const ( RequestMethodMatchConditionParameters_MatchValues_STATUS_TRACE = RequestMethodMatchConditionParameters_MatchValues_STATUS("TRACE") ) +// Mapping from string to RequestMethodMatchConditionParameters_MatchValues_STATUS +var requestMethodMatchConditionParameters_MatchValues_STATUS_Values = map[string]RequestMethodMatchConditionParameters_MatchValues_STATUS{ + "delete": RequestMethodMatchConditionParameters_MatchValues_STATUS_DELETE, + "get": RequestMethodMatchConditionParameters_MatchValues_STATUS_GET, + "head": RequestMethodMatchConditionParameters_MatchValues_STATUS_HEAD, + "options": RequestMethodMatchConditionParameters_MatchValues_STATUS_OPTIONS, + "post": RequestMethodMatchConditionParameters_MatchValues_STATUS_POST, + "put": RequestMethodMatchConditionParameters_MatchValues_STATUS_PUT, + "trace": RequestMethodMatchConditionParameters_MatchValues_STATUS_TRACE, +} + type RequestMethodMatchConditionParameters_Operator_STATUS string const RequestMethodMatchConditionParameters_Operator_STATUS_Equal = RequestMethodMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to RequestMethodMatchConditionParameters_Operator_STATUS +var requestMethodMatchConditionParameters_Operator_STATUS_Values = map[string]RequestMethodMatchConditionParameters_Operator_STATUS{ + "equal": RequestMethodMatchConditionParameters_Operator_STATUS_Equal, +} + type RequestMethodMatchConditionParameters_TypeName_STATUS string const RequestMethodMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestMethodConditionParameters = RequestMethodMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestMethodConditionParameters") +// Mapping from string to RequestMethodMatchConditionParameters_TypeName_STATUS +var requestMethodMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestMethodMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequestmethodconditionparameters": RequestMethodMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestMethodConditionParameters, +} + type RequestSchemeMatchConditionParameters_MatchValues_STATUS string const ( @@ -1421,14 +1823,30 @@ const ( RequestSchemeMatchConditionParameters_MatchValues_STATUS_HTTPS = RequestSchemeMatchConditionParameters_MatchValues_STATUS("HTTPS") ) +// Mapping from string to RequestSchemeMatchConditionParameters_MatchValues_STATUS +var requestSchemeMatchConditionParameters_MatchValues_STATUS_Values = map[string]RequestSchemeMatchConditionParameters_MatchValues_STATUS{ + "http": RequestSchemeMatchConditionParameters_MatchValues_STATUS_HTTP, + "https": RequestSchemeMatchConditionParameters_MatchValues_STATUS_HTTPS, +} + type RequestSchemeMatchConditionParameters_Operator_STATUS string const RequestSchemeMatchConditionParameters_Operator_STATUS_Equal = RequestSchemeMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to RequestSchemeMatchConditionParameters_Operator_STATUS +var requestSchemeMatchConditionParameters_Operator_STATUS_Values = map[string]RequestSchemeMatchConditionParameters_Operator_STATUS{ + "equal": RequestSchemeMatchConditionParameters_Operator_STATUS_Equal, +} + type RequestSchemeMatchConditionParameters_TypeName_STATUS string const RequestSchemeMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestSchemeConditionParameters = RequestSchemeMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestSchemeConditionParameters") +// Mapping from string to RequestSchemeMatchConditionParameters_TypeName_STATUS +var requestSchemeMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestSchemeMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequestschemeconditionparameters": RequestSchemeMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestSchemeConditionParameters, +} + type RequestUriMatchConditionParameters_Operator_STATUS string const ( @@ -1444,14 +1862,38 @@ const ( RequestUriMatchConditionParameters_Operator_STATUS_RegEx = RequestUriMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to RequestUriMatchConditionParameters_Operator_STATUS +var requestUriMatchConditionParameters_Operator_STATUS_Values = map[string]RequestUriMatchConditionParameters_Operator_STATUS{ + "any": RequestUriMatchConditionParameters_Operator_STATUS_Any, + "beginswith": RequestUriMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": RequestUriMatchConditionParameters_Operator_STATUS_Contains, + "endswith": RequestUriMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": RequestUriMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": RequestUriMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": RequestUriMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": RequestUriMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": RequestUriMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": RequestUriMatchConditionParameters_Operator_STATUS_RegEx, +} + type RequestUriMatchConditionParameters_TypeName_STATUS string const RequestUriMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestUriConditionParameters = RequestUriMatchConditionParameters_TypeName_STATUS("DeliveryRuleRequestUriConditionParameters") +// Mapping from string to RequestUriMatchConditionParameters_TypeName_STATUS +var requestUriMatchConditionParameters_TypeName_STATUS_Values = map[string]RequestUriMatchConditionParameters_TypeName_STATUS{ + "deliveryrulerequesturiconditionparameters": RequestUriMatchConditionParameters_TypeName_STATUS_DeliveryRuleRequestUriConditionParameters, +} + type RouteConfigurationOverrideActionParameters_TypeName_STATUS string const RouteConfigurationOverrideActionParameters_TypeName_STATUS_DeliveryRuleRouteConfigurationOverrideActionParameters = RouteConfigurationOverrideActionParameters_TypeName_STATUS("DeliveryRuleRouteConfigurationOverrideActionParameters") +// Mapping from string to RouteConfigurationOverrideActionParameters_TypeName_STATUS +var routeConfigurationOverrideActionParameters_TypeName_STATUS_Values = map[string]RouteConfigurationOverrideActionParameters_TypeName_STATUS{ + "deliveryrulerouteconfigurationoverrideactionparameters": RouteConfigurationOverrideActionParameters_TypeName_STATUS_DeliveryRuleRouteConfigurationOverrideActionParameters, +} + type ServerPortMatchConditionParameters_Operator_STATUS string const ( @@ -1467,10 +1909,29 @@ const ( ServerPortMatchConditionParameters_Operator_STATUS_RegEx = ServerPortMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to ServerPortMatchConditionParameters_Operator_STATUS +var serverPortMatchConditionParameters_Operator_STATUS_Values = map[string]ServerPortMatchConditionParameters_Operator_STATUS{ + "any": ServerPortMatchConditionParameters_Operator_STATUS_Any, + "beginswith": ServerPortMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": ServerPortMatchConditionParameters_Operator_STATUS_Contains, + "endswith": ServerPortMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": ServerPortMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": ServerPortMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": ServerPortMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": ServerPortMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": ServerPortMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": ServerPortMatchConditionParameters_Operator_STATUS_RegEx, +} + type ServerPortMatchConditionParameters_TypeName_STATUS string const ServerPortMatchConditionParameters_TypeName_STATUS_DeliveryRuleServerPortConditionParameters = ServerPortMatchConditionParameters_TypeName_STATUS("DeliveryRuleServerPortConditionParameters") +// Mapping from string to ServerPortMatchConditionParameters_TypeName_STATUS +var serverPortMatchConditionParameters_TypeName_STATUS_Values = map[string]ServerPortMatchConditionParameters_TypeName_STATUS{ + "deliveryruleserverportconditionparameters": ServerPortMatchConditionParameters_TypeName_STATUS_DeliveryRuleServerPortConditionParameters, +} + type SocketAddrMatchConditionParameters_Operator_STATUS string const ( @@ -1478,10 +1939,21 @@ const ( SocketAddrMatchConditionParameters_Operator_STATUS_IPMatch = SocketAddrMatchConditionParameters_Operator_STATUS("IPMatch") ) +// Mapping from string to SocketAddrMatchConditionParameters_Operator_STATUS +var socketAddrMatchConditionParameters_Operator_STATUS_Values = map[string]SocketAddrMatchConditionParameters_Operator_STATUS{ + "any": SocketAddrMatchConditionParameters_Operator_STATUS_Any, + "ipmatch": SocketAddrMatchConditionParameters_Operator_STATUS_IPMatch, +} + type SocketAddrMatchConditionParameters_TypeName_STATUS string const SocketAddrMatchConditionParameters_TypeName_STATUS_DeliveryRuleSocketAddrConditionParameters = SocketAddrMatchConditionParameters_TypeName_STATUS("DeliveryRuleSocketAddrConditionParameters") +// Mapping from string to SocketAddrMatchConditionParameters_TypeName_STATUS +var socketAddrMatchConditionParameters_TypeName_STATUS_Values = map[string]SocketAddrMatchConditionParameters_TypeName_STATUS{ + "deliveryrulesocketaddrconditionparameters": SocketAddrMatchConditionParameters_TypeName_STATUS_DeliveryRuleSocketAddrConditionParameters, +} + // The protocol of an established TLS connection. type SslProtocol_STATUS string @@ -1491,14 +1963,31 @@ const ( SslProtocol_STATUS_TLSv12 = SslProtocol_STATUS("TLSv1.2") ) +// Mapping from string to SslProtocol_STATUS +var sslProtocol_STATUS_Values = map[string]SslProtocol_STATUS{ + "tlsv1": SslProtocol_STATUS_TLSv1, + "tlsv1.1": SslProtocol_STATUS_TLSv11, + "tlsv1.2": SslProtocol_STATUS_TLSv12, +} + type SslProtocolMatchConditionParameters_Operator_STATUS string const SslProtocolMatchConditionParameters_Operator_STATUS_Equal = SslProtocolMatchConditionParameters_Operator_STATUS("Equal") +// Mapping from string to SslProtocolMatchConditionParameters_Operator_STATUS +var sslProtocolMatchConditionParameters_Operator_STATUS_Values = map[string]SslProtocolMatchConditionParameters_Operator_STATUS{ + "equal": SslProtocolMatchConditionParameters_Operator_STATUS_Equal, +} + type SslProtocolMatchConditionParameters_TypeName_STATUS string const SslProtocolMatchConditionParameters_TypeName_STATUS_DeliveryRuleSslProtocolConditionParameters = SslProtocolMatchConditionParameters_TypeName_STATUS("DeliveryRuleSslProtocolConditionParameters") +// Mapping from string to SslProtocolMatchConditionParameters_TypeName_STATUS +var sslProtocolMatchConditionParameters_TypeName_STATUS_Values = map[string]SslProtocolMatchConditionParameters_TypeName_STATUS{ + "deliveryrulesslprotocolconditionparameters": SslProtocolMatchConditionParameters_TypeName_STATUS_DeliveryRuleSslProtocolConditionParameters, +} + // Describes what transforms are applied before matching type Transform_STATUS string @@ -1511,6 +2000,16 @@ const ( Transform_STATUS_UrlEncode = Transform_STATUS("UrlEncode") ) +// Mapping from string to Transform_STATUS +var transform_STATUS_Values = map[string]Transform_STATUS{ + "lowercase": Transform_STATUS_Lowercase, + "removenulls": Transform_STATUS_RemoveNulls, + "trim": Transform_STATUS_Trim, + "uppercase": Transform_STATUS_Uppercase, + "urldecode": Transform_STATUS_UrlDecode, + "urlencode": Transform_STATUS_UrlEncode, +} + type UrlFileExtensionMatchConditionParameters_Operator_STATUS string const ( @@ -1526,10 +2025,29 @@ const ( UrlFileExtensionMatchConditionParameters_Operator_STATUS_RegEx = UrlFileExtensionMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to UrlFileExtensionMatchConditionParameters_Operator_STATUS +var urlFileExtensionMatchConditionParameters_Operator_STATUS_Values = map[string]UrlFileExtensionMatchConditionParameters_Operator_STATUS{ + "any": UrlFileExtensionMatchConditionParameters_Operator_STATUS_Any, + "beginswith": UrlFileExtensionMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": UrlFileExtensionMatchConditionParameters_Operator_STATUS_Contains, + "endswith": UrlFileExtensionMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": UrlFileExtensionMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": UrlFileExtensionMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": UrlFileExtensionMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": UrlFileExtensionMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": UrlFileExtensionMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": UrlFileExtensionMatchConditionParameters_Operator_STATUS_RegEx, +} + type UrlFileExtensionMatchConditionParameters_TypeName_STATUS string const UrlFileExtensionMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlFileExtensionMatchConditionParameters = UrlFileExtensionMatchConditionParameters_TypeName_STATUS("DeliveryRuleUrlFileExtensionMatchConditionParameters") +// Mapping from string to UrlFileExtensionMatchConditionParameters_TypeName_STATUS +var urlFileExtensionMatchConditionParameters_TypeName_STATUS_Values = map[string]UrlFileExtensionMatchConditionParameters_TypeName_STATUS{ + "deliveryruleurlfileextensionmatchconditionparameters": UrlFileExtensionMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlFileExtensionMatchConditionParameters, +} + type UrlFileNameMatchConditionParameters_Operator_STATUS string const ( @@ -1545,10 +2063,29 @@ const ( UrlFileNameMatchConditionParameters_Operator_STATUS_RegEx = UrlFileNameMatchConditionParameters_Operator_STATUS("RegEx") ) +// Mapping from string to UrlFileNameMatchConditionParameters_Operator_STATUS +var urlFileNameMatchConditionParameters_Operator_STATUS_Values = map[string]UrlFileNameMatchConditionParameters_Operator_STATUS{ + "any": UrlFileNameMatchConditionParameters_Operator_STATUS_Any, + "beginswith": UrlFileNameMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": UrlFileNameMatchConditionParameters_Operator_STATUS_Contains, + "endswith": UrlFileNameMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": UrlFileNameMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": UrlFileNameMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": UrlFileNameMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": UrlFileNameMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": UrlFileNameMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": UrlFileNameMatchConditionParameters_Operator_STATUS_RegEx, +} + type UrlFileNameMatchConditionParameters_TypeName_STATUS string const UrlFileNameMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlFilenameConditionParameters = UrlFileNameMatchConditionParameters_TypeName_STATUS("DeliveryRuleUrlFilenameConditionParameters") +// Mapping from string to UrlFileNameMatchConditionParameters_TypeName_STATUS +var urlFileNameMatchConditionParameters_TypeName_STATUS_Values = map[string]UrlFileNameMatchConditionParameters_TypeName_STATUS{ + "deliveryruleurlfilenameconditionparameters": UrlFileNameMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlFilenameConditionParameters, +} + type UrlPathMatchConditionParameters_Operator_STATUS string const ( @@ -1565,10 +2102,30 @@ const ( UrlPathMatchConditionParameters_Operator_STATUS_Wildcard = UrlPathMatchConditionParameters_Operator_STATUS("Wildcard") ) +// Mapping from string to UrlPathMatchConditionParameters_Operator_STATUS +var urlPathMatchConditionParameters_Operator_STATUS_Values = map[string]UrlPathMatchConditionParameters_Operator_STATUS{ + "any": UrlPathMatchConditionParameters_Operator_STATUS_Any, + "beginswith": UrlPathMatchConditionParameters_Operator_STATUS_BeginsWith, + "contains": UrlPathMatchConditionParameters_Operator_STATUS_Contains, + "endswith": UrlPathMatchConditionParameters_Operator_STATUS_EndsWith, + "equal": UrlPathMatchConditionParameters_Operator_STATUS_Equal, + "greaterthan": UrlPathMatchConditionParameters_Operator_STATUS_GreaterThan, + "greaterthanorequal": UrlPathMatchConditionParameters_Operator_STATUS_GreaterThanOrEqual, + "lessthan": UrlPathMatchConditionParameters_Operator_STATUS_LessThan, + "lessthanorequal": UrlPathMatchConditionParameters_Operator_STATUS_LessThanOrEqual, + "regex": UrlPathMatchConditionParameters_Operator_STATUS_RegEx, + "wildcard": UrlPathMatchConditionParameters_Operator_STATUS_Wildcard, +} + type UrlPathMatchConditionParameters_TypeName_STATUS string const UrlPathMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlPathMatchConditionParameters = UrlPathMatchConditionParameters_TypeName_STATUS("DeliveryRuleUrlPathMatchConditionParameters") +// Mapping from string to UrlPathMatchConditionParameters_TypeName_STATUS +var urlPathMatchConditionParameters_TypeName_STATUS_Values = map[string]UrlPathMatchConditionParameters_TypeName_STATUS{ + "deliveryruleurlpathmatchconditionparameters": UrlPathMatchConditionParameters_TypeName_STATUS_DeliveryRuleUrlPathMatchConditionParameters, +} + type UrlRedirectActionParameters_DestinationProtocol_STATUS string const ( @@ -1577,6 +2134,13 @@ const ( UrlRedirectActionParameters_DestinationProtocol_STATUS_MatchRequest = UrlRedirectActionParameters_DestinationProtocol_STATUS("MatchRequest") ) +// Mapping from string to UrlRedirectActionParameters_DestinationProtocol_STATUS +var urlRedirectActionParameters_DestinationProtocol_STATUS_Values = map[string]UrlRedirectActionParameters_DestinationProtocol_STATUS{ + "http": UrlRedirectActionParameters_DestinationProtocol_STATUS_Http, + "https": UrlRedirectActionParameters_DestinationProtocol_STATUS_Https, + "matchrequest": UrlRedirectActionParameters_DestinationProtocol_STATUS_MatchRequest, +} + type UrlRedirectActionParameters_RedirectType_STATUS string const ( @@ -1586,22 +2150,50 @@ const ( UrlRedirectActionParameters_RedirectType_STATUS_TemporaryRedirect = UrlRedirectActionParameters_RedirectType_STATUS("TemporaryRedirect") ) +// Mapping from string to UrlRedirectActionParameters_RedirectType_STATUS +var urlRedirectActionParameters_RedirectType_STATUS_Values = map[string]UrlRedirectActionParameters_RedirectType_STATUS{ + "found": UrlRedirectActionParameters_RedirectType_STATUS_Found, + "moved": UrlRedirectActionParameters_RedirectType_STATUS_Moved, + "permanentredirect": UrlRedirectActionParameters_RedirectType_STATUS_PermanentRedirect, + "temporaryredirect": UrlRedirectActionParameters_RedirectType_STATUS_TemporaryRedirect, +} + type UrlRedirectActionParameters_TypeName_STATUS string const UrlRedirectActionParameters_TypeName_STATUS_DeliveryRuleUrlRedirectActionParameters = UrlRedirectActionParameters_TypeName_STATUS("DeliveryRuleUrlRedirectActionParameters") +// Mapping from string to UrlRedirectActionParameters_TypeName_STATUS +var urlRedirectActionParameters_TypeName_STATUS_Values = map[string]UrlRedirectActionParameters_TypeName_STATUS{ + "deliveryruleurlredirectactionparameters": UrlRedirectActionParameters_TypeName_STATUS_DeliveryRuleUrlRedirectActionParameters, +} + type UrlRewriteActionParameters_TypeName_STATUS string const UrlRewriteActionParameters_TypeName_STATUS_DeliveryRuleUrlRewriteActionParameters = UrlRewriteActionParameters_TypeName_STATUS("DeliveryRuleUrlRewriteActionParameters") +// Mapping from string to UrlRewriteActionParameters_TypeName_STATUS +var urlRewriteActionParameters_TypeName_STATUS_Values = map[string]UrlRewriteActionParameters_TypeName_STATUS{ + "deliveryruleurlrewriteactionparameters": UrlRewriteActionParameters_TypeName_STATUS_DeliveryRuleUrlRewriteActionParameters, +} + type UrlSigningActionParameters_Algorithm_STATUS string const UrlSigningActionParameters_Algorithm_STATUS_SHA256 = UrlSigningActionParameters_Algorithm_STATUS("SHA256") +// Mapping from string to UrlSigningActionParameters_Algorithm_STATUS +var urlSigningActionParameters_Algorithm_STATUS_Values = map[string]UrlSigningActionParameters_Algorithm_STATUS{ + "sha256": UrlSigningActionParameters_Algorithm_STATUS_SHA256, +} + type UrlSigningActionParameters_TypeName_STATUS string const UrlSigningActionParameters_TypeName_STATUS_DeliveryRuleUrlSigningActionParameters = UrlSigningActionParameters_TypeName_STATUS("DeliveryRuleUrlSigningActionParameters") +// Mapping from string to UrlSigningActionParameters_TypeName_STATUS +var urlSigningActionParameters_TypeName_STATUS_Values = map[string]UrlSigningActionParameters_TypeName_STATUS{ + "deliveryruleurlsigningactionparameters": UrlSigningActionParameters_TypeName_STATUS_DeliveryRuleUrlSigningActionParameters, +} + // Defines how to identify a parameter for a specific purpose e.g. expires type UrlSigningParamIdentifier_STATUS_ARM struct { // ParamIndicator: Indicates the purpose of the parameter @@ -1619,6 +2211,13 @@ const ( CacheConfiguration_CacheBehavior_STATUS_OverrideIfOriginMissing = CacheConfiguration_CacheBehavior_STATUS("OverrideIfOriginMissing") ) +// Mapping from string to CacheConfiguration_CacheBehavior_STATUS +var cacheConfiguration_CacheBehavior_STATUS_Values = map[string]CacheConfiguration_CacheBehavior_STATUS{ + "honororigin": CacheConfiguration_CacheBehavior_STATUS_HonorOrigin, + "overridealways": CacheConfiguration_CacheBehavior_STATUS_OverrideAlways, + "overrideiforiginmissing": CacheConfiguration_CacheBehavior_STATUS_OverrideIfOriginMissing, +} + type CacheConfiguration_IsCompressionEnabled_STATUS string const ( @@ -1626,6 +2225,12 @@ const ( CacheConfiguration_IsCompressionEnabled_STATUS_Enabled = CacheConfiguration_IsCompressionEnabled_STATUS("Enabled") ) +// Mapping from string to CacheConfiguration_IsCompressionEnabled_STATUS +var cacheConfiguration_IsCompressionEnabled_STATUS_Values = map[string]CacheConfiguration_IsCompressionEnabled_STATUS{ + "disabled": CacheConfiguration_IsCompressionEnabled_STATUS_Disabled, + "enabled": CacheConfiguration_IsCompressionEnabled_STATUS_Enabled, +} + type CacheConfiguration_QueryStringCachingBehavior_STATUS string const ( @@ -1635,6 +2240,14 @@ const ( CacheConfiguration_QueryStringCachingBehavior_STATUS_UseQueryString = CacheConfiguration_QueryStringCachingBehavior_STATUS("UseQueryString") ) +// Mapping from string to CacheConfiguration_QueryStringCachingBehavior_STATUS +var cacheConfiguration_QueryStringCachingBehavior_STATUS_Values = map[string]CacheConfiguration_QueryStringCachingBehavior_STATUS{ + "ignorequerystring": CacheConfiguration_QueryStringCachingBehavior_STATUS_IgnoreQueryString, + "ignorespecifiedquerystrings": CacheConfiguration_QueryStringCachingBehavior_STATUS_IgnoreSpecifiedQueryStrings, + "includespecifiedquerystrings": CacheConfiguration_QueryStringCachingBehavior_STATUS_IncludeSpecifiedQueryStrings, + "usequerystring": CacheConfiguration_QueryStringCachingBehavior_STATUS_UseQueryString, +} + type OriginGroupOverride_ForwardingProtocol_STATUS string const ( @@ -1643,6 +2256,13 @@ const ( OriginGroupOverride_ForwardingProtocol_STATUS_MatchRequest = OriginGroupOverride_ForwardingProtocol_STATUS("MatchRequest") ) +// Mapping from string to OriginGroupOverride_ForwardingProtocol_STATUS +var originGroupOverride_ForwardingProtocol_STATUS_Values = map[string]OriginGroupOverride_ForwardingProtocol_STATUS{ + "httponly": OriginGroupOverride_ForwardingProtocol_STATUS_HttpOnly, + "httpsonly": OriginGroupOverride_ForwardingProtocol_STATUS_HttpsOnly, + "matchrequest": OriginGroupOverride_ForwardingProtocol_STATUS_MatchRequest, +} + type UrlSigningParamIdentifier_ParamIndicator_STATUS string const ( @@ -1650,3 +2270,10 @@ const ( UrlSigningParamIdentifier_ParamIndicator_STATUS_KeyId = UrlSigningParamIdentifier_ParamIndicator_STATUS("KeyId") UrlSigningParamIdentifier_ParamIndicator_STATUS_Signature = UrlSigningParamIdentifier_ParamIndicator_STATUS("Signature") ) + +// Mapping from string to UrlSigningParamIdentifier_ParamIndicator_STATUS +var urlSigningParamIdentifier_ParamIndicator_STATUS_Values = map[string]UrlSigningParamIdentifier_ParamIndicator_STATUS{ + "expires": UrlSigningParamIdentifier_ParamIndicator_STATUS_Expires, + "keyid": UrlSigningParamIdentifier_ParamIndicator_STATUS_KeyId, + "signature": UrlSigningParamIdentifier_ParamIndicator_STATUS_Signature, +} diff --git a/v2/api/cdn/v1api20230501/profiles_secret_spec_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_secret_spec_arm_types_gen.go index c8493598ad2..eb63ef06c61 100644 --- a/v2/api/cdn/v1api20230501/profiles_secret_spec_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_secret_spec_arm_types_gen.go @@ -143,17 +143,37 @@ type AzureFirstPartyManagedCertificateParameters_Type string const AzureFirstPartyManagedCertificateParameters_Type_AzureFirstPartyManagedCertificate = AzureFirstPartyManagedCertificateParameters_Type("AzureFirstPartyManagedCertificate") +// Mapping from string to AzureFirstPartyManagedCertificateParameters_Type +var azureFirstPartyManagedCertificateParameters_Type_Values = map[string]AzureFirstPartyManagedCertificateParameters_Type{ + "azurefirstpartymanagedcertificate": AzureFirstPartyManagedCertificateParameters_Type_AzureFirstPartyManagedCertificate, +} + // +kubebuilder:validation:Enum={"CustomerCertificate"} type CustomerCertificateParameters_Type string const CustomerCertificateParameters_Type_CustomerCertificate = CustomerCertificateParameters_Type("CustomerCertificate") +// Mapping from string to CustomerCertificateParameters_Type +var customerCertificateParameters_Type_Values = map[string]CustomerCertificateParameters_Type{ + "customercertificate": CustomerCertificateParameters_Type_CustomerCertificate, +} + // +kubebuilder:validation:Enum={"ManagedCertificate"} type ManagedCertificateParameters_Type string const ManagedCertificateParameters_Type_ManagedCertificate = ManagedCertificateParameters_Type("ManagedCertificate") +// Mapping from string to ManagedCertificateParameters_Type +var managedCertificateParameters_Type_Values = map[string]ManagedCertificateParameters_Type{ + "managedcertificate": ManagedCertificateParameters_Type_ManagedCertificate, +} + // +kubebuilder:validation:Enum={"UrlSigningKey"} type UrlSigningKeyParameters_Type string const UrlSigningKeyParameters_Type_UrlSigningKey = UrlSigningKeyParameters_Type("UrlSigningKey") + +// Mapping from string to UrlSigningKeyParameters_Type +var urlSigningKeyParameters_Type_Values = map[string]UrlSigningKeyParameters_Type{ + "urlsigningkey": UrlSigningKeyParameters_Type_UrlSigningKey, +} diff --git a/v2/api/cdn/v1api20230501/profiles_secret_status_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_secret_status_arm_types_gen.go index 83027dd24fa..52a5dc43742 100644 --- a/v2/api/cdn/v1api20230501/profiles_secret_status_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_secret_status_arm_types_gen.go @@ -105,6 +105,14 @@ const ( SecretProperties_DeploymentStatus_STATUS_Succeeded = SecretProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to SecretProperties_DeploymentStatus_STATUS +var secretProperties_DeploymentStatus_STATUS_Values = map[string]SecretProperties_DeploymentStatus_STATUS{ + "failed": SecretProperties_DeploymentStatus_STATUS_Failed, + "inprogress": SecretProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": SecretProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": SecretProperties_DeploymentStatus_STATUS_Succeeded, +} + type SecretProperties_ProvisioningState_STATUS string const ( @@ -115,6 +123,15 @@ const ( SecretProperties_ProvisioningState_STATUS_Updating = SecretProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to SecretProperties_ProvisioningState_STATUS +var secretProperties_ProvisioningState_STATUS_Values = map[string]SecretProperties_ProvisioningState_STATUS{ + "creating": SecretProperties_ProvisioningState_STATUS_Creating, + "deleting": SecretProperties_ProvisioningState_STATUS_Deleting, + "failed": SecretProperties_ProvisioningState_STATUS_Failed, + "succeeded": SecretProperties_ProvisioningState_STATUS_Succeeded, + "updating": SecretProperties_ProvisioningState_STATUS_Updating, +} + type AzureFirstPartyManagedCertificateParameters_STATUS_ARM struct { // CertificateAuthority: Certificate issuing authority. CertificateAuthority *string `json:"certificateAuthority,omitempty"` @@ -192,14 +209,34 @@ type AzureFirstPartyManagedCertificateParameters_Type_STATUS string const AzureFirstPartyManagedCertificateParameters_Type_STATUS_AzureFirstPartyManagedCertificate = AzureFirstPartyManagedCertificateParameters_Type_STATUS("AzureFirstPartyManagedCertificate") +// Mapping from string to AzureFirstPartyManagedCertificateParameters_Type_STATUS +var azureFirstPartyManagedCertificateParameters_Type_STATUS_Values = map[string]AzureFirstPartyManagedCertificateParameters_Type_STATUS{ + "azurefirstpartymanagedcertificate": AzureFirstPartyManagedCertificateParameters_Type_STATUS_AzureFirstPartyManagedCertificate, +} + type CustomerCertificateParameters_Type_STATUS string const CustomerCertificateParameters_Type_STATUS_CustomerCertificate = CustomerCertificateParameters_Type_STATUS("CustomerCertificate") +// Mapping from string to CustomerCertificateParameters_Type_STATUS +var customerCertificateParameters_Type_STATUS_Values = map[string]CustomerCertificateParameters_Type_STATUS{ + "customercertificate": CustomerCertificateParameters_Type_STATUS_CustomerCertificate, +} + type ManagedCertificateParameters_Type_STATUS string const ManagedCertificateParameters_Type_STATUS_ManagedCertificate = ManagedCertificateParameters_Type_STATUS("ManagedCertificate") +// Mapping from string to ManagedCertificateParameters_Type_STATUS +var managedCertificateParameters_Type_STATUS_Values = map[string]ManagedCertificateParameters_Type_STATUS{ + "managedcertificate": ManagedCertificateParameters_Type_STATUS_ManagedCertificate, +} + type UrlSigningKeyParameters_Type_STATUS string const UrlSigningKeyParameters_Type_STATUS_UrlSigningKey = UrlSigningKeyParameters_Type_STATUS("UrlSigningKey") + +// Mapping from string to UrlSigningKeyParameters_Type_STATUS +var urlSigningKeyParameters_Type_STATUS_Values = map[string]UrlSigningKeyParameters_Type_STATUS{ + "urlsigningkey": UrlSigningKeyParameters_Type_STATUS_UrlSigningKey, +} diff --git a/v2/api/cdn/v1api20230501/profiles_security_policy_spec_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_security_policy_spec_arm_types_gen.go index 78f57f39098..78c1202039f 100644 --- a/v2/api/cdn/v1api20230501/profiles_security_policy_spec_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_security_policy_spec_arm_types_gen.go @@ -92,3 +92,8 @@ type SecurityPolicyWebApplicationFirewallAssociation_ARM struct { type SecurityPolicyWebApplicationFirewallParameters_Type string const SecurityPolicyWebApplicationFirewallParameters_Type_WebApplicationFirewall = SecurityPolicyWebApplicationFirewallParameters_Type("WebApplicationFirewall") + +// Mapping from string to SecurityPolicyWebApplicationFirewallParameters_Type +var securityPolicyWebApplicationFirewallParameters_Type_Values = map[string]SecurityPolicyWebApplicationFirewallParameters_Type{ + "webapplicationfirewall": SecurityPolicyWebApplicationFirewallParameters_Type_WebApplicationFirewall, +} diff --git a/v2/api/cdn/v1api20230501/profiles_security_policy_status_arm_types_gen.go b/v2/api/cdn/v1api20230501/profiles_security_policy_status_arm_types_gen.go index 01afebbb622..894ce326b36 100644 --- a/v2/api/cdn/v1api20230501/profiles_security_policy_status_arm_types_gen.go +++ b/v2/api/cdn/v1api20230501/profiles_security_policy_status_arm_types_gen.go @@ -45,6 +45,14 @@ const ( SecurityPolicyProperties_DeploymentStatus_STATUS_Succeeded = SecurityPolicyProperties_DeploymentStatus_STATUS("Succeeded") ) +// Mapping from string to SecurityPolicyProperties_DeploymentStatus_STATUS +var securityPolicyProperties_DeploymentStatus_STATUS_Values = map[string]SecurityPolicyProperties_DeploymentStatus_STATUS{ + "failed": SecurityPolicyProperties_DeploymentStatus_STATUS_Failed, + "inprogress": SecurityPolicyProperties_DeploymentStatus_STATUS_InProgress, + "notstarted": SecurityPolicyProperties_DeploymentStatus_STATUS_NotStarted, + "succeeded": SecurityPolicyProperties_DeploymentStatus_STATUS_Succeeded, +} + type SecurityPolicyProperties_ProvisioningState_STATUS string const ( @@ -55,6 +63,15 @@ const ( SecurityPolicyProperties_ProvisioningState_STATUS_Updating = SecurityPolicyProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to SecurityPolicyProperties_ProvisioningState_STATUS +var securityPolicyProperties_ProvisioningState_STATUS_Values = map[string]SecurityPolicyProperties_ProvisioningState_STATUS{ + "creating": SecurityPolicyProperties_ProvisioningState_STATUS_Creating, + "deleting": SecurityPolicyProperties_ProvisioningState_STATUS_Deleting, + "failed": SecurityPolicyProperties_ProvisioningState_STATUS_Failed, + "succeeded": SecurityPolicyProperties_ProvisioningState_STATUS_Succeeded, + "updating": SecurityPolicyProperties_ProvisioningState_STATUS_Updating, +} + type SecurityPolicyPropertiesParameters_STATUS_ARM struct { // WebApplicationFirewall: Mutually exclusive with all other properties WebApplicationFirewall *SecurityPolicyWebApplicationFirewallParameters_STATUS_ARM `json:"webApplicationFirewall,omitempty"` @@ -109,6 +126,11 @@ type SecurityPolicyWebApplicationFirewallParameters_Type_STATUS string const SecurityPolicyWebApplicationFirewallParameters_Type_STATUS_WebApplicationFirewall = SecurityPolicyWebApplicationFirewallParameters_Type_STATUS("WebApplicationFirewall") +// Mapping from string to SecurityPolicyWebApplicationFirewallParameters_Type_STATUS +var securityPolicyWebApplicationFirewallParameters_Type_STATUS_Values = map[string]SecurityPolicyWebApplicationFirewallParameters_Type_STATUS{ + "webapplicationfirewall": SecurityPolicyWebApplicationFirewallParameters_Type_STATUS_WebApplicationFirewall, +} + // Reference to another resource along with its state. type ActivatedResourceReference_STATUS_Profiles_SecurityPolicy_SubResourceEmbedded_ARM struct { // Id: Resource ID. diff --git a/v2/api/cdn/v1api20230501/route_types_gen.go b/v2/api/cdn/v1api20230501/route_types_gen.go index d7ffb9a8f3d..45fb681bba7 100644 --- a/v2/api/cdn/v1api20230501/route_types_gen.go +++ b/v2/api/cdn/v1api20230501/route_types_gen.go @@ -685,32 +685,36 @@ func (route *Profiles_AfdEndpoints_Route_Spec) AssignProperties_From_Profiles_Af // EnabledState if source.EnabledState != nil { - enabledState := RouteProperties_EnabledState(*source.EnabledState) - route.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, routeProperties_EnabledState_Values) + route.EnabledState = &enabledStateTemp } else { route.EnabledState = nil } // ForwardingProtocol if source.ForwardingProtocol != nil { - forwardingProtocol := RouteProperties_ForwardingProtocol(*source.ForwardingProtocol) - route.ForwardingProtocol = &forwardingProtocol + forwardingProtocol := *source.ForwardingProtocol + forwardingProtocolTemp := genruntime.ToEnum(forwardingProtocol, routeProperties_ForwardingProtocol_Values) + route.ForwardingProtocol = &forwardingProtocolTemp } else { route.ForwardingProtocol = nil } // HttpsRedirect if source.HttpsRedirect != nil { - httpsRedirect := RouteProperties_HttpsRedirect(*source.HttpsRedirect) - route.HttpsRedirect = &httpsRedirect + httpsRedirect := *source.HttpsRedirect + httpsRedirectTemp := genruntime.ToEnum(httpsRedirect, routeProperties_HttpsRedirect_Values) + route.HttpsRedirect = &httpsRedirectTemp } else { route.HttpsRedirect = nil } // LinkToDefaultDomain if source.LinkToDefaultDomain != nil { - linkToDefaultDomain := RouteProperties_LinkToDefaultDomain(*source.LinkToDefaultDomain) - route.LinkToDefaultDomain = &linkToDefaultDomain + linkToDefaultDomain := *source.LinkToDefaultDomain + linkToDefaultDomainTemp := genruntime.ToEnum(linkToDefaultDomain, routeProperties_LinkToDefaultDomain_Values) + route.LinkToDefaultDomain = &linkToDefaultDomainTemp } else { route.LinkToDefaultDomain = nil } @@ -765,7 +769,7 @@ func (route *Profiles_AfdEndpoints_Route_Spec) AssignProperties_From_Profiles_Af for supportedProtocolIndex, supportedProtocolItem := range source.SupportedProtocols { // Shadow the loop variable to avoid aliasing supportedProtocolItem := supportedProtocolItem - supportedProtocolList[supportedProtocolIndex] = AFDEndpointProtocols(supportedProtocolItem) + supportedProtocolList[supportedProtocolIndex] = genruntime.ToEnum(supportedProtocolItem, aFDEndpointProtocols_Values) } route.SupportedProtocols = supportedProtocolList } else { @@ -1385,16 +1389,18 @@ func (route *Profiles_AfdEndpoints_Route_STATUS) AssignProperties_From_Profiles_ // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := RouteProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - route.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, routeProperties_DeploymentStatus_STATUS_Values) + route.DeploymentStatus = &deploymentStatusTemp } else { route.DeploymentStatus = nil } // EnabledState if source.EnabledState != nil { - enabledState := RouteProperties_EnabledState_STATUS(*source.EnabledState) - route.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, routeProperties_EnabledState_STATUS_Values) + route.EnabledState = &enabledStateTemp } else { route.EnabledState = nil } @@ -1404,16 +1410,18 @@ func (route *Profiles_AfdEndpoints_Route_STATUS) AssignProperties_From_Profiles_ // ForwardingProtocol if source.ForwardingProtocol != nil { - forwardingProtocol := RouteProperties_ForwardingProtocol_STATUS(*source.ForwardingProtocol) - route.ForwardingProtocol = &forwardingProtocol + forwardingProtocol := *source.ForwardingProtocol + forwardingProtocolTemp := genruntime.ToEnum(forwardingProtocol, routeProperties_ForwardingProtocol_STATUS_Values) + route.ForwardingProtocol = &forwardingProtocolTemp } else { route.ForwardingProtocol = nil } // HttpsRedirect if source.HttpsRedirect != nil { - httpsRedirect := RouteProperties_HttpsRedirect_STATUS(*source.HttpsRedirect) - route.HttpsRedirect = &httpsRedirect + httpsRedirect := *source.HttpsRedirect + httpsRedirectTemp := genruntime.ToEnum(httpsRedirect, routeProperties_HttpsRedirect_STATUS_Values) + route.HttpsRedirect = &httpsRedirectTemp } else { route.HttpsRedirect = nil } @@ -1423,8 +1431,9 @@ func (route *Profiles_AfdEndpoints_Route_STATUS) AssignProperties_From_Profiles_ // LinkToDefaultDomain if source.LinkToDefaultDomain != nil { - linkToDefaultDomain := RouteProperties_LinkToDefaultDomain_STATUS(*source.LinkToDefaultDomain) - route.LinkToDefaultDomain = &linkToDefaultDomain + linkToDefaultDomain := *source.LinkToDefaultDomain + linkToDefaultDomainTemp := genruntime.ToEnum(linkToDefaultDomain, routeProperties_LinkToDefaultDomain_STATUS_Values) + route.LinkToDefaultDomain = &linkToDefaultDomainTemp } else { route.LinkToDefaultDomain = nil } @@ -1452,8 +1461,9 @@ func (route *Profiles_AfdEndpoints_Route_STATUS) AssignProperties_From_Profiles_ // ProvisioningState if source.ProvisioningState != nil { - provisioningState := RouteProperties_ProvisioningState_STATUS(*source.ProvisioningState) - route.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, routeProperties_ProvisioningState_STATUS_Values) + route.ProvisioningState = &provisioningStateTemp } else { route.ProvisioningState = nil } @@ -1482,7 +1492,7 @@ func (route *Profiles_AfdEndpoints_Route_STATUS) AssignProperties_From_Profiles_ for supportedProtocolIndex, supportedProtocolItem := range source.SupportedProtocols { // Shadow the loop variable to avoid aliasing supportedProtocolItem := supportedProtocolItem - supportedProtocolList[supportedProtocolIndex] = AFDEndpointProtocols_STATUS(supportedProtocolItem) + supportedProtocolList[supportedProtocolIndex] = genruntime.ToEnum(supportedProtocolItem, aFDEndpointProtocols_STATUS_Values) } route.SupportedProtocols = supportedProtocolList } else { @@ -1957,8 +1967,9 @@ func (configuration *AfdRouteCacheConfiguration) AssignProperties_From_AfdRouteC // QueryStringCachingBehavior if source.QueryStringCachingBehavior != nil { - queryStringCachingBehavior := AfdRouteCacheConfiguration_QueryStringCachingBehavior(*source.QueryStringCachingBehavior) - configuration.QueryStringCachingBehavior = &queryStringCachingBehavior + queryStringCachingBehavior := *source.QueryStringCachingBehavior + queryStringCachingBehaviorTemp := genruntime.ToEnum(queryStringCachingBehavior, afdRouteCacheConfiguration_QueryStringCachingBehavior_Values) + configuration.QueryStringCachingBehavior = &queryStringCachingBehaviorTemp } else { configuration.QueryStringCachingBehavior = nil } @@ -2111,8 +2122,9 @@ func (configuration *AfdRouteCacheConfiguration_STATUS) AssignProperties_From_Af // QueryStringCachingBehavior if source.QueryStringCachingBehavior != nil { - queryStringCachingBehavior := AfdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS(*source.QueryStringCachingBehavior) - configuration.QueryStringCachingBehavior = &queryStringCachingBehavior + queryStringCachingBehavior := *source.QueryStringCachingBehavior + queryStringCachingBehaviorTemp := genruntime.ToEnum(queryStringCachingBehavior, afdRouteCacheConfiguration_QueryStringCachingBehavior_STATUS_Values) + configuration.QueryStringCachingBehavior = &queryStringCachingBehaviorTemp } else { configuration.QueryStringCachingBehavior = nil } diff --git a/v2/api/cdn/v1api20230501/rule_set_types_gen.go b/v2/api/cdn/v1api20230501/rule_set_types_gen.go index 453826dc0d0..222931025d3 100644 --- a/v2/api/cdn/v1api20230501/rule_set_types_gen.go +++ b/v2/api/cdn/v1api20230501/rule_set_types_gen.go @@ -646,8 +646,9 @@ func (ruleSet *Profiles_RuleSet_STATUS) AssignProperties_From_Profiles_RuleSet_S // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := RuleSetProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - ruleSet.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, ruleSetProperties_DeploymentStatus_STATUS_Values) + ruleSet.DeploymentStatus = &deploymentStatusTemp } else { ruleSet.DeploymentStatus = nil } @@ -663,8 +664,9 @@ func (ruleSet *Profiles_RuleSet_STATUS) AssignProperties_From_Profiles_RuleSet_S // ProvisioningState if source.ProvisioningState != nil { - provisioningState := RuleSetProperties_ProvisioningState_STATUS(*source.ProvisioningState) - ruleSet.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, ruleSetProperties_ProvisioningState_STATUS_Values) + ruleSet.ProvisioningState = &provisioningStateTemp } else { ruleSet.ProvisioningState = nil } diff --git a/v2/api/cdn/v1api20230501/rule_types_gen.go b/v2/api/cdn/v1api20230501/rule_types_gen.go index c6721913bec..86563aa4b13 100644 --- a/v2/api/cdn/v1api20230501/rule_types_gen.go +++ b/v2/api/cdn/v1api20230501/rule_types_gen.go @@ -540,8 +540,9 @@ func (rule *Profiles_RuleSets_Rule_Spec) AssignProperties_From_Profiles_RuleSets // MatchProcessingBehavior if source.MatchProcessingBehavior != nil { - matchProcessingBehavior := RuleProperties_MatchProcessingBehavior(*source.MatchProcessingBehavior) - rule.MatchProcessingBehavior = &matchProcessingBehavior + matchProcessingBehavior := *source.MatchProcessingBehavior + matchProcessingBehaviorTemp := genruntime.ToEnum(matchProcessingBehavior, ruleProperties_MatchProcessingBehavior_Values) + rule.MatchProcessingBehavior = &matchProcessingBehaviorTemp } else { rule.MatchProcessingBehavior = nil } @@ -953,8 +954,9 @@ func (rule *Profiles_RuleSets_Rule_STATUS) AssignProperties_From_Profiles_RuleSe // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := RuleProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - rule.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, ruleProperties_DeploymentStatus_STATUS_Values) + rule.DeploymentStatus = &deploymentStatusTemp } else { rule.DeploymentStatus = nil } @@ -964,8 +966,9 @@ func (rule *Profiles_RuleSets_Rule_STATUS) AssignProperties_From_Profiles_RuleSe // MatchProcessingBehavior if source.MatchProcessingBehavior != nil { - matchProcessingBehavior := RuleProperties_MatchProcessingBehavior_STATUS(*source.MatchProcessingBehavior) - rule.MatchProcessingBehavior = &matchProcessingBehavior + matchProcessingBehavior := *source.MatchProcessingBehavior + matchProcessingBehaviorTemp := genruntime.ToEnum(matchProcessingBehavior, ruleProperties_MatchProcessingBehavior_STATUS_Values) + rule.MatchProcessingBehavior = &matchProcessingBehaviorTemp } else { rule.MatchProcessingBehavior = nil } @@ -978,8 +981,9 @@ func (rule *Profiles_RuleSets_Rule_STATUS) AssignProperties_From_Profiles_RuleSe // ProvisioningState if source.ProvisioningState != nil { - provisioningState := RuleProperties_ProvisioningState_STATUS(*source.ProvisioningState) - rule.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, ruleProperties_ProvisioningState_STATUS_Values) + rule.ProvisioningState = &provisioningStateTemp } else { rule.ProvisioningState = nil } @@ -4153,8 +4157,9 @@ func (action *DeliveryRuleCacheExpirationAction) AssignProperties_From_DeliveryR // Name if source.Name != nil { - name := DeliveryRuleCacheExpirationAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCacheExpirationAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -4283,8 +4288,9 @@ func (action *DeliveryRuleCacheExpirationAction_STATUS) AssignProperties_From_De // Name if source.Name != nil { - name := DeliveryRuleCacheExpirationAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCacheExpirationAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -4412,8 +4418,9 @@ func (action *DeliveryRuleCacheKeyQueryStringAction) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleCacheKeyQueryStringAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCacheKeyQueryStringAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -4542,8 +4549,9 @@ func (action *DeliveryRuleCacheKeyQueryStringAction_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleCacheKeyQueryStringAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCacheKeyQueryStringAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -4671,8 +4679,9 @@ func (condition *DeliveryRuleClientPortCondition) AssignProperties_From_Delivery // Name if source.Name != nil { - name := DeliveryRuleClientPortCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleClientPortCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -4801,8 +4810,9 @@ func (condition *DeliveryRuleClientPortCondition_STATUS) AssignProperties_From_D // Name if source.Name != nil { - name := DeliveryRuleClientPortCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleClientPortCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -4930,8 +4940,9 @@ func (condition *DeliveryRuleCookiesCondition) AssignProperties_From_DeliveryRul // Name if source.Name != nil { - name := DeliveryRuleCookiesCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCookiesCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -5060,8 +5071,9 @@ func (condition *DeliveryRuleCookiesCondition_STATUS) AssignProperties_From_Deli // Name if source.Name != nil { - name := DeliveryRuleCookiesCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleCookiesCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -5189,8 +5201,9 @@ func (condition *DeliveryRuleHostNameCondition) AssignProperties_From_DeliveryRu // Name if source.Name != nil { - name := DeliveryRuleHostNameCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleHostNameCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -5319,8 +5332,9 @@ func (condition *DeliveryRuleHostNameCondition_STATUS) AssignProperties_From_Del // Name if source.Name != nil { - name := DeliveryRuleHostNameCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleHostNameCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -5448,8 +5462,9 @@ func (condition *DeliveryRuleHttpVersionCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleHttpVersionCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleHttpVersionCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -5578,8 +5593,9 @@ func (condition *DeliveryRuleHttpVersionCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleHttpVersionCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleHttpVersionCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -5707,8 +5723,9 @@ func (condition *DeliveryRuleIsDeviceCondition) AssignProperties_From_DeliveryRu // Name if source.Name != nil { - name := DeliveryRuleIsDeviceCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleIsDeviceCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -5837,8 +5854,9 @@ func (condition *DeliveryRuleIsDeviceCondition_STATUS) AssignProperties_From_Del // Name if source.Name != nil { - name := DeliveryRuleIsDeviceCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleIsDeviceCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -5966,8 +5984,9 @@ func (condition *DeliveryRulePostArgsCondition) AssignProperties_From_DeliveryRu // Name if source.Name != nil { - name := DeliveryRulePostArgsCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRulePostArgsCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -6096,8 +6115,9 @@ func (condition *DeliveryRulePostArgsCondition_STATUS) AssignProperties_From_Del // Name if source.Name != nil { - name := DeliveryRulePostArgsCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRulePostArgsCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -6225,8 +6245,9 @@ func (condition *DeliveryRuleQueryStringCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleQueryStringCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleQueryStringCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -6355,8 +6376,9 @@ func (condition *DeliveryRuleQueryStringCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleQueryStringCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleQueryStringCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -6484,8 +6506,9 @@ func (condition *DeliveryRuleRemoteAddressCondition) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleRemoteAddressCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRemoteAddressCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -6614,8 +6637,9 @@ func (condition *DeliveryRuleRemoteAddressCondition_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRemoteAddressCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRemoteAddressCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -6743,8 +6767,9 @@ func (condition *DeliveryRuleRequestBodyCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleRequestBodyCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestBodyCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -6873,8 +6898,9 @@ func (condition *DeliveryRuleRequestBodyCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleRequestBodyCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestBodyCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -7002,8 +7028,9 @@ func (action *DeliveryRuleRequestHeaderAction) AssignProperties_From_DeliveryRul // Name if source.Name != nil { - name := DeliveryRuleRequestHeaderAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestHeaderAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -7132,8 +7159,9 @@ func (action *DeliveryRuleRequestHeaderAction_STATUS) AssignProperties_From_Deli // Name if source.Name != nil { - name := DeliveryRuleRequestHeaderAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestHeaderAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -7261,8 +7289,9 @@ func (condition *DeliveryRuleRequestHeaderCondition) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleRequestHeaderCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestHeaderCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -7391,8 +7420,9 @@ func (condition *DeliveryRuleRequestHeaderCondition_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRequestHeaderCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestHeaderCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -7520,8 +7550,9 @@ func (condition *DeliveryRuleRequestMethodCondition) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleRequestMethodCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestMethodCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -7650,8 +7681,9 @@ func (condition *DeliveryRuleRequestMethodCondition_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRequestMethodCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestMethodCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -7779,8 +7811,9 @@ func (condition *DeliveryRuleRequestSchemeCondition) AssignProperties_From_Deliv // Name if source.Name != nil { - name := DeliveryRuleRequestSchemeCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestSchemeCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -7909,8 +7942,9 @@ func (condition *DeliveryRuleRequestSchemeCondition_STATUS) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRequestSchemeCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestSchemeCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -8038,8 +8072,9 @@ func (condition *DeliveryRuleRequestUriCondition) AssignProperties_From_Delivery // Name if source.Name != nil { - name := DeliveryRuleRequestUriCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestUriCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -8168,8 +8203,9 @@ func (condition *DeliveryRuleRequestUriCondition_STATUS) AssignProperties_From_D // Name if source.Name != nil { - name := DeliveryRuleRequestUriCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRequestUriCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -8297,8 +8333,9 @@ func (action *DeliveryRuleResponseHeaderAction) AssignProperties_From_DeliveryRu // Name if source.Name != nil { - name := DeliveryRuleResponseHeaderAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleResponseHeaderAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -8427,8 +8464,9 @@ func (action *DeliveryRuleResponseHeaderAction_STATUS) AssignProperties_From_Del // Name if source.Name != nil { - name := DeliveryRuleResponseHeaderAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleResponseHeaderAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -8556,8 +8594,9 @@ func (action *DeliveryRuleRouteConfigurationOverrideAction) AssignProperties_Fro // Name if source.Name != nil { - name := DeliveryRuleRouteConfigurationOverrideAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRouteConfigurationOverrideAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -8686,8 +8725,9 @@ func (action *DeliveryRuleRouteConfigurationOverrideAction_STATUS) AssignPropert // Name if source.Name != nil { - name := DeliveryRuleRouteConfigurationOverrideAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleRouteConfigurationOverrideAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -8815,8 +8855,9 @@ func (condition *DeliveryRuleServerPortCondition) AssignProperties_From_Delivery // Name if source.Name != nil { - name := DeliveryRuleServerPortCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleServerPortCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -8945,8 +8986,9 @@ func (condition *DeliveryRuleServerPortCondition_STATUS) AssignProperties_From_D // Name if source.Name != nil { - name := DeliveryRuleServerPortCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleServerPortCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -9074,8 +9116,9 @@ func (condition *DeliveryRuleSocketAddrCondition) AssignProperties_From_Delivery // Name if source.Name != nil { - name := DeliveryRuleSocketAddrCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleSocketAddrCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -9204,8 +9247,9 @@ func (condition *DeliveryRuleSocketAddrCondition_STATUS) AssignProperties_From_D // Name if source.Name != nil { - name := DeliveryRuleSocketAddrCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleSocketAddrCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -9333,8 +9377,9 @@ func (condition *DeliveryRuleSslProtocolCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleSslProtocolCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleSslProtocolCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -9463,8 +9508,9 @@ func (condition *DeliveryRuleSslProtocolCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleSslProtocolCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleSslProtocolCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -9592,8 +9638,9 @@ func (condition *DeliveryRuleUrlFileExtensionCondition) AssignProperties_From_De // Name if source.Name != nil { - name := DeliveryRuleUrlFileExtensionCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlFileExtensionCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -9722,8 +9769,9 @@ func (condition *DeliveryRuleUrlFileExtensionCondition_STATUS) AssignProperties_ // Name if source.Name != nil { - name := DeliveryRuleUrlFileExtensionCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlFileExtensionCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -9851,8 +9899,9 @@ func (condition *DeliveryRuleUrlFileNameCondition) AssignProperties_From_Deliver // Name if source.Name != nil { - name := DeliveryRuleUrlFileNameCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlFileNameCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -9981,8 +10030,9 @@ func (condition *DeliveryRuleUrlFileNameCondition_STATUS) AssignProperties_From_ // Name if source.Name != nil { - name := DeliveryRuleUrlFileNameCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlFileNameCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10110,8 +10160,9 @@ func (condition *DeliveryRuleUrlPathCondition) AssignProperties_From_DeliveryRul // Name if source.Name != nil { - name := DeliveryRuleUrlPathCondition_Name(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlPathCondition_Name_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10240,8 +10291,9 @@ func (condition *DeliveryRuleUrlPathCondition_STATUS) AssignProperties_From_Deli // Name if source.Name != nil { - name := DeliveryRuleUrlPathCondition_Name_STATUS(*source.Name) - condition.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, deliveryRuleUrlPathCondition_Name_STATUS_Values) + condition.Name = &nameTemp } else { condition.Name = nil } @@ -10369,8 +10421,9 @@ func (action *OriginGroupOverrideAction) AssignProperties_From_OriginGroupOverri // Name if source.Name != nil { - name := OriginGroupOverrideAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, originGroupOverrideAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -10499,8 +10552,9 @@ func (action *OriginGroupOverrideAction_STATUS) AssignProperties_From_OriginGrou // Name if source.Name != nil { - name := OriginGroupOverrideAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, originGroupOverrideAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -10628,8 +10682,9 @@ func (action *UrlRedirectAction) AssignProperties_From_UrlRedirectAction(source // Name if source.Name != nil { - name := UrlRedirectAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlRedirectAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -10758,8 +10813,9 @@ func (action *UrlRedirectAction_STATUS) AssignProperties_From_UrlRedirectAction_ // Name if source.Name != nil { - name := UrlRedirectAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlRedirectAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -10887,8 +10943,9 @@ func (action *UrlRewriteAction) AssignProperties_From_UrlRewriteAction(source *v // Name if source.Name != nil { - name := UrlRewriteAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlRewriteAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -11017,8 +11074,9 @@ func (action *UrlRewriteAction_STATUS) AssignProperties_From_UrlRewriteAction_ST // Name if source.Name != nil { - name := UrlRewriteAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlRewriteAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -11146,8 +11204,9 @@ func (action *UrlSigningAction) AssignProperties_From_UrlSigningAction(source *v // Name if source.Name != nil { - name := UrlSigningAction_Name(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlSigningAction_Name_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -11276,8 +11335,9 @@ func (action *UrlSigningAction_STATUS) AssignProperties_From_UrlSigningAction_ST // Name if source.Name != nil { - name := UrlSigningAction_Name_STATUS(*source.Name) - action.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, urlSigningAction_Name_STATUS_Values) + action.Name = &nameTemp } else { action.Name = nil } @@ -11431,8 +11491,9 @@ func (parameters *CacheExpirationActionParameters) AssignProperties_From_CacheEx // CacheBehavior if source.CacheBehavior != nil { - cacheBehavior := CacheExpirationActionParameters_CacheBehavior(*source.CacheBehavior) - parameters.CacheBehavior = &cacheBehavior + cacheBehavior := *source.CacheBehavior + cacheBehaviorTemp := genruntime.ToEnum(cacheBehavior, cacheExpirationActionParameters_CacheBehavior_Values) + parameters.CacheBehavior = &cacheBehaviorTemp } else { parameters.CacheBehavior = nil } @@ -11442,16 +11503,18 @@ func (parameters *CacheExpirationActionParameters) AssignProperties_From_CacheEx // CacheType if source.CacheType != nil { - cacheType := CacheExpirationActionParameters_CacheType(*source.CacheType) - parameters.CacheType = &cacheType + cacheType := *source.CacheType + cacheTypeTemp := genruntime.ToEnum(cacheType, cacheExpirationActionParameters_CacheType_Values) + parameters.CacheType = &cacheTypeTemp } else { parameters.CacheType = nil } // TypeName if source.TypeName != nil { - typeName := CacheExpirationActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cacheExpirationActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -11597,8 +11660,9 @@ func (parameters *CacheExpirationActionParameters_STATUS) AssignProperties_From_ // CacheBehavior if source.CacheBehavior != nil { - cacheBehavior := CacheExpirationActionParameters_CacheBehavior_STATUS(*source.CacheBehavior) - parameters.CacheBehavior = &cacheBehavior + cacheBehavior := *source.CacheBehavior + cacheBehaviorTemp := genruntime.ToEnum(cacheBehavior, cacheExpirationActionParameters_CacheBehavior_STATUS_Values) + parameters.CacheBehavior = &cacheBehaviorTemp } else { parameters.CacheBehavior = nil } @@ -11608,16 +11672,18 @@ func (parameters *CacheExpirationActionParameters_STATUS) AssignProperties_From_ // CacheType if source.CacheType != nil { - cacheType := CacheExpirationActionParameters_CacheType_STATUS(*source.CacheType) - parameters.CacheType = &cacheType + cacheType := *source.CacheType + cacheTypeTemp := genruntime.ToEnum(cacheType, cacheExpirationActionParameters_CacheType_STATUS_Values) + parameters.CacheType = &cacheTypeTemp } else { parameters.CacheType = nil } // TypeName if source.TypeName != nil { - typeName := CacheExpirationActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cacheExpirationActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -11753,16 +11819,18 @@ func (parameters *CacheKeyQueryStringActionParameters) AssignProperties_From_Cac // QueryStringBehavior if source.QueryStringBehavior != nil { - queryStringBehavior := CacheKeyQueryStringActionParameters_QueryStringBehavior(*source.QueryStringBehavior) - parameters.QueryStringBehavior = &queryStringBehavior + queryStringBehavior := *source.QueryStringBehavior + queryStringBehaviorTemp := genruntime.ToEnum(queryStringBehavior, cacheKeyQueryStringActionParameters_QueryStringBehavior_Values) + parameters.QueryStringBehavior = &queryStringBehaviorTemp } else { parameters.QueryStringBehavior = nil } // TypeName if source.TypeName != nil { - typeName := CacheKeyQueryStringActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cacheKeyQueryStringActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -11886,16 +11954,18 @@ func (parameters *CacheKeyQueryStringActionParameters_STATUS) AssignProperties_F // QueryStringBehavior if source.QueryStringBehavior != nil { - queryStringBehavior := CacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS(*source.QueryStringBehavior) - parameters.QueryStringBehavior = &queryStringBehavior + queryStringBehavior := *source.QueryStringBehavior + queryStringBehaviorTemp := genruntime.ToEnum(queryStringBehavior, cacheKeyQueryStringActionParameters_QueryStringBehavior_STATUS_Values) + parameters.QueryStringBehavior = &queryStringBehaviorTemp } else { parameters.QueryStringBehavior = nil } // TypeName if source.TypeName != nil { - typeName := CacheKeyQueryStringActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cacheKeyQueryStringActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -12057,8 +12127,9 @@ func (parameters *ClientPortMatchConditionParameters) AssignProperties_From_Clie // Operator if source.Operator != nil { - operator := ClientPortMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, clientPortMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -12069,7 +12140,7 @@ func (parameters *ClientPortMatchConditionParameters) AssignProperties_From_Clie for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -12078,8 +12149,9 @@ func (parameters *ClientPortMatchConditionParameters) AssignProperties_From_Clie // TypeName if source.TypeName != nil { - typeName := ClientPortMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, clientPortMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -12270,8 +12342,9 @@ func (parameters *ClientPortMatchConditionParameters_STATUS) AssignProperties_Fr // Operator if source.Operator != nil { - operator := ClientPortMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, clientPortMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -12282,7 +12355,7 @@ func (parameters *ClientPortMatchConditionParameters_STATUS) AssignProperties_Fr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -12291,8 +12364,9 @@ func (parameters *ClientPortMatchConditionParameters_STATUS) AssignProperties_Fr // TypeName if source.TypeName != nil { - typeName := ClientPortMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, clientPortMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -12490,8 +12564,9 @@ func (parameters *CookiesMatchConditionParameters) AssignProperties_From_Cookies // Operator if source.Operator != nil { - operator := CookiesMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, cookiesMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -12505,7 +12580,7 @@ func (parameters *CookiesMatchConditionParameters) AssignProperties_From_Cookies for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -12514,8 +12589,9 @@ func (parameters *CookiesMatchConditionParameters) AssignProperties_From_Cookies // TypeName if source.TypeName != nil { - typeName := CookiesMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cookiesMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -12721,8 +12797,9 @@ func (parameters *CookiesMatchConditionParameters_STATUS) AssignProperties_From_ // Operator if source.Operator != nil { - operator := CookiesMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, cookiesMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -12736,7 +12813,7 @@ func (parameters *CookiesMatchConditionParameters_STATUS) AssignProperties_From_ for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -12745,8 +12822,9 @@ func (parameters *CookiesMatchConditionParameters_STATUS) AssignProperties_From_ // TypeName if source.TypeName != nil { - typeName := CookiesMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, cookiesMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -12911,8 +12989,9 @@ func (parameters *HeaderActionParameters) AssignProperties_From_HeaderActionPara // HeaderAction if source.HeaderAction != nil { - headerAction := HeaderActionParameters_HeaderAction(*source.HeaderAction) - parameters.HeaderAction = &headerAction + headerAction := *source.HeaderAction + headerActionTemp := genruntime.ToEnum(headerAction, headerActionParameters_HeaderAction_Values) + parameters.HeaderAction = &headerActionTemp } else { parameters.HeaderAction = nil } @@ -12922,8 +13001,9 @@ func (parameters *HeaderActionParameters) AssignProperties_From_HeaderActionPara // TypeName if source.TypeName != nil { - typeName := HeaderActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, headerActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -13062,8 +13142,9 @@ func (parameters *HeaderActionParameters_STATUS) AssignProperties_From_HeaderAct // HeaderAction if source.HeaderAction != nil { - headerAction := HeaderActionParameters_HeaderAction_STATUS(*source.HeaderAction) - parameters.HeaderAction = &headerAction + headerAction := *source.HeaderAction + headerActionTemp := genruntime.ToEnum(headerAction, headerActionParameters_HeaderAction_STATUS_Values) + parameters.HeaderAction = &headerActionTemp } else { parameters.HeaderAction = nil } @@ -13073,8 +13154,9 @@ func (parameters *HeaderActionParameters_STATUS) AssignProperties_From_HeaderAct // TypeName if source.TypeName != nil { - typeName := HeaderActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, headerActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -13242,8 +13324,9 @@ func (parameters *HostNameMatchConditionParameters) AssignProperties_From_HostNa // Operator if source.Operator != nil { - operator := HostNameMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, hostNameMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -13254,7 +13337,7 @@ func (parameters *HostNameMatchConditionParameters) AssignProperties_From_HostNa for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -13263,8 +13346,9 @@ func (parameters *HostNameMatchConditionParameters) AssignProperties_From_HostNa // TypeName if source.TypeName != nil { - typeName := HostNameMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, hostNameMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -13455,8 +13539,9 @@ func (parameters *HostNameMatchConditionParameters_STATUS) AssignProperties_From // Operator if source.Operator != nil { - operator := HostNameMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, hostNameMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -13467,7 +13552,7 @@ func (parameters *HostNameMatchConditionParameters_STATUS) AssignProperties_From for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -13476,8 +13561,9 @@ func (parameters *HostNameMatchConditionParameters_STATUS) AssignProperties_From // TypeName if source.TypeName != nil { - typeName := HostNameMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, hostNameMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -13660,8 +13746,9 @@ func (parameters *HttpVersionMatchConditionParameters) AssignProperties_From_Htt // Operator if source.Operator != nil { - operator := HttpVersionMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, httpVersionMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -13672,7 +13759,7 @@ func (parameters *HttpVersionMatchConditionParameters) AssignProperties_From_Htt for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -13681,8 +13768,9 @@ func (parameters *HttpVersionMatchConditionParameters) AssignProperties_From_Htt // TypeName if source.TypeName != nil { - typeName := HttpVersionMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, httpVersionMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -13873,8 +13961,9 @@ func (parameters *HttpVersionMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := HttpVersionMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, httpVersionMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -13885,7 +13974,7 @@ func (parameters *HttpVersionMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -13894,8 +13983,9 @@ func (parameters *HttpVersionMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := HttpVersionMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, httpVersionMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -14071,7 +14161,7 @@ func (parameters *IsDeviceMatchConditionParameters) AssignProperties_From_IsDevi for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = IsDeviceMatchConditionParameters_MatchValues(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, isDeviceMatchConditionParameters_MatchValues_Values) } parameters.MatchValues = matchValueList } else { @@ -14088,8 +14178,9 @@ func (parameters *IsDeviceMatchConditionParameters) AssignProperties_From_IsDevi // Operator if source.Operator != nil { - operator := IsDeviceMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, isDeviceMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -14100,7 +14191,7 @@ func (parameters *IsDeviceMatchConditionParameters) AssignProperties_From_IsDevi for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -14109,8 +14200,9 @@ func (parameters *IsDeviceMatchConditionParameters) AssignProperties_From_IsDevi // TypeName if source.TypeName != nil { - typeName := IsDeviceMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, isDeviceMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -14315,7 +14407,7 @@ func (parameters *IsDeviceMatchConditionParameters_STATUS) AssignProperties_From for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = IsDeviceMatchConditionParameters_MatchValues_STATUS(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, isDeviceMatchConditionParameters_MatchValues_STATUS_Values) } parameters.MatchValues = matchValueList } else { @@ -14332,8 +14424,9 @@ func (parameters *IsDeviceMatchConditionParameters_STATUS) AssignProperties_From // Operator if source.Operator != nil { - operator := IsDeviceMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, isDeviceMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -14344,7 +14437,7 @@ func (parameters *IsDeviceMatchConditionParameters_STATUS) AssignProperties_From for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -14353,8 +14446,9 @@ func (parameters *IsDeviceMatchConditionParameters_STATUS) AssignProperties_From // TypeName if source.TypeName != nil { - typeName := IsDeviceMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, isDeviceMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -14516,8 +14610,9 @@ func (parameters *OriginGroupOverrideActionParameters) AssignProperties_From_Ori // TypeName if source.TypeName != nil { - typeName := OriginGroupOverrideActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, originGroupOverrideActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -14648,8 +14743,9 @@ func (parameters *OriginGroupOverrideActionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := OriginGroupOverrideActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, originGroupOverrideActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -14827,8 +14923,9 @@ func (parameters *PostArgsMatchConditionParameters) AssignProperties_From_PostAr // Operator if source.Operator != nil { - operator := PostArgsMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, postArgsMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -14842,7 +14939,7 @@ func (parameters *PostArgsMatchConditionParameters) AssignProperties_From_PostAr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -14851,8 +14948,9 @@ func (parameters *PostArgsMatchConditionParameters) AssignProperties_From_PostAr // TypeName if source.TypeName != nil { - typeName := PostArgsMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, postArgsMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -15058,8 +15156,9 @@ func (parameters *PostArgsMatchConditionParameters_STATUS) AssignProperties_From // Operator if source.Operator != nil { - operator := PostArgsMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, postArgsMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -15073,7 +15172,7 @@ func (parameters *PostArgsMatchConditionParameters_STATUS) AssignProperties_From for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -15082,8 +15181,9 @@ func (parameters *PostArgsMatchConditionParameters_STATUS) AssignProperties_From // TypeName if source.TypeName != nil { - typeName := PostArgsMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, postArgsMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -15269,8 +15369,9 @@ func (parameters *QueryStringMatchConditionParameters) AssignProperties_From_Que // Operator if source.Operator != nil { - operator := QueryStringMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, queryStringMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -15281,7 +15382,7 @@ func (parameters *QueryStringMatchConditionParameters) AssignProperties_From_Que for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -15290,8 +15391,9 @@ func (parameters *QueryStringMatchConditionParameters) AssignProperties_From_Que // TypeName if source.TypeName != nil { - typeName := QueryStringMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, queryStringMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -15482,8 +15584,9 @@ func (parameters *QueryStringMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := QueryStringMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, queryStringMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -15494,7 +15597,7 @@ func (parameters *QueryStringMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -15503,8 +15606,9 @@ func (parameters *QueryStringMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := QueryStringMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, queryStringMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -15688,8 +15792,9 @@ func (parameters *RemoteAddressMatchConditionParameters) AssignProperties_From_R // Operator if source.Operator != nil { - operator := RemoteAddressMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, remoteAddressMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -15700,7 +15805,7 @@ func (parameters *RemoteAddressMatchConditionParameters) AssignProperties_From_R for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -15709,8 +15814,9 @@ func (parameters *RemoteAddressMatchConditionParameters) AssignProperties_From_R // TypeName if source.TypeName != nil { - typeName := RemoteAddressMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, remoteAddressMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -15902,8 +16008,9 @@ func (parameters *RemoteAddressMatchConditionParameters_STATUS) AssignProperties // Operator if source.Operator != nil { - operator := RemoteAddressMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, remoteAddressMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -15914,7 +16021,7 @@ func (parameters *RemoteAddressMatchConditionParameters_STATUS) AssignProperties for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -15923,8 +16030,9 @@ func (parameters *RemoteAddressMatchConditionParameters_STATUS) AssignProperties // TypeName if source.TypeName != nil { - typeName := RemoteAddressMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, remoteAddressMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -16107,8 +16215,9 @@ func (parameters *RequestBodyMatchConditionParameters) AssignProperties_From_Req // Operator if source.Operator != nil { - operator := RequestBodyMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestBodyMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -16119,7 +16228,7 @@ func (parameters *RequestBodyMatchConditionParameters) AssignProperties_From_Req for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -16128,8 +16237,9 @@ func (parameters *RequestBodyMatchConditionParameters) AssignProperties_From_Req // TypeName if source.TypeName != nil { - typeName := RequestBodyMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestBodyMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -16320,8 +16430,9 @@ func (parameters *RequestBodyMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := RequestBodyMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestBodyMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -16332,7 +16443,7 @@ func (parameters *RequestBodyMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -16341,8 +16452,9 @@ func (parameters *RequestBodyMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := RequestBodyMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestBodyMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -16540,8 +16652,9 @@ func (parameters *RequestHeaderMatchConditionParameters) AssignProperties_From_R // Operator if source.Operator != nil { - operator := RequestHeaderMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestHeaderMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -16555,7 +16668,7 @@ func (parameters *RequestHeaderMatchConditionParameters) AssignProperties_From_R for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -16564,8 +16677,9 @@ func (parameters *RequestHeaderMatchConditionParameters) AssignProperties_From_R // TypeName if source.TypeName != nil { - typeName := RequestHeaderMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestHeaderMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -16771,8 +16885,9 @@ func (parameters *RequestHeaderMatchConditionParameters_STATUS) AssignProperties // Operator if source.Operator != nil { - operator := RequestHeaderMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestHeaderMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -16786,7 +16901,7 @@ func (parameters *RequestHeaderMatchConditionParameters_STATUS) AssignProperties for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -16795,8 +16910,9 @@ func (parameters *RequestHeaderMatchConditionParameters_STATUS) AssignProperties // TypeName if source.TypeName != nil { - typeName := RequestHeaderMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestHeaderMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -16975,7 +17091,7 @@ func (parameters *RequestMethodMatchConditionParameters) AssignProperties_From_R for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = RequestMethodMatchConditionParameters_MatchValues(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, requestMethodMatchConditionParameters_MatchValues_Values) } parameters.MatchValues = matchValueList } else { @@ -16992,8 +17108,9 @@ func (parameters *RequestMethodMatchConditionParameters) AssignProperties_From_R // Operator if source.Operator != nil { - operator := RequestMethodMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestMethodMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -17004,7 +17121,7 @@ func (parameters *RequestMethodMatchConditionParameters) AssignProperties_From_R for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -17013,8 +17130,9 @@ func (parameters *RequestMethodMatchConditionParameters) AssignProperties_From_R // TypeName if source.TypeName != nil { - typeName := RequestMethodMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestMethodMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17219,7 +17337,7 @@ func (parameters *RequestMethodMatchConditionParameters_STATUS) AssignProperties for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = RequestMethodMatchConditionParameters_MatchValues_STATUS(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, requestMethodMatchConditionParameters_MatchValues_STATUS_Values) } parameters.MatchValues = matchValueList } else { @@ -17236,8 +17354,9 @@ func (parameters *RequestMethodMatchConditionParameters_STATUS) AssignProperties // Operator if source.Operator != nil { - operator := RequestMethodMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestMethodMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -17248,7 +17367,7 @@ func (parameters *RequestMethodMatchConditionParameters_STATUS) AssignProperties for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -17257,8 +17376,9 @@ func (parameters *RequestMethodMatchConditionParameters_STATUS) AssignProperties // TypeName if source.TypeName != nil { - typeName := RequestMethodMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestMethodMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17444,7 +17564,7 @@ func (parameters *RequestSchemeMatchConditionParameters) AssignProperties_From_R for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = RequestSchemeMatchConditionParameters_MatchValues(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, requestSchemeMatchConditionParameters_MatchValues_Values) } parameters.MatchValues = matchValueList } else { @@ -17461,8 +17581,9 @@ func (parameters *RequestSchemeMatchConditionParameters) AssignProperties_From_R // Operator if source.Operator != nil { - operator := RequestSchemeMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestSchemeMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -17473,7 +17594,7 @@ func (parameters *RequestSchemeMatchConditionParameters) AssignProperties_From_R for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -17482,8 +17603,9 @@ func (parameters *RequestSchemeMatchConditionParameters) AssignProperties_From_R // TypeName if source.TypeName != nil { - typeName := RequestSchemeMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestSchemeMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17688,7 +17810,7 @@ func (parameters *RequestSchemeMatchConditionParameters_STATUS) AssignProperties for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = RequestSchemeMatchConditionParameters_MatchValues_STATUS(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, requestSchemeMatchConditionParameters_MatchValues_STATUS_Values) } parameters.MatchValues = matchValueList } else { @@ -17705,8 +17827,9 @@ func (parameters *RequestSchemeMatchConditionParameters_STATUS) AssignProperties // Operator if source.Operator != nil { - operator := RequestSchemeMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestSchemeMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -17717,7 +17840,7 @@ func (parameters *RequestSchemeMatchConditionParameters_STATUS) AssignProperties for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -17726,8 +17849,9 @@ func (parameters *RequestSchemeMatchConditionParameters_STATUS) AssignProperties // TypeName if source.TypeName != nil { - typeName := RequestSchemeMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestSchemeMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -17920,8 +18044,9 @@ func (parameters *RequestUriMatchConditionParameters) AssignProperties_From_Requ // Operator if source.Operator != nil { - operator := RequestUriMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestUriMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -17932,7 +18057,7 @@ func (parameters *RequestUriMatchConditionParameters) AssignProperties_From_Requ for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -17941,8 +18066,9 @@ func (parameters *RequestUriMatchConditionParameters) AssignProperties_From_Requ // TypeName if source.TypeName != nil { - typeName := RequestUriMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestUriMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18133,8 +18259,9 @@ func (parameters *RequestUriMatchConditionParameters_STATUS) AssignProperties_Fr // Operator if source.Operator != nil { - operator := RequestUriMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, requestUriMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -18145,7 +18272,7 @@ func (parameters *RequestUriMatchConditionParameters_STATUS) AssignProperties_Fr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -18154,8 +18281,9 @@ func (parameters *RequestUriMatchConditionParameters_STATUS) AssignProperties_Fr // TypeName if source.TypeName != nil { - typeName := RequestUriMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, requestUriMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18344,8 +18472,9 @@ func (parameters *RouteConfigurationOverrideActionParameters) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := RouteConfigurationOverrideActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, routeConfigurationOverrideActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18528,8 +18657,9 @@ func (parameters *RouteConfigurationOverrideActionParameters_STATUS) AssignPrope // TypeName if source.TypeName != nil { - typeName := RouteConfigurationOverrideActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, routeConfigurationOverrideActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18704,8 +18834,9 @@ func (parameters *ServerPortMatchConditionParameters) AssignProperties_From_Serv // Operator if source.Operator != nil { - operator := ServerPortMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, serverPortMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -18716,7 +18847,7 @@ func (parameters *ServerPortMatchConditionParameters) AssignProperties_From_Serv for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -18725,8 +18856,9 @@ func (parameters *ServerPortMatchConditionParameters) AssignProperties_From_Serv // TypeName if source.TypeName != nil { - typeName := ServerPortMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, serverPortMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -18917,8 +19049,9 @@ func (parameters *ServerPortMatchConditionParameters_STATUS) AssignProperties_Fr // Operator if source.Operator != nil { - operator := ServerPortMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, serverPortMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -18929,7 +19062,7 @@ func (parameters *ServerPortMatchConditionParameters_STATUS) AssignProperties_Fr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -18938,8 +19071,9 @@ func (parameters *ServerPortMatchConditionParameters_STATUS) AssignProperties_Fr // TypeName if source.TypeName != nil { - typeName := ServerPortMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, serverPortMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -19122,8 +19256,9 @@ func (parameters *SocketAddrMatchConditionParameters) AssignProperties_From_Sock // Operator if source.Operator != nil { - operator := SocketAddrMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, socketAddrMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -19134,7 +19269,7 @@ func (parameters *SocketAddrMatchConditionParameters) AssignProperties_From_Sock for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -19143,8 +19278,9 @@ func (parameters *SocketAddrMatchConditionParameters) AssignProperties_From_Sock // TypeName if source.TypeName != nil { - typeName := SocketAddrMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, socketAddrMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -19335,8 +19471,9 @@ func (parameters *SocketAddrMatchConditionParameters_STATUS) AssignProperties_Fr // Operator if source.Operator != nil { - operator := SocketAddrMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, socketAddrMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -19347,7 +19484,7 @@ func (parameters *SocketAddrMatchConditionParameters_STATUS) AssignProperties_Fr for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -19356,8 +19493,9 @@ func (parameters *SocketAddrMatchConditionParameters_STATUS) AssignProperties_Fr // TypeName if source.TypeName != nil { - typeName := SocketAddrMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, socketAddrMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -19533,7 +19671,7 @@ func (parameters *SslProtocolMatchConditionParameters) AssignProperties_From_Ssl for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = SslProtocol(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, sslProtocol_Values) } parameters.MatchValues = matchValueList } else { @@ -19550,8 +19688,9 @@ func (parameters *SslProtocolMatchConditionParameters) AssignProperties_From_Ssl // Operator if source.Operator != nil { - operator := SslProtocolMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, sslProtocolMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -19562,7 +19701,7 @@ func (parameters *SslProtocolMatchConditionParameters) AssignProperties_From_Ssl for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -19571,8 +19710,9 @@ func (parameters *SslProtocolMatchConditionParameters) AssignProperties_From_Ssl // TypeName if source.TypeName != nil { - typeName := SslProtocolMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, sslProtocolMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -19777,7 +19917,7 @@ func (parameters *SslProtocolMatchConditionParameters_STATUS) AssignProperties_F for matchValueIndex, matchValueItem := range source.MatchValues { // Shadow the loop variable to avoid aliasing matchValueItem := matchValueItem - matchValueList[matchValueIndex] = SslProtocol_STATUS(matchValueItem) + matchValueList[matchValueIndex] = genruntime.ToEnum(matchValueItem, sslProtocol_STATUS_Values) } parameters.MatchValues = matchValueList } else { @@ -19794,8 +19934,9 @@ func (parameters *SslProtocolMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := SslProtocolMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, sslProtocolMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -19806,7 +19947,7 @@ func (parameters *SslProtocolMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -19815,8 +19956,9 @@ func (parameters *SslProtocolMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := SslProtocolMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, sslProtocolMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20009,8 +20151,9 @@ func (parameters *UrlFileExtensionMatchConditionParameters) AssignProperties_Fro // Operator if source.Operator != nil { - operator := UrlFileExtensionMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlFileExtensionMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20021,7 +20164,7 @@ func (parameters *UrlFileExtensionMatchConditionParameters) AssignProperties_Fro for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -20030,8 +20173,9 @@ func (parameters *UrlFileExtensionMatchConditionParameters) AssignProperties_Fro // TypeName if source.TypeName != nil { - typeName := UrlFileExtensionMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlFileExtensionMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20222,8 +20366,9 @@ func (parameters *UrlFileExtensionMatchConditionParameters_STATUS) AssignPropert // Operator if source.Operator != nil { - operator := UrlFileExtensionMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlFileExtensionMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20234,7 +20379,7 @@ func (parameters *UrlFileExtensionMatchConditionParameters_STATUS) AssignPropert for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -20243,8 +20388,9 @@ func (parameters *UrlFileExtensionMatchConditionParameters_STATUS) AssignPropert // TypeName if source.TypeName != nil { - typeName := UrlFileExtensionMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlFileExtensionMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20427,8 +20573,9 @@ func (parameters *UrlFileNameMatchConditionParameters) AssignProperties_From_Url // Operator if source.Operator != nil { - operator := UrlFileNameMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlFileNameMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20439,7 +20586,7 @@ func (parameters *UrlFileNameMatchConditionParameters) AssignProperties_From_Url for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -20448,8 +20595,9 @@ func (parameters *UrlFileNameMatchConditionParameters) AssignProperties_From_Url // TypeName if source.TypeName != nil { - typeName := UrlFileNameMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlFileNameMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20640,8 +20788,9 @@ func (parameters *UrlFileNameMatchConditionParameters_STATUS) AssignProperties_F // Operator if source.Operator != nil { - operator := UrlFileNameMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlFileNameMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20652,7 +20801,7 @@ func (parameters *UrlFileNameMatchConditionParameters_STATUS) AssignProperties_F for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -20661,8 +20810,9 @@ func (parameters *UrlFileNameMatchConditionParameters_STATUS) AssignProperties_F // TypeName if source.TypeName != nil { - typeName := UrlFileNameMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlFileNameMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -20845,8 +20995,9 @@ func (parameters *UrlPathMatchConditionParameters) AssignProperties_From_UrlPath // Operator if source.Operator != nil { - operator := UrlPathMatchConditionParameters_Operator(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlPathMatchConditionParameters_Operator_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -20857,7 +21008,7 @@ func (parameters *UrlPathMatchConditionParameters) AssignProperties_From_UrlPath for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_Values) } parameters.Transforms = transformList } else { @@ -20866,8 +21017,9 @@ func (parameters *UrlPathMatchConditionParameters) AssignProperties_From_UrlPath // TypeName if source.TypeName != nil { - typeName := UrlPathMatchConditionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlPathMatchConditionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21058,8 +21210,9 @@ func (parameters *UrlPathMatchConditionParameters_STATUS) AssignProperties_From_ // Operator if source.Operator != nil { - operator := UrlPathMatchConditionParameters_Operator_STATUS(*source.Operator) - parameters.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, urlPathMatchConditionParameters_Operator_STATUS_Values) + parameters.Operator = &operatorTemp } else { parameters.Operator = nil } @@ -21070,7 +21223,7 @@ func (parameters *UrlPathMatchConditionParameters_STATUS) AssignProperties_From_ for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = Transform_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transform_STATUS_Values) } parameters.Transforms = transformList } else { @@ -21079,8 +21232,9 @@ func (parameters *UrlPathMatchConditionParameters_STATUS) AssignProperties_From_ // TypeName if source.TypeName != nil { - typeName := UrlPathMatchConditionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlPathMatchConditionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21302,24 +21456,27 @@ func (parameters *UrlRedirectActionParameters) AssignProperties_From_UrlRedirect // DestinationProtocol if source.DestinationProtocol != nil { - destinationProtocol := UrlRedirectActionParameters_DestinationProtocol(*source.DestinationProtocol) - parameters.DestinationProtocol = &destinationProtocol + destinationProtocol := *source.DestinationProtocol + destinationProtocolTemp := genruntime.ToEnum(destinationProtocol, urlRedirectActionParameters_DestinationProtocol_Values) + parameters.DestinationProtocol = &destinationProtocolTemp } else { parameters.DestinationProtocol = nil } // RedirectType if source.RedirectType != nil { - redirectType := UrlRedirectActionParameters_RedirectType(*source.RedirectType) - parameters.RedirectType = &redirectType + redirectType := *source.RedirectType + redirectTypeTemp := genruntime.ToEnum(redirectType, urlRedirectActionParameters_RedirectType_Values) + parameters.RedirectType = &redirectTypeTemp } else { parameters.RedirectType = nil } // TypeName if source.TypeName != nil { - typeName := UrlRedirectActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlRedirectActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21526,24 +21683,27 @@ func (parameters *UrlRedirectActionParameters_STATUS) AssignProperties_From_UrlR // DestinationProtocol if source.DestinationProtocol != nil { - destinationProtocol := UrlRedirectActionParameters_DestinationProtocol_STATUS(*source.DestinationProtocol) - parameters.DestinationProtocol = &destinationProtocol + destinationProtocol := *source.DestinationProtocol + destinationProtocolTemp := genruntime.ToEnum(destinationProtocol, urlRedirectActionParameters_DestinationProtocol_STATUS_Values) + parameters.DestinationProtocol = &destinationProtocolTemp } else { parameters.DestinationProtocol = nil } // RedirectType if source.RedirectType != nil { - redirectType := UrlRedirectActionParameters_RedirectType_STATUS(*source.RedirectType) - parameters.RedirectType = &redirectType + redirectType := *source.RedirectType + redirectTypeTemp := genruntime.ToEnum(redirectType, urlRedirectActionParameters_RedirectType_STATUS_Values) + parameters.RedirectType = &redirectTypeTemp } else { parameters.RedirectType = nil } // TypeName if source.TypeName != nil { - typeName := UrlRedirectActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlRedirectActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21716,8 +21876,9 @@ func (parameters *UrlRewriteActionParameters) AssignProperties_From_UrlRewriteAc // TypeName if source.TypeName != nil { - typeName := UrlRewriteActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlRewriteActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -21868,8 +22029,9 @@ func (parameters *UrlRewriteActionParameters_STATUS) AssignProperties_From_UrlRe // TypeName if source.TypeName != nil { - typeName := UrlRewriteActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlRewriteActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -22003,8 +22165,9 @@ func (parameters *UrlSigningActionParameters) AssignProperties_From_UrlSigningAc // Algorithm if source.Algorithm != nil { - algorithm := UrlSigningActionParameters_Algorithm(*source.Algorithm) - parameters.Algorithm = &algorithm + algorithm := *source.Algorithm + algorithmTemp := genruntime.ToEnum(algorithm, urlSigningActionParameters_Algorithm_Values) + parameters.Algorithm = &algorithmTemp } else { parameters.Algorithm = nil } @@ -22029,8 +22192,9 @@ func (parameters *UrlSigningActionParameters) AssignProperties_From_UrlSigningAc // TypeName if source.TypeName != nil { - typeName := UrlSigningActionParameters_TypeName(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlSigningActionParameters_TypeName_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -22185,8 +22349,9 @@ func (parameters *UrlSigningActionParameters_STATUS) AssignProperties_From_UrlSi // Algorithm if source.Algorithm != nil { - algorithm := UrlSigningActionParameters_Algorithm_STATUS(*source.Algorithm) - parameters.Algorithm = &algorithm + algorithm := *source.Algorithm + algorithmTemp := genruntime.ToEnum(algorithm, urlSigningActionParameters_Algorithm_STATUS_Values) + parameters.Algorithm = &algorithmTemp } else { parameters.Algorithm = nil } @@ -22211,8 +22376,9 @@ func (parameters *UrlSigningActionParameters_STATUS) AssignProperties_From_UrlSi // TypeName if source.TypeName != nil { - typeName := UrlSigningActionParameters_TypeName_STATUS(*source.TypeName) - parameters.TypeName = &typeName + typeName := *source.TypeName + typeNameTemp := genruntime.ToEnum(typeName, urlSigningActionParameters_TypeName_STATUS_Values) + parameters.TypeName = &typeNameTemp } else { parameters.TypeName = nil } @@ -22385,8 +22551,9 @@ func (configuration *CacheConfiguration) AssignProperties_From_CacheConfiguratio // CacheBehavior if source.CacheBehavior != nil { - cacheBehavior := CacheConfiguration_CacheBehavior(*source.CacheBehavior) - configuration.CacheBehavior = &cacheBehavior + cacheBehavior := *source.CacheBehavior + cacheBehaviorTemp := genruntime.ToEnum(cacheBehavior, cacheConfiguration_CacheBehavior_Values) + configuration.CacheBehavior = &cacheBehaviorTemp } else { configuration.CacheBehavior = nil } @@ -22396,8 +22563,9 @@ func (configuration *CacheConfiguration) AssignProperties_From_CacheConfiguratio // IsCompressionEnabled if source.IsCompressionEnabled != nil { - isCompressionEnabled := CacheConfiguration_IsCompressionEnabled(*source.IsCompressionEnabled) - configuration.IsCompressionEnabled = &isCompressionEnabled + isCompressionEnabled := *source.IsCompressionEnabled + isCompressionEnabledTemp := genruntime.ToEnum(isCompressionEnabled, cacheConfiguration_IsCompressionEnabled_Values) + configuration.IsCompressionEnabled = &isCompressionEnabledTemp } else { configuration.IsCompressionEnabled = nil } @@ -22407,8 +22575,9 @@ func (configuration *CacheConfiguration) AssignProperties_From_CacheConfiguratio // QueryStringCachingBehavior if source.QueryStringCachingBehavior != nil { - queryStringCachingBehavior := CacheConfiguration_QueryStringCachingBehavior(*source.QueryStringCachingBehavior) - configuration.QueryStringCachingBehavior = &queryStringCachingBehavior + queryStringCachingBehavior := *source.QueryStringCachingBehavior + queryStringCachingBehaviorTemp := genruntime.ToEnum(queryStringCachingBehavior, cacheConfiguration_QueryStringCachingBehavior_Values) + configuration.QueryStringCachingBehavior = &queryStringCachingBehaviorTemp } else { configuration.QueryStringCachingBehavior = nil } @@ -22575,8 +22744,9 @@ func (configuration *CacheConfiguration_STATUS) AssignProperties_From_CacheConfi // CacheBehavior if source.CacheBehavior != nil { - cacheBehavior := CacheConfiguration_CacheBehavior_STATUS(*source.CacheBehavior) - configuration.CacheBehavior = &cacheBehavior + cacheBehavior := *source.CacheBehavior + cacheBehaviorTemp := genruntime.ToEnum(cacheBehavior, cacheConfiguration_CacheBehavior_STATUS_Values) + configuration.CacheBehavior = &cacheBehaviorTemp } else { configuration.CacheBehavior = nil } @@ -22586,8 +22756,9 @@ func (configuration *CacheConfiguration_STATUS) AssignProperties_From_CacheConfi // IsCompressionEnabled if source.IsCompressionEnabled != nil { - isCompressionEnabled := CacheConfiguration_IsCompressionEnabled_STATUS(*source.IsCompressionEnabled) - configuration.IsCompressionEnabled = &isCompressionEnabled + isCompressionEnabled := *source.IsCompressionEnabled + isCompressionEnabledTemp := genruntime.ToEnum(isCompressionEnabled, cacheConfiguration_IsCompressionEnabled_STATUS_Values) + configuration.IsCompressionEnabled = &isCompressionEnabledTemp } else { configuration.IsCompressionEnabled = nil } @@ -22597,8 +22768,9 @@ func (configuration *CacheConfiguration_STATUS) AssignProperties_From_CacheConfi // QueryStringCachingBehavior if source.QueryStringCachingBehavior != nil { - queryStringCachingBehavior := CacheConfiguration_QueryStringCachingBehavior_STATUS(*source.QueryStringCachingBehavior) - configuration.QueryStringCachingBehavior = &queryStringCachingBehavior + queryStringCachingBehavior := *source.QueryStringCachingBehavior + queryStringCachingBehaviorTemp := genruntime.ToEnum(queryStringCachingBehavior, cacheConfiguration_QueryStringCachingBehavior_STATUS_Values) + configuration.QueryStringCachingBehavior = &queryStringCachingBehaviorTemp } else { configuration.QueryStringCachingBehavior = nil } @@ -22727,8 +22899,9 @@ func (override *OriginGroupOverride) AssignProperties_From_OriginGroupOverride(s // ForwardingProtocol if source.ForwardingProtocol != nil { - forwardingProtocol := OriginGroupOverride_ForwardingProtocol(*source.ForwardingProtocol) - override.ForwardingProtocol = &forwardingProtocol + forwardingProtocol := *source.ForwardingProtocol + forwardingProtocolTemp := genruntime.ToEnum(forwardingProtocol, originGroupOverride_ForwardingProtocol_Values) + override.ForwardingProtocol = &forwardingProtocolTemp } else { override.ForwardingProtocol = nil } @@ -22861,8 +23034,9 @@ func (override *OriginGroupOverride_STATUS) AssignProperties_From_OriginGroupOve // ForwardingProtocol if source.ForwardingProtocol != nil { - forwardingProtocol := OriginGroupOverride_ForwardingProtocol_STATUS(*source.ForwardingProtocol) - override.ForwardingProtocol = &forwardingProtocol + forwardingProtocol := *source.ForwardingProtocol + forwardingProtocolTemp := genruntime.ToEnum(forwardingProtocol, originGroupOverride_ForwardingProtocol_STATUS_Values) + override.ForwardingProtocol = &forwardingProtocolTemp } else { override.ForwardingProtocol = nil } @@ -22986,8 +23160,9 @@ func (identifier *UrlSigningParamIdentifier) AssignProperties_From_UrlSigningPar // ParamIndicator if source.ParamIndicator != nil { - paramIndicator := UrlSigningParamIdentifier_ParamIndicator(*source.ParamIndicator) - identifier.ParamIndicator = ¶mIndicator + paramIndicator := *source.ParamIndicator + paramIndicatorTemp := genruntime.ToEnum(paramIndicator, urlSigningParamIdentifier_ParamIndicator_Values) + identifier.ParamIndicator = ¶mIndicatorTemp } else { identifier.ParamIndicator = nil } @@ -23088,8 +23263,9 @@ func (identifier *UrlSigningParamIdentifier_STATUS) AssignProperties_From_UrlSig // ParamIndicator if source.ParamIndicator != nil { - paramIndicator := UrlSigningParamIdentifier_ParamIndicator_STATUS(*source.ParamIndicator) - identifier.ParamIndicator = ¶mIndicator + paramIndicator := *source.ParamIndicator + paramIndicatorTemp := genruntime.ToEnum(paramIndicator, urlSigningParamIdentifier_ParamIndicator_STATUS_Values) + identifier.ParamIndicator = ¶mIndicatorTemp } else { identifier.ParamIndicator = nil } diff --git a/v2/api/cdn/v1api20230501/secret_types_gen.go b/v2/api/cdn/v1api20230501/secret_types_gen.go index 7a82c681410..895d40447ca 100644 --- a/v2/api/cdn/v1api20230501/secret_types_gen.go +++ b/v2/api/cdn/v1api20230501/secret_types_gen.go @@ -729,8 +729,9 @@ func (secret *Profiles_Secret_STATUS) AssignProperties_From_Profiles_Secret_STAT // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := SecretProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - secret.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, secretProperties_DeploymentStatus_STATUS_Values) + secret.DeploymentStatus = &deploymentStatusTemp } else { secret.DeploymentStatus = nil } @@ -758,8 +759,9 @@ func (secret *Profiles_Secret_STATUS) AssignProperties_From_Profiles_Secret_STAT // ProvisioningState if source.ProvisioningState != nil { - provisioningState := SecretProperties_ProvisioningState_STATUS(*source.ProvisioningState) - secret.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, secretProperties_ProvisioningState_STATUS_Values) + secret.ProvisioningState = &provisioningStateTemp } else { secret.ProvisioningState = nil } @@ -1409,8 +1411,9 @@ func (parameters *AzureFirstPartyManagedCertificateParameters) AssignProperties_ // Type if source.Type != nil { - typeVar := AzureFirstPartyManagedCertificateParameters_Type(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, azureFirstPartyManagedCertificateParameters_Type_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } @@ -1579,8 +1582,9 @@ func (parameters *AzureFirstPartyManagedCertificateParameters_STATUS) AssignProp // Type if source.Type != nil { - typeVar := AzureFirstPartyManagedCertificateParameters_Type_STATUS(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, azureFirstPartyManagedCertificateParameters_Type_STATUS_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } @@ -1772,8 +1776,9 @@ func (parameters *CustomerCertificateParameters) AssignProperties_From_CustomerC // Type if source.Type != nil { - typeVar := CustomerCertificateParameters_Type(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, customerCertificateParameters_Type_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } @@ -2017,8 +2022,9 @@ func (parameters *CustomerCertificateParameters_STATUS) AssignProperties_From_Cu // Type if source.Type != nil { - typeVar := CustomerCertificateParameters_Type_STATUS(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, customerCertificateParameters_Type_STATUS_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } @@ -2142,8 +2148,9 @@ func (parameters *ManagedCertificateParameters) AssignProperties_From_ManagedCer // Type if source.Type != nil { - typeVar := ManagedCertificateParameters_Type(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedCertificateParameters_Type_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } @@ -2244,8 +2251,9 @@ func (parameters *ManagedCertificateParameters_STATUS) AssignProperties_From_Man // Type if source.Type != nil { - typeVar := ManagedCertificateParameters_Type_STATUS(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedCertificateParameters_Type_STATUS_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } @@ -2405,8 +2413,9 @@ func (parameters *UrlSigningKeyParameters) AssignProperties_From_UrlSigningKeyPa // Type if source.Type != nil { - typeVar := UrlSigningKeyParameters_Type(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, urlSigningKeyParameters_Type_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } @@ -2571,8 +2580,9 @@ func (parameters *UrlSigningKeyParameters_STATUS) AssignProperties_From_UrlSigni // Type if source.Type != nil { - typeVar := UrlSigningKeyParameters_Type_STATUS(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, urlSigningKeyParameters_Type_STATUS_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } diff --git a/v2/api/cdn/v1api20230501/security_policy_types_gen.go b/v2/api/cdn/v1api20230501/security_policy_types_gen.go index 927d73e01df..168de839b6a 100644 --- a/v2/api/cdn/v1api20230501/security_policy_types_gen.go +++ b/v2/api/cdn/v1api20230501/security_policy_types_gen.go @@ -731,8 +731,9 @@ func (policy *Profiles_SecurityPolicy_STATUS) AssignProperties_From_Profiles_Sec // DeploymentStatus if source.DeploymentStatus != nil { - deploymentStatus := SecurityPolicyProperties_DeploymentStatus_STATUS(*source.DeploymentStatus) - policy.DeploymentStatus = &deploymentStatus + deploymentStatus := *source.DeploymentStatus + deploymentStatusTemp := genruntime.ToEnum(deploymentStatus, securityPolicyProperties_DeploymentStatus_STATUS_Values) + policy.DeploymentStatus = &deploymentStatusTemp } else { policy.DeploymentStatus = nil } @@ -760,8 +761,9 @@ func (policy *Profiles_SecurityPolicy_STATUS) AssignProperties_From_Profiles_Sec // ProvisioningState if source.ProvisioningState != nil { - provisioningState := SecurityPolicyProperties_ProvisioningState_STATUS(*source.ProvisioningState) - policy.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, securityPolicyProperties_ProvisioningState_STATUS_Values) + policy.ProvisioningState = &provisioningStateTemp } else { policy.ProvisioningState = nil } @@ -1166,8 +1168,9 @@ func (parameters *SecurityPolicyWebApplicationFirewallParameters) AssignProperti // Type if source.Type != nil { - typeVar := SecurityPolicyWebApplicationFirewallParameters_Type(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, securityPolicyWebApplicationFirewallParameters_Type_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } @@ -1363,8 +1366,9 @@ func (parameters *SecurityPolicyWebApplicationFirewallParameters_STATUS) AssignP // Type if source.Type != nil { - typeVar := SecurityPolicyWebApplicationFirewallParameters_Type_STATUS(*source.Type) - parameters.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, securityPolicyWebApplicationFirewallParameters_Type_STATUS_Values) + parameters.Type = &typeTemp } else { parameters.Type = nil } diff --git a/v2/api/compute/v1api20200930/disk_spec_arm_types_gen.go b/v2/api/compute/v1api20200930/disk_spec_arm_types_gen.go index 28e4db64cf0..7d22b214c30 100644 --- a/v2/api/compute/v1api20200930/disk_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20200930/disk_spec_arm_types_gen.go @@ -157,6 +157,14 @@ const ( DiskSku_Name_UltraSSD_LRS = DiskSku_Name("UltraSSD_LRS") ) +// Mapping from string to DiskSku_Name +var diskSku_Name_Values = map[string]DiskSku_Name{ + "premium_lrs": DiskSku_Name_Premium_LRS, + "standardssd_lrs": DiskSku_Name_StandardSSD_LRS, + "standard_lrs": DiskSku_Name_Standard_LRS, + "ultrassd_lrs": DiskSku_Name_UltraSSD_LRS, +} + // Encryption at rest settings for disk or snapshot type Encryption_ARM struct { DiskEncryptionSetId *string `json:"diskEncryptionSetId,omitempty"` @@ -186,6 +194,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. type PurchasePlan_ARM struct { // Name: The plan ID. diff --git a/v2/api/compute/v1api20200930/disk_status_arm_types_gen.go b/v2/api/compute/v1api20200930/disk_status_arm_types_gen.go index 5d864475def..d6e8cdb72ba 100644 --- a/v2/api/compute/v1api20200930/disk_status_arm_types_gen.go +++ b/v2/api/compute/v1api20200930/disk_status_arm_types_gen.go @@ -182,6 +182,14 @@ const ( DiskSku_Name_STATUS_UltraSSD_LRS = DiskSku_Name_STATUS("UltraSSD_LRS") ) +// Mapping from string to DiskSku_Name_STATUS +var diskSku_Name_STATUS_Values = map[string]DiskSku_Name_STATUS{ + "premium_lrs": DiskSku_Name_STATUS_Premium_LRS, + "standardssd_lrs": DiskSku_Name_STATUS_StandardSSD_LRS, + "standard_lrs": DiskSku_Name_STATUS_Standard_LRS, + "ultrassd_lrs": DiskSku_Name_STATUS_UltraSSD_LRS, +} + // Encryption at rest settings for disk or snapshot type Encryption_STATUS_ARM struct { // DiskEncryptionSetId: ResourceId of the disk encryption set to use for enabling encryption at rest. @@ -211,6 +219,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. type PurchasePlan_STATUS_ARM struct { // Name: The plan ID. diff --git a/v2/api/compute/v1api20200930/disk_types_gen.go b/v2/api/compute/v1api20200930/disk_types_gen.go index 991f6faa914..a799affcee8 100644 --- a/v2/api/compute/v1api20200930/disk_types_gen.go +++ b/v2/api/compute/v1api20200930/disk_types_gen.go @@ -934,8 +934,9 @@ func (disk *Disk_Spec) AssignProperties_From_Disk_Spec(source *v20200930s.Disk_S // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := DiskProperties_HyperVGeneration(*source.HyperVGeneration) - disk.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, diskProperties_HyperVGeneration_Values) + disk.HyperVGeneration = &hyperVGenerationTemp } else { disk.HyperVGeneration = nil } @@ -948,16 +949,18 @@ func (disk *Disk_Spec) AssignProperties_From_Disk_Spec(source *v20200930s.Disk_S // NetworkAccessPolicy if source.NetworkAccessPolicy != nil { - networkAccessPolicy := NetworkAccessPolicy(*source.NetworkAccessPolicy) - disk.NetworkAccessPolicy = &networkAccessPolicy + networkAccessPolicy := *source.NetworkAccessPolicy + networkAccessPolicyTemp := genruntime.ToEnum(networkAccessPolicy, networkAccessPolicy_Values) + disk.NetworkAccessPolicy = &networkAccessPolicyTemp } else { disk.NetworkAccessPolicy = nil } // OsType if source.OsType != nil { - osType := DiskProperties_OsType(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, diskProperties_OsType_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -1862,8 +1865,9 @@ func (disk *Disk_STATUS) AssignProperties_From_Disk_STATUS(source *v20200930s.Di // DiskState if source.DiskState != nil { - diskState := DiskState_STATUS(*source.DiskState) - disk.DiskState = &diskState + diskState := *source.DiskState + diskStateTemp := genruntime.ToEnum(diskState, diskState_STATUS_Values) + disk.DiskState = &diskStateTemp } else { disk.DiskState = nil } @@ -1906,8 +1910,9 @@ func (disk *Disk_STATUS) AssignProperties_From_Disk_STATUS(source *v20200930s.Di // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := DiskProperties_HyperVGeneration_STATUS(*source.HyperVGeneration) - disk.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, diskProperties_HyperVGeneration_STATUS_Values) + disk.HyperVGeneration = &hyperVGenerationTemp } else { disk.HyperVGeneration = nil } @@ -1932,16 +1937,18 @@ func (disk *Disk_STATUS) AssignProperties_From_Disk_STATUS(source *v20200930s.Di // NetworkAccessPolicy if source.NetworkAccessPolicy != nil { - networkAccessPolicy := NetworkAccessPolicy_STATUS(*source.NetworkAccessPolicy) - disk.NetworkAccessPolicy = &networkAccessPolicy + networkAccessPolicy := *source.NetworkAccessPolicy + networkAccessPolicyTemp := genruntime.ToEnum(networkAccessPolicy, networkAccessPolicy_STATUS_Values) + disk.NetworkAccessPolicy = &networkAccessPolicyTemp } else { disk.NetworkAccessPolicy = nil } // OsType if source.OsType != nil { - osType := DiskProperties_OsType_STATUS(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, diskProperties_OsType_STATUS_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -2400,8 +2407,9 @@ func (data *CreationData) AssignProperties_From_CreationData(source *v20200930s. // CreateOption if source.CreateOption != nil { - createOption := CreationData_CreateOption(*source.CreateOption) - data.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, creationData_CreateOption_Values) + data.CreateOption = &createOptionTemp } else { data.CreateOption = nil } @@ -2702,8 +2710,9 @@ func (data *CreationData_STATUS) AssignProperties_From_CreationData_STATUS(sourc // CreateOption if source.CreateOption != nil { - createOption := CreationData_CreateOption_STATUS(*source.CreateOption) - data.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, creationData_CreateOption_STATUS_Values) + data.CreateOption = &createOptionTemp } else { data.CreateOption = nil } @@ -2828,6 +2837,12 @@ const ( DiskProperties_HyperVGeneration_V2 = DiskProperties_HyperVGeneration("V2") ) +// Mapping from string to DiskProperties_HyperVGeneration +var diskProperties_HyperVGeneration_Values = map[string]DiskProperties_HyperVGeneration{ + "v1": DiskProperties_HyperVGeneration_V1, + "v2": DiskProperties_HyperVGeneration_V2, +} + type DiskProperties_HyperVGeneration_STATUS string const ( @@ -2835,6 +2850,12 @@ const ( DiskProperties_HyperVGeneration_STATUS_V2 = DiskProperties_HyperVGeneration_STATUS("V2") ) +// Mapping from string to DiskProperties_HyperVGeneration_STATUS +var diskProperties_HyperVGeneration_STATUS_Values = map[string]DiskProperties_HyperVGeneration_STATUS{ + "v1": DiskProperties_HyperVGeneration_STATUS_V1, + "v2": DiskProperties_HyperVGeneration_STATUS_V2, +} + // +kubebuilder:validation:Enum={"Linux","Windows"} type DiskProperties_OsType string @@ -2843,6 +2864,12 @@ const ( DiskProperties_OsType_Windows = DiskProperties_OsType("Windows") ) +// Mapping from string to DiskProperties_OsType +var diskProperties_OsType_Values = map[string]DiskProperties_OsType{ + "linux": DiskProperties_OsType_Linux, + "windows": DiskProperties_OsType_Windows, +} + type DiskProperties_OsType_STATUS string const ( @@ -2850,6 +2877,12 @@ const ( DiskProperties_OsType_STATUS_Windows = DiskProperties_OsType_STATUS("Windows") ) +// Mapping from string to DiskProperties_OsType_STATUS +var diskProperties_OsType_STATUS_Values = map[string]DiskProperties_OsType_STATUS{ + "linux": DiskProperties_OsType_STATUS_Linux, + "windows": DiskProperties_OsType_STATUS_Windows, +} + // The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. type DiskSku struct { // Name: The sku name. @@ -2900,8 +2933,9 @@ func (diskSku *DiskSku) AssignProperties_From_DiskSku(source *v20200930s.DiskSku // Name if source.Name != nil { - name := DiskSku_Name(*source.Name) - diskSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, diskSku_Name_Values) + diskSku.Name = &nameTemp } else { diskSku.Name = nil } @@ -2993,8 +3027,9 @@ func (diskSku *DiskSku_STATUS) AssignProperties_From_DiskSku_STATUS(source *v202 // Name if source.Name != nil { - name := DiskSku_Name_STATUS(*source.Name) - diskSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, diskSku_Name_STATUS_Values) + diskSku.Name = &nameTemp } else { diskSku.Name = nil } @@ -3045,6 +3080,16 @@ const ( DiskState_STATUS_Unattached = DiskState_STATUS("Unattached") ) +// Mapping from string to DiskState_STATUS +var diskState_STATUS_Values = map[string]DiskState_STATUS{ + "activesas": DiskState_STATUS_ActiveSAS, + "activeupload": DiskState_STATUS_ActiveUpload, + "attached": DiskState_STATUS_Attached, + "readytoupload": DiskState_STATUS_ReadyToUpload, + "reserved": DiskState_STATUS_Reserved, + "unattached": DiskState_STATUS_Unattached, +} + // Encryption at rest settings for disk or snapshot type Encryption struct { // DiskEncryptionSetReference: ResourceId of the disk encryption set to use for enabling encryption at rest. @@ -3118,8 +3163,9 @@ func (encryption *Encryption) AssignProperties_From_Encryption(source *v20200930 // Type if source.Type != nil { - typeVar := EncryptionType(*source.Type) - encryption.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, encryptionType_Values) + encryption.Type = &typeTemp } else { encryption.Type = nil } @@ -3230,8 +3276,9 @@ func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(sou // Type if source.Type != nil { - typeVar := EncryptionType_STATUS(*source.Type) - encryption.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, encryptionType_STATUS_Values) + encryption.Type = &typeTemp } else { encryption.Type = nil } @@ -3674,8 +3721,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -3776,8 +3824,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -3823,6 +3872,13 @@ const ( NetworkAccessPolicy_DenyAll = NetworkAccessPolicy("DenyAll") ) +// Mapping from string to NetworkAccessPolicy +var networkAccessPolicy_Values = map[string]NetworkAccessPolicy{ + "allowall": NetworkAccessPolicy_AllowAll, + "allowprivate": NetworkAccessPolicy_AllowPrivate, + "denyall": NetworkAccessPolicy_DenyAll, +} + // Policy for accessing the disk via network. type NetworkAccessPolicy_STATUS string @@ -3832,6 +3888,13 @@ const ( NetworkAccessPolicy_STATUS_DenyAll = NetworkAccessPolicy_STATUS("DenyAll") ) +// Mapping from string to NetworkAccessPolicy_STATUS +var networkAccessPolicy_STATUS_Values = map[string]NetworkAccessPolicy_STATUS{ + "allowall": NetworkAccessPolicy_STATUS_AllowAll, + "allowprivate": NetworkAccessPolicy_STATUS_AllowPrivate, + "denyall": NetworkAccessPolicy_STATUS_DenyAll, +} + // Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. type PurchasePlan struct { // +kubebuilder:validation:Required @@ -4168,6 +4231,17 @@ const ( CreationData_CreateOption_Upload = CreationData_CreateOption("Upload") ) +// Mapping from string to CreationData_CreateOption +var creationData_CreateOption_Values = map[string]CreationData_CreateOption{ + "attach": CreationData_CreateOption_Attach, + "copy": CreationData_CreateOption_Copy, + "empty": CreationData_CreateOption_Empty, + "fromimage": CreationData_CreateOption_FromImage, + "import": CreationData_CreateOption_Import, + "restore": CreationData_CreateOption_Restore, + "upload": CreationData_CreateOption_Upload, +} + type CreationData_CreateOption_STATUS string const ( @@ -4180,6 +4254,17 @@ const ( CreationData_CreateOption_STATUS_Upload = CreationData_CreateOption_STATUS("Upload") ) +// Mapping from string to CreationData_CreateOption_STATUS +var creationData_CreateOption_STATUS_Values = map[string]CreationData_CreateOption_STATUS{ + "attach": CreationData_CreateOption_STATUS_Attach, + "copy": CreationData_CreateOption_STATUS_Copy, + "empty": CreationData_CreateOption_STATUS_Empty, + "fromimage": CreationData_CreateOption_STATUS_FromImage, + "import": CreationData_CreateOption_STATUS_Import, + "restore": CreationData_CreateOption_STATUS_Restore, + "upload": CreationData_CreateOption_STATUS_Upload, +} + // Encryption settings for one disk volume. type EncryptionSettingsElement struct { // DiskEncryptionKey: Key Vault Secret Url and vault id of the disk encryption key @@ -4492,6 +4577,13 @@ const ( EncryptionType_EncryptionAtRestWithPlatformKey = EncryptionType("EncryptionAtRestWithPlatformKey") ) +// Mapping from string to EncryptionType +var encryptionType_Values = map[string]EncryptionType{ + "encryptionatrestwithcustomerkey": EncryptionType_EncryptionAtRestWithCustomerKey, + "encryptionatrestwithplatformandcustomerkeys": EncryptionType_EncryptionAtRestWithPlatformAndCustomerKeys, + "encryptionatrestwithplatformkey": EncryptionType_EncryptionAtRestWithPlatformKey, +} + // The type of key used to encrypt the data of the disk. type EncryptionType_STATUS string @@ -4501,6 +4593,13 @@ const ( EncryptionType_STATUS_EncryptionAtRestWithPlatformKey = EncryptionType_STATUS("EncryptionAtRestWithPlatformKey") ) +// Mapping from string to EncryptionType_STATUS +var encryptionType_STATUS_Values = map[string]EncryptionType_STATUS{ + "encryptionatrestwithcustomerkey": EncryptionType_STATUS_EncryptionAtRestWithCustomerKey, + "encryptionatrestwithplatformandcustomerkeys": EncryptionType_STATUS_EncryptionAtRestWithPlatformAndCustomerKeys, + "encryptionatrestwithplatformkey": EncryptionType_STATUS_EncryptionAtRestWithPlatformKey, +} + // The source image used for creating the disk. type ImageDiskReference struct { // Lun: If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the diff --git a/v2/api/compute/v1api20200930/snapshot_spec_arm_types_gen.go b/v2/api/compute/v1api20200930/snapshot_spec_arm_types_gen.go index d21621af8a3..6a336b928d2 100644 --- a/v2/api/compute/v1api20200930/snapshot_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20200930/snapshot_spec_arm_types_gen.go @@ -94,3 +94,10 @@ const ( SnapshotSku_Name_Standard_LRS = SnapshotSku_Name("Standard_LRS") SnapshotSku_Name_Standard_ZRS = SnapshotSku_Name("Standard_ZRS") ) + +// Mapping from string to SnapshotSku_Name +var snapshotSku_Name_Values = map[string]SnapshotSku_Name{ + "premium_lrs": SnapshotSku_Name_Premium_LRS, + "standard_lrs": SnapshotSku_Name_Standard_LRS, + "standard_zrs": SnapshotSku_Name_Standard_ZRS, +} diff --git a/v2/api/compute/v1api20200930/snapshot_status_arm_types_gen.go b/v2/api/compute/v1api20200930/snapshot_status_arm_types_gen.go index 91974066f10..1728fbd32ff 100644 --- a/v2/api/compute/v1api20200930/snapshot_status_arm_types_gen.go +++ b/v2/api/compute/v1api20200930/snapshot_status_arm_types_gen.go @@ -103,3 +103,10 @@ const ( SnapshotSku_Name_STATUS_Standard_LRS = SnapshotSku_Name_STATUS("Standard_LRS") SnapshotSku_Name_STATUS_Standard_ZRS = SnapshotSku_Name_STATUS("Standard_ZRS") ) + +// Mapping from string to SnapshotSku_Name_STATUS +var snapshotSku_Name_STATUS_Values = map[string]SnapshotSku_Name_STATUS{ + "premium_lrs": SnapshotSku_Name_STATUS_Premium_LRS, + "standard_lrs": SnapshotSku_Name_STATUS_Standard_LRS, + "standard_zrs": SnapshotSku_Name_STATUS_Standard_ZRS, +} diff --git a/v2/api/compute/v1api20200930/snapshot_types_gen.go b/v2/api/compute/v1api20200930/snapshot_types_gen.go index edc441f79b2..c9ff9a69442 100644 --- a/v2/api/compute/v1api20200930/snapshot_types_gen.go +++ b/v2/api/compute/v1api20200930/snapshot_types_gen.go @@ -769,8 +769,9 @@ func (snapshot *Snapshot_Spec) AssignProperties_From_Snapshot_Spec(source *v2020 // DiskState if source.DiskState != nil { - diskState := DiskState(*source.DiskState) - snapshot.DiskState = &diskState + diskState := *source.DiskState + diskStateTemp := genruntime.ToEnum(diskState, diskState_Values) + snapshot.DiskState = &diskStateTemp } else { snapshot.DiskState = nil } @@ -813,8 +814,9 @@ func (snapshot *Snapshot_Spec) AssignProperties_From_Snapshot_Spec(source *v2020 // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := SnapshotProperties_HyperVGeneration(*source.HyperVGeneration) - snapshot.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, snapshotProperties_HyperVGeneration_Values) + snapshot.HyperVGeneration = &hyperVGenerationTemp } else { snapshot.HyperVGeneration = nil } @@ -832,16 +834,18 @@ func (snapshot *Snapshot_Spec) AssignProperties_From_Snapshot_Spec(source *v2020 // NetworkAccessPolicy if source.NetworkAccessPolicy != nil { - networkAccessPolicy := NetworkAccessPolicy(*source.NetworkAccessPolicy) - snapshot.NetworkAccessPolicy = &networkAccessPolicy + networkAccessPolicy := *source.NetworkAccessPolicy + networkAccessPolicyTemp := genruntime.ToEnum(networkAccessPolicy, networkAccessPolicy_Values) + snapshot.NetworkAccessPolicy = &networkAccessPolicyTemp } else { snapshot.NetworkAccessPolicy = nil } // OsType if source.OsType != nil { - osType := SnapshotProperties_OsType(*source.OsType) - snapshot.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, snapshotProperties_OsType_Values) + snapshot.OsType = &osTypeTemp } else { snapshot.OsType = nil } @@ -1582,8 +1586,9 @@ func (snapshot *Snapshot_STATUS) AssignProperties_From_Snapshot_STATUS(source *v // DiskState if source.DiskState != nil { - diskState := DiskState_STATUS(*source.DiskState) - snapshot.DiskState = &diskState + diskState := *source.DiskState + diskStateTemp := genruntime.ToEnum(diskState, diskState_STATUS_Values) + snapshot.DiskState = &diskStateTemp } else { snapshot.DiskState = nil } @@ -1626,8 +1631,9 @@ func (snapshot *Snapshot_STATUS) AssignProperties_From_Snapshot_STATUS(source *v // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := SnapshotProperties_HyperVGeneration_STATUS(*source.HyperVGeneration) - snapshot.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, snapshotProperties_HyperVGeneration_STATUS_Values) + snapshot.HyperVGeneration = &hyperVGenerationTemp } else { snapshot.HyperVGeneration = nil } @@ -1654,16 +1660,18 @@ func (snapshot *Snapshot_STATUS) AssignProperties_From_Snapshot_STATUS(source *v // NetworkAccessPolicy if source.NetworkAccessPolicy != nil { - networkAccessPolicy := NetworkAccessPolicy_STATUS(*source.NetworkAccessPolicy) - snapshot.NetworkAccessPolicy = &networkAccessPolicy + networkAccessPolicy := *source.NetworkAccessPolicy + networkAccessPolicyTemp := genruntime.ToEnum(networkAccessPolicy, networkAccessPolicy_STATUS_Values) + snapshot.NetworkAccessPolicy = &networkAccessPolicyTemp } else { snapshot.NetworkAccessPolicy = nil } // OsType if source.OsType != nil { - osType := SnapshotProperties_OsType_STATUS(*source.OsType) - snapshot.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, snapshotProperties_OsType_STATUS_Values) + snapshot.OsType = &osTypeTemp } else { snapshot.OsType = nil } @@ -1891,6 +1899,16 @@ const ( DiskState_Unattached = DiskState("Unattached") ) +// Mapping from string to DiskState +var diskState_Values = map[string]DiskState{ + "activesas": DiskState_ActiveSAS, + "activeupload": DiskState_ActiveUpload, + "attached": DiskState_Attached, + "readytoupload": DiskState_ReadyToUpload, + "reserved": DiskState_Reserved, + "unattached": DiskState_Unattached, +} + // +kubebuilder:validation:Enum={"V1","V2"} type SnapshotProperties_HyperVGeneration string @@ -1899,6 +1917,12 @@ const ( SnapshotProperties_HyperVGeneration_V2 = SnapshotProperties_HyperVGeneration("V2") ) +// Mapping from string to SnapshotProperties_HyperVGeneration +var snapshotProperties_HyperVGeneration_Values = map[string]SnapshotProperties_HyperVGeneration{ + "v1": SnapshotProperties_HyperVGeneration_V1, + "v2": SnapshotProperties_HyperVGeneration_V2, +} + type SnapshotProperties_HyperVGeneration_STATUS string const ( @@ -1906,6 +1930,12 @@ const ( SnapshotProperties_HyperVGeneration_STATUS_V2 = SnapshotProperties_HyperVGeneration_STATUS("V2") ) +// Mapping from string to SnapshotProperties_HyperVGeneration_STATUS +var snapshotProperties_HyperVGeneration_STATUS_Values = map[string]SnapshotProperties_HyperVGeneration_STATUS{ + "v1": SnapshotProperties_HyperVGeneration_STATUS_V1, + "v2": SnapshotProperties_HyperVGeneration_STATUS_V2, +} + // +kubebuilder:validation:Enum={"Linux","Windows"} type SnapshotProperties_OsType string @@ -1914,6 +1944,12 @@ const ( SnapshotProperties_OsType_Windows = SnapshotProperties_OsType("Windows") ) +// Mapping from string to SnapshotProperties_OsType +var snapshotProperties_OsType_Values = map[string]SnapshotProperties_OsType{ + "linux": SnapshotProperties_OsType_Linux, + "windows": SnapshotProperties_OsType_Windows, +} + type SnapshotProperties_OsType_STATUS string const ( @@ -1921,6 +1957,12 @@ const ( SnapshotProperties_OsType_STATUS_Windows = SnapshotProperties_OsType_STATUS("Windows") ) +// Mapping from string to SnapshotProperties_OsType_STATUS +var snapshotProperties_OsType_STATUS_Values = map[string]SnapshotProperties_OsType_STATUS{ + "linux": SnapshotProperties_OsType_STATUS_Linux, + "windows": SnapshotProperties_OsType_STATUS_Windows, +} + // The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental // snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot type SnapshotSku struct { @@ -1972,8 +2014,9 @@ func (snapshotSku *SnapshotSku) AssignProperties_From_SnapshotSku(source *v20200 // Name if source.Name != nil { - name := SnapshotSku_Name(*source.Name) - snapshotSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, snapshotSku_Name_Values) + snapshotSku.Name = &nameTemp } else { snapshotSku.Name = nil } @@ -2066,8 +2109,9 @@ func (snapshotSku *SnapshotSku_STATUS) AssignProperties_From_SnapshotSku_STATUS( // Name if source.Name != nil { - name := SnapshotSku_Name_STATUS(*source.Name) - snapshotSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, snapshotSku_Name_STATUS_Values) + snapshotSku.Name = &nameTemp } else { snapshotSku.Name = nil } diff --git a/v2/api/compute/v1api20201201/virtual_machine_scale_set_spec_arm_types_gen.go b/v2/api/compute/v1api20201201/virtual_machine_scale_set_spec_arm_types_gen.go index dbb6a9e5cb9..6455bcb85d3 100644 --- a/v2/api/compute/v1api20201201/virtual_machine_scale_set_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20201201/virtual_machine_scale_set_spec_arm_types_gen.go @@ -184,6 +184,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // Describes a scale-in policy for a virtual machine scale set. type ScaleInPolicy_ARM struct { // Rules: The rules to be followed when scaling-in a virtual machine scale set. @@ -234,6 +239,14 @@ const ( VirtualMachineScaleSetIdentity_Type_UserAssigned = VirtualMachineScaleSetIdentity_Type("UserAssigned") ) +// Mapping from string to VirtualMachineScaleSetIdentity_Type +var virtualMachineScaleSetIdentity_Type_Values = map[string]VirtualMachineScaleSetIdentity_Type{ + "none": VirtualMachineScaleSetIdentity_Type_None, + "systemassigned": VirtualMachineScaleSetIdentity_Type_SystemAssigned, + "systemassigned, userassigned": VirtualMachineScaleSetIdentity_Type_SystemAssignedUserAssigned, + "userassigned": VirtualMachineScaleSetIdentity_Type_UserAssigned, +} + // Describes a virtual machine scale set virtual machine profile. type VirtualMachineScaleSetVMProfile_ARM struct { // BillingProfile: Specifies the billing related details of a Azure Spot VMSS. diff --git a/v2/api/compute/v1api20201201/virtual_machine_scale_set_status_arm_types_gen.go b/v2/api/compute/v1api20201201/virtual_machine_scale_set_status_arm_types_gen.go index 1e865af5416..07ffeaf810c 100644 --- a/v2/api/compute/v1api20201201/virtual_machine_scale_set_status_arm_types_gen.go +++ b/v2/api/compute/v1api20201201/virtual_machine_scale_set_status_arm_types_gen.go @@ -191,6 +191,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // Describes a scale-in policy for a virtual machine scale set. type ScaleInPolicy_STATUS_ARM struct { // Rules: The rules to be followed when scaling-in a virtual machine scale set. @@ -237,6 +242,14 @@ const ( VirtualMachineScaleSetIdentity_Type_STATUS_UserAssigned = VirtualMachineScaleSetIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to VirtualMachineScaleSetIdentity_Type_STATUS +var virtualMachineScaleSetIdentity_Type_STATUS_Values = map[string]VirtualMachineScaleSetIdentity_Type_STATUS{ + "none": VirtualMachineScaleSetIdentity_Type_STATUS_None, + "systemassigned": VirtualMachineScaleSetIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": VirtualMachineScaleSetIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": VirtualMachineScaleSetIdentity_Type_STATUS_UserAssigned, +} + type VirtualMachineScaleSetIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/compute/v1api20201201/virtual_machine_scale_set_types_gen.go b/v2/api/compute/v1api20201201/virtual_machine_scale_set_types_gen.go index d93c5ed51a3..bd367a46bfd 100644 --- a/v2/api/compute/v1api20201201/virtual_machine_scale_set_types_gen.go +++ b/v2/api/compute/v1api20201201/virtual_machine_scale_set_types_gen.go @@ -953,8 +953,9 @@ func (scaleSet *VirtualMachineScaleSet_Spec) AssignProperties_From_VirtualMachin // OrchestrationMode if source.OrchestrationMode != nil { - orchestrationMode := OrchestrationMode(*source.OrchestrationMode) - scaleSet.OrchestrationMode = &orchestrationMode + orchestrationMode := *source.OrchestrationMode + orchestrationModeTemp := genruntime.ToEnum(orchestrationMode, orchestrationMode_Values) + scaleSet.OrchestrationMode = &orchestrationModeTemp } else { scaleSet.OrchestrationMode = nil } @@ -1800,8 +1801,9 @@ func (scaleSet *VirtualMachineScaleSet_STATUS) AssignProperties_From_VirtualMach // OrchestrationMode if source.OrchestrationMode != nil { - orchestrationMode := OrchestrationMode_STATUS(*source.OrchestrationMode) - scaleSet.OrchestrationMode = &orchestrationMode + orchestrationMode := *source.OrchestrationMode + orchestrationModeTemp := genruntime.ToEnum(orchestrationMode, orchestrationMode_STATUS_Values) + scaleSet.OrchestrationMode = &orchestrationModeTemp } else { scaleSet.OrchestrationMode = nil } @@ -2348,6 +2350,12 @@ const ( OrchestrationMode_Uniform = OrchestrationMode("Uniform") ) +// Mapping from string to OrchestrationMode +var orchestrationMode_Values = map[string]OrchestrationMode{ + "flexible": OrchestrationMode_Flexible, + "uniform": OrchestrationMode_Uniform, +} + // Specifies the orchestration mode for the virtual machine scale set. type OrchestrationMode_STATUS string @@ -2356,6 +2364,12 @@ const ( OrchestrationMode_STATUS_Uniform = OrchestrationMode_STATUS("Uniform") ) +// Mapping from string to OrchestrationMode_STATUS +var orchestrationMode_STATUS_Values = map[string]OrchestrationMode_STATUS{ + "flexible": OrchestrationMode_STATUS_Flexible, + "uniform": OrchestrationMode_STATUS_Uniform, +} + // Describes a scale-in policy for a virtual machine scale set. type ScaleInPolicy struct { // Rules: The rules to be followed when scaling-in a virtual machine scale set. @@ -2418,7 +2432,7 @@ func (policy *ScaleInPolicy) AssignProperties_From_ScaleInPolicy(source *v202012 for ruleIndex, ruleItem := range source.Rules { // Shadow the loop variable to avoid aliasing ruleItem := ruleItem - ruleList[ruleIndex] = ScaleInPolicy_Rules(ruleItem) + ruleList[ruleIndex] = genruntime.ToEnum(ruleItem, scaleInPolicy_Rules_Values) } policy.Rules = ruleList } else { @@ -2506,7 +2520,7 @@ func (policy *ScaleInPolicy_STATUS) AssignProperties_From_ScaleInPolicy_STATUS(s for ruleIndex, ruleItem := range source.Rules { // Shadow the loop variable to avoid aliasing ruleItem := ruleItem - ruleList[ruleIndex] = ScaleInPolicy_Rules_STATUS(ruleItem) + ruleList[ruleIndex] = genruntime.ToEnum(ruleItem, scaleInPolicy_Rules_STATUS_Values) } policy.Rules = ruleList } else { @@ -2873,8 +2887,9 @@ func (policy *UpgradePolicy) AssignProperties_From_UpgradePolicy(source *v202012 // Mode if source.Mode != nil { - mode := UpgradePolicy_Mode(*source.Mode) - policy.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, upgradePolicy_Mode_Values) + policy.Mode = &modeTemp } else { policy.Mode = nil } @@ -3022,8 +3037,9 @@ func (policy *UpgradePolicy_STATUS) AssignProperties_From_UpgradePolicy_STATUS(s // Mode if source.Mode != nil { - mode := UpgradePolicy_Mode_STATUS(*source.Mode) - policy.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, upgradePolicy_Mode_STATUS_Values) + policy.Mode = &modeTemp } else { policy.Mode = nil } @@ -3162,8 +3178,9 @@ func (identity *VirtualMachineScaleSetIdentity) AssignProperties_From_VirtualMac // Type if source.Type != nil { - typeVar := VirtualMachineScaleSetIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, virtualMachineScaleSetIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3313,8 +3330,9 @@ func (identity *VirtualMachineScaleSetIdentity_STATUS) AssignProperties_From_Vir // Type if source.Type != nil { - typeVar := VirtualMachineScaleSetIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, virtualMachineScaleSetIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3702,8 +3720,9 @@ func (profile *VirtualMachineScaleSetVMProfile) AssignProperties_From_VirtualMac // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := EvictionPolicy(*source.EvictionPolicy) - profile.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, evictionPolicy_Values) + profile.EvictionPolicy = &evictionPolicyTemp } else { profile.EvictionPolicy = nil } @@ -3749,8 +3768,9 @@ func (profile *VirtualMachineScaleSetVMProfile) AssignProperties_From_VirtualMac // Priority if source.Priority != nil { - priority := Priority(*source.Priority) - profile.Priority = &priority + priority := *source.Priority + priorityTemp := genruntime.ToEnum(priority, priority_Values) + profile.Priority = &priorityTemp } else { profile.Priority = nil } @@ -4132,8 +4152,9 @@ func (profile *VirtualMachineScaleSetVMProfile_STATUS) AssignProperties_From_Vir // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := EvictionPolicy_STATUS(*source.EvictionPolicy) - profile.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, evictionPolicy_STATUS_Values) + profile.EvictionPolicy = &evictionPolicyTemp } else { profile.EvictionPolicy = nil } @@ -4179,8 +4200,9 @@ func (profile *VirtualMachineScaleSetVMProfile_STATUS) AssignProperties_From_Vir // Priority if source.Priority != nil { - priority := Priority_STATUS(*source.Priority) - profile.Priority = &priority + priority := *source.Priority + priorityTemp := genruntime.ToEnum(priority, priority_STATUS_Values) + profile.Priority = &priorityTemp } else { profile.Priority = nil } @@ -4989,6 +5011,13 @@ const ( ScaleInPolicy_Rules_OldestVM = ScaleInPolicy_Rules("OldestVM") ) +// Mapping from string to ScaleInPolicy_Rules +var scaleInPolicy_Rules_Values = map[string]ScaleInPolicy_Rules{ + "default": ScaleInPolicy_Rules_Default, + "newestvm": ScaleInPolicy_Rules_NewestVM, + "oldestvm": ScaleInPolicy_Rules_OldestVM, +} + type ScaleInPolicy_Rules_STATUS string const ( @@ -4997,6 +5026,13 @@ const ( ScaleInPolicy_Rules_STATUS_OldestVM = ScaleInPolicy_Rules_STATUS("OldestVM") ) +// Mapping from string to ScaleInPolicy_Rules_STATUS +var scaleInPolicy_Rules_STATUS_Values = map[string]ScaleInPolicy_Rules_STATUS{ + "default": ScaleInPolicy_Rules_STATUS_Default, + "newestvm": ScaleInPolicy_Rules_STATUS_NewestVM, + "oldestvm": ScaleInPolicy_Rules_STATUS_OldestVM, +} + type ScheduledEventsProfile struct { // TerminateNotificationProfile: Specifies Terminate Scheduled Event related configurations. TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"` @@ -5187,6 +5223,13 @@ const ( UpgradePolicy_Mode_Rolling = UpgradePolicy_Mode("Rolling") ) +// Mapping from string to UpgradePolicy_Mode +var upgradePolicy_Mode_Values = map[string]UpgradePolicy_Mode{ + "automatic": UpgradePolicy_Mode_Automatic, + "manual": UpgradePolicy_Mode_Manual, + "rolling": UpgradePolicy_Mode_Rolling, +} + type UpgradePolicy_Mode_STATUS string const ( @@ -5195,6 +5238,13 @@ const ( UpgradePolicy_Mode_STATUS_Rolling = UpgradePolicy_Mode_STATUS("Rolling") ) +// Mapping from string to UpgradePolicy_Mode_STATUS +var upgradePolicy_Mode_STATUS_Values = map[string]UpgradePolicy_Mode_STATUS{ + "automatic": UpgradePolicy_Mode_STATUS_Automatic, + "manual": UpgradePolicy_Mode_STATUS_Manual, + "rolling": UpgradePolicy_Mode_STATUS_Rolling, +} + // Describes a virtual machine scale set extension profile. type VirtualMachineScaleSetExtensionProfile struct { // Extensions: The virtual machine scale set child extension resources. @@ -7291,16 +7341,18 @@ func (disk *VirtualMachineScaleSetDataDisk) AssignProperties_From_VirtualMachine // Caching if source.Caching != nil { - caching := Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } @@ -7533,16 +7585,18 @@ func (disk *VirtualMachineScaleSetDataDisk_STATUS) AssignProperties_From_Virtual // Caching if source.Caching != nil { - caching := Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption_STATUS(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_STATUS_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } @@ -9238,16 +9292,18 @@ func (disk *VirtualMachineScaleSetOSDisk) AssignProperties_From_VirtualMachineSc // Caching if source.Caching != nil { - caching := Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } @@ -9296,8 +9352,9 @@ func (disk *VirtualMachineScaleSetOSDisk) AssignProperties_From_VirtualMachineSc // OsType if source.OsType != nil { - osType := VirtualMachineScaleSetOSDisk_OsType(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, virtualMachineScaleSetOSDisk_OsType_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -9555,16 +9612,18 @@ func (disk *VirtualMachineScaleSetOSDisk_STATUS) AssignProperties_From_VirtualMa // Caching if source.Caching != nil { - caching := Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption_STATUS(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_STATUS_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } @@ -9613,8 +9672,9 @@ func (disk *VirtualMachineScaleSetOSDisk_STATUS) AssignProperties_From_VirtualMa // OsType if source.OsType != nil { - osType := VirtualMachineScaleSetOSDisk_OsType_STATUS(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, virtualMachineScaleSetOSDisk_OsType_STATUS_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -10069,8 +10129,9 @@ func (configuration *VirtualMachineScaleSetIPConfiguration) AssignProperties_Fro // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion(*source.PrivateIPAddressVersion) - configuration.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, virtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_Values) + configuration.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { configuration.PrivateIPAddressVersion = nil } @@ -10509,8 +10570,9 @@ func (configuration *VirtualMachineScaleSetIPConfiguration_STATUS) AssignPropert // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS(*source.PrivateIPAddressVersion) - configuration.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, virtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_Values) + configuration.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { configuration.PrivateIPAddressVersion = nil } @@ -10764,8 +10826,9 @@ func (parameters *VirtualMachineScaleSetManagedDiskParameters) AssignProperties_ // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType(*source.StorageAccountType) - parameters.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_Values) + parameters.StorageAccountType = &storageAccountTypeTemp } else { parameters.StorageAccountType = nil } @@ -10872,8 +10935,9 @@ func (parameters *VirtualMachineScaleSetManagedDiskParameters_STATUS) AssignProp // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType_STATUS(*source.StorageAccountType) - parameters.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_STATUS_Values) + parameters.StorageAccountType = &storageAccountTypeTemp } else { parameters.StorageAccountType = nil } @@ -11056,6 +11120,12 @@ const ( VirtualMachineScaleSetOSDisk_OsType_Windows = VirtualMachineScaleSetOSDisk_OsType("Windows") ) +// Mapping from string to VirtualMachineScaleSetOSDisk_OsType +var virtualMachineScaleSetOSDisk_OsType_Values = map[string]VirtualMachineScaleSetOSDisk_OsType{ + "linux": VirtualMachineScaleSetOSDisk_OsType_Linux, + "windows": VirtualMachineScaleSetOSDisk_OsType_Windows, +} + type VirtualMachineScaleSetOSDisk_OsType_STATUS string const ( @@ -11063,6 +11133,12 @@ const ( VirtualMachineScaleSetOSDisk_OsType_STATUS_Windows = VirtualMachineScaleSetOSDisk_OsType_STATUS("Windows") ) +// Mapping from string to VirtualMachineScaleSetOSDisk_OsType_STATUS +var virtualMachineScaleSetOSDisk_OsType_STATUS_Values = map[string]VirtualMachineScaleSetOSDisk_OsType_STATUS{ + "linux": VirtualMachineScaleSetOSDisk_OsType_STATUS_Linux, + "windows": VirtualMachineScaleSetOSDisk_OsType_STATUS_Windows, +} + // +kubebuilder:validation:Enum={"IPv4","IPv6"} type VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion string @@ -11071,6 +11147,12 @@ const ( VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_IPv6 = VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion("IPv6") ) +// Mapping from string to VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion +var virtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_Values = map[string]VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion{ + "ipv4": VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_IPv4, + "ipv6": VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_IPv6, +} + type VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS string const ( @@ -11078,6 +11160,12 @@ const ( VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv6 = VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS("IPv6") ) +// Mapping from string to VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS +var virtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_Values = map[string]VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS{ + "ipv4": VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv4, + "ipv6": VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv6, +} + // Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration type VirtualMachineScaleSetPublicIPAddressConfiguration struct { // DnsSettings: The dns settings to be applied on the publicIP addresses . @@ -11280,8 +11368,9 @@ func (configuration *VirtualMachineScaleSetPublicIPAddressConfiguration) AssignP // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion(*source.PublicIPAddressVersion) - configuration.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, virtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_Values) + configuration.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { configuration.PublicIPAddressVersion = nil } @@ -11520,8 +11609,9 @@ func (configuration *VirtualMachineScaleSetPublicIPAddressConfiguration_STATUS) // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS(*source.PublicIPAddressVersion) - configuration.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, virtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_Values) + configuration.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { configuration.PublicIPAddressVersion = nil } @@ -11927,6 +12017,12 @@ const ( VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv6 = VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion("IPv6") ) +// Mapping from string to VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion +var virtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_Values = map[string]VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion{ + "ipv4": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv4, + "ipv6": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv6, +} + type VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS string const ( @@ -11934,6 +12030,12 @@ const ( VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv6 = VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS("IPv6") ) +// Mapping from string to VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS +var virtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_Values = map[string]VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS{ + "ipv4": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv4, + "ipv6": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv6, +} + func init() { SchemeBuilder.Register(&VirtualMachineScaleSet{}, &VirtualMachineScaleSetList{}) } diff --git a/v2/api/compute/v1api20201201/virtual_machine_spec_arm_types_gen.go b/v2/api/compute/v1api20201201/virtual_machine_spec_arm_types_gen.go index dd3cbed1217..7a61c427f8a 100644 --- a/v2/api/compute/v1api20201201/virtual_machine_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20201201/virtual_machine_spec_arm_types_gen.go @@ -333,6 +333,14 @@ const ( VirtualMachineIdentity_Type_UserAssigned = VirtualMachineIdentity_Type("UserAssigned") ) +// Mapping from string to VirtualMachineIdentity_Type +var virtualMachineIdentity_Type_Values = map[string]VirtualMachineIdentity_Type{ + "none": VirtualMachineIdentity_Type_None, + "systemassigned": VirtualMachineIdentity_Type_SystemAssigned, + "systemassigned, userassigned": VirtualMachineIdentity_Type_SystemAssignedUserAssigned, + "userassigned": VirtualMachineIdentity_Type_UserAssigned, +} + // Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. // You can easily view the output of your console log. // Azure also enables you to see a screenshot of the diff --git a/v2/api/compute/v1api20201201/virtual_machine_status_arm_types_gen.go b/v2/api/compute/v1api20201201/virtual_machine_status_arm_types_gen.go index d117d17bd4f..727b1041420 100644 --- a/v2/api/compute/v1api20201201/virtual_machine_status_arm_types_gen.go +++ b/v2/api/compute/v1api20201201/virtual_machine_status_arm_types_gen.go @@ -350,6 +350,14 @@ const ( VirtualMachineIdentity_Type_STATUS_UserAssigned = VirtualMachineIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to VirtualMachineIdentity_Type_STATUS +var virtualMachineIdentity_Type_STATUS_Values = map[string]VirtualMachineIdentity_Type_STATUS{ + "none": VirtualMachineIdentity_Type_STATUS_None, + "systemassigned": VirtualMachineIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": VirtualMachineIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": VirtualMachineIdentity_Type_STATUS_UserAssigned, +} + type VirtualMachineIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/compute/v1api20201201/virtual_machine_types_gen.go b/v2/api/compute/v1api20201201/virtual_machine_types_gen.go index bd5ea4bd056..36bda4829da 100644 --- a/v2/api/compute/v1api20201201/virtual_machine_types_gen.go +++ b/v2/api/compute/v1api20201201/virtual_machine_types_gen.go @@ -1086,8 +1086,9 @@ func (machine *VirtualMachine_Spec) AssignProperties_From_VirtualMachine_Spec(so // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := EvictionPolicy(*source.EvictionPolicy) - machine.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, evictionPolicy_Values) + machine.EvictionPolicy = &evictionPolicyTemp } else { machine.EvictionPolicy = nil } @@ -1210,8 +1211,9 @@ func (machine *VirtualMachine_Spec) AssignProperties_From_VirtualMachine_Spec(so // Priority if source.Priority != nil { - priority := Priority(*source.Priority) - machine.Priority = &priority + priority := *source.Priority + priorityTemp := genruntime.ToEnum(priority, priority_Values) + machine.Priority = &priorityTemp } else { machine.Priority = nil } @@ -2152,8 +2154,9 @@ func (machine *VirtualMachine_STATUS) AssignProperties_From_VirtualMachine_STATU // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := EvictionPolicy_STATUS(*source.EvictionPolicy) - machine.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, evictionPolicy_STATUS_Values) + machine.EvictionPolicy = &evictionPolicyTemp } else { machine.EvictionPolicy = nil } @@ -2286,8 +2289,9 @@ func (machine *VirtualMachine_STATUS) AssignProperties_From_VirtualMachine_STATU // Priority if source.Priority != nil { - priority := Priority_STATUS(*source.Priority) - machine.Priority = &priority + priority := *source.Priority + priorityTemp := genruntime.ToEnum(priority, priority_STATUS_Values) + machine.Priority = &priorityTemp } else { machine.Priority = nil } @@ -3201,6 +3205,12 @@ const ( EvictionPolicy_Delete = EvictionPolicy("Delete") ) +// Mapping from string to EvictionPolicy +var evictionPolicy_Values = map[string]EvictionPolicy{ + "deallocate": EvictionPolicy_Deallocate, + "delete": EvictionPolicy_Delete, +} + // Specifies the eviction policy for the Azure Spot VM/VMSS type EvictionPolicy_STATUS string @@ -3209,6 +3219,12 @@ const ( EvictionPolicy_STATUS_Delete = EvictionPolicy_STATUS("Delete") ) +// Mapping from string to EvictionPolicy_STATUS +var evictionPolicy_STATUS_Values = map[string]EvictionPolicy_STATUS{ + "deallocate": EvictionPolicy_STATUS_Deallocate, + "delete": EvictionPolicy_STATUS_Delete, +} + // The complex type of the extended location. type ExtendedLocation struct { // Name: The name of the extended location. @@ -3277,8 +3293,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -3361,8 +3378,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -3527,8 +3545,9 @@ func (profile *HardwareProfile_STATUS) AssignProperties_From_HardwareProfile_STA // VmSize if source.VmSize != nil { - vmSize := HardwareProfile_VmSize_STATUS(*source.VmSize) - profile.VmSize = &vmSize + vmSize := *source.VmSize + vmSizeTemp := genruntime.ToEnum(vmSize, hardwareProfile_VmSize_STATUS_Values) + profile.VmSize = &vmSizeTemp } else { profile.VmSize = nil } @@ -4732,6 +4751,13 @@ const ( Priority_Spot = Priority("Spot") ) +// Mapping from string to Priority +var priority_Values = map[string]Priority{ + "low": Priority_Low, + "regular": Priority_Regular, + "spot": Priority_Spot, +} + // Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. // 'Low' enum // will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS. @@ -4743,6 +4769,13 @@ const ( Priority_STATUS_Spot = Priority_STATUS("Spot") ) +// Mapping from string to Priority_STATUS +var priority_STATUS_Values = map[string]Priority_STATUS{ + "low": Priority_STATUS_Low, + "regular": Priority_STATUS_Regular, + "spot": Priority_STATUS_Spot, +} + // Specifies the Security profile settings for the virtual machine or virtual machine scale set. type SecurityProfile struct { // EncryptionAtHost: This property can be used by user in the request to enable or disable the Host Encryption for the @@ -4845,8 +4878,9 @@ func (profile *SecurityProfile) AssignProperties_From_SecurityProfile(source *v2 // SecurityType if source.SecurityType != nil { - securityType := SecurityProfile_SecurityType(*source.SecurityType) - profile.SecurityType = &securityType + securityType := *source.SecurityType + securityTypeTemp := genruntime.ToEnum(securityType, securityProfile_SecurityType_Values) + profile.SecurityType = &securityTypeTemp } else { profile.SecurityType = nil } @@ -4982,8 +5016,9 @@ func (profile *SecurityProfile_STATUS) AssignProperties_From_SecurityProfile_STA // SecurityType if source.SecurityType != nil { - securityType := SecurityProfile_SecurityType_STATUS(*source.SecurityType) - profile.SecurityType = &securityType + securityType := *source.SecurityType + securityTypeTemp := genruntime.ToEnum(securityType, securityProfile_SecurityType_STATUS_Values) + profile.SecurityType = &securityTypeTemp } else { profile.SecurityType = nil } @@ -5998,8 +6033,9 @@ func (identity *VirtualMachineIdentity) AssignProperties_From_VirtualMachineIden // Type if source.Type != nil { - typeVar := VirtualMachineIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, virtualMachineIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -6149,8 +6185,9 @@ func (identity *VirtualMachineIdentity_STATUS) AssignProperties_From_VirtualMach // Type if source.Type != nil { - typeVar := VirtualMachineIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, virtualMachineIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -6491,8 +6528,9 @@ func (view *VirtualMachineInstanceView_STATUS) AssignProperties_From_VirtualMach // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := VirtualMachineInstanceView_HyperVGeneration_STATUS(*source.HyperVGeneration) - view.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, virtualMachineInstanceView_HyperVGeneration_STATUS_Values) + view.HyperVGeneration = &hyperVGenerationTemp } else { view.HyperVGeneration = nil } @@ -7303,24 +7341,27 @@ func (disk *DataDisk) AssignProperties_From_DataDisk(source *v20201201s.DataDisk // Caching if source.Caching != nil { - caching := Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DetachOption if source.DetachOption != nil { - detachOption := DetachOption(*source.DetachOption) - disk.DetachOption = &detachOption + detachOption := *source.DetachOption + detachOptionTemp := genruntime.ToEnum(detachOption, detachOption_Values) + disk.DetachOption = &detachOptionTemp } else { disk.DetachOption = nil } @@ -7673,24 +7714,27 @@ func (disk *DataDisk_STATUS) AssignProperties_From_DataDisk_STATUS(source *v2020 // Caching if source.Caching != nil { - caching := Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption_STATUS(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_STATUS_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DetachOption if source.DetachOption != nil { - detachOption := DetachOption_STATUS(*source.DetachOption) - disk.DetachOption = &detachOption + detachOption := *source.DetachOption + detachOptionTemp := genruntime.ToEnum(detachOption, detachOption_STATUS_Values) + disk.DetachOption = &detachOptionTemp } else { disk.DetachOption = nil } @@ -8202,6 +8246,176 @@ const ( HardwareProfile_VmSize_STATUS_Standard_NV6 = HardwareProfile_VmSize_STATUS("Standard_NV6") ) +// Mapping from string to HardwareProfile_VmSize_STATUS +var hardwareProfile_VmSize_STATUS_Values = map[string]HardwareProfile_VmSize_STATUS{ + "basic_a0": HardwareProfile_VmSize_STATUS_Basic_A0, + "basic_a1": HardwareProfile_VmSize_STATUS_Basic_A1, + "basic_a2": HardwareProfile_VmSize_STATUS_Basic_A2, + "basic_a3": HardwareProfile_VmSize_STATUS_Basic_A3, + "basic_a4": HardwareProfile_VmSize_STATUS_Basic_A4, + "standard_a0": HardwareProfile_VmSize_STATUS_Standard_A0, + "standard_a1": HardwareProfile_VmSize_STATUS_Standard_A1, + "standard_a10": HardwareProfile_VmSize_STATUS_Standard_A10, + "standard_a11": HardwareProfile_VmSize_STATUS_Standard_A11, + "standard_a1_v2": HardwareProfile_VmSize_STATUS_Standard_A1_V2, + "standard_a2": HardwareProfile_VmSize_STATUS_Standard_A2, + "standard_a2m_v2": HardwareProfile_VmSize_STATUS_Standard_A2M_V2, + "standard_a2_v2": HardwareProfile_VmSize_STATUS_Standard_A2_V2, + "standard_a3": HardwareProfile_VmSize_STATUS_Standard_A3, + "standard_a4": HardwareProfile_VmSize_STATUS_Standard_A4, + "standard_a4m_v2": HardwareProfile_VmSize_STATUS_Standard_A4M_V2, + "standard_a4_v2": HardwareProfile_VmSize_STATUS_Standard_A4_V2, + "standard_a5": HardwareProfile_VmSize_STATUS_Standard_A5, + "standard_a6": HardwareProfile_VmSize_STATUS_Standard_A6, + "standard_a7": HardwareProfile_VmSize_STATUS_Standard_A7, + "standard_a8": HardwareProfile_VmSize_STATUS_Standard_A8, + "standard_a8m_v2": HardwareProfile_VmSize_STATUS_Standard_A8M_V2, + "standard_a8_v2": HardwareProfile_VmSize_STATUS_Standard_A8_V2, + "standard_a9": HardwareProfile_VmSize_STATUS_Standard_A9, + "standard_b1ms": HardwareProfile_VmSize_STATUS_Standard_B1Ms, + "standard_b1s": HardwareProfile_VmSize_STATUS_Standard_B1S, + "standard_b2ms": HardwareProfile_VmSize_STATUS_Standard_B2Ms, + "standard_b2s": HardwareProfile_VmSize_STATUS_Standard_B2S, + "standard_b4ms": HardwareProfile_VmSize_STATUS_Standard_B4Ms, + "standard_b8ms": HardwareProfile_VmSize_STATUS_Standard_B8Ms, + "standard_d1": HardwareProfile_VmSize_STATUS_Standard_D1, + "standard_d11": HardwareProfile_VmSize_STATUS_Standard_D11, + "standard_d11_v2": HardwareProfile_VmSize_STATUS_Standard_D11_V2, + "standard_d12": HardwareProfile_VmSize_STATUS_Standard_D12, + "standard_d12_v2": HardwareProfile_VmSize_STATUS_Standard_D12_V2, + "standard_d13": HardwareProfile_VmSize_STATUS_Standard_D13, + "standard_d13_v2": HardwareProfile_VmSize_STATUS_Standard_D13_V2, + "standard_d14": HardwareProfile_VmSize_STATUS_Standard_D14, + "standard_d14_v2": HardwareProfile_VmSize_STATUS_Standard_D14_V2, + "standard_d15_v2": HardwareProfile_VmSize_STATUS_Standard_D15_V2, + "standard_d16s_v3": HardwareProfile_VmSize_STATUS_Standard_D16S_V3, + "standard_d16_v3": HardwareProfile_VmSize_STATUS_Standard_D16_V3, + "standard_d1_v2": HardwareProfile_VmSize_STATUS_Standard_D1_V2, + "standard_d2": HardwareProfile_VmSize_STATUS_Standard_D2, + "standard_d2s_v3": HardwareProfile_VmSize_STATUS_Standard_D2S_V3, + "standard_d2_v2": HardwareProfile_VmSize_STATUS_Standard_D2_V2, + "standard_d2_v3": HardwareProfile_VmSize_STATUS_Standard_D2_V3, + "standard_d3": HardwareProfile_VmSize_STATUS_Standard_D3, + "standard_d32s_v3": HardwareProfile_VmSize_STATUS_Standard_D32S_V3, + "standard_d32_v3": HardwareProfile_VmSize_STATUS_Standard_D32_V3, + "standard_d3_v2": HardwareProfile_VmSize_STATUS_Standard_D3_V2, + "standard_d4": HardwareProfile_VmSize_STATUS_Standard_D4, + "standard_d4s_v3": HardwareProfile_VmSize_STATUS_Standard_D4S_V3, + "standard_d4_v2": HardwareProfile_VmSize_STATUS_Standard_D4_V2, + "standard_d4_v3": HardwareProfile_VmSize_STATUS_Standard_D4_V3, + "standard_d5_v2": HardwareProfile_VmSize_STATUS_Standard_D5_V2, + "standard_d64s_v3": HardwareProfile_VmSize_STATUS_Standard_D64S_V3, + "standard_d64_v3": HardwareProfile_VmSize_STATUS_Standard_D64_V3, + "standard_d8s_v3": HardwareProfile_VmSize_STATUS_Standard_D8S_V3, + "standard_d8_v3": HardwareProfile_VmSize_STATUS_Standard_D8_V3, + "standard_ds1": HardwareProfile_VmSize_STATUS_Standard_DS1, + "standard_ds11": HardwareProfile_VmSize_STATUS_Standard_DS11, + "standard_ds11_v2": HardwareProfile_VmSize_STATUS_Standard_DS11_V2, + "standard_ds12": HardwareProfile_VmSize_STATUS_Standard_DS12, + "standard_ds12_v2": HardwareProfile_VmSize_STATUS_Standard_DS12_V2, + "standard_ds13": HardwareProfile_VmSize_STATUS_Standard_DS13, + "standard_ds13-2_v2": HardwareProfile_VmSize_STATUS_Standard_DS132_V2, + "standard_ds13-4_v2": HardwareProfile_VmSize_STATUS_Standard_DS134_V2, + "standard_ds13_v2": HardwareProfile_VmSize_STATUS_Standard_DS13_V2, + "standard_ds14": HardwareProfile_VmSize_STATUS_Standard_DS14, + "standard_ds14-4_v2": HardwareProfile_VmSize_STATUS_Standard_DS144_V2, + "standard_ds14-8_v2": HardwareProfile_VmSize_STATUS_Standard_DS148_V2, + "standard_ds14_v2": HardwareProfile_VmSize_STATUS_Standard_DS14_V2, + "standard_ds15_v2": HardwareProfile_VmSize_STATUS_Standard_DS15_V2, + "standard_ds1_v2": HardwareProfile_VmSize_STATUS_Standard_DS1_V2, + "standard_ds2": HardwareProfile_VmSize_STATUS_Standard_DS2, + "standard_ds2_v2": HardwareProfile_VmSize_STATUS_Standard_DS2_V2, + "standard_ds3": HardwareProfile_VmSize_STATUS_Standard_DS3, + "standard_ds3_v2": HardwareProfile_VmSize_STATUS_Standard_DS3_V2, + "standard_ds4": HardwareProfile_VmSize_STATUS_Standard_DS4, + "standard_ds4_v2": HardwareProfile_VmSize_STATUS_Standard_DS4_V2, + "standard_ds5_v2": HardwareProfile_VmSize_STATUS_Standard_DS5_V2, + "standard_e16s_v3": HardwareProfile_VmSize_STATUS_Standard_E16S_V3, + "standard_e16_v3": HardwareProfile_VmSize_STATUS_Standard_E16_V3, + "standard_e2s_v3": HardwareProfile_VmSize_STATUS_Standard_E2S_V3, + "standard_e2_v3": HardwareProfile_VmSize_STATUS_Standard_E2_V3, + "standard_e32-16_v3": HardwareProfile_VmSize_STATUS_Standard_E3216_V3, + "standard_e32-8s_v3": HardwareProfile_VmSize_STATUS_Standard_E328S_V3, + "standard_e32s_v3": HardwareProfile_VmSize_STATUS_Standard_E32S_V3, + "standard_e32_v3": HardwareProfile_VmSize_STATUS_Standard_E32_V3, + "standard_e4s_v3": HardwareProfile_VmSize_STATUS_Standard_E4S_V3, + "standard_e4_v3": HardwareProfile_VmSize_STATUS_Standard_E4_V3, + "standard_e64-16s_v3": HardwareProfile_VmSize_STATUS_Standard_E6416S_V3, + "standard_e64-32s_v3": HardwareProfile_VmSize_STATUS_Standard_E6432S_V3, + "standard_e64s_v3": HardwareProfile_VmSize_STATUS_Standard_E64S_V3, + "standard_e64_v3": HardwareProfile_VmSize_STATUS_Standard_E64_V3, + "standard_e8s_v3": HardwareProfile_VmSize_STATUS_Standard_E8S_V3, + "standard_e8_v3": HardwareProfile_VmSize_STATUS_Standard_E8_V3, + "standard_f1": HardwareProfile_VmSize_STATUS_Standard_F1, + "standard_f16": HardwareProfile_VmSize_STATUS_Standard_F16, + "standard_f16s": HardwareProfile_VmSize_STATUS_Standard_F16S, + "standard_f16s_v2": HardwareProfile_VmSize_STATUS_Standard_F16S_V2, + "standard_f1s": HardwareProfile_VmSize_STATUS_Standard_F1S, + "standard_f2": HardwareProfile_VmSize_STATUS_Standard_F2, + "standard_f2s": HardwareProfile_VmSize_STATUS_Standard_F2S, + "standard_f2s_v2": HardwareProfile_VmSize_STATUS_Standard_F2S_V2, + "standard_f32s_v2": HardwareProfile_VmSize_STATUS_Standard_F32S_V2, + "standard_f4": HardwareProfile_VmSize_STATUS_Standard_F4, + "standard_f4s": HardwareProfile_VmSize_STATUS_Standard_F4S, + "standard_f4s_v2": HardwareProfile_VmSize_STATUS_Standard_F4S_V2, + "standard_f64s_v2": HardwareProfile_VmSize_STATUS_Standard_F64S_V2, + "standard_f72s_v2": HardwareProfile_VmSize_STATUS_Standard_F72S_V2, + "standard_f8": HardwareProfile_VmSize_STATUS_Standard_F8, + "standard_f8s": HardwareProfile_VmSize_STATUS_Standard_F8S, + "standard_f8s_v2": HardwareProfile_VmSize_STATUS_Standard_F8S_V2, + "standard_g1": HardwareProfile_VmSize_STATUS_Standard_G1, + "standard_g2": HardwareProfile_VmSize_STATUS_Standard_G2, + "standard_g3": HardwareProfile_VmSize_STATUS_Standard_G3, + "standard_g4": HardwareProfile_VmSize_STATUS_Standard_G4, + "standard_g5": HardwareProfile_VmSize_STATUS_Standard_G5, + "standard_gs1": HardwareProfile_VmSize_STATUS_Standard_GS1, + "standard_gs2": HardwareProfile_VmSize_STATUS_Standard_GS2, + "standard_gs3": HardwareProfile_VmSize_STATUS_Standard_GS3, + "standard_gs4": HardwareProfile_VmSize_STATUS_Standard_GS4, + "standard_gs4-4": HardwareProfile_VmSize_STATUS_Standard_GS44, + "standard_gs4-8": HardwareProfile_VmSize_STATUS_Standard_GS48, + "standard_gs5": HardwareProfile_VmSize_STATUS_Standard_GS5, + "standard_gs5-16": HardwareProfile_VmSize_STATUS_Standard_GS516, + "standard_gs5-8": HardwareProfile_VmSize_STATUS_Standard_GS58, + "standard_h16": HardwareProfile_VmSize_STATUS_Standard_H16, + "standard_h16m": HardwareProfile_VmSize_STATUS_Standard_H16M, + "standard_h16mr": HardwareProfile_VmSize_STATUS_Standard_H16Mr, + "standard_h16r": HardwareProfile_VmSize_STATUS_Standard_H16R, + "standard_h8": HardwareProfile_VmSize_STATUS_Standard_H8, + "standard_h8m": HardwareProfile_VmSize_STATUS_Standard_H8M, + "standard_l16s": HardwareProfile_VmSize_STATUS_Standard_L16S, + "standard_l32s": HardwareProfile_VmSize_STATUS_Standard_L32S, + "standard_l4s": HardwareProfile_VmSize_STATUS_Standard_L4S, + "standard_l8s": HardwareProfile_VmSize_STATUS_Standard_L8S, + "standard_m128-32ms": HardwareProfile_VmSize_STATUS_Standard_M12832Ms, + "standard_m128-64ms": HardwareProfile_VmSize_STATUS_Standard_M12864Ms, + "standard_m128ms": HardwareProfile_VmSize_STATUS_Standard_M128Ms, + "standard_m128s": HardwareProfile_VmSize_STATUS_Standard_M128S, + "standard_m64-16ms": HardwareProfile_VmSize_STATUS_Standard_M6416Ms, + "standard_m64-32ms": HardwareProfile_VmSize_STATUS_Standard_M6432Ms, + "standard_m64ms": HardwareProfile_VmSize_STATUS_Standard_M64Ms, + "standard_m64s": HardwareProfile_VmSize_STATUS_Standard_M64S, + "standard_nc12": HardwareProfile_VmSize_STATUS_Standard_NC12, + "standard_nc12s_v2": HardwareProfile_VmSize_STATUS_Standard_NC12S_V2, + "standard_nc12s_v3": HardwareProfile_VmSize_STATUS_Standard_NC12S_V3, + "standard_nc24": HardwareProfile_VmSize_STATUS_Standard_NC24, + "standard_nc24r": HardwareProfile_VmSize_STATUS_Standard_NC24R, + "standard_nc24rs_v2": HardwareProfile_VmSize_STATUS_Standard_NC24Rs_V2, + "standard_nc24rs_v3": HardwareProfile_VmSize_STATUS_Standard_NC24Rs_V3, + "standard_nc24s_v2": HardwareProfile_VmSize_STATUS_Standard_NC24S_V2, + "standard_nc24s_v3": HardwareProfile_VmSize_STATUS_Standard_NC24S_V3, + "standard_nc6": HardwareProfile_VmSize_STATUS_Standard_NC6, + "standard_nc6s_v2": HardwareProfile_VmSize_STATUS_Standard_NC6S_V2, + "standard_nc6s_v3": HardwareProfile_VmSize_STATUS_Standard_NC6S_V3, + "standard_nd12s": HardwareProfile_VmSize_STATUS_Standard_ND12S, + "standard_nd24rs": HardwareProfile_VmSize_STATUS_Standard_ND24Rs, + "standard_nd24s": HardwareProfile_VmSize_STATUS_Standard_ND24S, + "standard_nd6s": HardwareProfile_VmSize_STATUS_Standard_ND6S, + "standard_nv12": HardwareProfile_VmSize_STATUS_Standard_NV12, + "standard_nv24": HardwareProfile_VmSize_STATUS_Standard_NV24, + "standard_nv6": HardwareProfile_VmSize_STATUS_Standard_NV6, +} + // Specifies information about the image to use. You can specify information about platform images, marketplace images, or // virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual // machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set @@ -8594,8 +8808,9 @@ func (status *InstanceViewStatus_STATUS) AssignProperties_From_InstanceViewStatu // Level if source.Level != nil { - level := InstanceViewStatus_Level_STATUS(*source.Level) - status.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, instanceViewStatus_Level_STATUS_Values) + status.Level = &levelTemp } else { status.Level = nil } @@ -9141,8 +9356,9 @@ func (status *MaintenanceRedeployStatus_STATUS) AssignProperties_From_Maintenanc // LastOperationResultCode if source.LastOperationResultCode != nil { - lastOperationResultCode := MaintenanceRedeployStatus_LastOperationResultCode_STATUS(*source.LastOperationResultCode) - status.LastOperationResultCode = &lastOperationResultCode + lastOperationResultCode := *source.LastOperationResultCode + lastOperationResultCodeTemp := genruntime.ToEnum(lastOperationResultCode, maintenanceRedeployStatus_LastOperationResultCode_STATUS_Values) + status.LastOperationResultCode = &lastOperationResultCodeTemp } else { status.LastOperationResultCode = nil } @@ -9685,16 +9901,18 @@ func (disk *OSDisk) AssignProperties_From_OSDisk(source *v20201201s.OSDisk) erro // Caching if source.Caching != nil { - caching := Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } @@ -9755,8 +9973,9 @@ func (disk *OSDisk) AssignProperties_From_OSDisk(source *v20201201s.OSDisk) erro // OsType if source.OsType != nil { - osType := OSDisk_OsType(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSDisk_OsType_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -10070,16 +10289,18 @@ func (disk *OSDisk_STATUS) AssignProperties_From_OSDisk_STATUS(source *v20201201 // Caching if source.Caching != nil { - caching := Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption_STATUS(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_STATUS_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } @@ -10140,8 +10361,9 @@ func (disk *OSDisk_STATUS) AssignProperties_From_OSDisk_STATUS(source *v20201201 // OsType if source.OsType != nil { - osType := OSDisk_OsType_STATUS(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSDisk_OsType_STATUS_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -10289,10 +10511,20 @@ type SecurityProfile_SecurityType string const SecurityProfile_SecurityType_TrustedLaunch = SecurityProfile_SecurityType("TrustedLaunch") +// Mapping from string to SecurityProfile_SecurityType +var securityProfile_SecurityType_Values = map[string]SecurityProfile_SecurityType{ + "trustedlaunch": SecurityProfile_SecurityType_TrustedLaunch, +} + type SecurityProfile_SecurityType_STATUS string const SecurityProfile_SecurityType_STATUS_TrustedLaunch = SecurityProfile_SecurityType_STATUS("TrustedLaunch") +// Mapping from string to SecurityProfile_SecurityType_STATUS +var securityProfile_SecurityType_STATUS_Values = map[string]SecurityProfile_SecurityType_STATUS{ + "trustedlaunch": SecurityProfile_SecurityType_STATUS_TrustedLaunch, +} + // Specifies the security settings like secure boot and vTPM used while creating the virtual machine. // Minimum // api-version: 2020-12-01 @@ -11153,6 +11385,12 @@ const ( VirtualMachineInstanceView_HyperVGeneration_STATUS_V2 = VirtualMachineInstanceView_HyperVGeneration_STATUS("V2") ) +// Mapping from string to VirtualMachineInstanceView_HyperVGeneration_STATUS +var virtualMachineInstanceView_HyperVGeneration_STATUS_Values = map[string]VirtualMachineInstanceView_HyperVGeneration_STATUS{ + "v1": VirtualMachineInstanceView_HyperVGeneration_STATUS_V1, + "v2": VirtualMachineInstanceView_HyperVGeneration_STATUS_V2, +} + // The status of virtual machine patch operations. type VirtualMachinePatchStatus_STATUS struct { // AvailablePatchSummary: The available patch summary of the latest assessment operation for the virtual machine. @@ -11963,8 +12201,9 @@ func (content *AdditionalUnattendContent) AssignProperties_From_AdditionalUnatte // ComponentName if source.ComponentName != nil { - componentName := AdditionalUnattendContent_ComponentName(*source.ComponentName) - content.ComponentName = &componentName + componentName := *source.ComponentName + componentNameTemp := genruntime.ToEnum(componentName, additionalUnattendContent_ComponentName_Values) + content.ComponentName = &componentNameTemp } else { content.ComponentName = nil } @@ -11974,16 +12213,18 @@ func (content *AdditionalUnattendContent) AssignProperties_From_AdditionalUnatte // PassName if source.PassName != nil { - passName := AdditionalUnattendContent_PassName(*source.PassName) - content.PassName = &passName + passName := *source.PassName + passNameTemp := genruntime.ToEnum(passName, additionalUnattendContent_PassName_Values) + content.PassName = &passNameTemp } else { content.PassName = nil } // SettingName if source.SettingName != nil { - settingName := AdditionalUnattendContent_SettingName(*source.SettingName) - content.SettingName = &settingName + settingName := *source.SettingName + settingNameTemp := genruntime.ToEnum(settingName, additionalUnattendContent_SettingName_Values) + content.SettingName = &settingNameTemp } else { content.SettingName = nil } @@ -12101,8 +12342,9 @@ func (content *AdditionalUnattendContent_STATUS) AssignProperties_From_Additiona // ComponentName if source.ComponentName != nil { - componentName := AdditionalUnattendContent_ComponentName_STATUS(*source.ComponentName) - content.ComponentName = &componentName + componentName := *source.ComponentName + componentNameTemp := genruntime.ToEnum(componentName, additionalUnattendContent_ComponentName_STATUS_Values) + content.ComponentName = &componentNameTemp } else { content.ComponentName = nil } @@ -12112,16 +12354,18 @@ func (content *AdditionalUnattendContent_STATUS) AssignProperties_From_Additiona // PassName if source.PassName != nil { - passName := AdditionalUnattendContent_PassName_STATUS(*source.PassName) - content.PassName = &passName + passName := *source.PassName + passNameTemp := genruntime.ToEnum(passName, additionalUnattendContent_PassName_STATUS_Values) + content.PassName = &passNameTemp } else { content.PassName = nil } // SettingName if source.SettingName != nil { - settingName := AdditionalUnattendContent_SettingName_STATUS(*source.SettingName) - content.SettingName = &settingName + settingName := *source.SettingName + settingNameTemp := genruntime.ToEnum(settingName, additionalUnattendContent_SettingName_STATUS_Values) + content.SettingName = &settingNameTemp } else { content.SettingName = nil } @@ -12315,8 +12559,9 @@ func (summary *AvailablePatchSummary_STATUS) AssignProperties_From_AvailablePatc // Status if source.Status != nil { - status := AvailablePatchSummary_Status_STATUS(*source.Status) - summary.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, availablePatchSummary_Status_STATUS_Values) + summary.Status = &statusTemp } else { summary.Status = nil } @@ -12399,6 +12644,13 @@ const ( Caching_ReadWrite = Caching("ReadWrite") ) +// Mapping from string to Caching +var caching_Values = map[string]Caching{ + "none": Caching_None, + "readonly": Caching_ReadOnly, + "readwrite": Caching_ReadWrite, +} + // Specifies the caching requirements. // Possible values are: // None @@ -12413,6 +12665,13 @@ const ( Caching_STATUS_ReadWrite = Caching_STATUS("ReadWrite") ) +// Mapping from string to Caching_STATUS +var caching_STATUS_Values = map[string]Caching_STATUS{ + "none": Caching_STATUS_None, + "readonly": Caching_STATUS_ReadOnly, + "readwrite": Caching_STATUS_ReadWrite, +} + // Specifies how the virtual machine should be created. // Possible values are: // Attach \u2013 This value @@ -12430,6 +12689,13 @@ const ( CreateOption_FromImage = CreateOption("FromImage") ) +// Mapping from string to CreateOption +var createOption_Values = map[string]CreateOption{ + "attach": CreateOption_Attach, + "empty": CreateOption_Empty, + "fromimage": CreateOption_FromImage, +} + // Specifies how the virtual machine should be created. // Possible values are: // Attach \u2013 This value @@ -12446,6 +12712,13 @@ const ( CreateOption_STATUS_FromImage = CreateOption_STATUS("FromImage") ) +// Mapping from string to CreateOption_STATUS +var createOption_STATUS_Values = map[string]CreateOption_STATUS{ + "attach": CreateOption_STATUS_Attach, + "empty": CreateOption_STATUS_Empty, + "fromimage": CreateOption_STATUS_FromImage, +} + // Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from // the virtual machine. Supported values: ForceDetach. // detachOption: ForceDetach is applicable only for @@ -12460,6 +12733,11 @@ type DetachOption string const DetachOption_ForceDetach = DetachOption("ForceDetach") +// Mapping from string to DetachOption +var detachOption_Values = map[string]DetachOption{ + "forcedetach": DetachOption_ForceDetach, +} + // Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from // the virtual machine. Supported values: ForceDetach. // detachOption: ForceDetach is applicable only for @@ -12473,6 +12751,11 @@ type DetachOption_STATUS string const DetachOption_STATUS_ForceDetach = DetachOption_STATUS("ForceDetach") +// Mapping from string to DetachOption_STATUS +var detachOption_STATUS_Values = map[string]DetachOption_STATUS{ + "forcedetach": DetachOption_STATUS_ForceDetach, +} + // Describes the parameters of ephemeral disk settings that can be specified for operating system disk. // NOTE: The // ephemeral disk settings can only be specified for managed disk. @@ -12547,16 +12830,18 @@ func (settings *DiffDiskSettings) AssignProperties_From_DiffDiskSettings(source // Option if source.Option != nil { - option := DiffDiskOption(*source.Option) - settings.Option = &option + option := *source.Option + optionTemp := genruntime.ToEnum(option, diffDiskOption_Values) + settings.Option = &optionTemp } else { settings.Option = nil } // Placement if source.Placement != nil { - placement := DiffDiskPlacement(*source.Placement) - settings.Placement = &placement + placement := *source.Placement + placementTemp := genruntime.ToEnum(placement, diffDiskPlacement_Values) + settings.Placement = &placementTemp } else { settings.Placement = nil } @@ -12650,16 +12935,18 @@ func (settings *DiffDiskSettings_STATUS) AssignProperties_From_DiffDiskSettings_ // Option if source.Option != nil { - option := DiffDiskOption_STATUS(*source.Option) - settings.Option = &option + option := *source.Option + optionTemp := genruntime.ToEnum(option, diffDiskOption_STATUS_Values) + settings.Option = &optionTemp } else { settings.Option = nil } // Placement if source.Placement != nil { - placement := DiffDiskPlacement_STATUS(*source.Placement) - settings.Placement = &placement + placement := *source.Placement + placementTemp := genruntime.ToEnum(placement, diffDiskPlacement_STATUS_Values) + settings.Placement = &placementTemp } else { settings.Placement = nil } @@ -13033,6 +13320,13 @@ const ( InstanceViewStatus_Level_STATUS_Warning = InstanceViewStatus_Level_STATUS("Warning") ) +// Mapping from string to InstanceViewStatus_Level_STATUS +var instanceViewStatus_Level_STATUS_Values = map[string]InstanceViewStatus_Level_STATUS{ + "error": InstanceViewStatus_Level_STATUS_Error, + "info": InstanceViewStatus_Level_STATUS_Info, + "warning": InstanceViewStatus_Level_STATUS_Warning, +} + // Describes the properties of the last installed patch summary. type LastPatchInstallationSummary_STATUS struct { // Error: The errors that were encountered during execution of the operation. The details array contains the list of them. @@ -13212,8 +13506,9 @@ func (summary *LastPatchInstallationSummary_STATUS) AssignProperties_From_LastPa // Status if source.Status != nil { - status := LastPatchInstallationSummary_Status_STATUS(*source.Status) - summary.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, lastPatchInstallationSummary_Status_STATUS_Values) + summary.Status = &statusTemp } else { summary.Status = nil } @@ -13344,8 +13639,9 @@ func (settings *LinuxPatchSettings) AssignProperties_From_LinuxPatchSettings(sou // PatchMode if source.PatchMode != nil { - patchMode := LinuxPatchSettings_PatchMode(*source.PatchMode) - settings.PatchMode = &patchMode + patchMode := *source.PatchMode + patchModeTemp := genruntime.ToEnum(patchMode, linuxPatchSettings_PatchMode_Values) + settings.PatchMode = &patchModeTemp } else { settings.PatchMode = nil } @@ -13417,8 +13713,9 @@ func (settings *LinuxPatchSettings_STATUS) AssignProperties_From_LinuxPatchSetti // PatchMode if source.PatchMode != nil { - patchMode := LinuxPatchSettings_PatchMode_STATUS(*source.PatchMode) - settings.PatchMode = &patchMode + patchMode := *source.PatchMode + patchModeTemp := genruntime.ToEnum(patchMode, linuxPatchSettings_PatchMode_STATUS_Values) + settings.PatchMode = &patchModeTemp } else { settings.PatchMode = nil } @@ -13460,6 +13757,14 @@ const ( MaintenanceRedeployStatus_LastOperationResultCode_STATUS_RetryLater = MaintenanceRedeployStatus_LastOperationResultCode_STATUS("RetryLater") ) +// Mapping from string to MaintenanceRedeployStatus_LastOperationResultCode_STATUS +var maintenanceRedeployStatus_LastOperationResultCode_STATUS_Values = map[string]MaintenanceRedeployStatus_LastOperationResultCode_STATUS{ + "maintenanceaborted": MaintenanceRedeployStatus_LastOperationResultCode_STATUS_MaintenanceAborted, + "maintenancecompleted": MaintenanceRedeployStatus_LastOperationResultCode_STATUS_MaintenanceCompleted, + "none": MaintenanceRedeployStatus_LastOperationResultCode_STATUS_None, + "retrylater": MaintenanceRedeployStatus_LastOperationResultCode_STATUS_RetryLater, +} + // The parameters of a managed disk. type ManagedDiskParameters struct { // DiskEncryptionSet: Specifies the customer managed disk encryption set resource id for the managed disk. @@ -13571,8 +13876,9 @@ func (parameters *ManagedDiskParameters) AssignProperties_From_ManagedDiskParame // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType(*source.StorageAccountType) - parameters.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_Values) + parameters.StorageAccountType = &storageAccountTypeTemp } else { parameters.StorageAccountType = nil } @@ -13700,8 +14006,9 @@ func (parameters *ManagedDiskParameters_STATUS) AssignProperties_From_ManagedDis // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType_STATUS(*source.StorageAccountType) - parameters.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_STATUS_Values) + parameters.StorageAccountType = &storageAccountTypeTemp } else { parameters.StorageAccountType = nil } @@ -13757,6 +14064,12 @@ const ( OSDisk_OsType_Windows = OSDisk_OsType("Windows") ) +// Mapping from string to OSDisk_OsType +var oSDisk_OsType_Values = map[string]OSDisk_OsType{ + "linux": OSDisk_OsType_Linux, + "windows": OSDisk_OsType_Windows, +} + type OSDisk_OsType_STATUS string const ( @@ -13764,6 +14077,12 @@ const ( OSDisk_OsType_STATUS_Windows = OSDisk_OsType_STATUS("Windows") ) +// Mapping from string to OSDisk_OsType_STATUS +var oSDisk_OsType_STATUS_Values = map[string]OSDisk_OsType_STATUS{ + "linux": OSDisk_OsType_STATUS_Linux, + "windows": OSDisk_OsType_STATUS_Windows, +} + // Specifies settings related to VM Guest Patching on Windows. type PatchSettings struct { // EnableHotpatching: Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the @@ -13846,8 +14165,9 @@ func (settings *PatchSettings) AssignProperties_From_PatchSettings(source *v2020 // PatchMode if source.PatchMode != nil { - patchMode := PatchSettings_PatchMode(*source.PatchMode) - settings.PatchMode = &patchMode + patchMode := *source.PatchMode + patchModeTemp := genruntime.ToEnum(patchMode, patchSettings_PatchMode_Values) + settings.PatchMode = &patchModeTemp } else { settings.PatchMode = nil } @@ -13949,8 +14269,9 @@ func (settings *PatchSettings_STATUS) AssignProperties_From_PatchSettings_STATUS // PatchMode if source.PatchMode != nil { - patchMode := PatchSettings_PatchMode_STATUS(*source.PatchMode) - settings.PatchMode = &patchMode + patchMode := *source.PatchMode + patchModeTemp := genruntime.ToEnum(patchMode, patchSettings_PatchMode_STATUS_Values) + settings.PatchMode = &patchModeTemp } else { settings.PatchMode = nil } @@ -14842,19 +15163,39 @@ type AdditionalUnattendContent_ComponentName string const AdditionalUnattendContent_ComponentName_MicrosoftWindowsShellSetup = AdditionalUnattendContent_ComponentName("Microsoft-Windows-Shell-Setup") +// Mapping from string to AdditionalUnattendContent_ComponentName +var additionalUnattendContent_ComponentName_Values = map[string]AdditionalUnattendContent_ComponentName{ + "microsoft-windows-shell-setup": AdditionalUnattendContent_ComponentName_MicrosoftWindowsShellSetup, +} + type AdditionalUnattendContent_ComponentName_STATUS string const AdditionalUnattendContent_ComponentName_STATUS_MicrosoftWindowsShellSetup = AdditionalUnattendContent_ComponentName_STATUS("Microsoft-Windows-Shell-Setup") +// Mapping from string to AdditionalUnattendContent_ComponentName_STATUS +var additionalUnattendContent_ComponentName_STATUS_Values = map[string]AdditionalUnattendContent_ComponentName_STATUS{ + "microsoft-windows-shell-setup": AdditionalUnattendContent_ComponentName_STATUS_MicrosoftWindowsShellSetup, +} + // +kubebuilder:validation:Enum={"OobeSystem"} type AdditionalUnattendContent_PassName string const AdditionalUnattendContent_PassName_OobeSystem = AdditionalUnattendContent_PassName("OobeSystem") +// Mapping from string to AdditionalUnattendContent_PassName +var additionalUnattendContent_PassName_Values = map[string]AdditionalUnattendContent_PassName{ + "oobesystem": AdditionalUnattendContent_PassName_OobeSystem, +} + type AdditionalUnattendContent_PassName_STATUS string const AdditionalUnattendContent_PassName_STATUS_OobeSystem = AdditionalUnattendContent_PassName_STATUS("OobeSystem") +// Mapping from string to AdditionalUnattendContent_PassName_STATUS +var additionalUnattendContent_PassName_STATUS_Values = map[string]AdditionalUnattendContent_PassName_STATUS{ + "oobesystem": AdditionalUnattendContent_PassName_STATUS_OobeSystem, +} + // +kubebuilder:validation:Enum={"AutoLogon","FirstLogonCommands"} type AdditionalUnattendContent_SettingName string @@ -14863,6 +15204,12 @@ const ( AdditionalUnattendContent_SettingName_FirstLogonCommands = AdditionalUnattendContent_SettingName("FirstLogonCommands") ) +// Mapping from string to AdditionalUnattendContent_SettingName +var additionalUnattendContent_SettingName_Values = map[string]AdditionalUnattendContent_SettingName{ + "autologon": AdditionalUnattendContent_SettingName_AutoLogon, + "firstlogoncommands": AdditionalUnattendContent_SettingName_FirstLogonCommands, +} + type AdditionalUnattendContent_SettingName_STATUS string const ( @@ -14870,6 +15217,12 @@ const ( AdditionalUnattendContent_SettingName_STATUS_FirstLogonCommands = AdditionalUnattendContent_SettingName_STATUS("FirstLogonCommands") ) +// Mapping from string to AdditionalUnattendContent_SettingName_STATUS +var additionalUnattendContent_SettingName_STATUS_Values = map[string]AdditionalUnattendContent_SettingName_STATUS{ + "autologon": AdditionalUnattendContent_SettingName_STATUS_AutoLogon, + "firstlogoncommands": AdditionalUnattendContent_SettingName_STATUS_FirstLogonCommands, +} + // Api error. type ApiError_STATUS struct { // Code: The error code. @@ -15056,17 +15409,36 @@ const ( AvailablePatchSummary_Status_STATUS_Unknown = AvailablePatchSummary_Status_STATUS("Unknown") ) +// Mapping from string to AvailablePatchSummary_Status_STATUS +var availablePatchSummary_Status_STATUS_Values = map[string]AvailablePatchSummary_Status_STATUS{ + "completedwithwarnings": AvailablePatchSummary_Status_STATUS_CompletedWithWarnings, + "failed": AvailablePatchSummary_Status_STATUS_Failed, + "inprogress": AvailablePatchSummary_Status_STATUS_InProgress, + "succeeded": AvailablePatchSummary_Status_STATUS_Succeeded, + "unknown": AvailablePatchSummary_Status_STATUS_Unknown, +} + // Specifies the ephemeral disk option for operating system disk. // +kubebuilder:validation:Enum={"Local"} type DiffDiskOption string const DiffDiskOption_Local = DiffDiskOption("Local") +// Mapping from string to DiffDiskOption +var diffDiskOption_Values = map[string]DiffDiskOption{ + "local": DiffDiskOption_Local, +} + // Specifies the ephemeral disk option for operating system disk. type DiffDiskOption_STATUS string const DiffDiskOption_STATUS_Local = DiffDiskOption_STATUS("Local") +// Mapping from string to DiffDiskOption_STATUS +var diffDiskOption_STATUS_Values = map[string]DiffDiskOption_STATUS{ + "local": DiffDiskOption_STATUS_Local, +} + // Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to // choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information on // Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at @@ -15080,6 +15452,12 @@ const ( DiffDiskPlacement_ResourceDisk = DiffDiskPlacement("ResourceDisk") ) +// Mapping from string to DiffDiskPlacement +var diffDiskPlacement_Values = map[string]DiffDiskPlacement{ + "cachedisk": DiffDiskPlacement_CacheDisk, + "resourcedisk": DiffDiskPlacement_ResourceDisk, +} + // Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to // choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information on // Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at @@ -15092,6 +15470,12 @@ const ( DiffDiskPlacement_STATUS_ResourceDisk = DiffDiskPlacement_STATUS("ResourceDisk") ) +// Mapping from string to DiffDiskPlacement_STATUS +var diffDiskPlacement_STATUS_Values = map[string]DiffDiskPlacement_STATUS{ + "cachedisk": DiffDiskPlacement_STATUS_CacheDisk, + "resourcedisk": DiffDiskPlacement_STATUS_ResourceDisk, +} + // Describes a reference to Key Vault Key type KeyVaultKeyReference struct { // +kubebuilder:validation:Required @@ -15544,6 +15928,15 @@ const ( LastPatchInstallationSummary_Status_STATUS_Unknown = LastPatchInstallationSummary_Status_STATUS("Unknown") ) +// Mapping from string to LastPatchInstallationSummary_Status_STATUS +var lastPatchInstallationSummary_Status_STATUS_Values = map[string]LastPatchInstallationSummary_Status_STATUS{ + "completedwithwarnings": LastPatchInstallationSummary_Status_STATUS_CompletedWithWarnings, + "failed": LastPatchInstallationSummary_Status_STATUS_Failed, + "inprogress": LastPatchInstallationSummary_Status_STATUS_InProgress, + "succeeded": LastPatchInstallationSummary_Status_STATUS_Succeeded, + "unknown": LastPatchInstallationSummary_Status_STATUS_Unknown, +} + // +kubebuilder:validation:Enum={"AutomaticByPlatform","ImageDefault"} type LinuxPatchSettings_PatchMode string @@ -15552,6 +15945,12 @@ const ( LinuxPatchSettings_PatchMode_ImageDefault = LinuxPatchSettings_PatchMode("ImageDefault") ) +// Mapping from string to LinuxPatchSettings_PatchMode +var linuxPatchSettings_PatchMode_Values = map[string]LinuxPatchSettings_PatchMode{ + "automaticbyplatform": LinuxPatchSettings_PatchMode_AutomaticByPlatform, + "imagedefault": LinuxPatchSettings_PatchMode_ImageDefault, +} + type LinuxPatchSettings_PatchMode_STATUS string const ( @@ -15559,6 +15958,12 @@ const ( LinuxPatchSettings_PatchMode_STATUS_ImageDefault = LinuxPatchSettings_PatchMode_STATUS("ImageDefault") ) +// Mapping from string to LinuxPatchSettings_PatchMode_STATUS +var linuxPatchSettings_PatchMode_STATUS_Values = map[string]LinuxPatchSettings_PatchMode_STATUS{ + "automaticbyplatform": LinuxPatchSettings_PatchMode_STATUS_AutomaticByPlatform, + "imagedefault": LinuxPatchSettings_PatchMode_STATUS_ImageDefault, +} + // +kubebuilder:validation:Enum={"AutomaticByOS","AutomaticByPlatform","Manual"} type PatchSettings_PatchMode string @@ -15568,6 +15973,13 @@ const ( PatchSettings_PatchMode_Manual = PatchSettings_PatchMode("Manual") ) +// Mapping from string to PatchSettings_PatchMode +var patchSettings_PatchMode_Values = map[string]PatchSettings_PatchMode{ + "automaticbyos": PatchSettings_PatchMode_AutomaticByOS, + "automaticbyplatform": PatchSettings_PatchMode_AutomaticByPlatform, + "manual": PatchSettings_PatchMode_Manual, +} + type PatchSettings_PatchMode_STATUS string const ( @@ -15576,6 +15988,13 @@ const ( PatchSettings_PatchMode_STATUS_Manual = PatchSettings_PatchMode_STATUS("Manual") ) +// Mapping from string to PatchSettings_PatchMode_STATUS +var patchSettings_PatchMode_STATUS_Values = map[string]PatchSettings_PatchMode_STATUS{ + "automaticbyos": PatchSettings_PatchMode_STATUS_AutomaticByOS, + "automaticbyplatform": PatchSettings_PatchMode_STATUS_AutomaticByPlatform, + "manual": PatchSettings_PatchMode_STATUS_Manual, +} + // Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. type SshPublicKey_STATUS struct { // KeyData: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit @@ -15771,6 +16190,16 @@ const ( StorageAccountType_UltraSSD_LRS = StorageAccountType("UltraSSD_LRS") ) +// Mapping from string to StorageAccountType +var storageAccountType_Values = map[string]StorageAccountType{ + "premium_lrs": StorageAccountType_Premium_LRS, + "premium_zrs": StorageAccountType_Premium_ZRS, + "standardssd_lrs": StorageAccountType_StandardSSD_LRS, + "standardssd_zrs": StorageAccountType_StandardSSD_ZRS, + "standard_lrs": StorageAccountType_Standard_LRS, + "ultrassd_lrs": StorageAccountType_UltraSSD_LRS, +} + // Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks. It cannot // be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. // UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD @@ -15788,6 +16217,16 @@ const ( StorageAccountType_STATUS_UltraSSD_LRS = StorageAccountType_STATUS("UltraSSD_LRS") ) +// Mapping from string to StorageAccountType_STATUS +var storageAccountType_STATUS_Values = map[string]StorageAccountType_STATUS{ + "premium_lrs": StorageAccountType_STATUS_Premium_LRS, + "premium_zrs": StorageAccountType_STATUS_Premium_ZRS, + "standardssd_lrs": StorageAccountType_STATUS_StandardSSD_LRS, + "standardssd_zrs": StorageAccountType_STATUS_StandardSSD_ZRS, + "standard_lrs": StorageAccountType_STATUS_Standard_LRS, + "ultrassd_lrs": StorageAccountType_STATUS_UltraSSD_LRS, +} + // Describes Protocol and thumbprint of Windows Remote Management listener type WinRMListener struct { // CertificateUrl: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to @@ -15867,8 +16306,9 @@ func (listener *WinRMListener) AssignProperties_From_WinRMListener(source *v2020 // Protocol if source.Protocol != nil { - protocol := WinRMListener_Protocol(*source.Protocol) - listener.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, winRMListener_Protocol_Values) + listener.Protocol = &protocolTemp } else { listener.Protocol = nil } @@ -15962,8 +16402,9 @@ func (listener *WinRMListener_STATUS) AssignProperties_From_WinRMListener_STATUS // Protocol if source.Protocol != nil { - protocol := WinRMListener_Protocol_STATUS(*source.Protocol) - listener.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, winRMListener_Protocol_STATUS_Values) + listener.Protocol = &protocolTemp } else { listener.Protocol = nil } @@ -16170,6 +16611,12 @@ const ( WinRMListener_Protocol_Https = WinRMListener_Protocol("Https") ) +// Mapping from string to WinRMListener_Protocol +var winRMListener_Protocol_Values = map[string]WinRMListener_Protocol{ + "http": WinRMListener_Protocol_Http, + "https": WinRMListener_Protocol_Https, +} + type WinRMListener_Protocol_STATUS string const ( @@ -16177,6 +16624,12 @@ const ( WinRMListener_Protocol_STATUS_Https = WinRMListener_Protocol_STATUS("Https") ) +// Mapping from string to WinRMListener_Protocol_STATUS +var winRMListener_Protocol_STATUS_Values = map[string]WinRMListener_Protocol_STATUS{ + "http": WinRMListener_Protocol_STATUS_Http, + "https": WinRMListener_Protocol_STATUS_Https, +} + func init() { SchemeBuilder.Register(&VirtualMachine{}, &VirtualMachineList{}) } diff --git a/v2/api/compute/v1api20201201/virtual_machines_extension_types_gen.go b/v2/api/compute/v1api20201201/virtual_machines_extension_types_gen.go index 037b3283d5d..9242265b109 100644 --- a/v2/api/compute/v1api20201201/virtual_machines_extension_types_gen.go +++ b/v2/api/compute/v1api20201201/virtual_machines_extension_types_gen.go @@ -1774,8 +1774,9 @@ func (status *InstanceViewStatus) AssignProperties_From_InstanceViewStatus(sourc // Level if source.Level != nil { - level := InstanceViewStatus_Level(*source.Level) - status.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, instanceViewStatus_Level_Values) + status.Level = &levelTemp } else { status.Level = nil } @@ -1835,6 +1836,13 @@ const ( InstanceViewStatus_Level_Warning = InstanceViewStatus_Level("Warning") ) +// Mapping from string to InstanceViewStatus_Level +var instanceViewStatus_Level_Values = map[string]InstanceViewStatus_Level{ + "error": InstanceViewStatus_Level_Error, + "info": InstanceViewStatus_Level_Info, + "warning": InstanceViewStatus_Level_Warning, +} + func init() { SchemeBuilder.Register(&VirtualMachinesExtension{}, &VirtualMachinesExtensionList{}) } diff --git a/v2/api/compute/v1api20210701/image_spec_arm_types_gen.go b/v2/api/compute/v1api20210701/image_spec_arm_types_gen.go index 021e30a9e4c..0db9cfb02d6 100644 --- a/v2/api/compute/v1api20210701/image_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20210701/image_spec_arm_types_gen.go @@ -67,6 +67,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // Describes a storage profile. type ImageStorageProfile_ARM struct { // DataDisks: Specifies the parameters that are used to add a data disk to a virtual machine. diff --git a/v2/api/compute/v1api20210701/image_status_arm_types_gen.go b/v2/api/compute/v1api20210701/image_status_arm_types_gen.go index 60a7f24bdfd..d32de7c183e 100644 --- a/v2/api/compute/v1api20210701/image_status_arm_types_gen.go +++ b/v2/api/compute/v1api20210701/image_status_arm_types_gen.go @@ -60,6 +60,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // Describes a storage profile. type ImageStorageProfile_STATUS_ARM struct { // DataDisks: Specifies the parameters that are used to add a data disk to a virtual machine. diff --git a/v2/api/compute/v1api20210701/image_types_gen.go b/v2/api/compute/v1api20210701/image_types_gen.go index 9e12ddea05a..6e295ab986e 100644 --- a/v2/api/compute/v1api20210701/image_types_gen.go +++ b/v2/api/compute/v1api20210701/image_types_gen.go @@ -588,8 +588,9 @@ func (image *Image_Spec) AssignProperties_From_Image_Spec(source *v20210701s.Ima // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := HyperVGenerationType(*source.HyperVGeneration) - image.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, hyperVGenerationType_Values) + image.HyperVGeneration = &hyperVGenerationTemp } else { image.HyperVGeneration = nil } @@ -943,8 +944,9 @@ func (image *Image_STATUS) AssignProperties_From_Image_STATUS(source *v20210701s // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := HyperVGenerationType_STATUS(*source.HyperVGeneration) - image.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, hyperVGenerationType_STATUS_Values) + image.HyperVGeneration = &hyperVGenerationTemp } else { image.HyperVGeneration = nil } @@ -1144,8 +1146,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -1228,8 +1231,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -1274,6 +1278,12 @@ const ( HyperVGenerationType_V2 = HyperVGenerationType("V2") ) +// Mapping from string to HyperVGenerationType +var hyperVGenerationType_Values = map[string]HyperVGenerationType{ + "v1": HyperVGenerationType_V1, + "v2": HyperVGenerationType_V2, +} + // Specifies the HyperVGeneration Type type HyperVGenerationType_STATUS string @@ -1282,6 +1292,12 @@ const ( HyperVGenerationType_STATUS_V2 = HyperVGenerationType_STATUS("V2") ) +// Mapping from string to HyperVGenerationType_STATUS +var hyperVGenerationType_STATUS_Values = map[string]HyperVGenerationType_STATUS{ + "v1": HyperVGenerationType_STATUS_V1, + "v2": HyperVGenerationType_STATUS_V2, +} + // Describes a storage profile. type ImageStorageProfile struct { // DataDisks: Specifies the parameters that are used to add a data disk to a virtual machine. @@ -1974,8 +1990,9 @@ func (disk *ImageDataDisk) AssignProperties_From_ImageDataDisk(source *v20210701 // Caching if source.Caching != nil { - caching := ImageDataDisk_Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, imageDataDisk_Caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } @@ -2024,8 +2041,9 @@ func (disk *ImageDataDisk) AssignProperties_From_ImageDataDisk(source *v20210701 // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType(*source.StorageAccountType) - disk.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_Values) + disk.StorageAccountType = &storageAccountTypeTemp } else { disk.StorageAccountType = nil } @@ -2236,8 +2254,9 @@ func (disk *ImageDataDisk_STATUS) AssignProperties_From_ImageDataDisk_STATUS(sou // Caching if source.Caching != nil { - caching := ImageDataDisk_Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, imageDataDisk_Caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } @@ -2286,8 +2305,9 @@ func (disk *ImageDataDisk_STATUS) AssignProperties_From_ImageDataDisk_STATUS(sou // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType_STATUS(*source.StorageAccountType) - disk.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_STATUS_Values) + disk.StorageAccountType = &storageAccountTypeTemp } else { disk.StorageAccountType = nil } @@ -2587,8 +2607,9 @@ func (disk *ImageOSDisk) AssignProperties_From_ImageOSDisk(source *v20210701s.Im // Caching if source.Caching != nil { - caching := ImageOSDisk_Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, imageOSDisk_Caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } @@ -2622,16 +2643,18 @@ func (disk *ImageOSDisk) AssignProperties_From_ImageOSDisk(source *v20210701s.Im // OsState if source.OsState != nil { - osState := ImageOSDisk_OsState(*source.OsState) - disk.OsState = &osState + osState := *source.OsState + osStateTemp := genruntime.ToEnum(osState, imageOSDisk_OsState_Values) + disk.OsState = &osStateTemp } else { disk.OsState = nil } // OsType if source.OsType != nil { - osType := ImageOSDisk_OsType(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, imageOSDisk_OsType_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -2650,8 +2673,9 @@ func (disk *ImageOSDisk) AssignProperties_From_ImageOSDisk(source *v20210701s.Im // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType(*source.StorageAccountType) - disk.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_Values) + disk.StorageAccountType = &storageAccountTypeTemp } else { disk.StorageAccountType = nil } @@ -2887,8 +2911,9 @@ func (disk *ImageOSDisk_STATUS) AssignProperties_From_ImageOSDisk_STATUS(source // Caching if source.Caching != nil { - caching := ImageOSDisk_Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, imageOSDisk_Caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } @@ -2922,16 +2947,18 @@ func (disk *ImageOSDisk_STATUS) AssignProperties_From_ImageOSDisk_STATUS(source // OsState if source.OsState != nil { - osState := ImageOSDisk_OsState_STATUS(*source.OsState) - disk.OsState = &osState + osState := *source.OsState + osStateTemp := genruntime.ToEnum(osState, imageOSDisk_OsState_STATUS_Values) + disk.OsState = &osStateTemp } else { disk.OsState = nil } // OsType if source.OsType != nil { - osType := ImageOSDisk_OsType_STATUS(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, imageOSDisk_OsType_STATUS_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -2950,8 +2977,9 @@ func (disk *ImageOSDisk_STATUS) AssignProperties_From_ImageOSDisk_STATUS(source // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType_STATUS(*source.StorageAccountType) - disk.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_STATUS_Values) + disk.StorageAccountType = &storageAccountTypeTemp } else { disk.StorageAccountType = nil } @@ -3059,6 +3087,13 @@ const ( ImageDataDisk_Caching_ReadWrite = ImageDataDisk_Caching("ReadWrite") ) +// Mapping from string to ImageDataDisk_Caching +var imageDataDisk_Caching_Values = map[string]ImageDataDisk_Caching{ + "none": ImageDataDisk_Caching_None, + "readonly": ImageDataDisk_Caching_ReadOnly, + "readwrite": ImageDataDisk_Caching_ReadWrite, +} + type ImageDataDisk_Caching_STATUS string const ( @@ -3067,6 +3102,13 @@ const ( ImageDataDisk_Caching_STATUS_ReadWrite = ImageDataDisk_Caching_STATUS("ReadWrite") ) +// Mapping from string to ImageDataDisk_Caching_STATUS +var imageDataDisk_Caching_STATUS_Values = map[string]ImageDataDisk_Caching_STATUS{ + "none": ImageDataDisk_Caching_STATUS_None, + "readonly": ImageDataDisk_Caching_STATUS_ReadOnly, + "readwrite": ImageDataDisk_Caching_STATUS_ReadWrite, +} + // +kubebuilder:validation:Enum={"None","ReadOnly","ReadWrite"} type ImageOSDisk_Caching string @@ -3076,6 +3118,13 @@ const ( ImageOSDisk_Caching_ReadWrite = ImageOSDisk_Caching("ReadWrite") ) +// Mapping from string to ImageOSDisk_Caching +var imageOSDisk_Caching_Values = map[string]ImageOSDisk_Caching{ + "none": ImageOSDisk_Caching_None, + "readonly": ImageOSDisk_Caching_ReadOnly, + "readwrite": ImageOSDisk_Caching_ReadWrite, +} + type ImageOSDisk_Caching_STATUS string const ( @@ -3084,6 +3133,13 @@ const ( ImageOSDisk_Caching_STATUS_ReadWrite = ImageOSDisk_Caching_STATUS("ReadWrite") ) +// Mapping from string to ImageOSDisk_Caching_STATUS +var imageOSDisk_Caching_STATUS_Values = map[string]ImageOSDisk_Caching_STATUS{ + "none": ImageOSDisk_Caching_STATUS_None, + "readonly": ImageOSDisk_Caching_STATUS_ReadOnly, + "readwrite": ImageOSDisk_Caching_STATUS_ReadWrite, +} + // +kubebuilder:validation:Enum={"Generalized","Specialized"} type ImageOSDisk_OsState string @@ -3092,6 +3148,12 @@ const ( ImageOSDisk_OsState_Specialized = ImageOSDisk_OsState("Specialized") ) +// Mapping from string to ImageOSDisk_OsState +var imageOSDisk_OsState_Values = map[string]ImageOSDisk_OsState{ + "generalized": ImageOSDisk_OsState_Generalized, + "specialized": ImageOSDisk_OsState_Specialized, +} + type ImageOSDisk_OsState_STATUS string const ( @@ -3099,6 +3161,12 @@ const ( ImageOSDisk_OsState_STATUS_Specialized = ImageOSDisk_OsState_STATUS("Specialized") ) +// Mapping from string to ImageOSDisk_OsState_STATUS +var imageOSDisk_OsState_STATUS_Values = map[string]ImageOSDisk_OsState_STATUS{ + "generalized": ImageOSDisk_OsState_STATUS_Generalized, + "specialized": ImageOSDisk_OsState_STATUS_Specialized, +} + // +kubebuilder:validation:Enum={"Linux","Windows"} type ImageOSDisk_OsType string @@ -3107,6 +3175,12 @@ const ( ImageOSDisk_OsType_Windows = ImageOSDisk_OsType("Windows") ) +// Mapping from string to ImageOSDisk_OsType +var imageOSDisk_OsType_Values = map[string]ImageOSDisk_OsType{ + "linux": ImageOSDisk_OsType_Linux, + "windows": ImageOSDisk_OsType_Windows, +} + type ImageOSDisk_OsType_STATUS string const ( @@ -3114,6 +3188,12 @@ const ( ImageOSDisk_OsType_STATUS_Windows = ImageOSDisk_OsType_STATUS("Windows") ) +// Mapping from string to ImageOSDisk_OsType_STATUS +var imageOSDisk_OsType_STATUS_Values = map[string]ImageOSDisk_OsType_STATUS{ + "linux": ImageOSDisk_OsType_STATUS_Linux, + "windows": ImageOSDisk_OsType_STATUS_Windows, +} + // Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you // create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS // uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. @@ -3133,6 +3213,16 @@ const ( StorageAccountType_UltraSSD_LRS = StorageAccountType("UltraSSD_LRS") ) +// Mapping from string to StorageAccountType +var storageAccountType_Values = map[string]StorageAccountType{ + "premium_lrs": StorageAccountType_Premium_LRS, + "premium_zrs": StorageAccountType_Premium_ZRS, + "standardssd_lrs": StorageAccountType_StandardSSD_LRS, + "standardssd_zrs": StorageAccountType_StandardSSD_ZRS, + "standard_lrs": StorageAccountType_Standard_LRS, + "ultrassd_lrs": StorageAccountType_UltraSSD_LRS, +} + // Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you // create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS // uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. @@ -3151,6 +3241,16 @@ const ( StorageAccountType_STATUS_UltraSSD_LRS = StorageAccountType_STATUS("UltraSSD_LRS") ) +// Mapping from string to StorageAccountType_STATUS +var storageAccountType_STATUS_Values = map[string]StorageAccountType_STATUS{ + "premium_lrs": StorageAccountType_STATUS_Premium_LRS, + "premium_zrs": StorageAccountType_STATUS_Premium_ZRS, + "standardssd_lrs": StorageAccountType_STATUS_StandardSSD_LRS, + "standardssd_zrs": StorageAccountType_STATUS_StandardSSD_ZRS, + "standard_lrs": StorageAccountType_STATUS_Standard_LRS, + "ultrassd_lrs": StorageAccountType_STATUS_UltraSSD_LRS, +} + func init() { SchemeBuilder.Register(&Image{}, &ImageList{}) } diff --git a/v2/api/compute/v1api20220301/image_spec_arm_types_gen.go b/v2/api/compute/v1api20220301/image_spec_arm_types_gen.go index 1e072331789..a5d26d03264 100644 --- a/v2/api/compute/v1api20220301/image_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20220301/image_spec_arm_types_gen.go @@ -67,6 +67,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // Describes a storage profile. type ImageStorageProfile_ARM struct { // DataDisks: Specifies the parameters that are used to add a data disk to a virtual machine. diff --git a/v2/api/compute/v1api20220301/image_status_arm_types_gen.go b/v2/api/compute/v1api20220301/image_status_arm_types_gen.go index f7715545ac9..8e581455446 100644 --- a/v2/api/compute/v1api20220301/image_status_arm_types_gen.go +++ b/v2/api/compute/v1api20220301/image_status_arm_types_gen.go @@ -60,6 +60,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // Describes a storage profile. type ImageStorageProfile_STATUS_ARM struct { // DataDisks: Specifies the parameters that are used to add a data disk to a virtual machine. diff --git a/v2/api/compute/v1api20220301/image_types_gen.go b/v2/api/compute/v1api20220301/image_types_gen.go index 015449a7e7d..547d415e432 100644 --- a/v2/api/compute/v1api20220301/image_types_gen.go +++ b/v2/api/compute/v1api20220301/image_types_gen.go @@ -585,8 +585,9 @@ func (image *Image_Spec) AssignProperties_From_Image_Spec(source *v20220301s.Ima // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := HyperVGenerationType(*source.HyperVGeneration) - image.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, hyperVGenerationType_Values) + image.HyperVGeneration = &hyperVGenerationTemp } else { image.HyperVGeneration = nil } @@ -997,8 +998,9 @@ func (image *Image_STATUS) AssignProperties_From_Image_STATUS(source *v20220301s // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := HyperVGenerationType_STATUS(*source.HyperVGeneration) - image.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, hyperVGenerationType_STATUS_Values) + image.HyperVGeneration = &hyperVGenerationTemp } else { image.HyperVGeneration = nil } @@ -1198,8 +1200,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -1300,8 +1303,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -1346,6 +1350,12 @@ const ( HyperVGenerationType_V2 = HyperVGenerationType("V2") ) +// Mapping from string to HyperVGenerationType +var hyperVGenerationType_Values = map[string]HyperVGenerationType{ + "v1": HyperVGenerationType_V1, + "v2": HyperVGenerationType_V2, +} + // Specifies the HyperVGeneration Type type HyperVGenerationType_STATUS string @@ -1354,6 +1364,12 @@ const ( HyperVGenerationType_STATUS_V2 = HyperVGenerationType_STATUS("V2") ) +// Mapping from string to HyperVGenerationType_STATUS +var hyperVGenerationType_STATUS_Values = map[string]HyperVGenerationType_STATUS{ + "v1": HyperVGenerationType_STATUS_V1, + "v2": HyperVGenerationType_STATUS_V2, +} + // Describes a storage profile. type ImageStorageProfile struct { // DataDisks: Specifies the parameters that are used to add a data disk to a virtual machine. @@ -2106,8 +2122,9 @@ func (disk *ImageDataDisk) AssignProperties_From_ImageDataDisk(source *v20220301 // Caching if source.Caching != nil { - caching := ImageDataDisk_Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, imageDataDisk_Caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } @@ -2156,8 +2173,9 @@ func (disk *ImageDataDisk) AssignProperties_From_ImageDataDisk(source *v20220301 // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType(*source.StorageAccountType) - disk.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_Values) + disk.StorageAccountType = &storageAccountTypeTemp } else { disk.StorageAccountType = nil } @@ -2436,8 +2454,9 @@ func (disk *ImageDataDisk_STATUS) AssignProperties_From_ImageDataDisk_STATUS(sou // Caching if source.Caching != nil { - caching := ImageDataDisk_Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, imageDataDisk_Caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } @@ -2486,8 +2505,9 @@ func (disk *ImageDataDisk_STATUS) AssignProperties_From_ImageDataDisk_STATUS(sou // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType_STATUS(*source.StorageAccountType) - disk.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_STATUS_Values) + disk.StorageAccountType = &storageAccountTypeTemp } else { disk.StorageAccountType = nil } @@ -2787,8 +2807,9 @@ func (disk *ImageOSDisk) AssignProperties_From_ImageOSDisk(source *v20220301s.Im // Caching if source.Caching != nil { - caching := ImageOSDisk_Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, imageOSDisk_Caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } @@ -2822,16 +2843,18 @@ func (disk *ImageOSDisk) AssignProperties_From_ImageOSDisk(source *v20220301s.Im // OsState if source.OsState != nil { - osState := ImageOSDisk_OsState(*source.OsState) - disk.OsState = &osState + osState := *source.OsState + osStateTemp := genruntime.ToEnum(osState, imageOSDisk_OsState_Values) + disk.OsState = &osStateTemp } else { disk.OsState = nil } // OsType if source.OsType != nil { - osType := ImageOSDisk_OsType(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, imageOSDisk_OsType_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -2850,8 +2873,9 @@ func (disk *ImageOSDisk) AssignProperties_From_ImageOSDisk(source *v20220301s.Im // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType(*source.StorageAccountType) - disk.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_Values) + disk.StorageAccountType = &storageAccountTypeTemp } else { disk.StorageAccountType = nil } @@ -3168,8 +3192,9 @@ func (disk *ImageOSDisk_STATUS) AssignProperties_From_ImageOSDisk_STATUS(source // Caching if source.Caching != nil { - caching := ImageOSDisk_Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, imageOSDisk_Caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } @@ -3203,16 +3228,18 @@ func (disk *ImageOSDisk_STATUS) AssignProperties_From_ImageOSDisk_STATUS(source // OsState if source.OsState != nil { - osState := ImageOSDisk_OsState_STATUS(*source.OsState) - disk.OsState = &osState + osState := *source.OsState + osStateTemp := genruntime.ToEnum(osState, imageOSDisk_OsState_STATUS_Values) + disk.OsState = &osStateTemp } else { disk.OsState = nil } // OsType if source.OsType != nil { - osType := ImageOSDisk_OsType_STATUS(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, imageOSDisk_OsType_STATUS_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -3231,8 +3258,9 @@ func (disk *ImageOSDisk_STATUS) AssignProperties_From_ImageOSDisk_STATUS(source // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType_STATUS(*source.StorageAccountType) - disk.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_STATUS_Values) + disk.StorageAccountType = &storageAccountTypeTemp } else { disk.StorageAccountType = nil } @@ -3340,6 +3368,13 @@ const ( ImageDataDisk_Caching_ReadWrite = ImageDataDisk_Caching("ReadWrite") ) +// Mapping from string to ImageDataDisk_Caching +var imageDataDisk_Caching_Values = map[string]ImageDataDisk_Caching{ + "none": ImageDataDisk_Caching_None, + "readonly": ImageDataDisk_Caching_ReadOnly, + "readwrite": ImageDataDisk_Caching_ReadWrite, +} + type ImageDataDisk_Caching_STATUS string const ( @@ -3348,6 +3383,13 @@ const ( ImageDataDisk_Caching_STATUS_ReadWrite = ImageDataDisk_Caching_STATUS("ReadWrite") ) +// Mapping from string to ImageDataDisk_Caching_STATUS +var imageDataDisk_Caching_STATUS_Values = map[string]ImageDataDisk_Caching_STATUS{ + "none": ImageDataDisk_Caching_STATUS_None, + "readonly": ImageDataDisk_Caching_STATUS_ReadOnly, + "readwrite": ImageDataDisk_Caching_STATUS_ReadWrite, +} + // +kubebuilder:validation:Enum={"None","ReadOnly","ReadWrite"} type ImageOSDisk_Caching string @@ -3357,6 +3399,13 @@ const ( ImageOSDisk_Caching_ReadWrite = ImageOSDisk_Caching("ReadWrite") ) +// Mapping from string to ImageOSDisk_Caching +var imageOSDisk_Caching_Values = map[string]ImageOSDisk_Caching{ + "none": ImageOSDisk_Caching_None, + "readonly": ImageOSDisk_Caching_ReadOnly, + "readwrite": ImageOSDisk_Caching_ReadWrite, +} + type ImageOSDisk_Caching_STATUS string const ( @@ -3365,6 +3414,13 @@ const ( ImageOSDisk_Caching_STATUS_ReadWrite = ImageOSDisk_Caching_STATUS("ReadWrite") ) +// Mapping from string to ImageOSDisk_Caching_STATUS +var imageOSDisk_Caching_STATUS_Values = map[string]ImageOSDisk_Caching_STATUS{ + "none": ImageOSDisk_Caching_STATUS_None, + "readonly": ImageOSDisk_Caching_STATUS_ReadOnly, + "readwrite": ImageOSDisk_Caching_STATUS_ReadWrite, +} + // +kubebuilder:validation:Enum={"Generalized","Specialized"} type ImageOSDisk_OsState string @@ -3373,6 +3429,12 @@ const ( ImageOSDisk_OsState_Specialized = ImageOSDisk_OsState("Specialized") ) +// Mapping from string to ImageOSDisk_OsState +var imageOSDisk_OsState_Values = map[string]ImageOSDisk_OsState{ + "generalized": ImageOSDisk_OsState_Generalized, + "specialized": ImageOSDisk_OsState_Specialized, +} + type ImageOSDisk_OsState_STATUS string const ( @@ -3380,6 +3442,12 @@ const ( ImageOSDisk_OsState_STATUS_Specialized = ImageOSDisk_OsState_STATUS("Specialized") ) +// Mapping from string to ImageOSDisk_OsState_STATUS +var imageOSDisk_OsState_STATUS_Values = map[string]ImageOSDisk_OsState_STATUS{ + "generalized": ImageOSDisk_OsState_STATUS_Generalized, + "specialized": ImageOSDisk_OsState_STATUS_Specialized, +} + // +kubebuilder:validation:Enum={"Linux","Windows"} type ImageOSDisk_OsType string @@ -3388,6 +3456,12 @@ const ( ImageOSDisk_OsType_Windows = ImageOSDisk_OsType("Windows") ) +// Mapping from string to ImageOSDisk_OsType +var imageOSDisk_OsType_Values = map[string]ImageOSDisk_OsType{ + "linux": ImageOSDisk_OsType_Linux, + "windows": ImageOSDisk_OsType_Windows, +} + type ImageOSDisk_OsType_STATUS string const ( @@ -3395,6 +3469,12 @@ const ( ImageOSDisk_OsType_STATUS_Windows = ImageOSDisk_OsType_STATUS("Windows") ) +// Mapping from string to ImageOSDisk_OsType_STATUS +var imageOSDisk_OsType_STATUS_Values = map[string]ImageOSDisk_OsType_STATUS{ + "linux": ImageOSDisk_OsType_STATUS_Linux, + "windows": ImageOSDisk_OsType_STATUS_Windows, +} + // Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you // create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS // uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. @@ -3415,6 +3495,17 @@ const ( StorageAccountType_UltraSSD_LRS = StorageAccountType("UltraSSD_LRS") ) +// Mapping from string to StorageAccountType +var storageAccountType_Values = map[string]StorageAccountType{ + "premiumv2_lrs": StorageAccountType_PremiumV2_LRS, + "premium_lrs": StorageAccountType_Premium_LRS, + "premium_zrs": StorageAccountType_Premium_ZRS, + "standardssd_lrs": StorageAccountType_StandardSSD_LRS, + "standardssd_zrs": StorageAccountType_StandardSSD_ZRS, + "standard_lrs": StorageAccountType_Standard_LRS, + "ultrassd_lrs": StorageAccountType_UltraSSD_LRS, +} + // Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you // create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS // uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. @@ -3434,6 +3525,17 @@ const ( StorageAccountType_STATUS_UltraSSD_LRS = StorageAccountType_STATUS("UltraSSD_LRS") ) +// Mapping from string to StorageAccountType_STATUS +var storageAccountType_STATUS_Values = map[string]StorageAccountType_STATUS{ + "premiumv2_lrs": StorageAccountType_STATUS_PremiumV2_LRS, + "premium_lrs": StorageAccountType_STATUS_Premium_LRS, + "premium_zrs": StorageAccountType_STATUS_Premium_ZRS, + "standardssd_lrs": StorageAccountType_STATUS_StandardSSD_LRS, + "standardssd_zrs": StorageAccountType_STATUS_StandardSSD_ZRS, + "standard_lrs": StorageAccountType_STATUS_Standard_LRS, + "ultrassd_lrs": StorageAccountType_STATUS_UltraSSD_LRS, +} + func init() { SchemeBuilder.Register(&Image{}, &ImageList{}) } diff --git a/v2/api/compute/v1api20220301/virtual_machine_scale_set_spec_arm_types_gen.go b/v2/api/compute/v1api20220301/virtual_machine_scale_set_spec_arm_types_gen.go index 8bcb71c9d67..f5b6e9dd98a 100644 --- a/v2/api/compute/v1api20220301/virtual_machine_scale_set_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20220301/virtual_machine_scale_set_spec_arm_types_gen.go @@ -244,6 +244,14 @@ const ( VirtualMachineScaleSetIdentity_Type_UserAssigned = VirtualMachineScaleSetIdentity_Type("UserAssigned") ) +// Mapping from string to VirtualMachineScaleSetIdentity_Type +var virtualMachineScaleSetIdentity_Type_Values = map[string]VirtualMachineScaleSetIdentity_Type{ + "none": VirtualMachineScaleSetIdentity_Type_None, + "systemassigned": VirtualMachineScaleSetIdentity_Type_SystemAssigned, + "systemassigned, userassigned": VirtualMachineScaleSetIdentity_Type_SystemAssignedUserAssigned, + "userassigned": VirtualMachineScaleSetIdentity_Type_UserAssigned, +} + // Describes a virtual machine scale set virtual machine profile. type VirtualMachineScaleSetVMProfile_ARM struct { // ApplicationProfile: Specifies the gallery applications that should be made available to the VM/VMSS diff --git a/v2/api/compute/v1api20220301/virtual_machine_scale_set_status_arm_types_gen.go b/v2/api/compute/v1api20220301/virtual_machine_scale_set_status_arm_types_gen.go index 5c815804339..cbacb495ab9 100644 --- a/v2/api/compute/v1api20220301/virtual_machine_scale_set_status_arm_types_gen.go +++ b/v2/api/compute/v1api20220301/virtual_machine_scale_set_status_arm_types_gen.go @@ -251,6 +251,14 @@ const ( VirtualMachineScaleSetIdentity_Type_STATUS_UserAssigned = VirtualMachineScaleSetIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to VirtualMachineScaleSetIdentity_Type_STATUS +var virtualMachineScaleSetIdentity_Type_STATUS_Values = map[string]VirtualMachineScaleSetIdentity_Type_STATUS{ + "none": VirtualMachineScaleSetIdentity_Type_STATUS_None, + "systemassigned": VirtualMachineScaleSetIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": VirtualMachineScaleSetIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": VirtualMachineScaleSetIdentity_Type_STATUS_UserAssigned, +} + type VirtualMachineScaleSetIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/compute/v1api20220301/virtual_machine_scale_set_types_gen.go b/v2/api/compute/v1api20220301/virtual_machine_scale_set_types_gen.go index 12c8f2b8e4f..4cd82ddecdc 100644 --- a/v2/api/compute/v1api20220301/virtual_machine_scale_set_types_gen.go +++ b/v2/api/compute/v1api20220301/virtual_machine_scale_set_types_gen.go @@ -977,8 +977,9 @@ func (scaleSet *VirtualMachineScaleSet_Spec) AssignProperties_From_VirtualMachin // OrchestrationMode if source.OrchestrationMode != nil { - orchestrationMode := OrchestrationMode(*source.OrchestrationMode) - scaleSet.OrchestrationMode = &orchestrationMode + orchestrationMode := *source.OrchestrationMode + orchestrationModeTemp := genruntime.ToEnum(orchestrationMode, orchestrationMode_Values) + scaleSet.OrchestrationMode = &orchestrationModeTemp } else { scaleSet.OrchestrationMode = nil } @@ -2082,8 +2083,9 @@ func (scaleSet *VirtualMachineScaleSet_STATUS) AssignProperties_From_VirtualMach // OrchestrationMode if source.OrchestrationMode != nil { - orchestrationMode := OrchestrationMode_STATUS(*source.OrchestrationMode) - scaleSet.OrchestrationMode = &orchestrationMode + orchestrationMode := *source.OrchestrationMode + orchestrationModeTemp := genruntime.ToEnum(orchestrationMode, orchestrationMode_STATUS_Values) + scaleSet.OrchestrationMode = &orchestrationModeTemp } else { scaleSet.OrchestrationMode = nil } @@ -2550,8 +2552,9 @@ func (policy *AutomaticRepairsPolicy) AssignProperties_From_AutomaticRepairsPoli // RepairAction if source.RepairAction != nil { - repairAction := AutomaticRepairsPolicy_RepairAction(*source.RepairAction) - policy.RepairAction = &repairAction + repairAction := *source.RepairAction + repairActionTemp := genruntime.ToEnum(repairAction, automaticRepairsPolicy_RepairAction_Values) + policy.RepairAction = &repairActionTemp } else { policy.RepairAction = nil } @@ -2690,8 +2693,9 @@ func (policy *AutomaticRepairsPolicy_STATUS) AssignProperties_From_AutomaticRepa // RepairAction if source.RepairAction != nil { - repairAction := AutomaticRepairsPolicy_RepairAction_STATUS(*source.RepairAction) - policy.RepairAction = &repairAction + repairAction := *source.RepairAction + repairActionTemp := genruntime.ToEnum(repairAction, automaticRepairsPolicy_RepairAction_STATUS_Values) + policy.RepairAction = &repairActionTemp } else { policy.RepairAction = nil } @@ -2744,6 +2748,12 @@ const ( OrchestrationMode_Uniform = OrchestrationMode("Uniform") ) +// Mapping from string to OrchestrationMode +var orchestrationMode_Values = map[string]OrchestrationMode{ + "flexible": OrchestrationMode_Flexible, + "uniform": OrchestrationMode_Uniform, +} + // Specifies the orchestration mode for the virtual machine scale set. type OrchestrationMode_STATUS string @@ -2752,6 +2762,12 @@ const ( OrchestrationMode_STATUS_Uniform = OrchestrationMode_STATUS("Uniform") ) +// Mapping from string to OrchestrationMode_STATUS +var orchestrationMode_STATUS_Values = map[string]OrchestrationMode_STATUS{ + "flexible": OrchestrationMode_STATUS_Flexible, + "uniform": OrchestrationMode_STATUS_Uniform, +} + // Describes a scale-in policy for a virtual machine scale set. type ScaleInPolicy struct { // ForceDeletion: This property allows you to specify if virtual machines chosen for removal have to be force deleted when @@ -2838,7 +2854,7 @@ func (policy *ScaleInPolicy) AssignProperties_From_ScaleInPolicy(source *v202203 for ruleIndex, ruleItem := range source.Rules { // Shadow the loop variable to avoid aliasing ruleItem := ruleItem - ruleList[ruleIndex] = ScaleInPolicy_Rules(ruleItem) + ruleList[ruleIndex] = genruntime.ToEnum(ruleItem, scaleInPolicy_Rules_Values) } policy.Rules = ruleList } else { @@ -2981,7 +2997,7 @@ func (policy *ScaleInPolicy_STATUS) AssignProperties_From_ScaleInPolicy_STATUS(s for ruleIndex, ruleItem := range source.Rules { // Shadow the loop variable to avoid aliasing ruleItem := ruleItem - ruleList[ruleIndex] = ScaleInPolicy_Rules_STATUS(ruleItem) + ruleList[ruleIndex] = genruntime.ToEnum(ruleItem, scaleInPolicy_Rules_STATUS_Values) } policy.Rules = ruleList } else { @@ -3589,8 +3605,9 @@ func (policy *UpgradePolicy) AssignProperties_From_UpgradePolicy(source *v202203 // Mode if source.Mode != nil { - mode := UpgradePolicy_Mode(*source.Mode) - policy.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, upgradePolicy_Mode_Values) + policy.Mode = &modeTemp } else { policy.Mode = nil } @@ -3777,8 +3794,9 @@ func (policy *UpgradePolicy_STATUS) AssignProperties_From_UpgradePolicy_STATUS(s // Mode if source.Mode != nil { - mode := UpgradePolicy_Mode_STATUS(*source.Mode) - policy.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, upgradePolicy_Mode_STATUS_Values) + policy.Mode = &modeTemp } else { policy.Mode = nil } @@ -3917,8 +3935,9 @@ func (identity *VirtualMachineScaleSetIdentity) AssignProperties_From_VirtualMac // Type if source.Type != nil { - typeVar := VirtualMachineScaleSetIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, virtualMachineScaleSetIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -4095,8 +4114,9 @@ func (identity *VirtualMachineScaleSetIdentity_STATUS) AssignProperties_From_Vir // Type if source.Type != nil { - typeVar := VirtualMachineScaleSetIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, virtualMachineScaleSetIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -4599,8 +4619,9 @@ func (profile *VirtualMachineScaleSetVMProfile) AssignProperties_From_VirtualMac // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := EvictionPolicy(*source.EvictionPolicy) - profile.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, evictionPolicy_Values) + profile.EvictionPolicy = &evictionPolicyTemp } else { profile.EvictionPolicy = nil } @@ -4658,8 +4679,9 @@ func (profile *VirtualMachineScaleSetVMProfile) AssignProperties_From_VirtualMac // Priority if source.Priority != nil { - priority := Priority(*source.Priority) - profile.Priority = &priority + priority := *source.Priority + priorityTemp := genruntime.ToEnum(priority, priority_Values) + profile.Priority = &priorityTemp } else { profile.Priority = nil } @@ -5323,8 +5345,9 @@ func (profile *VirtualMachineScaleSetVMProfile_STATUS) AssignProperties_From_Vir // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := EvictionPolicy_STATUS(*source.EvictionPolicy) - profile.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, evictionPolicy_STATUS_Values) + profile.EvictionPolicy = &evictionPolicyTemp } else { profile.EvictionPolicy = nil } @@ -5382,8 +5405,9 @@ func (profile *VirtualMachineScaleSetVMProfile_STATUS) AssignProperties_From_Vir // Priority if source.Priority != nil { - priority := Priority_STATUS(*source.Priority) - profile.Priority = &priority + priority := *source.Priority + priorityTemp := genruntime.ToEnum(priority, priority_STATUS_Values) + profile.Priority = &priorityTemp } else { profile.Priority = nil } @@ -5916,6 +5940,13 @@ const ( AutomaticRepairsPolicy_RepairAction_Restart = AutomaticRepairsPolicy_RepairAction("Restart") ) +// Mapping from string to AutomaticRepairsPolicy_RepairAction +var automaticRepairsPolicy_RepairAction_Values = map[string]AutomaticRepairsPolicy_RepairAction{ + "reimage": AutomaticRepairsPolicy_RepairAction_Reimage, + "replace": AutomaticRepairsPolicy_RepairAction_Replace, + "restart": AutomaticRepairsPolicy_RepairAction_Restart, +} + type AutomaticRepairsPolicy_RepairAction_STATUS string const ( @@ -5924,6 +5955,13 @@ const ( AutomaticRepairsPolicy_RepairAction_STATUS_Restart = AutomaticRepairsPolicy_RepairAction_STATUS("Restart") ) +// Mapping from string to AutomaticRepairsPolicy_RepairAction_STATUS +var automaticRepairsPolicy_RepairAction_STATUS_Values = map[string]AutomaticRepairsPolicy_RepairAction_STATUS{ + "reimage": AutomaticRepairsPolicy_RepairAction_STATUS_Reimage, + "replace": AutomaticRepairsPolicy_RepairAction_STATUS_Replace, + "restart": AutomaticRepairsPolicy_RepairAction_STATUS_Restart, +} + // The configuration parameters used while performing a rolling upgrade. type RollingUpgradePolicy struct { // EnableCrossZoneUpgrade: Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration @@ -6390,6 +6428,13 @@ const ( ScaleInPolicy_Rules_OldestVM = ScaleInPolicy_Rules("OldestVM") ) +// Mapping from string to ScaleInPolicy_Rules +var scaleInPolicy_Rules_Values = map[string]ScaleInPolicy_Rules{ + "default": ScaleInPolicy_Rules_Default, + "newestvm": ScaleInPolicy_Rules_NewestVM, + "oldestvm": ScaleInPolicy_Rules_OldestVM, +} + type ScaleInPolicy_Rules_STATUS string const ( @@ -6398,6 +6443,13 @@ const ( ScaleInPolicy_Rules_STATUS_OldestVM = ScaleInPolicy_Rules_STATUS("OldestVM") ) +// Mapping from string to ScaleInPolicy_Rules_STATUS +var scaleInPolicy_Rules_STATUS_Values = map[string]ScaleInPolicy_Rules_STATUS{ + "default": ScaleInPolicy_Rules_STATUS_Default, + "newestvm": ScaleInPolicy_Rules_STATUS_NewestVM, + "oldestvm": ScaleInPolicy_Rules_STATUS_OldestVM, +} + // +kubebuilder:validation:Enum={"Automatic","Manual","Rolling"} type UpgradePolicy_Mode string @@ -6407,6 +6459,13 @@ const ( UpgradePolicy_Mode_Rolling = UpgradePolicy_Mode("Rolling") ) +// Mapping from string to UpgradePolicy_Mode +var upgradePolicy_Mode_Values = map[string]UpgradePolicy_Mode{ + "automatic": UpgradePolicy_Mode_Automatic, + "manual": UpgradePolicy_Mode_Manual, + "rolling": UpgradePolicy_Mode_Rolling, +} + type UpgradePolicy_Mode_STATUS string const ( @@ -6415,6 +6474,13 @@ const ( UpgradePolicy_Mode_STATUS_Rolling = UpgradePolicy_Mode_STATUS("Rolling") ) +// Mapping from string to UpgradePolicy_Mode_STATUS +var upgradePolicy_Mode_STATUS_Values = map[string]UpgradePolicy_Mode_STATUS{ + "automatic": UpgradePolicy_Mode_STATUS_Automatic, + "manual": UpgradePolicy_Mode_STATUS_Manual, + "rolling": UpgradePolicy_Mode_STATUS_Rolling, +} + // Describes a virtual machine scale set extension profile. type VirtualMachineScaleSetExtensionProfile struct { // Extensions: The virtual machine scale set child extension resources. @@ -7079,8 +7145,9 @@ func (profile *VirtualMachineScaleSetNetworkProfile) AssignProperties_From_Virtu // NetworkApiVersion if source.NetworkApiVersion != nil { - networkApiVersion := VirtualMachineScaleSetNetworkProfile_NetworkApiVersion(*source.NetworkApiVersion) - profile.NetworkApiVersion = &networkApiVersion + networkApiVersion := *source.NetworkApiVersion + networkApiVersionTemp := genruntime.ToEnum(networkApiVersion, virtualMachineScaleSetNetworkProfile_NetworkApiVersion_Values) + profile.NetworkApiVersion = &networkApiVersionTemp } else { profile.NetworkApiVersion = nil } @@ -7283,8 +7350,9 @@ func (profile *VirtualMachineScaleSetNetworkProfile_STATUS) AssignProperties_Fro // NetworkApiVersion if source.NetworkApiVersion != nil { - networkApiVersion := VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS(*source.NetworkApiVersion) - profile.NetworkApiVersion = &networkApiVersion + networkApiVersion := *source.NetworkApiVersion + networkApiVersionTemp := genruntime.ToEnum(networkApiVersion, virtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS_Values) + profile.NetworkApiVersion = &networkApiVersionTemp } else { profile.NetworkApiVersion = nil } @@ -8857,24 +8925,27 @@ func (disk *VirtualMachineScaleSetDataDisk) AssignProperties_From_VirtualMachine // Caching if source.Caching != nil { - caching := Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DeleteOption if source.DeleteOption != nil { - deleteOption := DeleteOption(*source.DeleteOption) - disk.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, deleteOption_Values) + disk.DeleteOption = &deleteOptionTemp } else { disk.DeleteOption = nil } @@ -9195,24 +9266,27 @@ func (disk *VirtualMachineScaleSetDataDisk_STATUS) AssignProperties_From_Virtual // Caching if source.Caching != nil { - caching := Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption_STATUS(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_STATUS_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DeleteOption if source.DeleteOption != nil { - deleteOption := DeleteOption_STATUS(*source.DeleteOption) - disk.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, deleteOption_STATUS_Values) + disk.DeleteOption = &deleteOptionTemp } else { disk.DeleteOption = nil } @@ -10429,8 +10503,9 @@ func (configuration *VirtualMachineScaleSetNetworkConfiguration) AssignPropertie // DeleteOption if source.DeleteOption != nil { - deleteOption := VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption(*source.DeleteOption) - configuration.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, virtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_Values) + configuration.DeleteOption = &deleteOptionTemp } else { configuration.DeleteOption = nil } @@ -10887,8 +10962,9 @@ func (configuration *VirtualMachineScaleSetNetworkConfiguration_STATUS) AssignPr // DeleteOption if source.DeleteOption != nil { - deleteOption := VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS(*source.DeleteOption) - configuration.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, virtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS_Values) + configuration.DeleteOption = &deleteOptionTemp } else { configuration.DeleteOption = nil } @@ -11086,10 +11162,20 @@ type VirtualMachineScaleSetNetworkProfile_NetworkApiVersion string const VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_20201101 = VirtualMachineScaleSetNetworkProfile_NetworkApiVersion("2020-11-01") +// Mapping from string to VirtualMachineScaleSetNetworkProfile_NetworkApiVersion +var virtualMachineScaleSetNetworkProfile_NetworkApiVersion_Values = map[string]VirtualMachineScaleSetNetworkProfile_NetworkApiVersion{ + "2020-11-01": VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_20201101, +} + type VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS string const VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS_20201101 = VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS("2020-11-01") +// Mapping from string to VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS +var virtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS_Values = map[string]VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS{ + "2020-11-01": VirtualMachineScaleSetNetworkProfile_NetworkApiVersion_STATUS_20201101, +} + // Describes a virtual machine scale set operating system disk. type VirtualMachineScaleSetOSDisk struct { // Caching: Specifies the caching requirements. @@ -11337,24 +11423,27 @@ func (disk *VirtualMachineScaleSetOSDisk) AssignProperties_From_VirtualMachineSc // Caching if source.Caching != nil { - caching := Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DeleteOption if source.DeleteOption != nil { - deleteOption := DeleteOption(*source.DeleteOption) - disk.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, deleteOption_Values) + disk.DeleteOption = &deleteOptionTemp } else { disk.DeleteOption = nil } @@ -11403,8 +11492,9 @@ func (disk *VirtualMachineScaleSetOSDisk) AssignProperties_From_VirtualMachineSc // OsType if source.OsType != nil { - osType := VirtualMachineScaleSetOSDisk_OsType(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, virtualMachineScaleSetOSDisk_OsType_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -11777,24 +11867,27 @@ func (disk *VirtualMachineScaleSetOSDisk_STATUS) AssignProperties_From_VirtualMa // Caching if source.Caching != nil { - caching := Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption_STATUS(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_STATUS_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DeleteOption if source.DeleteOption != nil { - deleteOption := DeleteOption_STATUS(*source.DeleteOption) - disk.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, deleteOption_STATUS_Values) + disk.DeleteOption = &deleteOptionTemp } else { disk.DeleteOption = nil } @@ -11843,8 +11936,9 @@ func (disk *VirtualMachineScaleSetOSDisk_STATUS) AssignProperties_From_VirtualMa // OsType if source.OsType != nil { - osType := VirtualMachineScaleSetOSDisk_OsType_STATUS(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, virtualMachineScaleSetOSDisk_OsType_STATUS_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -12307,8 +12401,9 @@ func (configuration *VirtualMachineScaleSetIPConfiguration) AssignProperties_Fro // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion(*source.PrivateIPAddressVersion) - configuration.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, virtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_Values) + configuration.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { configuration.PrivateIPAddressVersion = nil } @@ -12877,8 +12972,9 @@ func (configuration *VirtualMachineScaleSetIPConfiguration_STATUS) AssignPropert // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS(*source.PrivateIPAddressVersion) - configuration.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, virtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_Values) + configuration.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { configuration.PrivateIPAddressVersion = nil } @@ -13168,8 +13264,9 @@ func (parameters *VirtualMachineScaleSetManagedDiskParameters) AssignProperties_ // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType(*source.StorageAccountType) - parameters.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_Values) + parameters.StorageAccountType = &storageAccountTypeTemp } else { parameters.StorageAccountType = nil } @@ -13353,8 +13450,9 @@ func (parameters *VirtualMachineScaleSetManagedDiskParameters_STATUS) AssignProp // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType_STATUS(*source.StorageAccountType) - parameters.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_STATUS_Values) + parameters.StorageAccountType = &storageAccountTypeTemp } else { parameters.StorageAccountType = nil } @@ -13559,6 +13657,12 @@ const ( VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_Detach = VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption("Detach") ) +// Mapping from string to VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption +var virtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_Values = map[string]VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption{ + "delete": VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_Delete, + "detach": VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_Detach, +} + type VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS string const ( @@ -13566,6 +13670,12 @@ const ( VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS_Detach = VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS("Detach") ) +// Mapping from string to VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS +var virtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS_Values = map[string]VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS{ + "delete": VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS_Delete, + "detach": VirtualMachineScaleSetNetworkConfigurationProperties_DeleteOption_STATUS_Detach, +} + // +kubebuilder:validation:Enum={"Linux","Windows"} type VirtualMachineScaleSetOSDisk_OsType string @@ -13574,6 +13684,12 @@ const ( VirtualMachineScaleSetOSDisk_OsType_Windows = VirtualMachineScaleSetOSDisk_OsType("Windows") ) +// Mapping from string to VirtualMachineScaleSetOSDisk_OsType +var virtualMachineScaleSetOSDisk_OsType_Values = map[string]VirtualMachineScaleSetOSDisk_OsType{ + "linux": VirtualMachineScaleSetOSDisk_OsType_Linux, + "windows": VirtualMachineScaleSetOSDisk_OsType_Windows, +} + type VirtualMachineScaleSetOSDisk_OsType_STATUS string const ( @@ -13581,6 +13697,12 @@ const ( VirtualMachineScaleSetOSDisk_OsType_STATUS_Windows = VirtualMachineScaleSetOSDisk_OsType_STATUS("Windows") ) +// Mapping from string to VirtualMachineScaleSetOSDisk_OsType_STATUS +var virtualMachineScaleSetOSDisk_OsType_STATUS_Values = map[string]VirtualMachineScaleSetOSDisk_OsType_STATUS{ + "linux": VirtualMachineScaleSetOSDisk_OsType_STATUS_Linux, + "windows": VirtualMachineScaleSetOSDisk_OsType_STATUS_Windows, +} + // +kubebuilder:validation:Enum={"IPv4","IPv6"} type VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion string @@ -13589,6 +13711,12 @@ const ( VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_IPv6 = VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion("IPv6") ) +// Mapping from string to VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion +var virtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_Values = map[string]VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion{ + "ipv4": VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_IPv4, + "ipv6": VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_IPv6, +} + type VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS string const ( @@ -13596,6 +13724,12 @@ const ( VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv6 = VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS("IPv6") ) +// Mapping from string to VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS +var virtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_Values = map[string]VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS{ + "ipv4": VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv4, + "ipv6": VirtualMachineScaleSetIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv6, +} + // Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration type VirtualMachineScaleSetPublicIPAddressConfiguration struct { // DeleteOption: Specify what happens to the public IP when the VM is deleted @@ -13803,8 +13937,9 @@ func (configuration *VirtualMachineScaleSetPublicIPAddressConfiguration) AssignP // DeleteOption if source.DeleteOption != nil { - deleteOption := VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption(*source.DeleteOption) - configuration.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, virtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_Values) + configuration.DeleteOption = &deleteOptionTemp } else { configuration.DeleteOption = nil } @@ -13847,8 +13982,9 @@ func (configuration *VirtualMachineScaleSetPublicIPAddressConfiguration) AssignP // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion(*source.PublicIPAddressVersion) - configuration.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, virtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_Values) + configuration.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { configuration.PublicIPAddressVersion = nil } @@ -14192,8 +14328,9 @@ func (configuration *VirtualMachineScaleSetPublicIPAddressConfiguration_STATUS) // DeleteOption if source.DeleteOption != nil { - deleteOption := VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS(*source.DeleteOption) - configuration.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, virtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS_Values) + configuration.DeleteOption = &deleteOptionTemp } else { configuration.DeleteOption = nil } @@ -14236,8 +14373,9 @@ func (configuration *VirtualMachineScaleSetPublicIPAddressConfiguration_STATUS) // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS(*source.PublicIPAddressVersion) - configuration.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, virtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_Values) + configuration.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { configuration.PublicIPAddressVersion = nil } @@ -14698,6 +14836,12 @@ const ( VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_Detach = VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption("Detach") ) +// Mapping from string to VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption +var virtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_Values = map[string]VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption{ + "delete": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_Delete, + "detach": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_Detach, +} + type VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS string const ( @@ -14705,6 +14849,12 @@ const ( VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS_Detach = VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS("Detach") ) +// Mapping from string to VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS +var virtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS_Values = map[string]VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS{ + "delete": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS_Delete, + "detach": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_DeleteOption_STATUS_Detach, +} + // +kubebuilder:validation:Enum={"IPv4","IPv6"} type VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion string @@ -14713,6 +14863,12 @@ const ( VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv6 = VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion("IPv6") ) +// Mapping from string to VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion +var virtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_Values = map[string]VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion{ + "ipv4": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv4, + "ipv6": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv6, +} + type VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS string const ( @@ -14720,6 +14876,12 @@ const ( VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv6 = VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS("IPv6") ) +// Mapping from string to VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS +var virtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_Values = map[string]VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS{ + "ipv4": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv4, + "ipv6": VirtualMachineScaleSetPublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv6, +} + func init() { SchemeBuilder.Register(&VirtualMachineScaleSet{}, &VirtualMachineScaleSetList{}) } diff --git a/v2/api/compute/v1api20220301/virtual_machine_spec_arm_types_gen.go b/v2/api/compute/v1api20220301/virtual_machine_spec_arm_types_gen.go index 5030a5fd011..3f8e717fc74 100644 --- a/v2/api/compute/v1api20220301/virtual_machine_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20220301/virtual_machine_spec_arm_types_gen.go @@ -377,6 +377,14 @@ const ( VirtualMachineIdentity_Type_UserAssigned = VirtualMachineIdentity_Type("UserAssigned") ) +// Mapping from string to VirtualMachineIdentity_Type +var virtualMachineIdentity_Type_Values = map[string]VirtualMachineIdentity_Type{ + "none": VirtualMachineIdentity_Type_None, + "systemassigned": VirtualMachineIdentity_Type_SystemAssigned, + "systemassigned, userassigned": VirtualMachineIdentity_Type_SystemAssignedUserAssigned, + "userassigned": VirtualMachineIdentity_Type_UserAssigned, +} + // Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. // You can easily view the output of your console log. // Azure also enables you to see a screenshot of the diff --git a/v2/api/compute/v1api20220301/virtual_machine_status_arm_types_gen.go b/v2/api/compute/v1api20220301/virtual_machine_status_arm_types_gen.go index ec8e390ca1a..b3c7cf195e7 100644 --- a/v2/api/compute/v1api20220301/virtual_machine_status_arm_types_gen.go +++ b/v2/api/compute/v1api20220301/virtual_machine_status_arm_types_gen.go @@ -398,6 +398,14 @@ const ( VirtualMachineIdentity_Type_STATUS_UserAssigned = VirtualMachineIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to VirtualMachineIdentity_Type_STATUS +var virtualMachineIdentity_Type_STATUS_Values = map[string]VirtualMachineIdentity_Type_STATUS{ + "none": VirtualMachineIdentity_Type_STATUS_None, + "systemassigned": VirtualMachineIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": VirtualMachineIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": VirtualMachineIdentity_Type_STATUS_UserAssigned, +} + type VirtualMachineIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/compute/v1api20220301/virtual_machine_types_gen.go b/v2/api/compute/v1api20220301/virtual_machine_types_gen.go index eb2300f16a3..996cef27079 100644 --- a/v2/api/compute/v1api20220301/virtual_machine_types_gen.go +++ b/v2/api/compute/v1api20220301/virtual_machine_types_gen.go @@ -1199,8 +1199,9 @@ func (machine *VirtualMachine_Spec) AssignProperties_From_VirtualMachine_Spec(so // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := EvictionPolicy(*source.EvictionPolicy) - machine.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, evictionPolicy_Values) + machine.EvictionPolicy = &evictionPolicyTemp } else { machine.EvictionPolicy = nil } @@ -1323,8 +1324,9 @@ func (machine *VirtualMachine_Spec) AssignProperties_From_VirtualMachine_Spec(so // Priority if source.Priority != nil { - priority := Priority(*source.Priority) - machine.Priority = &priority + priority := *source.Priority + priorityTemp := genruntime.ToEnum(priority, priority_Values) + machine.Priority = &priorityTemp } else { machine.Priority = nil } @@ -2693,8 +2695,9 @@ func (machine *VirtualMachine_STATUS) AssignProperties_From_VirtualMachine_STATU // EvictionPolicy if source.EvictionPolicy != nil { - evictionPolicy := EvictionPolicy_STATUS(*source.EvictionPolicy) - machine.EvictionPolicy = &evictionPolicy + evictionPolicy := *source.EvictionPolicy + evictionPolicyTemp := genruntime.ToEnum(evictionPolicy, evictionPolicy_STATUS_Values) + machine.EvictionPolicy = &evictionPolicyTemp } else { machine.EvictionPolicy = nil } @@ -2827,8 +2830,9 @@ func (machine *VirtualMachine_STATUS) AssignProperties_From_VirtualMachine_STATU // Priority if source.Priority != nil { - priority := Priority_STATUS(*source.Priority) - machine.Priority = &priority + priority := *source.Priority + priorityTemp := genruntime.ToEnum(priority, priority_STATUS_Values) + machine.Priority = &priorityTemp } else { machine.Priority = nil } @@ -4354,6 +4358,12 @@ const ( EvictionPolicy_Delete = EvictionPolicy("Delete") ) +// Mapping from string to EvictionPolicy +var evictionPolicy_Values = map[string]EvictionPolicy{ + "deallocate": EvictionPolicy_Deallocate, + "delete": EvictionPolicy_Delete, +} + // Specifies the eviction policy for the Azure Spot VM/VMSS type EvictionPolicy_STATUS string @@ -4362,6 +4372,12 @@ const ( EvictionPolicy_STATUS_Delete = EvictionPolicy_STATUS("Delete") ) +// Mapping from string to EvictionPolicy_STATUS +var evictionPolicy_STATUS_Values = map[string]EvictionPolicy_STATUS{ + "deallocate": EvictionPolicy_STATUS_Deallocate, + "delete": EvictionPolicy_STATUS_Delete, +} + // Specifies the hardware settings for the virtual machine. type HardwareProfile struct { // VmSize: Specifies the size of the virtual machine. @@ -4584,8 +4600,9 @@ func (profile *HardwareProfile_STATUS) AssignProperties_From_HardwareProfile_STA // VmSize if source.VmSize != nil { - vmSize := HardwareProfile_VmSize_STATUS(*source.VmSize) - profile.VmSize = &vmSize + vmSize := *source.VmSize + vmSizeTemp := genruntime.ToEnum(vmSize, hardwareProfile_VmSize_STATUS_Values) + profile.VmSize = &vmSizeTemp } else { profile.VmSize = nil } @@ -4738,8 +4755,9 @@ func (profile *NetworkProfile) AssignProperties_From_NetworkProfile(source *v202 // NetworkApiVersion if source.NetworkApiVersion != nil { - networkApiVersion := NetworkProfile_NetworkApiVersion(*source.NetworkApiVersion) - profile.NetworkApiVersion = &networkApiVersion + networkApiVersion := *source.NetworkApiVersion + networkApiVersionTemp := genruntime.ToEnum(networkApiVersion, networkProfile_NetworkApiVersion_Values) + profile.NetworkApiVersion = &networkApiVersionTemp } else { profile.NetworkApiVersion = nil } @@ -4958,8 +4976,9 @@ func (profile *NetworkProfile_STATUS) AssignProperties_From_NetworkProfile_STATU // NetworkApiVersion if source.NetworkApiVersion != nil { - networkApiVersion := NetworkProfile_NetworkApiVersion_STATUS(*source.NetworkApiVersion) - profile.NetworkApiVersion = &networkApiVersion + networkApiVersion := *source.NetworkApiVersion + networkApiVersionTemp := genruntime.ToEnum(networkApiVersion, networkProfile_NetworkApiVersion_STATUS_Values) + profile.NetworkApiVersion = &networkApiVersionTemp } else { profile.NetworkApiVersion = nil } @@ -6114,6 +6133,13 @@ const ( Priority_Spot = Priority("Spot") ) +// Mapping from string to Priority +var priority_Values = map[string]Priority{ + "low": Priority_Low, + "regular": Priority_Regular, + "spot": Priority_Spot, +} + // Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. // 'Low' enum // will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS. @@ -6125,6 +6151,13 @@ const ( Priority_STATUS_Spot = Priority_STATUS("Spot") ) +// Mapping from string to Priority_STATUS +var priority_STATUS_Values = map[string]Priority_STATUS{ + "low": Priority_STATUS_Low, + "regular": Priority_STATUS_Regular, + "spot": Priority_STATUS_Spot, +} + type ScheduledEventsProfile struct { // TerminateNotificationProfile: Specifies Terminate Scheduled Event related configurations. TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"` @@ -6428,8 +6461,9 @@ func (profile *SecurityProfile) AssignProperties_From_SecurityProfile(source *v2 // SecurityType if source.SecurityType != nil { - securityType := SecurityProfile_SecurityType(*source.SecurityType) - profile.SecurityType = &securityType + securityType := *source.SecurityType + securityTypeTemp := genruntime.ToEnum(securityType, securityProfile_SecurityType_Values) + profile.SecurityType = &securityTypeTemp } else { profile.SecurityType = nil } @@ -6601,8 +6635,9 @@ func (profile *SecurityProfile_STATUS) AssignProperties_From_SecurityProfile_STA // SecurityType if source.SecurityType != nil { - securityType := SecurityProfile_SecurityType_STATUS(*source.SecurityType) - profile.SecurityType = &securityType + securityType := *source.SecurityType + securityTypeTemp := genruntime.ToEnum(securityType, securityProfile_SecurityType_STATUS_Values) + profile.SecurityType = &securityTypeTemp } else { profile.SecurityType = nil } @@ -7596,8 +7631,9 @@ func (identity *VirtualMachineIdentity) AssignProperties_From_VirtualMachineIden // Type if source.Type != nil { - typeVar := VirtualMachineIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, virtualMachineIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -7774,8 +7810,9 @@ func (identity *VirtualMachineIdentity_STATUS) AssignProperties_From_VirtualMach // Type if source.Type != nil { - typeVar := VirtualMachineIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, virtualMachineIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -8116,8 +8153,9 @@ func (view *VirtualMachineInstanceView_STATUS) AssignProperties_From_VirtualMach // HyperVGeneration if source.HyperVGeneration != nil { - hyperVGeneration := VirtualMachineInstanceView_HyperVGeneration_STATUS(*source.HyperVGeneration) - view.HyperVGeneration = &hyperVGeneration + hyperVGeneration := *source.HyperVGeneration + hyperVGenerationTemp := genruntime.ToEnum(hyperVGeneration, virtualMachineInstanceView_HyperVGeneration_STATUS_Values) + view.HyperVGeneration = &hyperVGenerationTemp } else { view.HyperVGeneration = nil } @@ -8965,32 +9003,36 @@ func (disk *DataDisk) AssignProperties_From_DataDisk(source *v20220301s.DataDisk // Caching if source.Caching != nil { - caching := Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DeleteOption if source.DeleteOption != nil { - deleteOption := DeleteOption(*source.DeleteOption) - disk.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, deleteOption_Values) + disk.DeleteOption = &deleteOptionTemp } else { disk.DeleteOption = nil } // DetachOption if source.DetachOption != nil { - detachOption := DetachOption(*source.DetachOption) - disk.DetachOption = &detachOption + detachOption := *source.DetachOption + detachOptionTemp := genruntime.ToEnum(detachOption, detachOption_Values) + disk.DetachOption = &detachOptionTemp } else { disk.DetachOption = nil } @@ -9464,32 +9506,36 @@ func (disk *DataDisk_STATUS) AssignProperties_From_DataDisk_STATUS(source *v2022 // Caching if source.Caching != nil { - caching := Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption_STATUS(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_STATUS_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DeleteOption if source.DeleteOption != nil { - deleteOption := DeleteOption_STATUS(*source.DeleteOption) - disk.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, deleteOption_STATUS_Values) + disk.DeleteOption = &deleteOptionTemp } else { disk.DeleteOption = nil } // DetachOption if source.DetachOption != nil { - detachOption := DetachOption_STATUS(*source.DetachOption) - disk.DetachOption = &detachOption + detachOption := *source.DetachOption + detachOptionTemp := genruntime.ToEnum(detachOption, detachOption_STATUS_Values) + disk.DetachOption = &detachOptionTemp } else { disk.DetachOption = nil } @@ -10009,6 +10055,176 @@ const ( HardwareProfile_VmSize_STATUS_Standard_NV6 = HardwareProfile_VmSize_STATUS("Standard_NV6") ) +// Mapping from string to HardwareProfile_VmSize_STATUS +var hardwareProfile_VmSize_STATUS_Values = map[string]HardwareProfile_VmSize_STATUS{ + "basic_a0": HardwareProfile_VmSize_STATUS_Basic_A0, + "basic_a1": HardwareProfile_VmSize_STATUS_Basic_A1, + "basic_a2": HardwareProfile_VmSize_STATUS_Basic_A2, + "basic_a3": HardwareProfile_VmSize_STATUS_Basic_A3, + "basic_a4": HardwareProfile_VmSize_STATUS_Basic_A4, + "standard_a0": HardwareProfile_VmSize_STATUS_Standard_A0, + "standard_a1": HardwareProfile_VmSize_STATUS_Standard_A1, + "standard_a10": HardwareProfile_VmSize_STATUS_Standard_A10, + "standard_a11": HardwareProfile_VmSize_STATUS_Standard_A11, + "standard_a1_v2": HardwareProfile_VmSize_STATUS_Standard_A1_V2, + "standard_a2": HardwareProfile_VmSize_STATUS_Standard_A2, + "standard_a2m_v2": HardwareProfile_VmSize_STATUS_Standard_A2M_V2, + "standard_a2_v2": HardwareProfile_VmSize_STATUS_Standard_A2_V2, + "standard_a3": HardwareProfile_VmSize_STATUS_Standard_A3, + "standard_a4": HardwareProfile_VmSize_STATUS_Standard_A4, + "standard_a4m_v2": HardwareProfile_VmSize_STATUS_Standard_A4M_V2, + "standard_a4_v2": HardwareProfile_VmSize_STATUS_Standard_A4_V2, + "standard_a5": HardwareProfile_VmSize_STATUS_Standard_A5, + "standard_a6": HardwareProfile_VmSize_STATUS_Standard_A6, + "standard_a7": HardwareProfile_VmSize_STATUS_Standard_A7, + "standard_a8": HardwareProfile_VmSize_STATUS_Standard_A8, + "standard_a8m_v2": HardwareProfile_VmSize_STATUS_Standard_A8M_V2, + "standard_a8_v2": HardwareProfile_VmSize_STATUS_Standard_A8_V2, + "standard_a9": HardwareProfile_VmSize_STATUS_Standard_A9, + "standard_b1ms": HardwareProfile_VmSize_STATUS_Standard_B1Ms, + "standard_b1s": HardwareProfile_VmSize_STATUS_Standard_B1S, + "standard_b2ms": HardwareProfile_VmSize_STATUS_Standard_B2Ms, + "standard_b2s": HardwareProfile_VmSize_STATUS_Standard_B2S, + "standard_b4ms": HardwareProfile_VmSize_STATUS_Standard_B4Ms, + "standard_b8ms": HardwareProfile_VmSize_STATUS_Standard_B8Ms, + "standard_d1": HardwareProfile_VmSize_STATUS_Standard_D1, + "standard_d11": HardwareProfile_VmSize_STATUS_Standard_D11, + "standard_d11_v2": HardwareProfile_VmSize_STATUS_Standard_D11_V2, + "standard_d12": HardwareProfile_VmSize_STATUS_Standard_D12, + "standard_d12_v2": HardwareProfile_VmSize_STATUS_Standard_D12_V2, + "standard_d13": HardwareProfile_VmSize_STATUS_Standard_D13, + "standard_d13_v2": HardwareProfile_VmSize_STATUS_Standard_D13_V2, + "standard_d14": HardwareProfile_VmSize_STATUS_Standard_D14, + "standard_d14_v2": HardwareProfile_VmSize_STATUS_Standard_D14_V2, + "standard_d15_v2": HardwareProfile_VmSize_STATUS_Standard_D15_V2, + "standard_d16s_v3": HardwareProfile_VmSize_STATUS_Standard_D16S_V3, + "standard_d16_v3": HardwareProfile_VmSize_STATUS_Standard_D16_V3, + "standard_d1_v2": HardwareProfile_VmSize_STATUS_Standard_D1_V2, + "standard_d2": HardwareProfile_VmSize_STATUS_Standard_D2, + "standard_d2s_v3": HardwareProfile_VmSize_STATUS_Standard_D2S_V3, + "standard_d2_v2": HardwareProfile_VmSize_STATUS_Standard_D2_V2, + "standard_d2_v3": HardwareProfile_VmSize_STATUS_Standard_D2_V3, + "standard_d3": HardwareProfile_VmSize_STATUS_Standard_D3, + "standard_d32s_v3": HardwareProfile_VmSize_STATUS_Standard_D32S_V3, + "standard_d32_v3": HardwareProfile_VmSize_STATUS_Standard_D32_V3, + "standard_d3_v2": HardwareProfile_VmSize_STATUS_Standard_D3_V2, + "standard_d4": HardwareProfile_VmSize_STATUS_Standard_D4, + "standard_d4s_v3": HardwareProfile_VmSize_STATUS_Standard_D4S_V3, + "standard_d4_v2": HardwareProfile_VmSize_STATUS_Standard_D4_V2, + "standard_d4_v3": HardwareProfile_VmSize_STATUS_Standard_D4_V3, + "standard_d5_v2": HardwareProfile_VmSize_STATUS_Standard_D5_V2, + "standard_d64s_v3": HardwareProfile_VmSize_STATUS_Standard_D64S_V3, + "standard_d64_v3": HardwareProfile_VmSize_STATUS_Standard_D64_V3, + "standard_d8s_v3": HardwareProfile_VmSize_STATUS_Standard_D8S_V3, + "standard_d8_v3": HardwareProfile_VmSize_STATUS_Standard_D8_V3, + "standard_ds1": HardwareProfile_VmSize_STATUS_Standard_DS1, + "standard_ds11": HardwareProfile_VmSize_STATUS_Standard_DS11, + "standard_ds11_v2": HardwareProfile_VmSize_STATUS_Standard_DS11_V2, + "standard_ds12": HardwareProfile_VmSize_STATUS_Standard_DS12, + "standard_ds12_v2": HardwareProfile_VmSize_STATUS_Standard_DS12_V2, + "standard_ds13": HardwareProfile_VmSize_STATUS_Standard_DS13, + "standard_ds13-2_v2": HardwareProfile_VmSize_STATUS_Standard_DS132_V2, + "standard_ds13-4_v2": HardwareProfile_VmSize_STATUS_Standard_DS134_V2, + "standard_ds13_v2": HardwareProfile_VmSize_STATUS_Standard_DS13_V2, + "standard_ds14": HardwareProfile_VmSize_STATUS_Standard_DS14, + "standard_ds14-4_v2": HardwareProfile_VmSize_STATUS_Standard_DS144_V2, + "standard_ds14-8_v2": HardwareProfile_VmSize_STATUS_Standard_DS148_V2, + "standard_ds14_v2": HardwareProfile_VmSize_STATUS_Standard_DS14_V2, + "standard_ds15_v2": HardwareProfile_VmSize_STATUS_Standard_DS15_V2, + "standard_ds1_v2": HardwareProfile_VmSize_STATUS_Standard_DS1_V2, + "standard_ds2": HardwareProfile_VmSize_STATUS_Standard_DS2, + "standard_ds2_v2": HardwareProfile_VmSize_STATUS_Standard_DS2_V2, + "standard_ds3": HardwareProfile_VmSize_STATUS_Standard_DS3, + "standard_ds3_v2": HardwareProfile_VmSize_STATUS_Standard_DS3_V2, + "standard_ds4": HardwareProfile_VmSize_STATUS_Standard_DS4, + "standard_ds4_v2": HardwareProfile_VmSize_STATUS_Standard_DS4_V2, + "standard_ds5_v2": HardwareProfile_VmSize_STATUS_Standard_DS5_V2, + "standard_e16s_v3": HardwareProfile_VmSize_STATUS_Standard_E16S_V3, + "standard_e16_v3": HardwareProfile_VmSize_STATUS_Standard_E16_V3, + "standard_e2s_v3": HardwareProfile_VmSize_STATUS_Standard_E2S_V3, + "standard_e2_v3": HardwareProfile_VmSize_STATUS_Standard_E2_V3, + "standard_e32-16_v3": HardwareProfile_VmSize_STATUS_Standard_E3216_V3, + "standard_e32-8s_v3": HardwareProfile_VmSize_STATUS_Standard_E328S_V3, + "standard_e32s_v3": HardwareProfile_VmSize_STATUS_Standard_E32S_V3, + "standard_e32_v3": HardwareProfile_VmSize_STATUS_Standard_E32_V3, + "standard_e4s_v3": HardwareProfile_VmSize_STATUS_Standard_E4S_V3, + "standard_e4_v3": HardwareProfile_VmSize_STATUS_Standard_E4_V3, + "standard_e64-16s_v3": HardwareProfile_VmSize_STATUS_Standard_E6416S_V3, + "standard_e64-32s_v3": HardwareProfile_VmSize_STATUS_Standard_E6432S_V3, + "standard_e64s_v3": HardwareProfile_VmSize_STATUS_Standard_E64S_V3, + "standard_e64_v3": HardwareProfile_VmSize_STATUS_Standard_E64_V3, + "standard_e8s_v3": HardwareProfile_VmSize_STATUS_Standard_E8S_V3, + "standard_e8_v3": HardwareProfile_VmSize_STATUS_Standard_E8_V3, + "standard_f1": HardwareProfile_VmSize_STATUS_Standard_F1, + "standard_f16": HardwareProfile_VmSize_STATUS_Standard_F16, + "standard_f16s": HardwareProfile_VmSize_STATUS_Standard_F16S, + "standard_f16s_v2": HardwareProfile_VmSize_STATUS_Standard_F16S_V2, + "standard_f1s": HardwareProfile_VmSize_STATUS_Standard_F1S, + "standard_f2": HardwareProfile_VmSize_STATUS_Standard_F2, + "standard_f2s": HardwareProfile_VmSize_STATUS_Standard_F2S, + "standard_f2s_v2": HardwareProfile_VmSize_STATUS_Standard_F2S_V2, + "standard_f32s_v2": HardwareProfile_VmSize_STATUS_Standard_F32S_V2, + "standard_f4": HardwareProfile_VmSize_STATUS_Standard_F4, + "standard_f4s": HardwareProfile_VmSize_STATUS_Standard_F4S, + "standard_f4s_v2": HardwareProfile_VmSize_STATUS_Standard_F4S_V2, + "standard_f64s_v2": HardwareProfile_VmSize_STATUS_Standard_F64S_V2, + "standard_f72s_v2": HardwareProfile_VmSize_STATUS_Standard_F72S_V2, + "standard_f8": HardwareProfile_VmSize_STATUS_Standard_F8, + "standard_f8s": HardwareProfile_VmSize_STATUS_Standard_F8S, + "standard_f8s_v2": HardwareProfile_VmSize_STATUS_Standard_F8S_V2, + "standard_g1": HardwareProfile_VmSize_STATUS_Standard_G1, + "standard_g2": HardwareProfile_VmSize_STATUS_Standard_G2, + "standard_g3": HardwareProfile_VmSize_STATUS_Standard_G3, + "standard_g4": HardwareProfile_VmSize_STATUS_Standard_G4, + "standard_g5": HardwareProfile_VmSize_STATUS_Standard_G5, + "standard_gs1": HardwareProfile_VmSize_STATUS_Standard_GS1, + "standard_gs2": HardwareProfile_VmSize_STATUS_Standard_GS2, + "standard_gs3": HardwareProfile_VmSize_STATUS_Standard_GS3, + "standard_gs4": HardwareProfile_VmSize_STATUS_Standard_GS4, + "standard_gs4-4": HardwareProfile_VmSize_STATUS_Standard_GS44, + "standard_gs4-8": HardwareProfile_VmSize_STATUS_Standard_GS48, + "standard_gs5": HardwareProfile_VmSize_STATUS_Standard_GS5, + "standard_gs5-16": HardwareProfile_VmSize_STATUS_Standard_GS516, + "standard_gs5-8": HardwareProfile_VmSize_STATUS_Standard_GS58, + "standard_h16": HardwareProfile_VmSize_STATUS_Standard_H16, + "standard_h16m": HardwareProfile_VmSize_STATUS_Standard_H16M, + "standard_h16mr": HardwareProfile_VmSize_STATUS_Standard_H16Mr, + "standard_h16r": HardwareProfile_VmSize_STATUS_Standard_H16R, + "standard_h8": HardwareProfile_VmSize_STATUS_Standard_H8, + "standard_h8m": HardwareProfile_VmSize_STATUS_Standard_H8M, + "standard_l16s": HardwareProfile_VmSize_STATUS_Standard_L16S, + "standard_l32s": HardwareProfile_VmSize_STATUS_Standard_L32S, + "standard_l4s": HardwareProfile_VmSize_STATUS_Standard_L4S, + "standard_l8s": HardwareProfile_VmSize_STATUS_Standard_L8S, + "standard_m128-32ms": HardwareProfile_VmSize_STATUS_Standard_M12832Ms, + "standard_m128-64ms": HardwareProfile_VmSize_STATUS_Standard_M12864Ms, + "standard_m128ms": HardwareProfile_VmSize_STATUS_Standard_M128Ms, + "standard_m128s": HardwareProfile_VmSize_STATUS_Standard_M128S, + "standard_m64-16ms": HardwareProfile_VmSize_STATUS_Standard_M6416Ms, + "standard_m64-32ms": HardwareProfile_VmSize_STATUS_Standard_M6432Ms, + "standard_m64ms": HardwareProfile_VmSize_STATUS_Standard_M64Ms, + "standard_m64s": HardwareProfile_VmSize_STATUS_Standard_M64S, + "standard_nc12": HardwareProfile_VmSize_STATUS_Standard_NC12, + "standard_nc12s_v2": HardwareProfile_VmSize_STATUS_Standard_NC12S_V2, + "standard_nc12s_v3": HardwareProfile_VmSize_STATUS_Standard_NC12S_V3, + "standard_nc24": HardwareProfile_VmSize_STATUS_Standard_NC24, + "standard_nc24r": HardwareProfile_VmSize_STATUS_Standard_NC24R, + "standard_nc24rs_v2": HardwareProfile_VmSize_STATUS_Standard_NC24Rs_V2, + "standard_nc24rs_v3": HardwareProfile_VmSize_STATUS_Standard_NC24Rs_V3, + "standard_nc24s_v2": HardwareProfile_VmSize_STATUS_Standard_NC24S_V2, + "standard_nc24s_v3": HardwareProfile_VmSize_STATUS_Standard_NC24S_V3, + "standard_nc6": HardwareProfile_VmSize_STATUS_Standard_NC6, + "standard_nc6s_v2": HardwareProfile_VmSize_STATUS_Standard_NC6S_V2, + "standard_nc6s_v3": HardwareProfile_VmSize_STATUS_Standard_NC6S_V3, + "standard_nd12s": HardwareProfile_VmSize_STATUS_Standard_ND12S, + "standard_nd24rs": HardwareProfile_VmSize_STATUS_Standard_ND24Rs, + "standard_nd24s": HardwareProfile_VmSize_STATUS_Standard_ND24S, + "standard_nd6s": HardwareProfile_VmSize_STATUS_Standard_ND6S, + "standard_nv12": HardwareProfile_VmSize_STATUS_Standard_NV12, + "standard_nv24": HardwareProfile_VmSize_STATUS_Standard_NV24, + "standard_nv6": HardwareProfile_VmSize_STATUS_Standard_NV6, +} + // Specifies information about the image to use. You can specify information about platform images, marketplace images, or // virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual // machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set @@ -10518,8 +10734,9 @@ func (status *InstanceViewStatus_STATUS) AssignProperties_From_InstanceViewStatu // Level if source.Level != nil { - level := InstanceViewStatus_Level_STATUS(*source.Level) - status.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, instanceViewStatus_Level_STATUS_Values) + status.Level = &levelTemp } else { status.Level = nil } @@ -11108,8 +11325,9 @@ func (status *MaintenanceRedeployStatus_STATUS) AssignProperties_From_Maintenanc // LastOperationResultCode if source.LastOperationResultCode != nil { - lastOperationResultCode := MaintenanceRedeployStatus_LastOperationResultCode_STATUS(*source.LastOperationResultCode) - status.LastOperationResultCode = &lastOperationResultCode + lastOperationResultCode := *source.LastOperationResultCode + lastOperationResultCodeTemp := genruntime.ToEnum(lastOperationResultCode, maintenanceRedeployStatus_LastOperationResultCode_STATUS_Values) + status.LastOperationResultCode = &lastOperationResultCodeTemp } else { status.LastOperationResultCode = nil } @@ -11264,8 +11482,9 @@ func (reference *NetworkInterfaceReference) AssignProperties_From_NetworkInterfa // DeleteOption if source.DeleteOption != nil { - deleteOption := NetworkInterfaceReferenceProperties_DeleteOption(*source.DeleteOption) - reference.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, networkInterfaceReferenceProperties_DeleteOption_Values) + reference.DeleteOption = &deleteOptionTemp } else { reference.DeleteOption = nil } @@ -11420,8 +11639,9 @@ func (reference *NetworkInterfaceReference_STATUS) AssignProperties_From_Network // DeleteOption if source.DeleteOption != nil { - deleteOption := NetworkInterfaceReferenceProperties_DeleteOption_STATUS(*source.DeleteOption) - reference.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, networkInterfaceReferenceProperties_DeleteOption_STATUS_Values) + reference.DeleteOption = &deleteOptionTemp } else { reference.DeleteOption = nil } @@ -11481,10 +11701,20 @@ type NetworkProfile_NetworkApiVersion string const NetworkProfile_NetworkApiVersion_20201101 = NetworkProfile_NetworkApiVersion("2020-11-01") +// Mapping from string to NetworkProfile_NetworkApiVersion +var networkProfile_NetworkApiVersion_Values = map[string]NetworkProfile_NetworkApiVersion{ + "2020-11-01": NetworkProfile_NetworkApiVersion_20201101, +} + type NetworkProfile_NetworkApiVersion_STATUS string const NetworkProfile_NetworkApiVersion_STATUS_20201101 = NetworkProfile_NetworkApiVersion_STATUS("2020-11-01") +// Mapping from string to NetworkProfile_NetworkApiVersion_STATUS +var networkProfile_NetworkApiVersion_STATUS_Values = map[string]NetworkProfile_NetworkApiVersion_STATUS{ + "2020-11-01": NetworkProfile_NetworkApiVersion_STATUS_20201101, +} + // Specifies information about the operating system disk used by the virtual machine. // For more information about // disks, see [About disks and VHDs for Azure virtual @@ -11772,24 +12002,27 @@ func (disk *OSDisk) AssignProperties_From_OSDisk(source *v20220301s.OSDisk) erro // Caching if source.Caching != nil { - caching := Caching(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DeleteOption if source.DeleteOption != nil { - deleteOption := DeleteOption(*source.DeleteOption) - disk.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, deleteOption_Values) + disk.DeleteOption = &deleteOptionTemp } else { disk.DeleteOption = nil } @@ -11850,8 +12083,9 @@ func (disk *OSDisk) AssignProperties_From_OSDisk(source *v20220301s.OSDisk) erro // OsType if source.OsType != nil { - osType := OSDisk_OsType(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSDisk_OsType_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -12300,24 +12534,27 @@ func (disk *OSDisk_STATUS) AssignProperties_From_OSDisk_STATUS(source *v20220301 // Caching if source.Caching != nil { - caching := Caching_STATUS(*source.Caching) - disk.Caching = &caching + caching := *source.Caching + cachingTemp := genruntime.ToEnum(caching, caching_STATUS_Values) + disk.Caching = &cachingTemp } else { disk.Caching = nil } // CreateOption if source.CreateOption != nil { - createOption := CreateOption_STATUS(*source.CreateOption) - disk.CreateOption = &createOption + createOption := *source.CreateOption + createOptionTemp := genruntime.ToEnum(createOption, createOption_STATUS_Values) + disk.CreateOption = &createOptionTemp } else { disk.CreateOption = nil } // DeleteOption if source.DeleteOption != nil { - deleteOption := DeleteOption_STATUS(*source.DeleteOption) - disk.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, deleteOption_STATUS_Values) + disk.DeleteOption = &deleteOptionTemp } else { disk.DeleteOption = nil } @@ -12378,8 +12615,9 @@ func (disk *OSDisk_STATUS) AssignProperties_From_OSDisk_STATUS(source *v20220301 // OsType if source.OsType != nil { - osType := OSDisk_OsType_STATUS(*source.OsType) - disk.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSDisk_OsType_STATUS_Values) + disk.OsType = &osTypeTemp } else { disk.OsType = nil } @@ -12538,6 +12776,12 @@ const ( SecurityProfile_SecurityType_TrustedLaunch = SecurityProfile_SecurityType("TrustedLaunch") ) +// Mapping from string to SecurityProfile_SecurityType +var securityProfile_SecurityType_Values = map[string]SecurityProfile_SecurityType{ + "confidentialvm": SecurityProfile_SecurityType_ConfidentialVM, + "trustedlaunch": SecurityProfile_SecurityType_TrustedLaunch, +} + type SecurityProfile_SecurityType_STATUS string const ( @@ -12545,6 +12789,12 @@ const ( SecurityProfile_SecurityType_STATUS_TrustedLaunch = SecurityProfile_SecurityType_STATUS("TrustedLaunch") ) +// Mapping from string to SecurityProfile_SecurityType_STATUS +var securityProfile_SecurityType_STATUS_Values = map[string]SecurityProfile_SecurityType_STATUS{ + "confidentialvm": SecurityProfile_SecurityType_STATUS_ConfidentialVM, + "trustedlaunch": SecurityProfile_SecurityType_STATUS_TrustedLaunch, +} + type TerminateNotificationProfile struct { // Enable: Specifies whether the Terminate Scheduled event is enabled or disabled. Enable *bool `json:"enable,omitempty"` @@ -13674,6 +13924,12 @@ const ( VirtualMachineInstanceView_HyperVGeneration_STATUS_V2 = VirtualMachineInstanceView_HyperVGeneration_STATUS("V2") ) +// Mapping from string to VirtualMachineInstanceView_HyperVGeneration_STATUS +var virtualMachineInstanceView_HyperVGeneration_STATUS_Values = map[string]VirtualMachineInstanceView_HyperVGeneration_STATUS{ + "v1": VirtualMachineInstanceView_HyperVGeneration_STATUS_V1, + "v2": VirtualMachineInstanceView_HyperVGeneration_STATUS_V2, +} + // Describes a virtual machine network interface configurations. type VirtualMachineNetworkInterfaceConfiguration struct { // DeleteOption: Specify what happens to the network interface when the VM is deleted @@ -13915,8 +14171,9 @@ func (configuration *VirtualMachineNetworkInterfaceConfiguration) AssignProperti // DeleteOption if source.DeleteOption != nil { - deleteOption := VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption(*source.DeleteOption) - configuration.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, virtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_Values) + configuration.DeleteOption = &deleteOptionTemp } else { configuration.DeleteOption = nil } @@ -14391,8 +14648,9 @@ func (configuration *VirtualMachineNetworkInterfaceConfiguration_STATUS) AssignP // DeleteOption if source.DeleteOption != nil { - deleteOption := VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS(*source.DeleteOption) - configuration.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, virtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS_Values) + configuration.DeleteOption = &deleteOptionTemp } else { configuration.DeleteOption = nil } @@ -16089,8 +16347,9 @@ func (content *AdditionalUnattendContent) AssignProperties_From_AdditionalUnatte // ComponentName if source.ComponentName != nil { - componentName := AdditionalUnattendContent_ComponentName(*source.ComponentName) - content.ComponentName = &componentName + componentName := *source.ComponentName + componentNameTemp := genruntime.ToEnum(componentName, additionalUnattendContent_ComponentName_Values) + content.ComponentName = &componentNameTemp } else { content.ComponentName = nil } @@ -16100,16 +16359,18 @@ func (content *AdditionalUnattendContent) AssignProperties_From_AdditionalUnatte // PassName if source.PassName != nil { - passName := AdditionalUnattendContent_PassName(*source.PassName) - content.PassName = &passName + passName := *source.PassName + passNameTemp := genruntime.ToEnum(passName, additionalUnattendContent_PassName_Values) + content.PassName = &passNameTemp } else { content.PassName = nil } // SettingName if source.SettingName != nil { - settingName := AdditionalUnattendContent_SettingName(*source.SettingName) - content.SettingName = &settingName + settingName := *source.SettingName + settingNameTemp := genruntime.ToEnum(settingName, additionalUnattendContent_SettingName_Values) + content.SettingName = &settingNameTemp } else { content.SettingName = nil } @@ -16261,8 +16522,9 @@ func (content *AdditionalUnattendContent_STATUS) AssignProperties_From_Additiona // ComponentName if source.ComponentName != nil { - componentName := AdditionalUnattendContent_ComponentName_STATUS(*source.ComponentName) - content.ComponentName = &componentName + componentName := *source.ComponentName + componentNameTemp := genruntime.ToEnum(componentName, additionalUnattendContent_ComponentName_STATUS_Values) + content.ComponentName = &componentNameTemp } else { content.ComponentName = nil } @@ -16272,16 +16534,18 @@ func (content *AdditionalUnattendContent_STATUS) AssignProperties_From_Additiona // PassName if source.PassName != nil { - passName := AdditionalUnattendContent_PassName_STATUS(*source.PassName) - content.PassName = &passName + passName := *source.PassName + passNameTemp := genruntime.ToEnum(passName, additionalUnattendContent_PassName_STATUS_Values) + content.PassName = &passNameTemp } else { content.PassName = nil } // SettingName if source.SettingName != nil { - settingName := AdditionalUnattendContent_SettingName_STATUS(*source.SettingName) - content.SettingName = &settingName + settingName := *source.SettingName + settingNameTemp := genruntime.ToEnum(settingName, additionalUnattendContent_SettingName_STATUS_Values) + content.SettingName = &settingNameTemp } else { content.SettingName = nil } @@ -16475,8 +16739,9 @@ func (summary *AvailablePatchSummary_STATUS) AssignProperties_From_AvailablePatc // Status if source.Status != nil { - status := AvailablePatchSummary_Status_STATUS(*source.Status) - summary.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, availablePatchSummary_Status_STATUS_Values) + summary.Status = &statusTemp } else { summary.Status = nil } @@ -16559,6 +16824,13 @@ const ( Caching_ReadWrite = Caching("ReadWrite") ) +// Mapping from string to Caching +var caching_Values = map[string]Caching{ + "none": Caching_None, + "readonly": Caching_ReadOnly, + "readwrite": Caching_ReadWrite, +} + // Specifies the caching requirements. // Possible values are: // None @@ -16573,6 +16845,13 @@ const ( Caching_STATUS_ReadWrite = Caching_STATUS("ReadWrite") ) +// Mapping from string to Caching_STATUS +var caching_STATUS_Values = map[string]Caching_STATUS{ + "none": Caching_STATUS_None, + "readonly": Caching_STATUS_ReadOnly, + "readwrite": Caching_STATUS_ReadWrite, +} + // Specifies how the virtual machine should be created. // Possible values are: // Attach \u2013 This value @@ -16590,6 +16869,13 @@ const ( CreateOption_FromImage = CreateOption("FromImage") ) +// Mapping from string to CreateOption +var createOption_Values = map[string]CreateOption{ + "attach": CreateOption_Attach, + "empty": CreateOption_Empty, + "fromimage": CreateOption_FromImage, +} + // Specifies how the virtual machine should be created. // Possible values are: // Attach \u2013 This value @@ -16606,6 +16892,13 @@ const ( CreateOption_STATUS_FromImage = CreateOption_STATUS("FromImage") ) +// Mapping from string to CreateOption_STATUS +var createOption_STATUS_Values = map[string]CreateOption_STATUS{ + "attach": CreateOption_STATUS_Attach, + "empty": CreateOption_STATUS_Empty, + "fromimage": CreateOption_STATUS_FromImage, +} + // Specifies the behavior of the managed disk when the VM gets deleted i.e whether the managed disk is deleted or detached. // Supported values: // Delete If this value is used, the managed disk is deleted when VM gets deleted. @@ -16620,6 +16913,12 @@ const ( DeleteOption_Detach = DeleteOption("Detach") ) +// Mapping from string to DeleteOption +var deleteOption_Values = map[string]DeleteOption{ + "delete": DeleteOption_Delete, + "detach": DeleteOption_Detach, +} + // Specifies the behavior of the managed disk when the VM gets deleted i.e whether the managed disk is deleted or detached. // Supported values: // Delete If this value is used, the managed disk is deleted when VM gets deleted. @@ -16633,6 +16932,12 @@ const ( DeleteOption_STATUS_Detach = DeleteOption_STATUS("Detach") ) +// Mapping from string to DeleteOption_STATUS +var deleteOption_STATUS_Values = map[string]DeleteOption_STATUS{ + "delete": DeleteOption_STATUS_Delete, + "detach": DeleteOption_STATUS_Detach, +} + // Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from // the virtual machine. Supported values: ForceDetach. // detachOption: ForceDetach is applicable only for @@ -16647,6 +16952,11 @@ type DetachOption string const DetachOption_ForceDetach = DetachOption("ForceDetach") +// Mapping from string to DetachOption +var detachOption_Values = map[string]DetachOption{ + "forcedetach": DetachOption_ForceDetach, +} + // Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from // the virtual machine. Supported values: ForceDetach. // detachOption: ForceDetach is applicable only for @@ -16660,6 +16970,11 @@ type DetachOption_STATUS string const DetachOption_STATUS_ForceDetach = DetachOption_STATUS("ForceDetach") +// Mapping from string to DetachOption_STATUS +var detachOption_STATUS_Values = map[string]DetachOption_STATUS{ + "forcedetach": DetachOption_STATUS_ForceDetach, +} + // Describes the parameters of ephemeral disk settings that can be specified for operating system disk. // NOTE: The // ephemeral disk settings can only be specified for managed disk. @@ -16733,16 +17048,18 @@ func (settings *DiffDiskSettings) AssignProperties_From_DiffDiskSettings(source // Option if source.Option != nil { - option := DiffDiskOption(*source.Option) - settings.Option = &option + option := *source.Option + optionTemp := genruntime.ToEnum(option, diffDiskOption_Values) + settings.Option = &optionTemp } else { settings.Option = nil } // Placement if source.Placement != nil { - placement := DiffDiskPlacement(*source.Placement) - settings.Placement = &placement + placement := *source.Placement + placementTemp := genruntime.ToEnum(placement, diffDiskPlacement_Values) + settings.Placement = &placementTemp } else { settings.Placement = nil } @@ -16858,16 +17175,18 @@ func (settings *DiffDiskSettings_STATUS) AssignProperties_From_DiffDiskSettings_ // Option if source.Option != nil { - option := DiffDiskOption_STATUS(*source.Option) - settings.Option = &option + option := *source.Option + optionTemp := genruntime.ToEnum(option, diffDiskOption_STATUS_Values) + settings.Option = &optionTemp } else { settings.Option = nil } // Placement if source.Placement != nil { - placement := DiffDiskPlacement_STATUS(*source.Placement) - settings.Placement = &placement + placement := *source.Placement + placementTemp := genruntime.ToEnum(placement, diffDiskPlacement_STATUS_Values) + settings.Placement = &placementTemp } else { settings.Placement = nil } @@ -17280,6 +17599,13 @@ const ( InstanceViewStatus_Level_STATUS_Warning = InstanceViewStatus_Level_STATUS("Warning") ) +// Mapping from string to InstanceViewStatus_Level_STATUS +var instanceViewStatus_Level_STATUS_Values = map[string]InstanceViewStatus_Level_STATUS{ + "error": InstanceViewStatus_Level_STATUS_Error, + "info": InstanceViewStatus_Level_STATUS_Info, + "warning": InstanceViewStatus_Level_STATUS_Warning, +} + // Describes the properties of the last installed patch summary. type LastPatchInstallationSummary_STATUS struct { // Error: The errors that were encountered during execution of the operation. The details array contains the list of them. @@ -17459,8 +17785,9 @@ func (summary *LastPatchInstallationSummary_STATUS) AssignProperties_From_LastPa // Status if source.Status != nil { - status := LastPatchInstallationSummary_Status_STATUS(*source.Status) - summary.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, lastPatchInstallationSummary_Status_STATUS_Values) + summary.Status = &statusTemp } else { summary.Status = nil } @@ -17635,8 +17962,9 @@ func (settings *LinuxPatchSettings) AssignProperties_From_LinuxPatchSettings(sou // AssessmentMode if source.AssessmentMode != nil { - assessmentMode := LinuxPatchSettings_AssessmentMode(*source.AssessmentMode) - settings.AssessmentMode = &assessmentMode + assessmentMode := *source.AssessmentMode + assessmentModeTemp := genruntime.ToEnum(assessmentMode, linuxPatchSettings_AssessmentMode_Values) + settings.AssessmentMode = &assessmentModeTemp } else { settings.AssessmentMode = nil } @@ -17655,8 +17983,9 @@ func (settings *LinuxPatchSettings) AssignProperties_From_LinuxPatchSettings(sou // PatchMode if source.PatchMode != nil { - patchMode := LinuxPatchSettings_PatchMode(*source.PatchMode) - settings.PatchMode = &patchMode + patchMode := *source.PatchMode + patchModeTemp := genruntime.ToEnum(patchMode, linuxPatchSettings_PatchMode_Values) + settings.PatchMode = &patchModeTemp } else { settings.PatchMode = nil } @@ -17811,8 +18140,9 @@ func (settings *LinuxPatchSettings_STATUS) AssignProperties_From_LinuxPatchSetti // AssessmentMode if source.AssessmentMode != nil { - assessmentMode := LinuxPatchSettings_AssessmentMode_STATUS(*source.AssessmentMode) - settings.AssessmentMode = &assessmentMode + assessmentMode := *source.AssessmentMode + assessmentModeTemp := genruntime.ToEnum(assessmentMode, linuxPatchSettings_AssessmentMode_STATUS_Values) + settings.AssessmentMode = &assessmentModeTemp } else { settings.AssessmentMode = nil } @@ -17831,8 +18161,9 @@ func (settings *LinuxPatchSettings_STATUS) AssignProperties_From_LinuxPatchSetti // PatchMode if source.PatchMode != nil { - patchMode := LinuxPatchSettings_PatchMode_STATUS(*source.PatchMode) - settings.PatchMode = &patchMode + patchMode := *source.PatchMode + patchModeTemp := genruntime.ToEnum(patchMode, linuxPatchSettings_PatchMode_STATUS_Values) + settings.PatchMode = &patchModeTemp } else { settings.PatchMode = nil } @@ -17894,6 +18225,14 @@ const ( MaintenanceRedeployStatus_LastOperationResultCode_STATUS_RetryLater = MaintenanceRedeployStatus_LastOperationResultCode_STATUS("RetryLater") ) +// Mapping from string to MaintenanceRedeployStatus_LastOperationResultCode_STATUS +var maintenanceRedeployStatus_LastOperationResultCode_STATUS_Values = map[string]MaintenanceRedeployStatus_LastOperationResultCode_STATUS{ + "maintenanceaborted": MaintenanceRedeployStatus_LastOperationResultCode_STATUS_MaintenanceAborted, + "maintenancecompleted": MaintenanceRedeployStatus_LastOperationResultCode_STATUS_MaintenanceCompleted, + "none": MaintenanceRedeployStatus_LastOperationResultCode_STATUS_None, + "retrylater": MaintenanceRedeployStatus_LastOperationResultCode_STATUS_RetryLater, +} + // The parameters of a managed disk. type ManagedDiskParameters struct { // DiskEncryptionSet: Specifies the customer managed disk encryption set resource id for the managed disk. @@ -18040,8 +18379,9 @@ func (parameters *ManagedDiskParameters) AssignProperties_From_ManagedDiskParame // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType(*source.StorageAccountType) - parameters.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_Values) + parameters.StorageAccountType = &storageAccountTypeTemp } else { parameters.StorageAccountType = nil } @@ -18253,8 +18593,9 @@ func (parameters *ManagedDiskParameters_STATUS) AssignProperties_From_ManagedDis // StorageAccountType if source.StorageAccountType != nil { - storageAccountType := StorageAccountType_STATUS(*source.StorageAccountType) - parameters.StorageAccountType = &storageAccountType + storageAccountType := *source.StorageAccountType + storageAccountTypeTemp := genruntime.ToEnum(storageAccountType, storageAccountType_STATUS_Values) + parameters.StorageAccountType = &storageAccountTypeTemp } else { parameters.StorageAccountType = nil } @@ -18322,6 +18663,12 @@ const ( NetworkInterfaceReferenceProperties_DeleteOption_Detach = NetworkInterfaceReferenceProperties_DeleteOption("Detach") ) +// Mapping from string to NetworkInterfaceReferenceProperties_DeleteOption +var networkInterfaceReferenceProperties_DeleteOption_Values = map[string]NetworkInterfaceReferenceProperties_DeleteOption{ + "delete": NetworkInterfaceReferenceProperties_DeleteOption_Delete, + "detach": NetworkInterfaceReferenceProperties_DeleteOption_Detach, +} + type NetworkInterfaceReferenceProperties_DeleteOption_STATUS string const ( @@ -18329,6 +18676,12 @@ const ( NetworkInterfaceReferenceProperties_DeleteOption_STATUS_Detach = NetworkInterfaceReferenceProperties_DeleteOption_STATUS("Detach") ) +// Mapping from string to NetworkInterfaceReferenceProperties_DeleteOption_STATUS +var networkInterfaceReferenceProperties_DeleteOption_STATUS_Values = map[string]NetworkInterfaceReferenceProperties_DeleteOption_STATUS{ + "delete": NetworkInterfaceReferenceProperties_DeleteOption_STATUS_Delete, + "detach": NetworkInterfaceReferenceProperties_DeleteOption_STATUS_Detach, +} + // +kubebuilder:validation:Enum={"Linux","Windows"} type OSDisk_OsType string @@ -18337,6 +18690,12 @@ const ( OSDisk_OsType_Windows = OSDisk_OsType("Windows") ) +// Mapping from string to OSDisk_OsType +var oSDisk_OsType_Values = map[string]OSDisk_OsType{ + "linux": OSDisk_OsType_Linux, + "windows": OSDisk_OsType_Windows, +} + type OSDisk_OsType_STATUS string const ( @@ -18344,6 +18703,12 @@ const ( OSDisk_OsType_STATUS_Windows = OSDisk_OsType_STATUS("Windows") ) +// Mapping from string to OSDisk_OsType_STATUS +var oSDisk_OsType_STATUS_Values = map[string]OSDisk_OsType_STATUS{ + "linux": OSDisk_OsType_STATUS_Linux, + "windows": OSDisk_OsType_STATUS_Windows, +} + // Specifies settings related to VM Guest Patching on Windows. type PatchSettings struct { // AssessmentMode: Specifies the mode of VM Guest patch assessment for the IaaS virtual machine. @@ -18462,8 +18827,9 @@ func (settings *PatchSettings) AssignProperties_From_PatchSettings(source *v2022 // AssessmentMode if source.AssessmentMode != nil { - assessmentMode := PatchSettings_AssessmentMode(*source.AssessmentMode) - settings.AssessmentMode = &assessmentMode + assessmentMode := *source.AssessmentMode + assessmentModeTemp := genruntime.ToEnum(assessmentMode, patchSettings_AssessmentMode_Values) + settings.AssessmentMode = &assessmentModeTemp } else { settings.AssessmentMode = nil } @@ -18490,8 +18856,9 @@ func (settings *PatchSettings) AssignProperties_From_PatchSettings(source *v2022 // PatchMode if source.PatchMode != nil { - patchMode := PatchSettings_PatchMode(*source.PatchMode) - settings.PatchMode = &patchMode + patchMode := *source.PatchMode + patchModeTemp := genruntime.ToEnum(patchMode, patchSettings_PatchMode_Values) + settings.PatchMode = &patchModeTemp } else { settings.PatchMode = nil } @@ -18676,8 +19043,9 @@ func (settings *PatchSettings_STATUS) AssignProperties_From_PatchSettings_STATUS // AssessmentMode if source.AssessmentMode != nil { - assessmentMode := PatchSettings_AssessmentMode_STATUS(*source.AssessmentMode) - settings.AssessmentMode = &assessmentMode + assessmentMode := *source.AssessmentMode + assessmentModeTemp := genruntime.ToEnum(assessmentMode, patchSettings_AssessmentMode_STATUS_Values) + settings.AssessmentMode = &assessmentModeTemp } else { settings.AssessmentMode = nil } @@ -18704,8 +19072,9 @@ func (settings *PatchSettings_STATUS) AssignProperties_From_PatchSettings_STATUS // PatchMode if source.PatchMode != nil { - patchMode := PatchSettings_PatchMode_STATUS(*source.PatchMode) - settings.PatchMode = &patchMode + patchMode := *source.PatchMode + patchModeTemp := genruntime.ToEnum(patchMode, patchSettings_PatchMode_STATUS_Values) + settings.PatchMode = &patchModeTemp } else { settings.PatchMode = nil } @@ -19470,6 +19839,12 @@ const ( VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_Detach = VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption("Detach") ) +// Mapping from string to VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption +var virtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_Values = map[string]VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption{ + "delete": VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_Delete, + "detach": VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_Detach, +} + type VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS string const ( @@ -19477,6 +19852,12 @@ const ( VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS_Detach = VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS("Detach") ) +// Mapping from string to VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS +var virtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS_Values = map[string]VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS{ + "delete": VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS_Delete, + "detach": VirtualMachineNetworkInterfaceConfigurationProperties_DeleteOption_STATUS_Detach, +} + // Describes a virtual machines network configuration's DNS settings. type VirtualMachineNetworkInterfaceDnsSettingsConfiguration struct { // DnsServers: List of DNS servers IP addresses @@ -19900,8 +20281,9 @@ func (configuration *VirtualMachineNetworkInterfaceIPConfiguration) AssignProper // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion(*source.PrivateIPAddressVersion) - configuration.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, virtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_Values) + configuration.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { configuration.PrivateIPAddressVersion = nil } @@ -20362,8 +20744,9 @@ func (configuration *VirtualMachineNetworkInterfaceIPConfiguration_STATUS) Assig // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS(*source.PrivateIPAddressVersion) - configuration.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, virtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS_Values) + configuration.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { configuration.PrivateIPAddressVersion = nil } @@ -20743,19 +21126,39 @@ type AdditionalUnattendContent_ComponentName string const AdditionalUnattendContent_ComponentName_MicrosoftWindowsShellSetup = AdditionalUnattendContent_ComponentName("Microsoft-Windows-Shell-Setup") +// Mapping from string to AdditionalUnattendContent_ComponentName +var additionalUnattendContent_ComponentName_Values = map[string]AdditionalUnattendContent_ComponentName{ + "microsoft-windows-shell-setup": AdditionalUnattendContent_ComponentName_MicrosoftWindowsShellSetup, +} + type AdditionalUnattendContent_ComponentName_STATUS string const AdditionalUnattendContent_ComponentName_STATUS_MicrosoftWindowsShellSetup = AdditionalUnattendContent_ComponentName_STATUS("Microsoft-Windows-Shell-Setup") +// Mapping from string to AdditionalUnattendContent_ComponentName_STATUS +var additionalUnattendContent_ComponentName_STATUS_Values = map[string]AdditionalUnattendContent_ComponentName_STATUS{ + "microsoft-windows-shell-setup": AdditionalUnattendContent_ComponentName_STATUS_MicrosoftWindowsShellSetup, +} + // +kubebuilder:validation:Enum={"OobeSystem"} type AdditionalUnattendContent_PassName string const AdditionalUnattendContent_PassName_OobeSystem = AdditionalUnattendContent_PassName("OobeSystem") +// Mapping from string to AdditionalUnattendContent_PassName +var additionalUnattendContent_PassName_Values = map[string]AdditionalUnattendContent_PassName{ + "oobesystem": AdditionalUnattendContent_PassName_OobeSystem, +} + type AdditionalUnattendContent_PassName_STATUS string const AdditionalUnattendContent_PassName_STATUS_OobeSystem = AdditionalUnattendContent_PassName_STATUS("OobeSystem") +// Mapping from string to AdditionalUnattendContent_PassName_STATUS +var additionalUnattendContent_PassName_STATUS_Values = map[string]AdditionalUnattendContent_PassName_STATUS{ + "oobesystem": AdditionalUnattendContent_PassName_STATUS_OobeSystem, +} + // +kubebuilder:validation:Enum={"AutoLogon","FirstLogonCommands"} type AdditionalUnattendContent_SettingName string @@ -20764,6 +21167,12 @@ const ( AdditionalUnattendContent_SettingName_FirstLogonCommands = AdditionalUnattendContent_SettingName("FirstLogonCommands") ) +// Mapping from string to AdditionalUnattendContent_SettingName +var additionalUnattendContent_SettingName_Values = map[string]AdditionalUnattendContent_SettingName{ + "autologon": AdditionalUnattendContent_SettingName_AutoLogon, + "firstlogoncommands": AdditionalUnattendContent_SettingName_FirstLogonCommands, +} + type AdditionalUnattendContent_SettingName_STATUS string const ( @@ -20771,6 +21180,12 @@ const ( AdditionalUnattendContent_SettingName_STATUS_FirstLogonCommands = AdditionalUnattendContent_SettingName_STATUS("FirstLogonCommands") ) +// Mapping from string to AdditionalUnattendContent_SettingName_STATUS +var additionalUnattendContent_SettingName_STATUS_Values = map[string]AdditionalUnattendContent_SettingName_STATUS{ + "autologon": AdditionalUnattendContent_SettingName_STATUS_AutoLogon, + "firstlogoncommands": AdditionalUnattendContent_SettingName_STATUS_FirstLogonCommands, +} + // Api error. type ApiError_STATUS struct { // Code: The error code. @@ -20957,17 +21372,36 @@ const ( AvailablePatchSummary_Status_STATUS_Unknown = AvailablePatchSummary_Status_STATUS("Unknown") ) +// Mapping from string to AvailablePatchSummary_Status_STATUS +var availablePatchSummary_Status_STATUS_Values = map[string]AvailablePatchSummary_Status_STATUS{ + "completedwithwarnings": AvailablePatchSummary_Status_STATUS_CompletedWithWarnings, + "failed": AvailablePatchSummary_Status_STATUS_Failed, + "inprogress": AvailablePatchSummary_Status_STATUS_InProgress, + "succeeded": AvailablePatchSummary_Status_STATUS_Succeeded, + "unknown": AvailablePatchSummary_Status_STATUS_Unknown, +} + // Specifies the ephemeral disk option for operating system disk. // +kubebuilder:validation:Enum={"Local"} type DiffDiskOption string const DiffDiskOption_Local = DiffDiskOption("Local") +// Mapping from string to DiffDiskOption +var diffDiskOption_Values = map[string]DiffDiskOption{ + "local": DiffDiskOption_Local, +} + // Specifies the ephemeral disk option for operating system disk. type DiffDiskOption_STATUS string const DiffDiskOption_STATUS_Local = DiffDiskOption_STATUS("Local") +// Mapping from string to DiffDiskOption_STATUS +var diffDiskOption_STATUS_Values = map[string]DiffDiskOption_STATUS{ + "local": DiffDiskOption_STATUS_Local, +} + // Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to // choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information on // Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at @@ -20981,6 +21415,12 @@ const ( DiffDiskPlacement_ResourceDisk = DiffDiskPlacement("ResourceDisk") ) +// Mapping from string to DiffDiskPlacement +var diffDiskPlacement_Values = map[string]DiffDiskPlacement{ + "cachedisk": DiffDiskPlacement_CacheDisk, + "resourcedisk": DiffDiskPlacement_ResourceDisk, +} + // Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to // choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information on // Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at @@ -20993,6 +21433,12 @@ const ( DiffDiskPlacement_STATUS_ResourceDisk = DiffDiskPlacement_STATUS("ResourceDisk") ) +// Mapping from string to DiffDiskPlacement_STATUS +var diffDiskPlacement_STATUS_Values = map[string]DiffDiskPlacement_STATUS{ + "cachedisk": DiffDiskPlacement_STATUS_CacheDisk, + "resourcedisk": DiffDiskPlacement_STATUS_ResourceDisk, +} + // Describes a reference to Key Vault Key type KeyVaultKeyReference struct { // +kubebuilder:validation:Required @@ -21246,6 +21692,15 @@ const ( LastPatchInstallationSummary_Status_STATUS_Unknown = LastPatchInstallationSummary_Status_STATUS("Unknown") ) +// Mapping from string to LastPatchInstallationSummary_Status_STATUS +var lastPatchInstallationSummary_Status_STATUS_Values = map[string]LastPatchInstallationSummary_Status_STATUS{ + "completedwithwarnings": LastPatchInstallationSummary_Status_STATUS_CompletedWithWarnings, + "failed": LastPatchInstallationSummary_Status_STATUS_Failed, + "inprogress": LastPatchInstallationSummary_Status_STATUS_InProgress, + "succeeded": LastPatchInstallationSummary_Status_STATUS_Succeeded, + "unknown": LastPatchInstallationSummary_Status_STATUS_Unknown, +} + // +kubebuilder:validation:Enum={"AutomaticByPlatform","ImageDefault"} type LinuxPatchSettings_AssessmentMode string @@ -21254,6 +21709,12 @@ const ( LinuxPatchSettings_AssessmentMode_ImageDefault = LinuxPatchSettings_AssessmentMode("ImageDefault") ) +// Mapping from string to LinuxPatchSettings_AssessmentMode +var linuxPatchSettings_AssessmentMode_Values = map[string]LinuxPatchSettings_AssessmentMode{ + "automaticbyplatform": LinuxPatchSettings_AssessmentMode_AutomaticByPlatform, + "imagedefault": LinuxPatchSettings_AssessmentMode_ImageDefault, +} + type LinuxPatchSettings_AssessmentMode_STATUS string const ( @@ -21261,6 +21722,12 @@ const ( LinuxPatchSettings_AssessmentMode_STATUS_ImageDefault = LinuxPatchSettings_AssessmentMode_STATUS("ImageDefault") ) +// Mapping from string to LinuxPatchSettings_AssessmentMode_STATUS +var linuxPatchSettings_AssessmentMode_STATUS_Values = map[string]LinuxPatchSettings_AssessmentMode_STATUS{ + "automaticbyplatform": LinuxPatchSettings_AssessmentMode_STATUS_AutomaticByPlatform, + "imagedefault": LinuxPatchSettings_AssessmentMode_STATUS_ImageDefault, +} + // +kubebuilder:validation:Enum={"AutomaticByPlatform","ImageDefault"} type LinuxPatchSettings_PatchMode string @@ -21269,6 +21736,12 @@ const ( LinuxPatchSettings_PatchMode_ImageDefault = LinuxPatchSettings_PatchMode("ImageDefault") ) +// Mapping from string to LinuxPatchSettings_PatchMode +var linuxPatchSettings_PatchMode_Values = map[string]LinuxPatchSettings_PatchMode{ + "automaticbyplatform": LinuxPatchSettings_PatchMode_AutomaticByPlatform, + "imagedefault": LinuxPatchSettings_PatchMode_ImageDefault, +} + type LinuxPatchSettings_PatchMode_STATUS string const ( @@ -21276,6 +21749,12 @@ const ( LinuxPatchSettings_PatchMode_STATUS_ImageDefault = LinuxPatchSettings_PatchMode_STATUS("ImageDefault") ) +// Mapping from string to LinuxPatchSettings_PatchMode_STATUS +var linuxPatchSettings_PatchMode_STATUS_Values = map[string]LinuxPatchSettings_PatchMode_STATUS{ + "automaticbyplatform": LinuxPatchSettings_PatchMode_STATUS_AutomaticByPlatform, + "imagedefault": LinuxPatchSettings_PatchMode_STATUS_ImageDefault, +} + // Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings. type LinuxVMGuestPatchAutomaticByPlatformSettings struct { // RebootSetting: Specifies the reboot setting for all AutomaticByPlatform patch installation operations. @@ -21326,8 +21805,9 @@ func (settings *LinuxVMGuestPatchAutomaticByPlatformSettings) AssignProperties_F // RebootSetting if source.RebootSetting != nil { - rebootSetting := LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting(*source.RebootSetting) - settings.RebootSetting = &rebootSetting + rebootSetting := *source.RebootSetting + rebootSettingTemp := genruntime.ToEnum(rebootSetting, linuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Values) + settings.RebootSetting = &rebootSettingTemp } else { settings.RebootSetting = nil } @@ -21410,8 +21890,9 @@ func (settings *LinuxVMGuestPatchAutomaticByPlatformSettings_STATUS) AssignPrope // RebootSetting if source.RebootSetting != nil { - rebootSetting := LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS(*source.RebootSetting) - settings.RebootSetting = &rebootSetting + rebootSetting := *source.RebootSetting + rebootSettingTemp := genruntime.ToEnum(rebootSetting, linuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Values) + settings.RebootSetting = &rebootSettingTemp } else { settings.RebootSetting = nil } @@ -21452,6 +21933,12 @@ const ( PatchSettings_AssessmentMode_ImageDefault = PatchSettings_AssessmentMode("ImageDefault") ) +// Mapping from string to PatchSettings_AssessmentMode +var patchSettings_AssessmentMode_Values = map[string]PatchSettings_AssessmentMode{ + "automaticbyplatform": PatchSettings_AssessmentMode_AutomaticByPlatform, + "imagedefault": PatchSettings_AssessmentMode_ImageDefault, +} + type PatchSettings_AssessmentMode_STATUS string const ( @@ -21459,6 +21946,12 @@ const ( PatchSettings_AssessmentMode_STATUS_ImageDefault = PatchSettings_AssessmentMode_STATUS("ImageDefault") ) +// Mapping from string to PatchSettings_AssessmentMode_STATUS +var patchSettings_AssessmentMode_STATUS_Values = map[string]PatchSettings_AssessmentMode_STATUS{ + "automaticbyplatform": PatchSettings_AssessmentMode_STATUS_AutomaticByPlatform, + "imagedefault": PatchSettings_AssessmentMode_STATUS_ImageDefault, +} + // +kubebuilder:validation:Enum={"AutomaticByOS","AutomaticByPlatform","Manual"} type PatchSettings_PatchMode string @@ -21468,6 +21961,13 @@ const ( PatchSettings_PatchMode_Manual = PatchSettings_PatchMode("Manual") ) +// Mapping from string to PatchSettings_PatchMode +var patchSettings_PatchMode_Values = map[string]PatchSettings_PatchMode{ + "automaticbyos": PatchSettings_PatchMode_AutomaticByOS, + "automaticbyplatform": PatchSettings_PatchMode_AutomaticByPlatform, + "manual": PatchSettings_PatchMode_Manual, +} + type PatchSettings_PatchMode_STATUS string const ( @@ -21476,6 +21976,13 @@ const ( PatchSettings_PatchMode_STATUS_Manual = PatchSettings_PatchMode_STATUS("Manual") ) +// Mapping from string to PatchSettings_PatchMode_STATUS +var patchSettings_PatchMode_STATUS_Values = map[string]PatchSettings_PatchMode_STATUS{ + "automaticbyos": PatchSettings_PatchMode_STATUS_AutomaticByOS, + "automaticbyplatform": PatchSettings_PatchMode_STATUS_AutomaticByPlatform, + "manual": PatchSettings_PatchMode_STATUS_Manual, +} + // Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. type SshPublicKey_STATUS struct { // KeyData: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit @@ -21674,6 +22181,12 @@ const ( VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_IPv6 = VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion("IPv6") ) +// Mapping from string to VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion +var virtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_Values = map[string]VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion{ + "ipv4": VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_IPv4, + "ipv6": VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_IPv6, +} + type VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS string const ( @@ -21681,6 +22194,12 @@ const ( VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv6 = VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS("IPv6") ) +// Mapping from string to VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS +var virtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS_Values = map[string]VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS{ + "ipv4": VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv4, + "ipv6": VirtualMachineNetworkInterfaceIPConfigurationProperties_PrivateIPAddressVersion_STATUS_IPv6, +} + // Describes a virtual machines IP Configuration's PublicIPAddress configuration type VirtualMachinePublicIPAddressConfiguration struct { // DeleteOption: Specify what happens to the public IP address when the VM is deleted @@ -21905,8 +22424,9 @@ func (configuration *VirtualMachinePublicIPAddressConfiguration) AssignPropertie // DeleteOption if source.DeleteOption != nil { - deleteOption := VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption(*source.DeleteOption) - configuration.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, virtualMachinePublicIPAddressConfigurationProperties_DeleteOption_Values) + configuration.DeleteOption = &deleteOptionTemp } else { configuration.DeleteOption = nil } @@ -21949,16 +22469,18 @@ func (configuration *VirtualMachinePublicIPAddressConfiguration) AssignPropertie // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion(*source.PublicIPAddressVersion) - configuration.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, virtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_Values) + configuration.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { configuration.PublicIPAddressVersion = nil } // PublicIPAllocationMethod if source.PublicIPAllocationMethod != nil { - publicIPAllocationMethod := VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod(*source.PublicIPAllocationMethod) - configuration.PublicIPAllocationMethod = &publicIPAllocationMethod + publicIPAllocationMethod := *source.PublicIPAllocationMethod + publicIPAllocationMethodTemp := genruntime.ToEnum(publicIPAllocationMethod, virtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_Values) + configuration.PublicIPAllocationMethod = &publicIPAllocationMethodTemp } else { configuration.PublicIPAllocationMethod = nil } @@ -22330,8 +22852,9 @@ func (configuration *VirtualMachinePublicIPAddressConfiguration_STATUS) AssignPr // DeleteOption if source.DeleteOption != nil { - deleteOption := VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS(*source.DeleteOption) - configuration.DeleteOption = &deleteOption + deleteOption := *source.DeleteOption + deleteOptionTemp := genruntime.ToEnum(deleteOption, virtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS_Values) + configuration.DeleteOption = &deleteOptionTemp } else { configuration.DeleteOption = nil } @@ -22374,16 +22897,18 @@ func (configuration *VirtualMachinePublicIPAddressConfiguration_STATUS) AssignPr // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS(*source.PublicIPAddressVersion) - configuration.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, virtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_Values) + configuration.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { configuration.PublicIPAddressVersion = nil } // PublicIPAllocationMethod if source.PublicIPAllocationMethod != nil { - publicIPAllocationMethod := VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS(*source.PublicIPAllocationMethod) - configuration.PublicIPAllocationMethod = &publicIPAllocationMethod + publicIPAllocationMethod := *source.PublicIPAllocationMethod + publicIPAllocationMethodTemp := genruntime.ToEnum(publicIPAllocationMethod, virtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS_Values) + configuration.PublicIPAllocationMethod = &publicIPAllocationMethodTemp } else { configuration.PublicIPAllocationMethod = nil } @@ -22607,8 +23132,9 @@ func (profile *VMDiskSecurityProfile) AssignProperties_From_VMDiskSecurityProfil // SecurityEncryptionType if source.SecurityEncryptionType != nil { - securityEncryptionType := VMDiskSecurityProfile_SecurityEncryptionType(*source.SecurityEncryptionType) - profile.SecurityEncryptionType = &securityEncryptionType + securityEncryptionType := *source.SecurityEncryptionType + securityEncryptionTypeTemp := genruntime.ToEnum(securityEncryptionType, vMDiskSecurityProfile_SecurityEncryptionType_Values) + profile.SecurityEncryptionType = &securityEncryptionTypeTemp } else { profile.SecurityEncryptionType = nil } @@ -22746,8 +23272,9 @@ func (profile *VMDiskSecurityProfile_STATUS) AssignProperties_From_VMDiskSecurit // SecurityEncryptionType if source.SecurityEncryptionType != nil { - securityEncryptionType := VMDiskSecurityProfile_SecurityEncryptionType_STATUS(*source.SecurityEncryptionType) - profile.SecurityEncryptionType = &securityEncryptionType + securityEncryptionType := *source.SecurityEncryptionType + securityEncryptionTypeTemp := genruntime.ToEnum(securityEncryptionType, vMDiskSecurityProfile_SecurityEncryptionType_STATUS_Values) + profile.SecurityEncryptionType = &securityEncryptionTypeTemp } else { profile.SecurityEncryptionType = nil } @@ -22842,8 +23369,9 @@ func (settings *WindowsVMGuestPatchAutomaticByPlatformSettings) AssignProperties // RebootSetting if source.RebootSetting != nil { - rebootSetting := WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting(*source.RebootSetting) - settings.RebootSetting = &rebootSetting + rebootSetting := *source.RebootSetting + rebootSettingTemp := genruntime.ToEnum(rebootSetting, windowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Values) + settings.RebootSetting = &rebootSettingTemp } else { settings.RebootSetting = nil } @@ -22926,8 +23454,9 @@ func (settings *WindowsVMGuestPatchAutomaticByPlatformSettings_STATUS) AssignPro // RebootSetting if source.RebootSetting != nil { - rebootSetting := WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS(*source.RebootSetting) - settings.RebootSetting = &rebootSetting + rebootSetting := *source.RebootSetting + rebootSettingTemp := genruntime.ToEnum(rebootSetting, windowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Values) + settings.RebootSetting = &rebootSettingTemp } else { settings.RebootSetting = nil } @@ -23042,8 +23571,9 @@ func (listener *WinRMListener) AssignProperties_From_WinRMListener(source *v2022 // Protocol if source.Protocol != nil { - protocol := WinRMListener_Protocol(*source.Protocol) - listener.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, winRMListener_Protocol_Values) + listener.Protocol = &protocolTemp } else { listener.Protocol = nil } @@ -23158,8 +23688,9 @@ func (listener *WinRMListener_STATUS) AssignProperties_From_WinRMListener_STATUS // Protocol if source.Protocol != nil { - protocol := WinRMListener_Protocol_STATUS(*source.Protocol) - listener.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, winRMListener_Protocol_STATUS_Values) + listener.Protocol = &protocolTemp } else { listener.Protocol = nil } @@ -23368,6 +23899,14 @@ const ( LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Unknown = LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting("Unknown") ) +// Mapping from string to LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting +var linuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Values = map[string]LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting{ + "always": LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Always, + "ifrequired": LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_IfRequired, + "never": LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Never, + "unknown": LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Unknown, +} + type LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS string const ( @@ -23377,6 +23916,14 @@ const ( LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Unknown = LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS("Unknown") ) +// Mapping from string to LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS +var linuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Values = map[string]LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS{ + "always": LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Always, + "ifrequired": LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_IfRequired, + "never": LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Never, + "unknown": LinuxVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Unknown, +} + // Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. type PublicIPAddressSku struct { // Name: Specify public IP sku name @@ -23442,16 +23989,18 @@ func (addressSku *PublicIPAddressSku) AssignProperties_From_PublicIPAddressSku(s // Name if source.Name != nil { - name := PublicIPAddressSku_Name(*source.Name) - addressSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, publicIPAddressSku_Name_Values) + addressSku.Name = &nameTemp } else { addressSku.Name = nil } // Tier if source.Tier != nil { - tier := PublicIPAddressSku_Tier(*source.Tier) - addressSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, publicIPAddressSku_Tier_Values) + addressSku.Tier = &tierTemp } else { addressSku.Tier = nil } @@ -23559,16 +24108,18 @@ func (addressSku *PublicIPAddressSku_STATUS) AssignProperties_From_PublicIPAddre // Name if source.Name != nil { - name := PublicIPAddressSku_Name_STATUS(*source.Name) - addressSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, publicIPAddressSku_Name_STATUS_Values) + addressSku.Name = &nameTemp } else { addressSku.Name = nil } // Tier if source.Tier != nil { - tier := PublicIPAddressSku_Tier_STATUS(*source.Tier) - addressSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, publicIPAddressSku_Tier_STATUS_Values) + addressSku.Tier = &tierTemp } else { addressSku.Tier = nil } @@ -23799,6 +24350,12 @@ const ( VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_Detach = VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption("Detach") ) +// Mapping from string to VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption +var virtualMachinePublicIPAddressConfigurationProperties_DeleteOption_Values = map[string]VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption{ + "delete": VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_Delete, + "detach": VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_Detach, +} + type VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS string const ( @@ -23806,6 +24363,12 @@ const ( VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS_Detach = VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS("Detach") ) +// Mapping from string to VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS +var virtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS_Values = map[string]VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS{ + "delete": VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS_Delete, + "detach": VirtualMachinePublicIPAddressConfigurationProperties_DeleteOption_STATUS_Detach, +} + // +kubebuilder:validation:Enum={"IPv4","IPv6"} type VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion string @@ -23814,6 +24377,12 @@ const ( VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv6 = VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion("IPv6") ) +// Mapping from string to VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion +var virtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_Values = map[string]VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion{ + "ipv4": VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv4, + "ipv6": VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_IPv6, +} + type VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS string const ( @@ -23821,6 +24390,12 @@ const ( VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv6 = VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS("IPv6") ) +// Mapping from string to VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS +var virtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_Values = map[string]VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS{ + "ipv4": VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv4, + "ipv6": VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAddressVersion_STATUS_IPv6, +} + // +kubebuilder:validation:Enum={"Dynamic","Static"} type VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod string @@ -23829,6 +24404,12 @@ const ( VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_Static = VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod("Static") ) +// Mapping from string to VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod +var virtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_Values = map[string]VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod{ + "dynamic": VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_Dynamic, + "static": VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_Static, +} + type VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS string const ( @@ -23836,6 +24417,12 @@ const ( VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS_Static = VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS("Static") ) +// Mapping from string to VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS +var virtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS_Values = map[string]VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS{ + "dynamic": VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS_Dynamic, + "static": VirtualMachinePublicIPAddressConfigurationProperties_PublicIPAllocationMethod_STATUS_Static, +} + // Describes a virtual machines network configuration's DNS settings. type VirtualMachinePublicIPAddressDnsSettingsConfiguration struct { // +kubebuilder:validation:Required @@ -23990,6 +24577,12 @@ const ( VMDiskSecurityProfile_SecurityEncryptionType_VMGuestStateOnly = VMDiskSecurityProfile_SecurityEncryptionType("VMGuestStateOnly") ) +// Mapping from string to VMDiskSecurityProfile_SecurityEncryptionType +var vMDiskSecurityProfile_SecurityEncryptionType_Values = map[string]VMDiskSecurityProfile_SecurityEncryptionType{ + "diskwithvmgueststate": VMDiskSecurityProfile_SecurityEncryptionType_DiskWithVMGuestState, + "vmgueststateonly": VMDiskSecurityProfile_SecurityEncryptionType_VMGuestStateOnly, +} + type VMDiskSecurityProfile_SecurityEncryptionType_STATUS string const ( @@ -23997,6 +24590,12 @@ const ( VMDiskSecurityProfile_SecurityEncryptionType_STATUS_VMGuestStateOnly = VMDiskSecurityProfile_SecurityEncryptionType_STATUS("VMGuestStateOnly") ) +// Mapping from string to VMDiskSecurityProfile_SecurityEncryptionType_STATUS +var vMDiskSecurityProfile_SecurityEncryptionType_STATUS_Values = map[string]VMDiskSecurityProfile_SecurityEncryptionType_STATUS{ + "diskwithvmgueststate": VMDiskSecurityProfile_SecurityEncryptionType_STATUS_DiskWithVMGuestState, + "vmgueststateonly": VMDiskSecurityProfile_SecurityEncryptionType_STATUS_VMGuestStateOnly, +} + // +kubebuilder:validation:Enum={"Always","IfRequired","Never","Unknown"} type WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting string @@ -24007,6 +24606,14 @@ const ( WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Unknown = WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting("Unknown") ) +// Mapping from string to WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting +var windowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Values = map[string]WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting{ + "always": WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Always, + "ifrequired": WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_IfRequired, + "never": WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Never, + "unknown": WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_Unknown, +} + type WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS string const ( @@ -24016,6 +24623,14 @@ const ( WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Unknown = WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS("Unknown") ) +// Mapping from string to WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS +var windowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Values = map[string]WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS{ + "always": WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Always, + "ifrequired": WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_IfRequired, + "never": WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Never, + "unknown": WindowsVMGuestPatchAutomaticByPlatformSettings_RebootSetting_STATUS_Unknown, +} + // +kubebuilder:validation:Enum={"Http","Https"} type WinRMListener_Protocol string @@ -24024,6 +24639,12 @@ const ( WinRMListener_Protocol_Https = WinRMListener_Protocol("Https") ) +// Mapping from string to WinRMListener_Protocol +var winRMListener_Protocol_Values = map[string]WinRMListener_Protocol{ + "http": WinRMListener_Protocol_Http, + "https": WinRMListener_Protocol_Https, +} + type WinRMListener_Protocol_STATUS string const ( @@ -24031,6 +24652,12 @@ const ( WinRMListener_Protocol_STATUS_Https = WinRMListener_Protocol_STATUS("Https") ) +// Mapping from string to WinRMListener_Protocol_STATUS +var winRMListener_Protocol_STATUS_Values = map[string]WinRMListener_Protocol_STATUS{ + "http": WinRMListener_Protocol_STATUS_Http, + "https": WinRMListener_Protocol_STATUS_Https, +} + // +kubebuilder:validation:Enum={"Basic","Standard"} type PublicIPAddressSku_Name string @@ -24039,6 +24666,12 @@ const ( PublicIPAddressSku_Name_Standard = PublicIPAddressSku_Name("Standard") ) +// Mapping from string to PublicIPAddressSku_Name +var publicIPAddressSku_Name_Values = map[string]PublicIPAddressSku_Name{ + "basic": PublicIPAddressSku_Name_Basic, + "standard": PublicIPAddressSku_Name_Standard, +} + type PublicIPAddressSku_Name_STATUS string const ( @@ -24046,6 +24679,12 @@ const ( PublicIPAddressSku_Name_STATUS_Standard = PublicIPAddressSku_Name_STATUS("Standard") ) +// Mapping from string to PublicIPAddressSku_Name_STATUS +var publicIPAddressSku_Name_STATUS_Values = map[string]PublicIPAddressSku_Name_STATUS{ + "basic": PublicIPAddressSku_Name_STATUS_Basic, + "standard": PublicIPAddressSku_Name_STATUS_Standard, +} + // +kubebuilder:validation:Enum={"Global","Regional"} type PublicIPAddressSku_Tier string @@ -24054,6 +24693,12 @@ const ( PublicIPAddressSku_Tier_Regional = PublicIPAddressSku_Tier("Regional") ) +// Mapping from string to PublicIPAddressSku_Tier +var publicIPAddressSku_Tier_Values = map[string]PublicIPAddressSku_Tier{ + "global": PublicIPAddressSku_Tier_Global, + "regional": PublicIPAddressSku_Tier_Regional, +} + type PublicIPAddressSku_Tier_STATUS string const ( @@ -24061,6 +24706,12 @@ const ( PublicIPAddressSku_Tier_STATUS_Regional = PublicIPAddressSku_Tier_STATUS("Regional") ) +// Mapping from string to PublicIPAddressSku_Tier_STATUS +var publicIPAddressSku_Tier_STATUS_Values = map[string]PublicIPAddressSku_Tier_STATUS{ + "global": PublicIPAddressSku_Tier_STATUS_Global, + "regional": PublicIPAddressSku_Tier_STATUS_Regional, +} + func init() { SchemeBuilder.Register(&VirtualMachine{}, &VirtualMachineList{}) } diff --git a/v2/api/compute/v1api20220301/virtual_machines_extension_types_gen.go b/v2/api/compute/v1api20220301/virtual_machines_extension_types_gen.go index 3ffbf28f0df..b4ce4c20f96 100644 --- a/v2/api/compute/v1api20220301/virtual_machines_extension_types_gen.go +++ b/v2/api/compute/v1api20220301/virtual_machines_extension_types_gen.go @@ -2064,8 +2064,9 @@ func (status *InstanceViewStatus) AssignProperties_From_InstanceViewStatus(sourc // Level if source.Level != nil { - level := InstanceViewStatus_Level(*source.Level) - status.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, instanceViewStatus_Level_Values) + status.Level = &levelTemp } else { status.Level = nil } @@ -2152,6 +2153,13 @@ const ( InstanceViewStatus_Level_Warning = InstanceViewStatus_Level("Warning") ) +// Mapping from string to InstanceViewStatus_Level +var instanceViewStatus_Level_Values = map[string]InstanceViewStatus_Level{ + "error": InstanceViewStatus_Level_Error, + "info": InstanceViewStatus_Level_Info, + "warning": InstanceViewStatus_Level_Warning, +} + func init() { SchemeBuilder.Register(&VirtualMachinesExtension{}, &VirtualMachinesExtensionList{}) } diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen.go b/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen.go index f2b1f5695bd..34555e2e1fc 100644 --- a/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen.go +++ b/v2/api/compute/v1api20220702/disk_encryption_set_spec_arm_types_gen.go @@ -72,6 +72,14 @@ const ( EncryptionSetIdentity_Type_UserAssigned = EncryptionSetIdentity_Type("UserAssigned") ) +// Mapping from string to EncryptionSetIdentity_Type +var encryptionSetIdentity_Type_Values = map[string]EncryptionSetIdentity_Type{ + "none": EncryptionSetIdentity_Type_None, + "systemassigned": EncryptionSetIdentity_Type_SystemAssigned, + "systemassigned, userassigned": EncryptionSetIdentity_Type_SystemAssignedUserAssigned, + "userassigned": EncryptionSetIdentity_Type_UserAssigned, +} + // Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots type KeyForDiskEncryptionSet_ARM struct { // KeyUrl: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen.go b/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen.go index fd1dbbb8375..a0556daeeff 100644 --- a/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen.go +++ b/v2/api/compute/v1api20220702/disk_encryption_set_status_arm_types_gen.go @@ -105,6 +105,14 @@ const ( EncryptionSetIdentity_Type_STATUS_UserAssigned = EncryptionSetIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to EncryptionSetIdentity_Type_STATUS +var encryptionSetIdentity_Type_STATUS_Values = map[string]EncryptionSetIdentity_Type_STATUS{ + "none": EncryptionSetIdentity_Type_STATUS_None, + "systemassigned": EncryptionSetIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": EncryptionSetIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": EncryptionSetIdentity_Type_STATUS_UserAssigned, +} + type EncryptionSetIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/compute/v1api20220702/disk_encryption_set_types_gen.go b/v2/api/compute/v1api20220702/disk_encryption_set_types_gen.go index 59df67a38cd..7899bfce378 100644 --- a/v2/api/compute/v1api20220702/disk_encryption_set_types_gen.go +++ b/v2/api/compute/v1api20220702/disk_encryption_set_types_gen.go @@ -620,8 +620,9 @@ func (encryptionSet *DiskEncryptionSet_Spec) AssignProperties_From_DiskEncryptio // EncryptionType if source.EncryptionType != nil { - encryptionType := DiskEncryptionSetType(*source.EncryptionType) - encryptionSet.EncryptionType = &encryptionType + encryptionType := *source.EncryptionType + encryptionTypeTemp := genruntime.ToEnum(encryptionType, diskEncryptionSetType_Values) + encryptionSet.EncryptionType = &encryptionTypeTemp } else { encryptionSet.EncryptionType = nil } @@ -1112,8 +1113,9 @@ func (encryptionSet *DiskEncryptionSet_STATUS) AssignProperties_From_DiskEncrypt // EncryptionType if source.EncryptionType != nil { - encryptionType := DiskEncryptionSetType_STATUS(*source.EncryptionType) - encryptionSet.EncryptionType = &encryptionType + encryptionType := *source.EncryptionType + encryptionTypeTemp := genruntime.ToEnum(encryptionType, diskEncryptionSetType_STATUS_Values) + encryptionSet.EncryptionType = &encryptionTypeTemp } else { encryptionSet.EncryptionType = nil } @@ -1483,6 +1485,13 @@ const ( DiskEncryptionSetType_EncryptionAtRestWithPlatformAndCustomerKeys = DiskEncryptionSetType("EncryptionAtRestWithPlatformAndCustomerKeys") ) +// Mapping from string to DiskEncryptionSetType +var diskEncryptionSetType_Values = map[string]DiskEncryptionSetType{ + "confidentialvmencryptedwithcustomerkey": DiskEncryptionSetType_ConfidentialVmEncryptedWithCustomerKey, + "encryptionatrestwithcustomerkey": DiskEncryptionSetType_EncryptionAtRestWithCustomerKey, + "encryptionatrestwithplatformandcustomerkeys": DiskEncryptionSetType_EncryptionAtRestWithPlatformAndCustomerKeys, +} + // The type of key used to encrypt the data of the disk. type DiskEncryptionSetType_STATUS string @@ -1492,6 +1501,13 @@ const ( DiskEncryptionSetType_STATUS_EncryptionAtRestWithPlatformAndCustomerKeys = DiskEncryptionSetType_STATUS("EncryptionAtRestWithPlatformAndCustomerKeys") ) +// Mapping from string to DiskEncryptionSetType_STATUS +var diskEncryptionSetType_STATUS_Values = map[string]DiskEncryptionSetType_STATUS{ + "confidentialvmencryptedwithcustomerkey": DiskEncryptionSetType_STATUS_ConfidentialVmEncryptedWithCustomerKey, + "encryptionatrestwithcustomerkey": DiskEncryptionSetType_STATUS_EncryptionAtRestWithCustomerKey, + "encryptionatrestwithplatformandcustomerkeys": DiskEncryptionSetType_STATUS_EncryptionAtRestWithPlatformAndCustomerKeys, +} + // The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used // to encrypt disks. type EncryptionSetIdentity struct { @@ -1563,8 +1579,9 @@ func (identity *EncryptionSetIdentity) AssignProperties_From_EncryptionSetIdenti // Type if source.Type != nil { - typeVar := EncryptionSetIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, encryptionSetIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1742,8 +1759,9 @@ func (identity *EncryptionSetIdentity_STATUS) AssignProperties_From_EncryptionSe // Type if source.Type != nil { - typeVar := EncryptionSetIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, encryptionSetIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } diff --git a/v2/api/containerinstance/v1api20211001/container_group_spec_arm_types_gen.go b/v2/api/containerinstance/v1api20211001/container_group_spec_arm_types_gen.go index bb24d388689..8c3da20205c 100644 --- a/v2/api/containerinstance/v1api20211001/container_group_spec_arm_types_gen.go +++ b/v2/api/containerinstance/v1api20211001/container_group_spec_arm_types_gen.go @@ -118,6 +118,14 @@ const ( ContainerGroupIdentity_Type_UserAssigned = ContainerGroupIdentity_Type("UserAssigned") ) +// Mapping from string to ContainerGroupIdentity_Type +var containerGroupIdentity_Type_Values = map[string]ContainerGroupIdentity_Type{ + "none": ContainerGroupIdentity_Type_None, + "systemassigned": ContainerGroupIdentity_Type_SystemAssigned, + "systemassigned, userassigned": ContainerGroupIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ContainerGroupIdentity_Type_UserAssigned, +} + // Container group subnet information. type ContainerGroupSubnetId_ARM struct { Id *string `json:"id,omitempty"` diff --git a/v2/api/containerinstance/v1api20211001/container_group_status_arm_types_gen.go b/v2/api/containerinstance/v1api20211001/container_group_status_arm_types_gen.go index a71b5da6050..64e6e10d1f0 100644 --- a/v2/api/containerinstance/v1api20211001/container_group_status_arm_types_gen.go +++ b/v2/api/containerinstance/v1api20211001/container_group_status_arm_types_gen.go @@ -130,6 +130,14 @@ const ( ContainerGroupIdentity_Type_STATUS_UserAssigned = ContainerGroupIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ContainerGroupIdentity_Type_STATUS +var containerGroupIdentity_Type_STATUS_Values = map[string]ContainerGroupIdentity_Type_STATUS{ + "none": ContainerGroupIdentity_Type_STATUS_None, + "systemassigned": ContainerGroupIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": ContainerGroupIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ContainerGroupIdentity_Type_STATUS_UserAssigned, +} + // Container group subnet information. type ContainerGroupSubnetId_STATUS_ARM struct { // Id: Resource ID of virtual network and subnet. diff --git a/v2/api/containerinstance/v1api20211001/container_group_types_gen.go b/v2/api/containerinstance/v1api20211001/container_group_types_gen.go index e199bec64d4..cf17c2f656d 100644 --- a/v2/api/containerinstance/v1api20211001/container_group_types_gen.go +++ b/v2/api/containerinstance/v1api20211001/container_group_types_gen.go @@ -911,8 +911,9 @@ func (group *ContainerGroup_Spec) AssignProperties_From_ContainerGroup_Spec(sour // OsType if source.OsType != nil { - osType := ContainerGroup_Properties_OsType_Spec(*source.OsType) - group.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, containerGroup_Properties_OsType_Spec_Values) + group.OsType = &osTypeTemp } else { group.OsType = nil } @@ -927,16 +928,18 @@ func (group *ContainerGroup_Spec) AssignProperties_From_ContainerGroup_Spec(sour // RestartPolicy if source.RestartPolicy != nil { - restartPolicy := ContainerGroup_Properties_RestartPolicy_Spec(*source.RestartPolicy) - group.RestartPolicy = &restartPolicy + restartPolicy := *source.RestartPolicy + restartPolicyTemp := genruntime.ToEnum(restartPolicy, containerGroup_Properties_RestartPolicy_Spec_Values) + group.RestartPolicy = &restartPolicyTemp } else { group.RestartPolicy = nil } // Sku if source.Sku != nil { - sku := ContainerGroupSku(*source.Sku) - group.Sku = &sku + sku := *source.Sku + skuTemp := genruntime.ToEnum(sku, containerGroupSku_Values) + group.Sku = &skuTemp } else { group.Sku = nil } @@ -1902,8 +1905,9 @@ func (group *ContainerGroup_STATUS) AssignProperties_From_ContainerGroup_STATUS( // OsType if source.OsType != nil { - osType := ContainerGroup_Properties_OsType_STATUS(*source.OsType) - group.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, containerGroup_Properties_OsType_STATUS_Values) + group.OsType = &osTypeTemp } else { group.OsType = nil } @@ -1913,16 +1917,18 @@ func (group *ContainerGroup_STATUS) AssignProperties_From_ContainerGroup_STATUS( // RestartPolicy if source.RestartPolicy != nil { - restartPolicy := ContainerGroup_Properties_RestartPolicy_STATUS(*source.RestartPolicy) - group.RestartPolicy = &restartPolicy + restartPolicy := *source.RestartPolicy + restartPolicyTemp := genruntime.ToEnum(restartPolicy, containerGroup_Properties_RestartPolicy_STATUS_Values) + group.RestartPolicy = &restartPolicyTemp } else { group.RestartPolicy = nil } // Sku if source.Sku != nil { - sku := ContainerGroupSku_STATUS(*source.Sku) - group.Sku = &sku + sku := *source.Sku + skuTemp := genruntime.ToEnum(sku, containerGroupSku_STATUS_Values) + group.Sku = &skuTemp } else { group.Sku = nil } @@ -3292,6 +3298,12 @@ const ( ContainerGroup_Properties_OsType_Spec_Windows = ContainerGroup_Properties_OsType_Spec("Windows") ) +// Mapping from string to ContainerGroup_Properties_OsType_Spec +var containerGroup_Properties_OsType_Spec_Values = map[string]ContainerGroup_Properties_OsType_Spec{ + "linux": ContainerGroup_Properties_OsType_Spec_Linux, + "windows": ContainerGroup_Properties_OsType_Spec_Windows, +} + type ContainerGroup_Properties_OsType_STATUS string const ( @@ -3299,6 +3311,12 @@ const ( ContainerGroup_Properties_OsType_STATUS_Windows = ContainerGroup_Properties_OsType_STATUS("Windows") ) +// Mapping from string to ContainerGroup_Properties_OsType_STATUS +var containerGroup_Properties_OsType_STATUS_Values = map[string]ContainerGroup_Properties_OsType_STATUS{ + "linux": ContainerGroup_Properties_OsType_STATUS_Linux, + "windows": ContainerGroup_Properties_OsType_STATUS_Windows, +} + // +kubebuilder:validation:Enum={"Always","Never","OnFailure"} type ContainerGroup_Properties_RestartPolicy_Spec string @@ -3308,6 +3326,13 @@ const ( ContainerGroup_Properties_RestartPolicy_Spec_OnFailure = ContainerGroup_Properties_RestartPolicy_Spec("OnFailure") ) +// Mapping from string to ContainerGroup_Properties_RestartPolicy_Spec +var containerGroup_Properties_RestartPolicy_Spec_Values = map[string]ContainerGroup_Properties_RestartPolicy_Spec{ + "always": ContainerGroup_Properties_RestartPolicy_Spec_Always, + "never": ContainerGroup_Properties_RestartPolicy_Spec_Never, + "onfailure": ContainerGroup_Properties_RestartPolicy_Spec_OnFailure, +} + type ContainerGroup_Properties_RestartPolicy_STATUS string const ( @@ -3316,6 +3341,13 @@ const ( ContainerGroup_Properties_RestartPolicy_STATUS_OnFailure = ContainerGroup_Properties_RestartPolicy_STATUS("OnFailure") ) +// Mapping from string to ContainerGroup_Properties_RestartPolicy_STATUS +var containerGroup_Properties_RestartPolicy_STATUS_Values = map[string]ContainerGroup_Properties_RestartPolicy_STATUS{ + "always": ContainerGroup_Properties_RestartPolicy_STATUS_Always, + "never": ContainerGroup_Properties_RestartPolicy_STATUS_Never, + "onfailure": ContainerGroup_Properties_RestartPolicy_STATUS_OnFailure, +} + // Container group diagnostic information. type ContainerGroupDiagnostics struct { // LogAnalytics: Container group log analytics information. @@ -3586,8 +3618,9 @@ func (identity *ContainerGroupIdentity) AssignProperties_From_ContainerGroupIden // Type if source.Type != nil { - typeVar := ContainerGroupIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, containerGroupIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3762,8 +3795,9 @@ func (identity *ContainerGroupIdentity_STATUS) AssignProperties_From_ContainerGr // Type if source.Type != nil { - typeVar := ContainerGroupIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, containerGroupIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3847,6 +3881,12 @@ const ( ContainerGroupSku_Standard = ContainerGroupSku("Standard") ) +// Mapping from string to ContainerGroupSku +var containerGroupSku_Values = map[string]ContainerGroupSku{ + "dedicated": ContainerGroupSku_Dedicated, + "standard": ContainerGroupSku_Standard, +} + // The container group SKU. type ContainerGroupSku_STATUS string @@ -3855,6 +3895,12 @@ const ( ContainerGroupSku_STATUS_Standard = ContainerGroupSku_STATUS("Standard") ) +// Mapping from string to ContainerGroupSku_STATUS +var containerGroupSku_STATUS_Values = map[string]ContainerGroupSku_STATUS{ + "dedicated": ContainerGroupSku_STATUS_Dedicated, + "standard": ContainerGroupSku_STATUS_Standard, +} + // Container group subnet information. type ContainerGroupSubnetId struct { // Name: Friendly name for the subnet. @@ -5447,8 +5493,9 @@ func (address *IpAddress) AssignProperties_From_IpAddress(source *v20211001s.IpA // AutoGeneratedDomainNameLabelScope if source.AutoGeneratedDomainNameLabelScope != nil { - autoGeneratedDomainNameLabelScope := IpAddress_AutoGeneratedDomainNameLabelScope(*source.AutoGeneratedDomainNameLabelScope) - address.AutoGeneratedDomainNameLabelScope = &autoGeneratedDomainNameLabelScope + autoGeneratedDomainNameLabelScope := *source.AutoGeneratedDomainNameLabelScope + autoGeneratedDomainNameLabelScopeTemp := genruntime.ToEnum(autoGeneratedDomainNameLabelScope, ipAddress_AutoGeneratedDomainNameLabelScope_Values) + address.AutoGeneratedDomainNameLabelScope = &autoGeneratedDomainNameLabelScopeTemp } else { address.AutoGeneratedDomainNameLabelScope = nil } @@ -5479,8 +5526,9 @@ func (address *IpAddress) AssignProperties_From_IpAddress(source *v20211001s.IpA // Type if source.Type != nil { - typeVar := IpAddress_Type(*source.Type) - address.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, ipAddress_Type_Values) + address.Type = &typeTemp } else { address.Type = nil } @@ -5682,8 +5730,9 @@ func (address *IpAddress_STATUS) AssignProperties_From_IpAddress_STATUS(source * // AutoGeneratedDomainNameLabelScope if source.AutoGeneratedDomainNameLabelScope != nil { - autoGeneratedDomainNameLabelScope := IpAddress_AutoGeneratedDomainNameLabelScope_STATUS(*source.AutoGeneratedDomainNameLabelScope) - address.AutoGeneratedDomainNameLabelScope = &autoGeneratedDomainNameLabelScope + autoGeneratedDomainNameLabelScope := *source.AutoGeneratedDomainNameLabelScope + autoGeneratedDomainNameLabelScopeTemp := genruntime.ToEnum(autoGeneratedDomainNameLabelScope, ipAddress_AutoGeneratedDomainNameLabelScope_STATUS_Values) + address.AutoGeneratedDomainNameLabelScope = &autoGeneratedDomainNameLabelScopeTemp } else { address.AutoGeneratedDomainNameLabelScope = nil } @@ -5717,8 +5766,9 @@ func (address *IpAddress_STATUS) AssignProperties_From_IpAddress_STATUS(source * // Type if source.Type != nil { - typeVar := IpAddress_Type_STATUS(*source.Type) - address.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, ipAddress_Type_STATUS_Values) + address.Type = &typeTemp } else { address.Type = nil } @@ -6622,8 +6672,9 @@ func (port *ContainerPort) AssignProperties_From_ContainerPort(source *v20211001 // Protocol if source.Protocol != nil { - protocol := ContainerPort_Protocol(*source.Protocol) - port.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, containerPort_Protocol_Values) + port.Protocol = &protocolTemp } else { port.Protocol = nil } @@ -6724,8 +6775,9 @@ func (port *ContainerPort_STATUS) AssignProperties_From_ContainerPort_STATUS(sou // Protocol if source.Protocol != nil { - protocol := ContainerPort_Protocol_STATUS(*source.Protocol) - port.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, containerPort_Protocol_STATUS_Values) + port.Protocol = &protocolTemp } else { port.Protocol = nil } @@ -8207,6 +8259,15 @@ const ( IpAddress_AutoGeneratedDomainNameLabelScope_Unsecure = IpAddress_AutoGeneratedDomainNameLabelScope("Unsecure") ) +// Mapping from string to IpAddress_AutoGeneratedDomainNameLabelScope +var ipAddress_AutoGeneratedDomainNameLabelScope_Values = map[string]IpAddress_AutoGeneratedDomainNameLabelScope{ + "noreuse": IpAddress_AutoGeneratedDomainNameLabelScope_Noreuse, + "resourcegroupreuse": IpAddress_AutoGeneratedDomainNameLabelScope_ResourceGroupReuse, + "subscriptionreuse": IpAddress_AutoGeneratedDomainNameLabelScope_SubscriptionReuse, + "tenantreuse": IpAddress_AutoGeneratedDomainNameLabelScope_TenantReuse, + "unsecure": IpAddress_AutoGeneratedDomainNameLabelScope_Unsecure, +} + type IpAddress_AutoGeneratedDomainNameLabelScope_STATUS string const ( @@ -8217,6 +8278,15 @@ const ( IpAddress_AutoGeneratedDomainNameLabelScope_STATUS_Unsecure = IpAddress_AutoGeneratedDomainNameLabelScope_STATUS("Unsecure") ) +// Mapping from string to IpAddress_AutoGeneratedDomainNameLabelScope_STATUS +var ipAddress_AutoGeneratedDomainNameLabelScope_STATUS_Values = map[string]IpAddress_AutoGeneratedDomainNameLabelScope_STATUS{ + "noreuse": IpAddress_AutoGeneratedDomainNameLabelScope_STATUS_Noreuse, + "resourcegroupreuse": IpAddress_AutoGeneratedDomainNameLabelScope_STATUS_ResourceGroupReuse, + "subscriptionreuse": IpAddress_AutoGeneratedDomainNameLabelScope_STATUS_SubscriptionReuse, + "tenantreuse": IpAddress_AutoGeneratedDomainNameLabelScope_STATUS_TenantReuse, + "unsecure": IpAddress_AutoGeneratedDomainNameLabelScope_STATUS_Unsecure, +} + // +kubebuilder:validation:Enum={"Private","Public"} type IpAddress_Type string @@ -8225,6 +8295,12 @@ const ( IpAddress_Type_Public = IpAddress_Type("Public") ) +// Mapping from string to IpAddress_Type +var ipAddress_Type_Values = map[string]IpAddress_Type{ + "private": IpAddress_Type_Private, + "public": IpAddress_Type_Public, +} + type IpAddress_Type_STATUS string const ( @@ -8232,6 +8308,12 @@ const ( IpAddress_Type_STATUS_Public = IpAddress_Type_STATUS("Public") ) +// Mapping from string to IpAddress_Type_STATUS +var ipAddress_Type_STATUS_Values = map[string]IpAddress_Type_STATUS{ + "private": IpAddress_Type_STATUS_Private, + "public": IpAddress_Type_STATUS_Public, +} + // Container group log analytics information. type LogAnalytics struct { // LogType: The log type to be used. @@ -8348,8 +8430,9 @@ func (analytics *LogAnalytics) AssignProperties_From_LogAnalytics(source *v20211 // LogType if source.LogType != nil { - logType := LogAnalytics_LogType(*source.LogType) - analytics.LogType = &logType + logType := *source.LogType + logTypeTemp := genruntime.ToEnum(logType, logAnalytics_LogType_Values) + analytics.LogType = &logTypeTemp } else { analytics.LogType = nil } @@ -8502,8 +8585,9 @@ func (analytics *LogAnalytics_STATUS) AssignProperties_From_LogAnalytics_STATUS( // LogType if source.LogType != nil { - logType := LogAnalytics_LogType_STATUS(*source.LogType) - analytics.LogType = &logType + logType := *source.LogType + logTypeTemp := genruntime.ToEnum(logType, logAnalytics_LogType_STATUS_Values) + analytics.LogType = &logTypeTemp } else { analytics.LogType = nil } @@ -8617,8 +8701,9 @@ func (port *Port) AssignProperties_From_Port(source *v20211001s.Port) error { // Protocol if source.Protocol != nil { - protocol := Port_Protocol(*source.Protocol) - port.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, port_Protocol_Values) + port.Protocol = &protocolTemp } else { port.Protocol = nil } @@ -8719,8 +8804,9 @@ func (port *Port_STATUS) AssignProperties_From_Port_STATUS(source *v20211001s.Po // Protocol if source.Protocol != nil { - protocol := Port_Protocol_STATUS(*source.Protocol) - port.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, port_Protocol_STATUS_Values) + port.Protocol = &protocolTemp } else { port.Protocol = nil } @@ -9682,8 +9768,9 @@ func (httpGet *ContainerHttpGet) AssignProperties_From_ContainerHttpGet(source * // Scheme if source.Scheme != nil { - scheme := ContainerHttpGet_Scheme(*source.Scheme) - httpGet.Scheme = &scheme + scheme := *source.Scheme + schemeTemp := genruntime.ToEnum(scheme, containerHttpGet_Scheme_Values) + httpGet.Scheme = &schemeTemp } else { httpGet.Scheme = nil } @@ -9869,8 +9956,9 @@ func (httpGet *ContainerHttpGet_STATUS) AssignProperties_From_ContainerHttpGet_S // Scheme if source.Scheme != nil { - scheme := ContainerHttpGet_Scheme_STATUS(*source.Scheme) - httpGet.Scheme = &scheme + scheme := *source.Scheme + schemeTemp := genruntime.ToEnum(scheme, containerHttpGet_Scheme_STATUS_Values) + httpGet.Scheme = &schemeTemp } else { httpGet.Scheme = nil } @@ -9935,6 +10023,12 @@ const ( ContainerPort_Protocol_UDP = ContainerPort_Protocol("UDP") ) +// Mapping from string to ContainerPort_Protocol +var containerPort_Protocol_Values = map[string]ContainerPort_Protocol{ + "tcp": ContainerPort_Protocol_TCP, + "udp": ContainerPort_Protocol_UDP, +} + type ContainerPort_Protocol_STATUS string const ( @@ -9942,6 +10036,12 @@ const ( ContainerPort_Protocol_STATUS_UDP = ContainerPort_Protocol_STATUS("UDP") ) +// Mapping from string to ContainerPort_Protocol_STATUS +var containerPort_Protocol_STATUS_Values = map[string]ContainerPort_Protocol_STATUS{ + "tcp": ContainerPort_Protocol_STATUS_TCP, + "udp": ContainerPort_Protocol_STATUS_UDP, +} + // The container instance state. type ContainerState_STATUS struct { // DetailStatus: The human-readable status of the container instance state. @@ -10069,6 +10169,12 @@ const ( LogAnalytics_LogType_ContainerInstanceLogs = LogAnalytics_LogType("ContainerInstanceLogs") ) +// Mapping from string to LogAnalytics_LogType +var logAnalytics_LogType_Values = map[string]LogAnalytics_LogType{ + "containerinsights": LogAnalytics_LogType_ContainerInsights, + "containerinstancelogs": LogAnalytics_LogType_ContainerInstanceLogs, +} + type LogAnalytics_LogType_STATUS string const ( @@ -10076,6 +10182,12 @@ const ( LogAnalytics_LogType_STATUS_ContainerInstanceLogs = LogAnalytics_LogType_STATUS("ContainerInstanceLogs") ) +// Mapping from string to LogAnalytics_LogType_STATUS +var logAnalytics_LogType_STATUS_Values = map[string]LogAnalytics_LogType_STATUS{ + "containerinsights": LogAnalytics_LogType_STATUS_ContainerInsights, + "containerinstancelogs": LogAnalytics_LogType_STATUS_ContainerInstanceLogs, +} + // +kubebuilder:validation:Enum={"TCP","UDP"} type Port_Protocol string @@ -10084,6 +10196,12 @@ const ( Port_Protocol_UDP = Port_Protocol("UDP") ) +// Mapping from string to Port_Protocol +var port_Protocol_Values = map[string]Port_Protocol{ + "tcp": Port_Protocol_TCP, + "udp": Port_Protocol_UDP, +} + type Port_Protocol_STATUS string const ( @@ -10091,6 +10209,12 @@ const ( Port_Protocol_STATUS_UDP = Port_Protocol_STATUS("UDP") ) +// Mapping from string to Port_Protocol_STATUS +var port_Protocol_STATUS_Values = map[string]Port_Protocol_STATUS{ + "tcp": Port_Protocol_STATUS_TCP, + "udp": Port_Protocol_STATUS_UDP, +} + // The resource limits. type ResourceLimits struct { // Cpu: The CPU limit of this container instance. @@ -10761,6 +10885,12 @@ const ( ContainerHttpGet_Scheme_Https = ContainerHttpGet_Scheme("https") ) +// Mapping from string to ContainerHttpGet_Scheme +var containerHttpGet_Scheme_Values = map[string]ContainerHttpGet_Scheme{ + "http": ContainerHttpGet_Scheme_Http, + "https": ContainerHttpGet_Scheme_Https, +} + type ContainerHttpGet_Scheme_STATUS string const ( @@ -10768,6 +10898,12 @@ const ( ContainerHttpGet_Scheme_STATUS_Https = ContainerHttpGet_Scheme_STATUS("https") ) +// Mapping from string to ContainerHttpGet_Scheme_STATUS +var containerHttpGet_Scheme_STATUS_Values = map[string]ContainerHttpGet_Scheme_STATUS{ + "http": ContainerHttpGet_Scheme_STATUS_Http, + "https": ContainerHttpGet_Scheme_STATUS_Https, +} + // The GPU resource. type GpuResource struct { // +kubebuilder:validation:Required @@ -10838,8 +10974,9 @@ func (resource *GpuResource) AssignProperties_From_GpuResource(source *v20211001 // Sku if source.Sku != nil { - sku := GpuResource_Sku(*source.Sku) - resource.Sku = &sku + sku := *source.Sku + skuTemp := genruntime.ToEnum(sku, gpuResource_Sku_Values) + resource.Sku = &skuTemp } else { resource.Sku = nil } @@ -10940,8 +11077,9 @@ func (resource *GpuResource_STATUS) AssignProperties_From_GpuResource_STATUS(sou // Sku if source.Sku != nil { - sku := GpuResource_Sku_STATUS(*source.Sku) - resource.Sku = &sku + sku := *source.Sku + skuTemp := genruntime.ToEnum(sku, gpuResource_Sku_STATUS_Values) + resource.Sku = &skuTemp } else { resource.Sku = nil } @@ -11168,6 +11306,13 @@ const ( GpuResource_Sku_V100 = GpuResource_Sku("V100") ) +// Mapping from string to GpuResource_Sku +var gpuResource_Sku_Values = map[string]GpuResource_Sku{ + "k80": GpuResource_Sku_K80, + "p100": GpuResource_Sku_P100, + "v100": GpuResource_Sku_V100, +} + type GpuResource_Sku_STATUS string const ( @@ -11176,6 +11321,13 @@ const ( GpuResource_Sku_STATUS_V100 = GpuResource_Sku_STATUS("V100") ) +// Mapping from string to GpuResource_Sku_STATUS +var gpuResource_Sku_STATUS_Values = map[string]GpuResource_Sku_STATUS{ + "k80": GpuResource_Sku_STATUS_K80, + "p100": GpuResource_Sku_STATUS_P100, + "v100": GpuResource_Sku_STATUS_V100, +} + func init() { SchemeBuilder.Register(&ContainerGroup{}, &ContainerGroupList{}) } diff --git a/v2/api/containerregistry/v1api20210901/registry_spec_arm_types_gen.go b/v2/api/containerregistry/v1api20210901/registry_spec_arm_types_gen.go index 16fdf0af803..145a9357f9c 100644 --- a/v2/api/containerregistry/v1api20210901/registry_spec_arm_types_gen.go +++ b/v2/api/containerregistry/v1api20210901/registry_spec_arm_types_gen.go @@ -104,6 +104,14 @@ const ( IdentityProperties_Type_UserAssigned = IdentityProperties_Type("UserAssigned") ) +// Mapping from string to IdentityProperties_Type +var identityProperties_Type_Values = map[string]IdentityProperties_Type{ + "none": IdentityProperties_Type_None, + "systemassigned": IdentityProperties_Type_SystemAssigned, + "systemassigned, userassigned": IdentityProperties_Type_SystemAssignedUserAssigned, + "userassigned": IdentityProperties_Type_UserAssigned, +} + // The network rule set for a container registry. type NetworkRuleSet_ARM struct { // DefaultAction: The default action of allow or deny when no other rules match. @@ -138,6 +146,14 @@ const ( Sku_Name_Standard = Sku_Name("Standard") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "basic": Sku_Name_Basic, + "classic": Sku_Name_Classic, + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/containerregistry/v1api20210901/registry_status_arm_types_gen.go b/v2/api/containerregistry/v1api20210901/registry_status_arm_types_gen.go index c0caf68639c..8925e74ab11 100644 --- a/v2/api/containerregistry/v1api20210901/registry_status_arm_types_gen.go +++ b/v2/api/containerregistry/v1api20210901/registry_status_arm_types_gen.go @@ -143,6 +143,14 @@ const ( IdentityProperties_Type_STATUS_UserAssigned = IdentityProperties_Type_STATUS("UserAssigned") ) +// Mapping from string to IdentityProperties_Type_STATUS +var identityProperties_Type_STATUS_Values = map[string]IdentityProperties_Type_STATUS{ + "none": IdentityProperties_Type_STATUS_None, + "systemassigned": IdentityProperties_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": IdentityProperties_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": IdentityProperties_Type_STATUS_UserAssigned, +} + // The network rule set for a container registry. type NetworkRuleSet_STATUS_ARM struct { // DefaultAction: The default action of allow or deny when no other rules match. @@ -182,6 +190,14 @@ const ( Sku_Name_STATUS_Standard = Sku_Name_STATUS("Standard") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "basic": Sku_Name_STATUS_Basic, + "classic": Sku_Name_STATUS_Classic, + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + type Sku_Tier_STATUS string const ( @@ -191,6 +207,14 @@ const ( Sku_Tier_STATUS_Standard = Sku_Tier_STATUS("Standard") ) +// Mapping from string to Sku_Tier_STATUS +var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{ + "basic": Sku_Tier_STATUS_Basic, + "classic": Sku_Tier_STATUS_Classic, + "premium": Sku_Tier_STATUS_Premium, + "standard": Sku_Tier_STATUS_Standard, +} + // The status of an Azure resource at the time the operation was called. type Status_STATUS_ARM struct { // DisplayStatus: The short label for the status. @@ -212,6 +236,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -221,6 +253,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + type UserIdentityProperties_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/containerregistry/v1api20210901/registry_types_gen.go b/v2/api/containerregistry/v1api20210901/registry_types_gen.go index 2bb7a614707..2efae855677 100644 --- a/v2/api/containerregistry/v1api20210901/registry_types_gen.go +++ b/v2/api/containerregistry/v1api20210901/registry_types_gen.go @@ -735,8 +735,9 @@ func (registry *Registry_Spec) AssignProperties_From_Registry_Spec(source *v2021 // NetworkRuleBypassOptions if source.NetworkRuleBypassOptions != nil { - networkRuleBypassOption := RegistryProperties_NetworkRuleBypassOptions(*source.NetworkRuleBypassOptions) - registry.NetworkRuleBypassOptions = &networkRuleBypassOption + networkRuleBypassOption := *source.NetworkRuleBypassOptions + networkRuleBypassOptionTemp := genruntime.ToEnum(networkRuleBypassOption, registryProperties_NetworkRuleBypassOptions_Values) + registry.NetworkRuleBypassOptions = &networkRuleBypassOptionTemp } else { registry.NetworkRuleBypassOptions = nil } @@ -775,8 +776,9 @@ func (registry *Registry_Spec) AssignProperties_From_Registry_Spec(source *v2021 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := RegistryProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - registry.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, registryProperties_PublicNetworkAccess_Values) + registry.PublicNetworkAccess = &publicNetworkAccessTemp } else { registry.PublicNetworkAccess = nil } @@ -798,8 +800,9 @@ func (registry *Registry_Spec) AssignProperties_From_Registry_Spec(source *v2021 // ZoneRedundancy if source.ZoneRedundancy != nil { - zoneRedundancy := RegistryProperties_ZoneRedundancy(*source.ZoneRedundancy) - registry.ZoneRedundancy = &zoneRedundancy + zoneRedundancy := *source.ZoneRedundancy + zoneRedundancyTemp := genruntime.ToEnum(zoneRedundancy, registryProperties_ZoneRedundancy_Values) + registry.ZoneRedundancy = &zoneRedundancyTemp } else { registry.ZoneRedundancy = nil } @@ -1487,8 +1490,9 @@ func (registry *Registry_STATUS) AssignProperties_From_Registry_STATUS(source *v // NetworkRuleBypassOptions if source.NetworkRuleBypassOptions != nil { - networkRuleBypassOption := RegistryProperties_NetworkRuleBypassOptions_STATUS(*source.NetworkRuleBypassOptions) - registry.NetworkRuleBypassOptions = &networkRuleBypassOption + networkRuleBypassOption := *source.NetworkRuleBypassOptions + networkRuleBypassOptionTemp := genruntime.ToEnum(networkRuleBypassOption, registryProperties_NetworkRuleBypassOptions_STATUS_Values) + registry.NetworkRuleBypassOptions = &networkRuleBypassOptionTemp } else { registry.NetworkRuleBypassOptions = nil } @@ -1537,16 +1541,18 @@ func (registry *Registry_STATUS) AssignProperties_From_Registry_STATUS(source *v // ProvisioningState if source.ProvisioningState != nil { - provisioningState := RegistryProperties_ProvisioningState_STATUS(*source.ProvisioningState) - registry.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, registryProperties_ProvisioningState_STATUS_Values) + registry.ProvisioningState = &provisioningStateTemp } else { registry.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := RegistryProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - registry.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, registryProperties_PublicNetworkAccess_STATUS_Values) + registry.PublicNetworkAccess = &publicNetworkAccessTemp } else { registry.PublicNetworkAccess = nil } @@ -1595,8 +1601,9 @@ func (registry *Registry_STATUS) AssignProperties_From_Registry_STATUS(source *v // ZoneRedundancy if source.ZoneRedundancy != nil { - zoneRedundancy := RegistryProperties_ZoneRedundancy_STATUS(*source.ZoneRedundancy) - registry.ZoneRedundancy = &zoneRedundancy + zoneRedundancy := *source.ZoneRedundancy + zoneRedundancyTemp := genruntime.ToEnum(zoneRedundancy, registryProperties_ZoneRedundancy_STATUS_Values) + registry.ZoneRedundancy = &zoneRedundancyTemp } else { registry.ZoneRedundancy = nil } @@ -1883,8 +1890,9 @@ func (property *EncryptionProperty) AssignProperties_From_EncryptionProperty(sou // Status if source.Status != nil { - status := EncryptionProperty_Status(*source.Status) - property.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, encryptionProperty_Status_Values) + property.Status = &statusTemp } else { property.Status = nil } @@ -2016,8 +2024,9 @@ func (property *EncryptionProperty_STATUS) AssignProperties_From_EncryptionPrope // Status if source.Status != nil { - status := EncryptionProperty_Status_STATUS(*source.Status) - property.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, encryptionProperty_Status_STATUS_Values) + property.Status = &statusTemp } else { property.Status = nil } @@ -2167,8 +2176,9 @@ func (properties *IdentityProperties) AssignProperties_From_IdentityProperties(s // Type if source.Type != nil { - typeVar := IdentityProperties_Type(*source.Type) - properties.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identityProperties_Type_Values) + properties.Type = &typeTemp } else { properties.Type = nil } @@ -2354,8 +2364,9 @@ func (properties *IdentityProperties_STATUS) AssignProperties_From_IdentityPrope // Type if source.Type != nil { - typeVar := IdentityProperties_Type_STATUS(*source.Type) - properties.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identityProperties_Type_STATUS_Values) + properties.Type = &typeTemp } else { properties.Type = nil } @@ -2503,8 +2514,9 @@ func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *v202 // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -2654,8 +2666,9 @@ func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATU // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction_STATUS(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_STATUS_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -3287,6 +3300,12 @@ const ( RegistryProperties_NetworkRuleBypassOptions_None = RegistryProperties_NetworkRuleBypassOptions("None") ) +// Mapping from string to RegistryProperties_NetworkRuleBypassOptions +var registryProperties_NetworkRuleBypassOptions_Values = map[string]RegistryProperties_NetworkRuleBypassOptions{ + "azureservices": RegistryProperties_NetworkRuleBypassOptions_AzureServices, + "none": RegistryProperties_NetworkRuleBypassOptions_None, +} + type RegistryProperties_NetworkRuleBypassOptions_STATUS string const ( @@ -3294,6 +3313,12 @@ const ( RegistryProperties_NetworkRuleBypassOptions_STATUS_None = RegistryProperties_NetworkRuleBypassOptions_STATUS("None") ) +// Mapping from string to RegistryProperties_NetworkRuleBypassOptions_STATUS +var registryProperties_NetworkRuleBypassOptions_STATUS_Values = map[string]RegistryProperties_NetworkRuleBypassOptions_STATUS{ + "azureservices": RegistryProperties_NetworkRuleBypassOptions_STATUS_AzureServices, + "none": RegistryProperties_NetworkRuleBypassOptions_STATUS_None, +} + type RegistryProperties_ProvisioningState_STATUS string const ( @@ -3305,6 +3330,16 @@ const ( RegistryProperties_ProvisioningState_STATUS_Updating = RegistryProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to RegistryProperties_ProvisioningState_STATUS +var registryProperties_ProvisioningState_STATUS_Values = map[string]RegistryProperties_ProvisioningState_STATUS{ + "canceled": RegistryProperties_ProvisioningState_STATUS_Canceled, + "creating": RegistryProperties_ProvisioningState_STATUS_Creating, + "deleting": RegistryProperties_ProvisioningState_STATUS_Deleting, + "failed": RegistryProperties_ProvisioningState_STATUS_Failed, + "succeeded": RegistryProperties_ProvisioningState_STATUS_Succeeded, + "updating": RegistryProperties_ProvisioningState_STATUS_Updating, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type RegistryProperties_PublicNetworkAccess string @@ -3313,6 +3348,12 @@ const ( RegistryProperties_PublicNetworkAccess_Enabled = RegistryProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to RegistryProperties_PublicNetworkAccess +var registryProperties_PublicNetworkAccess_Values = map[string]RegistryProperties_PublicNetworkAccess{ + "disabled": RegistryProperties_PublicNetworkAccess_Disabled, + "enabled": RegistryProperties_PublicNetworkAccess_Enabled, +} + type RegistryProperties_PublicNetworkAccess_STATUS string const ( @@ -3320,6 +3361,12 @@ const ( RegistryProperties_PublicNetworkAccess_STATUS_Enabled = RegistryProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to RegistryProperties_PublicNetworkAccess_STATUS +var registryProperties_PublicNetworkAccess_STATUS_Values = map[string]RegistryProperties_PublicNetworkAccess_STATUS{ + "disabled": RegistryProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": RegistryProperties_PublicNetworkAccess_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type RegistryProperties_ZoneRedundancy string @@ -3328,6 +3375,12 @@ const ( RegistryProperties_ZoneRedundancy_Enabled = RegistryProperties_ZoneRedundancy("Enabled") ) +// Mapping from string to RegistryProperties_ZoneRedundancy +var registryProperties_ZoneRedundancy_Values = map[string]RegistryProperties_ZoneRedundancy{ + "disabled": RegistryProperties_ZoneRedundancy_Disabled, + "enabled": RegistryProperties_ZoneRedundancy_Enabled, +} + type RegistryProperties_ZoneRedundancy_STATUS string const ( @@ -3335,6 +3388,12 @@ const ( RegistryProperties_ZoneRedundancy_STATUS_Enabled = RegistryProperties_ZoneRedundancy_STATUS("Enabled") ) +// Mapping from string to RegistryProperties_ZoneRedundancy_STATUS +var registryProperties_ZoneRedundancy_STATUS_Values = map[string]RegistryProperties_ZoneRedundancy_STATUS{ + "disabled": RegistryProperties_ZoneRedundancy_STATUS_Disabled, + "enabled": RegistryProperties_ZoneRedundancy_STATUS_Enabled, +} + // The SKU of a container registry. type Sku struct { // +kubebuilder:validation:Required @@ -3386,8 +3445,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20210901s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3479,16 +3539,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20210901s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Sku_Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -3704,8 +3766,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -3718,8 +3781,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -3780,6 +3844,12 @@ const ( EncryptionProperty_Status_Enabled = EncryptionProperty_Status("enabled") ) +// Mapping from string to EncryptionProperty_Status +var encryptionProperty_Status_Values = map[string]EncryptionProperty_Status{ + "disabled": EncryptionProperty_Status_Disabled, + "enabled": EncryptionProperty_Status_Enabled, +} + type EncryptionProperty_Status_STATUS string const ( @@ -3787,6 +3857,12 @@ const ( EncryptionProperty_Status_STATUS_Enabled = EncryptionProperty_Status_STATUS("enabled") ) +// Mapping from string to EncryptionProperty_Status_STATUS +var encryptionProperty_Status_STATUS_Values = map[string]EncryptionProperty_Status_STATUS{ + "disabled": EncryptionProperty_Status_STATUS_Disabled, + "enabled": EncryptionProperty_Status_STATUS_Enabled, +} + // The export policy for a container registry. type ExportPolicy struct { // Status: The value that indicates whether the policy is enabled or not. @@ -3837,8 +3913,9 @@ func (policy *ExportPolicy) AssignProperties_From_ExportPolicy(source *v20210901 // Status if source.Status != nil { - status := ExportPolicy_Status(*source.Status) - policy.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, exportPolicy_Status_Values) + policy.Status = &statusTemp } else { policy.Status = nil } @@ -3921,8 +3998,9 @@ func (policy *ExportPolicy_STATUS) AssignProperties_From_ExportPolicy_STATUS(sou // Status if source.Status != nil { - status := ExportPolicy_Status_STATUS(*source.Status) - policy.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, exportPolicy_Status_STATUS_Values) + policy.Status = &statusTemp } else { policy.Status = nil } @@ -4021,8 +4099,9 @@ func (rule *IPRule) AssignProperties_From_IPRule(source *v20210901s.IPRule) erro // Action if source.Action != nil { - action := IPRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, iPRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -4123,8 +4202,9 @@ func (rule *IPRule_STATUS) AssignProperties_From_IPRule_STATUS(source *v20210901 // Action if source.Action != nil { - action := IPRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, iPRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -4407,6 +4487,12 @@ const ( NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction +var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{ + "allow": NetworkRuleSet_DefaultAction_Allow, + "deny": NetworkRuleSet_DefaultAction_Deny, +} + type NetworkRuleSet_DefaultAction_STATUS string const ( @@ -4414,6 +4500,12 @@ const ( NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction_STATUS +var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{ + "allow": NetworkRuleSet_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSet_DefaultAction_STATUS_Deny, +} + // The quarantine policy for a container registry. type QuarantinePolicy struct { // Status: The value that indicates whether the policy is enabled or not. @@ -4464,8 +4556,9 @@ func (policy *QuarantinePolicy) AssignProperties_From_QuarantinePolicy(source *v // Status if source.Status != nil { - status := QuarantinePolicy_Status(*source.Status) - policy.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, quarantinePolicy_Status_Values) + policy.Status = &statusTemp } else { policy.Status = nil } @@ -4548,8 +4641,9 @@ func (policy *QuarantinePolicy_STATUS) AssignProperties_From_QuarantinePolicy_ST // Status if source.Status != nil { - status := QuarantinePolicy_Status_STATUS(*source.Status) - policy.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, quarantinePolicy_Status_STATUS_Values) + policy.Status = &statusTemp } else { policy.Status = nil } @@ -4650,8 +4744,9 @@ func (policy *RetentionPolicy) AssignProperties_From_RetentionPolicy(source *v20 // Status if source.Status != nil { - status := RetentionPolicy_Status(*source.Status) - policy.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, retentionPolicy_Status_Values) + policy.Status = &statusTemp } else { policy.Status = nil } @@ -4764,8 +4859,9 @@ func (policy *RetentionPolicy_STATUS) AssignProperties_From_RetentionPolicy_STAT // Status if source.Status != nil { - status := RetentionPolicy_Status_STATUS(*source.Status) - policy.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, retentionPolicy_Status_STATUS_Values) + policy.Status = &statusTemp } else { policy.Status = nil } @@ -4869,16 +4965,18 @@ func (policy *TrustPolicy) AssignProperties_From_TrustPolicy(source *v20210901s. // Status if source.Status != nil { - status := TrustPolicy_Status(*source.Status) - policy.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, trustPolicy_Status_Values) + policy.Status = &statusTemp } else { policy.Status = nil } // Type if source.Type != nil { - typeVar := TrustPolicy_Type(*source.Type) - policy.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, trustPolicy_Type_Values) + policy.Type = &typeTemp } else { policy.Type = nil } @@ -4986,16 +5084,18 @@ func (policy *TrustPolicy_STATUS) AssignProperties_From_TrustPolicy_STATUS(sourc // Status if source.Status != nil { - status := TrustPolicy_Status_STATUS(*source.Status) - policy.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, trustPolicy_Status_STATUS_Values) + policy.Status = &statusTemp } else { policy.Status = nil } // Type if source.Type != nil { - typeVar := TrustPolicy_Type_STATUS(*source.Type) - policy.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, trustPolicy_Type_STATUS_Values) + policy.Type = &typeTemp } else { policy.Type = nil } @@ -5151,6 +5251,12 @@ const ( ExportPolicy_Status_Enabled = ExportPolicy_Status("enabled") ) +// Mapping from string to ExportPolicy_Status +var exportPolicy_Status_Values = map[string]ExportPolicy_Status{ + "disabled": ExportPolicy_Status_Disabled, + "enabled": ExportPolicy_Status_Enabled, +} + type ExportPolicy_Status_STATUS string const ( @@ -5158,15 +5264,31 @@ const ( ExportPolicy_Status_STATUS_Enabled = ExportPolicy_Status_STATUS("enabled") ) +// Mapping from string to ExportPolicy_Status_STATUS +var exportPolicy_Status_STATUS_Values = map[string]ExportPolicy_Status_STATUS{ + "disabled": ExportPolicy_Status_STATUS_Disabled, + "enabled": ExportPolicy_Status_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Allow"} type IPRule_Action string const IPRule_Action_Allow = IPRule_Action("Allow") +// Mapping from string to IPRule_Action +var iPRule_Action_Values = map[string]IPRule_Action{ + "allow": IPRule_Action_Allow, +} + type IPRule_Action_STATUS string const IPRule_Action_STATUS_Allow = IPRule_Action_STATUS("Allow") +// Mapping from string to IPRule_Action_STATUS +var iPRule_Action_STATUS_Values = map[string]IPRule_Action_STATUS{ + "allow": IPRule_Action_STATUS_Allow, +} + // +kubebuilder:validation:Enum={"disabled","enabled"} type QuarantinePolicy_Status string @@ -5175,6 +5297,12 @@ const ( QuarantinePolicy_Status_Enabled = QuarantinePolicy_Status("enabled") ) +// Mapping from string to QuarantinePolicy_Status +var quarantinePolicy_Status_Values = map[string]QuarantinePolicy_Status{ + "disabled": QuarantinePolicy_Status_Disabled, + "enabled": QuarantinePolicy_Status_Enabled, +} + type QuarantinePolicy_Status_STATUS string const ( @@ -5182,6 +5310,12 @@ const ( QuarantinePolicy_Status_STATUS_Enabled = QuarantinePolicy_Status_STATUS("enabled") ) +// Mapping from string to QuarantinePolicy_Status_STATUS +var quarantinePolicy_Status_STATUS_Values = map[string]QuarantinePolicy_Status_STATUS{ + "disabled": QuarantinePolicy_Status_STATUS_Disabled, + "enabled": QuarantinePolicy_Status_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"disabled","enabled"} type RetentionPolicy_Status string @@ -5190,6 +5324,12 @@ const ( RetentionPolicy_Status_Enabled = RetentionPolicy_Status("enabled") ) +// Mapping from string to RetentionPolicy_Status +var retentionPolicy_Status_Values = map[string]RetentionPolicy_Status{ + "disabled": RetentionPolicy_Status_Disabled, + "enabled": RetentionPolicy_Status_Enabled, +} + type RetentionPolicy_Status_STATUS string const ( @@ -5197,6 +5337,12 @@ const ( RetentionPolicy_Status_STATUS_Enabled = RetentionPolicy_Status_STATUS("enabled") ) +// Mapping from string to RetentionPolicy_Status_STATUS +var retentionPolicy_Status_STATUS_Values = map[string]RetentionPolicy_Status_STATUS{ + "disabled": RetentionPolicy_Status_STATUS_Disabled, + "enabled": RetentionPolicy_Status_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"disabled","enabled"} type TrustPolicy_Status string @@ -5205,6 +5351,12 @@ const ( TrustPolicy_Status_Enabled = TrustPolicy_Status("enabled") ) +// Mapping from string to TrustPolicy_Status +var trustPolicy_Status_Values = map[string]TrustPolicy_Status{ + "disabled": TrustPolicy_Status_Disabled, + "enabled": TrustPolicy_Status_Enabled, +} + type TrustPolicy_Status_STATUS string const ( @@ -5212,15 +5364,31 @@ const ( TrustPolicy_Status_STATUS_Enabled = TrustPolicy_Status_STATUS("enabled") ) +// Mapping from string to TrustPolicy_Status_STATUS +var trustPolicy_Status_STATUS_Values = map[string]TrustPolicy_Status_STATUS{ + "disabled": TrustPolicy_Status_STATUS_Disabled, + "enabled": TrustPolicy_Status_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Notary"} type TrustPolicy_Type string const TrustPolicy_Type_Notary = TrustPolicy_Type("Notary") +// Mapping from string to TrustPolicy_Type +var trustPolicy_Type_Values = map[string]TrustPolicy_Type{ + "notary": TrustPolicy_Type_Notary, +} + type TrustPolicy_Type_STATUS string const TrustPolicy_Type_STATUS_Notary = TrustPolicy_Type_STATUS("Notary") +// Mapping from string to TrustPolicy_Type_STATUS +var trustPolicy_Type_STATUS_Values = map[string]TrustPolicy_Type_STATUS{ + "notary": TrustPolicy_Type_STATUS_Notary, +} + func init() { SchemeBuilder.Register(&Registry{}, &RegistryList{}) } diff --git a/v2/api/containerservice/v1api20210501/managed_cluster_spec_arm_types_gen.go b/v2/api/containerservice/v1api20210501/managed_cluster_spec_arm_types_gen.go index 5cd0b019756..8a768670b64 100644 --- a/v2/api/containerservice/v1api20210501/managed_cluster_spec_arm_types_gen.go +++ b/v2/api/containerservice/v1api20210501/managed_cluster_spec_arm_types_gen.go @@ -199,6 +199,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile_ARM struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -403,6 +408,13 @@ const ( ManagedClusterIdentity_Type_UserAssigned = ManagedClusterIdentity_Type("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type +var managedClusterIdentity_Type_Values = map[string]ManagedClusterIdentity_Type{ + "none": ManagedClusterIdentity_Type_None, + "systemassigned": ManagedClusterIdentity_Type_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_UserAssigned, +} + // See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod // identity integration. type ManagedClusterPodIdentityProfile_ARM struct { @@ -499,6 +511,11 @@ type ManagedClusterSKU_Name string const ManagedClusterSKU_Name_Basic = ManagedClusterSKU_Name("Basic") +// Mapping from string to ManagedClusterSKU_Name +var managedClusterSKU_Name_Values = map[string]ManagedClusterSKU_Name{ + "basic": ManagedClusterSKU_Name_Basic, +} + // +kubebuilder:validation:Enum={"Free","Paid"} type ManagedClusterSKU_Tier string @@ -507,6 +524,12 @@ const ( ManagedClusterSKU_Tier_Paid = ManagedClusterSKU_Tier("Paid") ) +// Mapping from string to ManagedClusterSKU_Tier +var managedClusterSKU_Tier_Values = map[string]ManagedClusterSKU_Tier{ + "free": ManagedClusterSKU_Tier_Free, + "paid": ManagedClusterSKU_Tier_Paid, +} + // Profile for Windows VMs in the managed cluster. type ManagedClusterWindowsProfile_ARM struct { // AdminPassword: Specifies the password of the administrator account. diff --git a/v2/api/containerservice/v1api20210501/managed_cluster_status_arm_types_gen.go b/v2/api/containerservice/v1api20210501/managed_cluster_status_arm_types_gen.go index 9af483e4a0a..2283686fd5d 100644 --- a/v2/api/containerservice/v1api20210501/managed_cluster_status_arm_types_gen.go +++ b/v2/api/containerservice/v1api20210501/managed_cluster_status_arm_types_gen.go @@ -220,6 +220,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile_STATUS_ARM struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -446,6 +451,13 @@ const ( ManagedClusterIdentity_Type_STATUS_UserAssigned = ManagedClusterIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type_STATUS +var managedClusterIdentity_Type_STATUS_Values = map[string]ManagedClusterIdentity_Type_STATUS{ + "none": ManagedClusterIdentity_Type_STATUS_None, + "systemassigned": ManagedClusterIdentity_Type_STATUS_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_STATUS_UserAssigned, +} + type ManagedClusterIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` @@ -546,6 +558,11 @@ type ManagedClusterSKU_Name_STATUS string const ManagedClusterSKU_Name_STATUS_Basic = ManagedClusterSKU_Name_STATUS("Basic") +// Mapping from string to ManagedClusterSKU_Name_STATUS +var managedClusterSKU_Name_STATUS_Values = map[string]ManagedClusterSKU_Name_STATUS{ + "basic": ManagedClusterSKU_Name_STATUS_Basic, +} + type ManagedClusterSKU_Tier_STATUS string const ( @@ -553,6 +570,12 @@ const ( ManagedClusterSKU_Tier_STATUS_Paid = ManagedClusterSKU_Tier_STATUS("Paid") ) +// Mapping from string to ManagedClusterSKU_Tier_STATUS +var managedClusterSKU_Tier_STATUS_Values = map[string]ManagedClusterSKU_Tier_STATUS{ + "free": ManagedClusterSKU_Tier_STATUS_Free, + "paid": ManagedClusterSKU_Tier_STATUS_Paid, +} + // Profile for Windows VMs in the managed cluster. type ManagedClusterWindowsProfile_STATUS_ARM struct { // AdminPassword: Specifies the password of the administrator account. diff --git a/v2/api/containerservice/v1api20210501/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20210501/managed_cluster_types_gen.go index 60c8c12c74d..cd209eb6fe9 100644 --- a/v2/api/containerservice/v1api20210501/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20210501/managed_cluster_types_gen.go @@ -3420,40 +3420,45 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := ContainerServiceNetworkProfile_LoadBalancerSku(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, containerServiceNetworkProfile_LoadBalancerSku_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := ContainerServiceNetworkProfile_NetworkMode(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, containerServiceNetworkProfile_NetworkMode_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := ContainerServiceNetworkProfile_NetworkPlugin(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, containerServiceNetworkProfile_NetworkPlugin_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := ContainerServiceNetworkProfile_NetworkPolicy(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, containerServiceNetworkProfile_NetworkPolicy_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -3723,40 +3728,45 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := ContainerServiceNetworkProfile_LoadBalancerSku_STATUS(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, containerServiceNetworkProfile_LoadBalancerSku_STATUS_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := ContainerServiceNetworkProfile_NetworkMode_STATUS(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, containerServiceNetworkProfile_NetworkMode_STATUS_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := ContainerServiceNetworkProfile_NetworkPlugin_STATUS(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, containerServiceNetworkProfile_NetworkPlugin_STATUS_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := ContainerServiceNetworkProfile_NetworkPolicy_STATUS(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, containerServiceNetworkProfile_NetworkPolicy_STATUS_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType_STATUS(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_STATUS_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -3919,8 +3929,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -4003,8 +4014,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -5320,8 +5332,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -5340,8 +5353,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -5369,8 +5383,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -5410,24 +5425,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -5445,16 +5463,18 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -5472,8 +5492,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -6202,8 +6223,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -6222,8 +6244,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -6251,8 +6274,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -6280,24 +6304,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -6325,16 +6352,18 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -6352,8 +6381,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Type if source.Type != nil { - typeVar := AgentPoolType_STATUS(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_STATUS_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -6957,8 +6987,9 @@ func (profile *ManagedClusterAutoUpgradeProfile) AssignProperties_From_ManagedCl // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -7027,8 +7058,9 @@ func (profile *ManagedClusterAutoUpgradeProfile_STATUS) AssignProperties_From_Ma // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -7367,8 +7399,9 @@ func (identity *ManagedClusterIdentity) AssignProperties_From_ManagedClusterIden // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -7514,8 +7547,9 @@ func (identity *ManagedClusterIdentity_STATUS) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -8376,8 +8410,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile) AssignProperties_From // Expander if source.Expander != nil { - expander := ManagedClusterProperties_AutoScalerProfile_Expander(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -8694,8 +8729,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile_STATUS) AssignProperti // Expander if source.Expander != nil { - expander := ManagedClusterProperties_AutoScalerProfile_Expander_STATUS(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -9052,16 +9088,18 @@ func (clusterSKU *ManagedClusterSKU) AssignProperties_From_ManagedClusterSKU(sou // Name if source.Name != nil { - name := ManagedClusterSKU_Name(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -9147,16 +9185,18 @@ func (clusterSKU *ManagedClusterSKU_STATUS) AssignProperties_From_ManagedCluster // Name if source.Name != nil { - name := ManagedClusterSKU_Name_STATUS(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_STATUS_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier_STATUS(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_STATUS_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -9324,8 +9364,9 @@ func (profile *ManagedClusterWindowsProfile) AssignProperties_From_ManagedCluste // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -9465,8 +9506,9 @@ func (profile *ManagedClusterWindowsProfile_STATUS) AssignProperties_From_Manage // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType_STATUS(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_STATUS_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -9548,8 +9590,9 @@ func (state *PowerState_STATUS) AssignProperties_From_PowerState_STATUS(source * // Code if source.Code != nil { - code := PowerState_Code_STATUS(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_STATUS_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -10104,6 +10147,12 @@ const ( ContainerServiceNetworkProfile_LoadBalancerSku_Standard = ContainerServiceNetworkProfile_LoadBalancerSku("standard") ) +// Mapping from string to ContainerServiceNetworkProfile_LoadBalancerSku +var containerServiceNetworkProfile_LoadBalancerSku_Values = map[string]ContainerServiceNetworkProfile_LoadBalancerSku{ + "basic": ContainerServiceNetworkProfile_LoadBalancerSku_Basic, + "standard": ContainerServiceNetworkProfile_LoadBalancerSku_Standard, +} + type ContainerServiceNetworkProfile_LoadBalancerSku_STATUS string const ( @@ -10111,6 +10160,12 @@ const ( ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Standard = ContainerServiceNetworkProfile_LoadBalancerSku_STATUS("standard") ) +// Mapping from string to ContainerServiceNetworkProfile_LoadBalancerSku_STATUS +var containerServiceNetworkProfile_LoadBalancerSku_STATUS_Values = map[string]ContainerServiceNetworkProfile_LoadBalancerSku_STATUS{ + "basic": ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Basic, + "standard": ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Standard, +} + // +kubebuilder:validation:Enum={"bridge","transparent"} type ContainerServiceNetworkProfile_NetworkMode string @@ -10119,6 +10174,12 @@ const ( ContainerServiceNetworkProfile_NetworkMode_Transparent = ContainerServiceNetworkProfile_NetworkMode("transparent") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkMode +var containerServiceNetworkProfile_NetworkMode_Values = map[string]ContainerServiceNetworkProfile_NetworkMode{ + "bridge": ContainerServiceNetworkProfile_NetworkMode_Bridge, + "transparent": ContainerServiceNetworkProfile_NetworkMode_Transparent, +} + type ContainerServiceNetworkProfile_NetworkMode_STATUS string const ( @@ -10126,6 +10187,12 @@ const ( ContainerServiceNetworkProfile_NetworkMode_STATUS_Transparent = ContainerServiceNetworkProfile_NetworkMode_STATUS("transparent") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkMode_STATUS +var containerServiceNetworkProfile_NetworkMode_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkMode_STATUS{ + "bridge": ContainerServiceNetworkProfile_NetworkMode_STATUS_Bridge, + "transparent": ContainerServiceNetworkProfile_NetworkMode_STATUS_Transparent, +} + // +kubebuilder:validation:Enum={"azure","kubenet"} type ContainerServiceNetworkProfile_NetworkPlugin string @@ -10134,6 +10201,12 @@ const ( ContainerServiceNetworkProfile_NetworkPlugin_Kubenet = ContainerServiceNetworkProfile_NetworkPlugin("kubenet") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPlugin +var containerServiceNetworkProfile_NetworkPlugin_Values = map[string]ContainerServiceNetworkProfile_NetworkPlugin{ + "azure": ContainerServiceNetworkProfile_NetworkPlugin_Azure, + "kubenet": ContainerServiceNetworkProfile_NetworkPlugin_Kubenet, +} + type ContainerServiceNetworkProfile_NetworkPlugin_STATUS string const ( @@ -10141,6 +10214,12 @@ const ( ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Kubenet = ContainerServiceNetworkProfile_NetworkPlugin_STATUS("kubenet") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPlugin_STATUS +var containerServiceNetworkProfile_NetworkPlugin_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPlugin_STATUS{ + "azure": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Azure, + "kubenet": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Kubenet, +} + // +kubebuilder:validation:Enum={"azure","calico"} type ContainerServiceNetworkProfile_NetworkPolicy string @@ -10149,6 +10228,12 @@ const ( ContainerServiceNetworkProfile_NetworkPolicy_Calico = ContainerServiceNetworkProfile_NetworkPolicy("calico") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPolicy +var containerServiceNetworkProfile_NetworkPolicy_Values = map[string]ContainerServiceNetworkProfile_NetworkPolicy{ + "azure": ContainerServiceNetworkProfile_NetworkPolicy_Azure, + "calico": ContainerServiceNetworkProfile_NetworkPolicy_Calico, +} + type ContainerServiceNetworkProfile_NetworkPolicy_STATUS string const ( @@ -10156,6 +10241,12 @@ const ( ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Calico = ContainerServiceNetworkProfile_NetworkPolicy_STATUS("calico") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPolicy_STATUS +var containerServiceNetworkProfile_NetworkPolicy_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPolicy_STATUS{ + "azure": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Azure, + "calico": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Calico, +} + // +kubebuilder:validation:Enum={"loadBalancer","userDefinedRouting"} type ContainerServiceNetworkProfile_OutboundType string @@ -10164,6 +10255,12 @@ const ( ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType +var containerServiceNetworkProfile_OutboundType_Values = map[string]ContainerServiceNetworkProfile_OutboundType{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_LoadBalancer, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting, +} + type ContainerServiceNetworkProfile_OutboundType_STATUS string const ( @@ -10171,6 +10268,12 @@ const ( ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType_STATUS("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType_STATUS +var containerServiceNetworkProfile_OutboundType_STATUS_Values = map[string]ContainerServiceNetworkProfile_OutboundType_STATUS{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_STATUS_LoadBalancer, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting, +} + // SSH configuration for Linux-based VMs running on Azure. type ContainerServiceSshConfiguration struct { // +kubebuilder:validation:Required @@ -10387,6 +10490,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel +var managedClusterAutoUpgradeProfile_UpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable, +} + type ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS string const ( @@ -10397,6 +10509,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS +var managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable, +} + type ManagedClusterIdentity_UserAssignedIdentities_STATUS struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` @@ -11385,8 +11506,9 @@ func (identity *ManagedClusterPodIdentity_STATUS) AssignProperties_From_ManagedC // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ManagedClusterPodIdentity_ProvisioningState_STATUS(*source.ProvisioningState) - identity.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, managedClusterPodIdentity_ProvisioningState_STATUS_Values) + identity.ProvisioningState = &provisioningStateTemp } else { identity.ProvisioningState = nil } @@ -11678,6 +11800,14 @@ const ( ManagedClusterProperties_AutoScalerProfile_Expander_Random = ManagedClusterProperties_AutoScalerProfile_Expander("random") ) +// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander +var managedClusterProperties_AutoScalerProfile_Expander_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander{ + "least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_LeastWaste, + "most-pods": ManagedClusterProperties_AutoScalerProfile_Expander_MostPods, + "priority": ManagedClusterProperties_AutoScalerProfile_Expander_Priority, + "random": ManagedClusterProperties_AutoScalerProfile_Expander_Random, +} + type ManagedClusterProperties_AutoScalerProfile_Expander_STATUS string const ( @@ -11687,6 +11817,14 @@ const ( ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random = ManagedClusterProperties_AutoScalerProfile_Expander_STATUS("random") ) +// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander_STATUS +var managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander_STATUS{ + "least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_LeastWaste, + "most-pods": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_MostPods, + "priority": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Priority, + "random": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random, +} + // +kubebuilder:validation:Enum={"None","Windows_Server"} type ManagedClusterWindowsProfile_LicenseType string @@ -11695,6 +11833,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_Windows_Server = ManagedClusterWindowsProfile_LicenseType("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType +var managedClusterWindowsProfile_LicenseType_Values = map[string]ManagedClusterWindowsProfile_LicenseType{ + "none": ManagedClusterWindowsProfile_LicenseType_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_Windows_Server, +} + type ManagedClusterWindowsProfile_LicenseType_STATUS string const ( @@ -11702,6 +11846,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server = ManagedClusterWindowsProfile_LicenseType_STATUS("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType_STATUS +var managedClusterWindowsProfile_LicenseType_STATUS_Values = map[string]ManagedClusterWindowsProfile_LicenseType_STATUS{ + "none": ManagedClusterWindowsProfile_LicenseType_STATUS_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server, +} + type PowerState_Code_STATUS string const ( @@ -11709,6 +11859,12 @@ const ( PowerState_Code_STATUS_Stopped = PowerState_Code_STATUS("Stopped") ) +// Mapping from string to PowerState_Code_STATUS +var powerState_Code_STATUS_Values = map[string]PowerState_Code_STATUS{ + "running": PowerState_Code_STATUS_Running, + "stopped": PowerState_Code_STATUS_Stopped, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails struct { Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` @@ -12518,6 +12674,14 @@ const ( ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating = ManagedClusterPodIdentity_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ManagedClusterPodIdentity_ProvisioningState_STATUS +var managedClusterPodIdentity_ProvisioningState_STATUS_Values = map[string]ManagedClusterPodIdentity_ProvisioningState_STATUS{ + "assigned": ManagedClusterPodIdentity_ProvisioningState_STATUS_Assigned, + "deleting": ManagedClusterPodIdentity_ProvisioningState_STATUS_Deleting, + "failed": ManagedClusterPodIdentity_ProvisioningState_STATUS_Failed, + "updating": ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating, +} + // A reference to an Azure resource. type ResourceReference struct { // Reference: The fully qualified Azure resource id. diff --git a/v2/api/containerservice/v1api20210501/managed_clusters_agent_pool_types_gen.go b/v2/api/containerservice/v1api20210501/managed_clusters_agent_pool_types_gen.go index c2ffa7d39bf..c4bbb742cfd 100644 --- a/v2/api/containerservice/v1api20210501/managed_clusters_agent_pool_types_gen.go +++ b/v2/api/containerservice/v1api20210501/managed_clusters_agent_pool_types_gen.go @@ -1104,8 +1104,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -1124,8 +1125,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -1153,8 +1155,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -1186,24 +1189,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -1229,16 +1235,18 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -1256,8 +1264,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - pool.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + pool.Type = &typeTemp } else { pool.Type = nil } @@ -2185,8 +2194,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -2208,8 +2218,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -2237,8 +2248,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -2266,24 +2278,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -2305,8 +2320,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // PropertiesType if source.PropertiesType != nil { - propertiesType := AgentPoolType_STATUS(*source.PropertiesType) - pool.PropertiesType = &propertiesType + propertiesType := *source.PropertiesType + propertiesTypeTemp := genruntime.ToEnum(propertiesType, agentPoolType_STATUS_Values) + pool.PropertiesType = &propertiesTypeTemp } else { pool.PropertiesType = nil } @@ -2319,16 +2335,18 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -2626,6 +2644,12 @@ const ( AgentPoolMode_User = AgentPoolMode("User") ) +// Mapping from string to AgentPoolMode +var agentPoolMode_Values = map[string]AgentPoolMode{ + "system": AgentPoolMode_System, + "user": AgentPoolMode_User, +} + // A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions // and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools type AgentPoolMode_STATUS string @@ -2635,6 +2659,12 @@ const ( AgentPoolMode_STATUS_User = AgentPoolMode_STATUS("User") ) +// Mapping from string to AgentPoolMode_STATUS +var agentPoolMode_STATUS_Values = map[string]AgentPoolMode_STATUS{ + "system": AgentPoolMode_STATUS_System, + "user": AgentPoolMode_STATUS_User, +} + // The type of Agent Pool. // +kubebuilder:validation:Enum={"AvailabilitySet","VirtualMachineScaleSets"} type AgentPoolType string @@ -2644,6 +2674,12 @@ const ( AgentPoolType_VirtualMachineScaleSets = AgentPoolType("VirtualMachineScaleSets") ) +// Mapping from string to AgentPoolType +var agentPoolType_Values = map[string]AgentPoolType{ + "availabilityset": AgentPoolType_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_VirtualMachineScaleSets, +} + // The type of Agent Pool. type AgentPoolType_STATUS string @@ -2652,6 +2688,12 @@ const ( AgentPoolType_STATUS_VirtualMachineScaleSets = AgentPoolType_STATUS("VirtualMachineScaleSets") ) +// Mapping from string to AgentPoolType_STATUS +var agentPoolType_STATUS_Values = map[string]AgentPoolType_STATUS{ + "availabilityset": AgentPoolType_STATUS_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_STATUS_VirtualMachineScaleSets, +} + // Settings for upgrading an agentpool type AgentPoolUpgradeSettings struct { // MaxSurge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it @@ -2807,6 +2849,15 @@ const ( GPUInstanceProfile_MIG7G = GPUInstanceProfile("MIG7g") ) +// Mapping from string to GPUInstanceProfile +var gPUInstanceProfile_Values = map[string]GPUInstanceProfile{ + "mig1g": GPUInstanceProfile_MIG1G, + "mig2g": GPUInstanceProfile_MIG2G, + "mig3g": GPUInstanceProfile_MIG3G, + "mig4g": GPUInstanceProfile_MIG4G, + "mig7g": GPUInstanceProfile_MIG7G, +} + // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. type GPUInstanceProfile_STATUS string @@ -2818,6 +2869,15 @@ const ( GPUInstanceProfile_STATUS_MIG7G = GPUInstanceProfile_STATUS("MIG7g") ) +// Mapping from string to GPUInstanceProfile_STATUS +var gPUInstanceProfile_STATUS_Values = map[string]GPUInstanceProfile_STATUS{ + "mig1g": GPUInstanceProfile_STATUS_MIG1G, + "mig2g": GPUInstanceProfile_STATUS_MIG2G, + "mig3g": GPUInstanceProfile_STATUS_MIG3G, + "mig4g": GPUInstanceProfile_STATUS_MIG4G, + "mig7g": GPUInstanceProfile_STATUS_MIG7G, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type KubeletConfig struct { // AllowedUnsafeSysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). @@ -3380,6 +3440,12 @@ const ( KubeletDiskType_Temporary = KubeletDiskType("Temporary") ) +// Mapping from string to KubeletDiskType +var kubeletDiskType_Values = map[string]KubeletDiskType{ + "os": KubeletDiskType_OS, + "temporary": KubeletDiskType_Temporary, +} + // Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. type KubeletDiskType_STATUS string @@ -3388,6 +3454,12 @@ const ( KubeletDiskType_STATUS_Temporary = KubeletDiskType_STATUS("Temporary") ) +// Mapping from string to KubeletDiskType_STATUS +var kubeletDiskType_STATUS_Values = map[string]KubeletDiskType_STATUS{ + "os": KubeletDiskType_STATUS_OS, + "temporary": KubeletDiskType_STATUS_Temporary, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type LinuxOSConfig struct { // SwapFileSizeMB: The size in MB of a swap file that will be created on each node. @@ -3698,6 +3770,12 @@ const ( OSDiskType_Managed = OSDiskType("Managed") ) +// Mapping from string to OSDiskType +var oSDiskType_Values = map[string]OSDiskType{ + "ephemeral": OSDiskType_Ephemeral, + "managed": OSDiskType_Managed, +} + // The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, // defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral // OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). @@ -3708,6 +3786,12 @@ const ( OSDiskType_STATUS_Managed = OSDiskType_STATUS("Managed") ) +// Mapping from string to OSDiskType_STATUS +var oSDiskType_STATUS_Values = map[string]OSDiskType_STATUS{ + "ephemeral": OSDiskType_STATUS_Ephemeral, + "managed": OSDiskType_STATUS_Managed, +} + // Specifies an OS SKU. This value must not be specified if OSType is Windows. // +kubebuilder:validation:Enum={"CBLMariner","Ubuntu"} type OSSKU string @@ -3717,6 +3801,12 @@ const ( OSSKU_Ubuntu = OSSKU("Ubuntu") ) +// Mapping from string to OSSKU +var oSSKU_Values = map[string]OSSKU{ + "cblmariner": OSSKU_CBLMariner, + "ubuntu": OSSKU_Ubuntu, +} + // Specifies an OS SKU. This value must not be specified if OSType is Windows. type OSSKU_STATUS string @@ -3725,6 +3815,12 @@ const ( OSSKU_STATUS_Ubuntu = OSSKU_STATUS("Ubuntu") ) +// Mapping from string to OSSKU_STATUS +var oSSKU_STATUS_Values = map[string]OSSKU_STATUS{ + "cblmariner": OSSKU_STATUS_CBLMariner, + "ubuntu": OSSKU_STATUS_Ubuntu, +} + // The operating system type. The default is Linux. // +kubebuilder:validation:Enum={"Linux","Windows"} type OSType string @@ -3734,6 +3830,12 @@ const ( OSType_Windows = OSType("Windows") ) +// Mapping from string to OSType +var oSType_Values = map[string]OSType{ + "linux": OSType_Linux, + "windows": OSType_Windows, +} + // The operating system type. The default is Linux. type OSType_STATUS string @@ -3742,6 +3844,12 @@ const ( OSType_STATUS_Windows = OSType_STATUS("Windows") ) +// Mapping from string to OSType_STATUS +var oSType_STATUS_Values = map[string]OSType_STATUS{ + "linux": OSType_STATUS_Linux, + "windows": OSType_STATUS_Windows, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) // +kubebuilder:validation:Enum={"Deallocate","Delete"} @@ -3752,6 +3860,12 @@ const ( ScaleSetEvictionPolicy_Delete = ScaleSetEvictionPolicy("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy +var scaleSetEvictionPolicy_Values = map[string]ScaleSetEvictionPolicy{ + "deallocate": ScaleSetEvictionPolicy_Deallocate, + "delete": ScaleSetEvictionPolicy_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) type ScaleSetEvictionPolicy_STATUS string @@ -3761,6 +3875,12 @@ const ( ScaleSetEvictionPolicy_STATUS_Delete = ScaleSetEvictionPolicy_STATUS("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy_STATUS +var scaleSetEvictionPolicy_STATUS_Values = map[string]ScaleSetEvictionPolicy_STATUS{ + "deallocate": ScaleSetEvictionPolicy_STATUS_Deallocate, + "delete": ScaleSetEvictionPolicy_STATUS_Delete, +} + // The Virtual Machine Scale Set priority. // +kubebuilder:validation:Enum={"Regular","Spot"} type ScaleSetPriority string @@ -3770,6 +3890,12 @@ const ( ScaleSetPriority_Spot = ScaleSetPriority("Spot") ) +// Mapping from string to ScaleSetPriority +var scaleSetPriority_Values = map[string]ScaleSetPriority{ + "regular": ScaleSetPriority_Regular, + "spot": ScaleSetPriority_Spot, +} + // The Virtual Machine Scale Set priority. type ScaleSetPriority_STATUS string @@ -3778,6 +3904,12 @@ const ( ScaleSetPriority_STATUS_Spot = ScaleSetPriority_STATUS("Spot") ) +// Mapping from string to ScaleSetPriority_STATUS +var scaleSetPriority_STATUS_Values = map[string]ScaleSetPriority_STATUS{ + "regular": ScaleSetPriority_STATUS_Regular, + "spot": ScaleSetPriority_STATUS_Spot, +} + // Sysctl settings for Linux agent nodes. type SysctlConfig struct { // FsAioMaxNr: Sysctl setting fs.aio-max-nr. diff --git a/v2/api/containerservice/v1api20230201/managed_cluster_spec_arm_types_gen.go b/v2/api/containerservice/v1api20230201/managed_cluster_spec_arm_types_gen.go index 92fcfc33ef4..a407e8468ce 100644 --- a/v2/api/containerservice/v1api20230201/managed_cluster_spec_arm_types_gen.go +++ b/v2/api/containerservice/v1api20230201/managed_cluster_spec_arm_types_gen.go @@ -242,6 +242,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile_ARM struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -475,6 +480,13 @@ const ( ManagedClusterIdentity_Type_UserAssigned = ManagedClusterIdentity_Type("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type +var managedClusterIdentity_Type_Values = map[string]ManagedClusterIdentity_Type{ + "none": ManagedClusterIdentity_Type_None, + "systemassigned": ManagedClusterIdentity_Type_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_UserAssigned, +} + // The OIDC issuer profile of the Managed Cluster. type ManagedClusterOIDCIssuerProfile_ARM struct { // Enabled: Whether the OIDC issuer is enabled. @@ -594,6 +606,11 @@ type ManagedClusterSKU_Name string const ManagedClusterSKU_Name_Base = ManagedClusterSKU_Name("Base") +// Mapping from string to ManagedClusterSKU_Name +var managedClusterSKU_Name_Values = map[string]ManagedClusterSKU_Name{ + "base": ManagedClusterSKU_Name_Base, +} + // +kubebuilder:validation:Enum={"Free","Standard"} type ManagedClusterSKU_Tier string @@ -602,6 +619,12 @@ const ( ManagedClusterSKU_Tier_Standard = ManagedClusterSKU_Tier("Standard") ) +// Mapping from string to ManagedClusterSKU_Tier +var managedClusterSKU_Tier_Values = map[string]ManagedClusterSKU_Tier{ + "free": ManagedClusterSKU_Tier_Free, + "standard": ManagedClusterSKU_Tier_Standard, +} + // Storage profile for the container service cluster. type ManagedClusterStorageProfile_ARM struct { // BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile. diff --git a/v2/api/containerservice/v1api20230201/managed_cluster_status_arm_types_gen.go b/v2/api/containerservice/v1api20230201/managed_cluster_status_arm_types_gen.go index 7d369b0cec2..0539f747e13 100644 --- a/v2/api/containerservice/v1api20230201/managed_cluster_status_arm_types_gen.go +++ b/v2/api/containerservice/v1api20230201/managed_cluster_status_arm_types_gen.go @@ -293,6 +293,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile_STATUS_ARM struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -556,6 +561,13 @@ const ( ManagedClusterIdentity_Type_STATUS_UserAssigned = ManagedClusterIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type_STATUS +var managedClusterIdentity_Type_STATUS_Values = map[string]ManagedClusterIdentity_Type_STATUS{ + "none": ManagedClusterIdentity_Type_STATUS_None, + "systemassigned": ManagedClusterIdentity_Type_STATUS_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_STATUS_UserAssigned, +} + type ManagedClusterIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` @@ -682,6 +694,11 @@ type ManagedClusterSKU_Name_STATUS string const ManagedClusterSKU_Name_STATUS_Base = ManagedClusterSKU_Name_STATUS("Base") +// Mapping from string to ManagedClusterSKU_Name_STATUS +var managedClusterSKU_Name_STATUS_Values = map[string]ManagedClusterSKU_Name_STATUS{ + "base": ManagedClusterSKU_Name_STATUS_Base, +} + type ManagedClusterSKU_Tier_STATUS string const ( @@ -689,6 +706,12 @@ const ( ManagedClusterSKU_Tier_STATUS_Standard = ManagedClusterSKU_Tier_STATUS("Standard") ) +// Mapping from string to ManagedClusterSKU_Tier_STATUS +var managedClusterSKU_Tier_STATUS_Values = map[string]ManagedClusterSKU_Tier_STATUS{ + "free": ManagedClusterSKU_Tier_STATUS_Free, + "standard": ManagedClusterSKU_Tier_STATUS_Standard, +} + // Storage profile for the container service cluster. type ManagedClusterStorageProfile_STATUS_ARM struct { // BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile. @@ -781,6 +804,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -790,6 +821,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Details about a user assigned identity. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The client ID of the user assigned identity. diff --git a/v2/api/containerservice/v1api20230201/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20230201/managed_cluster_types_gen.go index dd333b04b54..08fe0593350 100644 --- a/v2/api/containerservice/v1api20230201/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20230201/managed_cluster_types_gen.go @@ -1567,8 +1567,9 @@ func (cluster *ManagedCluster_Spec) AssignProperties_From_ManagedCluster_Spec(so // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - cluster.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_Values) + cluster.PublicNetworkAccess = &publicNetworkAccessTemp } else { cluster.PublicNetworkAccess = nil } @@ -3069,8 +3070,9 @@ func (cluster *ManagedCluster_STATUS) AssignProperties_From_ManagedCluster_STATU // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - cluster.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_STATUS_Values) + cluster.PublicNetworkAccess = &publicNetworkAccessTemp } else { cluster.PublicNetworkAccess = nil } @@ -4132,7 +4134,7 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe for ipFamilyIndex, ipFamilyItem := range source.IpFamilies { // Shadow the loop variable to avoid aliasing ipFamilyItem := ipFamilyItem - ipFamilyList[ipFamilyIndex] = ContainerServiceNetworkProfile_IpFamilies(ipFamilyItem) + ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, containerServiceNetworkProfile_IpFamilies_Values) } profile.IpFamilies = ipFamilyList } else { @@ -4153,8 +4155,9 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := ContainerServiceNetworkProfile_LoadBalancerSku(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, containerServiceNetworkProfile_LoadBalancerSku_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } @@ -4173,48 +4176,54 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // NetworkDataplane if source.NetworkDataplane != nil { - networkDataplane := ContainerServiceNetworkProfile_NetworkDataplane(*source.NetworkDataplane) - profile.NetworkDataplane = &networkDataplane + networkDataplane := *source.NetworkDataplane + networkDataplaneTemp := genruntime.ToEnum(networkDataplane, containerServiceNetworkProfile_NetworkDataplane_Values) + profile.NetworkDataplane = &networkDataplaneTemp } else { profile.NetworkDataplane = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := ContainerServiceNetworkProfile_NetworkMode(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, containerServiceNetworkProfile_NetworkMode_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := ContainerServiceNetworkProfile_NetworkPlugin(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, containerServiceNetworkProfile_NetworkPlugin_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPluginMode if source.NetworkPluginMode != nil { - networkPluginMode := ContainerServiceNetworkProfile_NetworkPluginMode(*source.NetworkPluginMode) - profile.NetworkPluginMode = &networkPluginMode + networkPluginMode := *source.NetworkPluginMode + networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, containerServiceNetworkProfile_NetworkPluginMode_Values) + profile.NetworkPluginMode = &networkPluginModeTemp } else { profile.NetworkPluginMode = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := ContainerServiceNetworkProfile_NetworkPolicy(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, containerServiceNetworkProfile_NetworkPolicy_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -4588,7 +4597,7 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont for ipFamilyIndex, ipFamilyItem := range source.IpFamilies { // Shadow the loop variable to avoid aliasing ipFamilyItem := ipFamilyItem - ipFamilyList[ipFamilyIndex] = ContainerServiceNetworkProfile_IpFamilies_STATUS(ipFamilyItem) + ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, containerServiceNetworkProfile_IpFamilies_STATUS_Values) } profile.IpFamilies = ipFamilyList } else { @@ -4609,8 +4618,9 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := ContainerServiceNetworkProfile_LoadBalancerSku_STATUS(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, containerServiceNetworkProfile_LoadBalancerSku_STATUS_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } @@ -4629,48 +4639,54 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // NetworkDataplane if source.NetworkDataplane != nil { - networkDataplane := ContainerServiceNetworkProfile_NetworkDataplane_STATUS(*source.NetworkDataplane) - profile.NetworkDataplane = &networkDataplane + networkDataplane := *source.NetworkDataplane + networkDataplaneTemp := genruntime.ToEnum(networkDataplane, containerServiceNetworkProfile_NetworkDataplane_STATUS_Values) + profile.NetworkDataplane = &networkDataplaneTemp } else { profile.NetworkDataplane = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := ContainerServiceNetworkProfile_NetworkMode_STATUS(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, containerServiceNetworkProfile_NetworkMode_STATUS_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := ContainerServiceNetworkProfile_NetworkPlugin_STATUS(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, containerServiceNetworkProfile_NetworkPlugin_STATUS_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPluginMode if source.NetworkPluginMode != nil { - networkPluginMode := ContainerServiceNetworkProfile_NetworkPluginMode_STATUS(*source.NetworkPluginMode) - profile.NetworkPluginMode = &networkPluginMode + networkPluginMode := *source.NetworkPluginMode + networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, containerServiceNetworkProfile_NetworkPluginMode_STATUS_Values) + profile.NetworkPluginMode = &networkPluginModeTemp } else { profile.NetworkPluginMode = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := ContainerServiceNetworkProfile_NetworkPolicy_STATUS(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, containerServiceNetworkProfile_NetworkPolicy_STATUS_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType_STATUS(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_STATUS_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -4886,8 +4902,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -4970,8 +4987,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -6402,8 +6420,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -6430,8 +6449,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -6459,8 +6479,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -6500,24 +6521,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -6552,24 +6576,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode(*source.ScaleDownMode) - profile.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values) + profile.ScaleDownMode = &scaleDownModeTemp } else { profile.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -6587,8 +6614,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -6618,8 +6646,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime) - profile.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values) + profile.WorkloadRuntime = &workloadRuntimeTemp } else { profile.WorkloadRuntime = nil } @@ -7454,8 +7483,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -7477,8 +7507,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -7506,8 +7537,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -7535,24 +7567,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -7580,24 +7615,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode) - profile.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values) + profile.ScaleDownMode = &scaleDownModeTemp } else { profile.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -7615,8 +7653,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Type if source.Type != nil { - typeVar := AgentPoolType_STATUS(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_STATUS_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -7641,8 +7680,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime) - profile.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values) + profile.WorkloadRuntime = &workloadRuntimeTemp } else { profile.WorkloadRuntime = nil } @@ -8318,8 +8358,9 @@ func (profile *ManagedClusterAutoUpgradeProfile) AssignProperties_From_ManagedCl // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -8388,8 +8429,9 @@ func (profile *ManagedClusterAutoUpgradeProfile_STATUS) AssignProperties_From_Ma // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -8915,8 +8957,9 @@ func (identity *ManagedClusterIdentity) AssignProperties_From_ManagedClusterIden // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -9062,8 +9105,9 @@ func (identity *ManagedClusterIdentity_STATUS) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -10119,8 +10163,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile) AssignProperties_From // Expander if source.Expander != nil { - expander := ManagedClusterProperties_AutoScalerProfile_Expander(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -10437,8 +10482,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile_STATUS) AssignProperti // Expander if source.Expander != nil { - expander := ManagedClusterProperties_AutoScalerProfile_Expander_STATUS(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -10572,6 +10618,12 @@ const ( ManagedClusterProperties_PublicNetworkAccess_Enabled = ManagedClusterProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to ManagedClusterProperties_PublicNetworkAccess +var managedClusterProperties_PublicNetworkAccess_Values = map[string]ManagedClusterProperties_PublicNetworkAccess{ + "disabled": ManagedClusterProperties_PublicNetworkAccess_Disabled, + "enabled": ManagedClusterProperties_PublicNetworkAccess_Enabled, +} + type ManagedClusterProperties_PublicNetworkAccess_STATUS string const ( @@ -10579,6 +10631,12 @@ const ( ManagedClusterProperties_PublicNetworkAccess_STATUS_Enabled = ManagedClusterProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ManagedClusterProperties_PublicNetworkAccess_STATUS +var managedClusterProperties_PublicNetworkAccess_STATUS_Values = map[string]ManagedClusterProperties_PublicNetworkAccess_STATUS{ + "disabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Enabled, +} + // Security profile for the container service cluster. type ManagedClusterSecurityProfile struct { // AzureKeyVaultKms: Azure Key Vault [key management @@ -11255,16 +11313,18 @@ func (clusterSKU *ManagedClusterSKU) AssignProperties_From_ManagedClusterSKU(sou // Name if source.Name != nil { - name := ManagedClusterSKU_Name(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -11350,16 +11410,18 @@ func (clusterSKU *ManagedClusterSKU_STATUS) AssignProperties_From_ManagedCluster // Name if source.Name != nil { - name := ManagedClusterSKU_Name_STATUS(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_STATUS_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier_STATUS(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_STATUS_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -12004,8 +12066,9 @@ func (profile *ManagedClusterWindowsProfile) AssignProperties_From_ManagedCluste // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -12183,8 +12246,9 @@ func (profile *ManagedClusterWindowsProfile_STATUS) AssignProperties_From_Manage // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType_STATUS(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_STATUS_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -12461,8 +12525,9 @@ func (state *PowerState_STATUS) AssignProperties_From_PowerState_STATUS(source * // Code if source.Code != nil { - code := PowerState_Code_STATUS(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_STATUS_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -12880,8 +12945,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -12894,8 +12960,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -13275,8 +13342,9 @@ func (vaultKms *AzureKeyVaultKms) AssignProperties_From_AzureKeyVaultKms(source // KeyVaultNetworkAccess if source.KeyVaultNetworkAccess != nil { - keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess(*source.KeyVaultNetworkAccess) - vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess + keyVaultNetworkAccess := *source.KeyVaultNetworkAccess + keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_Values) + vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp } else { vaultKms.KeyVaultNetworkAccess = nil } @@ -13415,8 +13483,9 @@ func (vaultKms *AzureKeyVaultKms_STATUS) AssignProperties_From_AzureKeyVaultKms_ // KeyVaultNetworkAccess if source.KeyVaultNetworkAccess != nil { - keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS(*source.KeyVaultNetworkAccess) - vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess + keyVaultNetworkAccess := *source.KeyVaultNetworkAccess + keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values) + vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp } else { vaultKms.KeyVaultNetworkAccess = nil } @@ -13474,6 +13543,12 @@ const ( ContainerServiceNetworkProfile_IpFamilies_IPv6 = ContainerServiceNetworkProfile_IpFamilies("IPv6") ) +// Mapping from string to ContainerServiceNetworkProfile_IpFamilies +var containerServiceNetworkProfile_IpFamilies_Values = map[string]ContainerServiceNetworkProfile_IpFamilies{ + "ipv4": ContainerServiceNetworkProfile_IpFamilies_IPv4, + "ipv6": ContainerServiceNetworkProfile_IpFamilies_IPv6, +} + type ContainerServiceNetworkProfile_IpFamilies_STATUS string const ( @@ -13481,6 +13556,12 @@ const ( ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv6 = ContainerServiceNetworkProfile_IpFamilies_STATUS("IPv6") ) +// Mapping from string to ContainerServiceNetworkProfile_IpFamilies_STATUS +var containerServiceNetworkProfile_IpFamilies_STATUS_Values = map[string]ContainerServiceNetworkProfile_IpFamilies_STATUS{ + "ipv4": ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv4, + "ipv6": ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv6, +} + // +kubebuilder:validation:Enum={"basic","standard"} type ContainerServiceNetworkProfile_LoadBalancerSku string @@ -13489,6 +13570,12 @@ const ( ContainerServiceNetworkProfile_LoadBalancerSku_Standard = ContainerServiceNetworkProfile_LoadBalancerSku("standard") ) +// Mapping from string to ContainerServiceNetworkProfile_LoadBalancerSku +var containerServiceNetworkProfile_LoadBalancerSku_Values = map[string]ContainerServiceNetworkProfile_LoadBalancerSku{ + "basic": ContainerServiceNetworkProfile_LoadBalancerSku_Basic, + "standard": ContainerServiceNetworkProfile_LoadBalancerSku_Standard, +} + type ContainerServiceNetworkProfile_LoadBalancerSku_STATUS string const ( @@ -13496,6 +13583,12 @@ const ( ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Standard = ContainerServiceNetworkProfile_LoadBalancerSku_STATUS("standard") ) +// Mapping from string to ContainerServiceNetworkProfile_LoadBalancerSku_STATUS +var containerServiceNetworkProfile_LoadBalancerSku_STATUS_Values = map[string]ContainerServiceNetworkProfile_LoadBalancerSku_STATUS{ + "basic": ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Basic, + "standard": ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Standard, +} + // +kubebuilder:validation:Enum={"azure","cilium"} type ContainerServiceNetworkProfile_NetworkDataplane string @@ -13504,6 +13597,12 @@ const ( ContainerServiceNetworkProfile_NetworkDataplane_Cilium = ContainerServiceNetworkProfile_NetworkDataplane("cilium") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkDataplane +var containerServiceNetworkProfile_NetworkDataplane_Values = map[string]ContainerServiceNetworkProfile_NetworkDataplane{ + "azure": ContainerServiceNetworkProfile_NetworkDataplane_Azure, + "cilium": ContainerServiceNetworkProfile_NetworkDataplane_Cilium, +} + type ContainerServiceNetworkProfile_NetworkDataplane_STATUS string const ( @@ -13511,6 +13610,12 @@ const ( ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Cilium = ContainerServiceNetworkProfile_NetworkDataplane_STATUS("cilium") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkDataplane_STATUS +var containerServiceNetworkProfile_NetworkDataplane_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkDataplane_STATUS{ + "azure": ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Azure, + "cilium": ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Cilium, +} + // +kubebuilder:validation:Enum={"bridge","transparent"} type ContainerServiceNetworkProfile_NetworkMode string @@ -13519,6 +13624,12 @@ const ( ContainerServiceNetworkProfile_NetworkMode_Transparent = ContainerServiceNetworkProfile_NetworkMode("transparent") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkMode +var containerServiceNetworkProfile_NetworkMode_Values = map[string]ContainerServiceNetworkProfile_NetworkMode{ + "bridge": ContainerServiceNetworkProfile_NetworkMode_Bridge, + "transparent": ContainerServiceNetworkProfile_NetworkMode_Transparent, +} + type ContainerServiceNetworkProfile_NetworkMode_STATUS string const ( @@ -13526,6 +13637,12 @@ const ( ContainerServiceNetworkProfile_NetworkMode_STATUS_Transparent = ContainerServiceNetworkProfile_NetworkMode_STATUS("transparent") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkMode_STATUS +var containerServiceNetworkProfile_NetworkMode_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkMode_STATUS{ + "bridge": ContainerServiceNetworkProfile_NetworkMode_STATUS_Bridge, + "transparent": ContainerServiceNetworkProfile_NetworkMode_STATUS_Transparent, +} + // +kubebuilder:validation:Enum={"azure","kubenet","none"} type ContainerServiceNetworkProfile_NetworkPlugin string @@ -13535,6 +13652,13 @@ const ( ContainerServiceNetworkProfile_NetworkPlugin_None = ContainerServiceNetworkProfile_NetworkPlugin("none") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPlugin +var containerServiceNetworkProfile_NetworkPlugin_Values = map[string]ContainerServiceNetworkProfile_NetworkPlugin{ + "azure": ContainerServiceNetworkProfile_NetworkPlugin_Azure, + "kubenet": ContainerServiceNetworkProfile_NetworkPlugin_Kubenet, + "none": ContainerServiceNetworkProfile_NetworkPlugin_None, +} + type ContainerServiceNetworkProfile_NetworkPlugin_STATUS string const ( @@ -13543,15 +13667,32 @@ const ( ContainerServiceNetworkProfile_NetworkPlugin_STATUS_None = ContainerServiceNetworkProfile_NetworkPlugin_STATUS("none") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPlugin_STATUS +var containerServiceNetworkProfile_NetworkPlugin_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPlugin_STATUS{ + "azure": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Azure, + "kubenet": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Kubenet, + "none": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_None, +} + // +kubebuilder:validation:Enum={"overlay"} type ContainerServiceNetworkProfile_NetworkPluginMode string const ContainerServiceNetworkProfile_NetworkPluginMode_Overlay = ContainerServiceNetworkProfile_NetworkPluginMode("overlay") +// Mapping from string to ContainerServiceNetworkProfile_NetworkPluginMode +var containerServiceNetworkProfile_NetworkPluginMode_Values = map[string]ContainerServiceNetworkProfile_NetworkPluginMode{ + "overlay": ContainerServiceNetworkProfile_NetworkPluginMode_Overlay, +} + type ContainerServiceNetworkProfile_NetworkPluginMode_STATUS string const ContainerServiceNetworkProfile_NetworkPluginMode_STATUS_Overlay = ContainerServiceNetworkProfile_NetworkPluginMode_STATUS("overlay") +// Mapping from string to ContainerServiceNetworkProfile_NetworkPluginMode_STATUS +var containerServiceNetworkProfile_NetworkPluginMode_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPluginMode_STATUS{ + "overlay": ContainerServiceNetworkProfile_NetworkPluginMode_STATUS_Overlay, +} + // +kubebuilder:validation:Enum={"azure","calico","cilium"} type ContainerServiceNetworkProfile_NetworkPolicy string @@ -13561,6 +13702,13 @@ const ( ContainerServiceNetworkProfile_NetworkPolicy_Cilium = ContainerServiceNetworkProfile_NetworkPolicy("cilium") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPolicy +var containerServiceNetworkProfile_NetworkPolicy_Values = map[string]ContainerServiceNetworkProfile_NetworkPolicy{ + "azure": ContainerServiceNetworkProfile_NetworkPolicy_Azure, + "calico": ContainerServiceNetworkProfile_NetworkPolicy_Calico, + "cilium": ContainerServiceNetworkProfile_NetworkPolicy_Cilium, +} + type ContainerServiceNetworkProfile_NetworkPolicy_STATUS string const ( @@ -13569,6 +13717,13 @@ const ( ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Cilium = ContainerServiceNetworkProfile_NetworkPolicy_STATUS("cilium") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPolicy_STATUS +var containerServiceNetworkProfile_NetworkPolicy_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPolicy_STATUS{ + "azure": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Azure, + "calico": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Calico, + "cilium": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Cilium, +} + // +kubebuilder:validation:Enum={"loadBalancer","managedNATGateway","userAssignedNATGateway","userDefinedRouting"} type ContainerServiceNetworkProfile_OutboundType string @@ -13579,6 +13734,14 @@ const ( ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType +var containerServiceNetworkProfile_OutboundType_Values = map[string]ContainerServiceNetworkProfile_OutboundType{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_LoadBalancer, + "managednatgateway": ContainerServiceNetworkProfile_OutboundType_ManagedNATGateway, + "userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_UserAssignedNATGateway, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting, +} + type ContainerServiceNetworkProfile_OutboundType_STATUS string const ( @@ -13588,6 +13751,14 @@ const ( ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType_STATUS("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType_STATUS +var containerServiceNetworkProfile_OutboundType_STATUS_Values = map[string]ContainerServiceNetworkProfile_OutboundType_STATUS{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_STATUS_LoadBalancer, + "managednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_ManagedNATGateway, + "userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_UserAssignedNATGateway, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting, +} + // SSH configuration for Linux-based VMs running on Azure. type ContainerServiceSshConfiguration struct { // +kubebuilder:validation:Required @@ -13804,6 +13975,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel +var managedClusterAutoUpgradeProfile_UpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable, +} + type ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS string const ( @@ -13814,6 +13994,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS +var managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable, +} + // Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes // infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See // aka.ms/AzureManagedPrometheus for an overview. @@ -15493,8 +15682,9 @@ func (identity *ManagedClusterPodIdentity_STATUS) AssignProperties_From_ManagedC // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ManagedClusterPodIdentity_ProvisioningState_STATUS(*source.ProvisioningState) - identity.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, managedClusterPodIdentity_ProvisioningState_STATUS_Values) + identity.ProvisioningState = &provisioningStateTemp } else { identity.ProvisioningState = nil } @@ -15786,6 +15976,14 @@ const ( ManagedClusterProperties_AutoScalerProfile_Expander_Random = ManagedClusterProperties_AutoScalerProfile_Expander("random") ) +// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander +var managedClusterProperties_AutoScalerProfile_Expander_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander{ + "least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_LeastWaste, + "most-pods": ManagedClusterProperties_AutoScalerProfile_Expander_MostPods, + "priority": ManagedClusterProperties_AutoScalerProfile_Expander_Priority, + "random": ManagedClusterProperties_AutoScalerProfile_Expander_Random, +} + type ManagedClusterProperties_AutoScalerProfile_Expander_STATUS string const ( @@ -15795,6 +15993,14 @@ const ( ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random = ManagedClusterProperties_AutoScalerProfile_Expander_STATUS("random") ) +// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander_STATUS +var managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander_STATUS{ + "least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_LeastWaste, + "most-pods": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_MostPods, + "priority": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Priority, + "random": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random, +} + // Microsoft Defender settings for the security profile. type ManagedClusterSecurityProfileDefender struct { // LogAnalyticsWorkspaceResourceReference: Resource ID of the Log Analytics workspace to be associated with Microsoft @@ -16992,6 +17198,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_Windows_Server = ManagedClusterWindowsProfile_LicenseType("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType +var managedClusterWindowsProfile_LicenseType_Values = map[string]ManagedClusterWindowsProfile_LicenseType{ + "none": ManagedClusterWindowsProfile_LicenseType_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_Windows_Server, +} + type ManagedClusterWindowsProfile_LicenseType_STATUS string const ( @@ -16999,6 +17211,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server = ManagedClusterWindowsProfile_LicenseType_STATUS("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType_STATUS +var managedClusterWindowsProfile_LicenseType_STATUS_Values = map[string]ManagedClusterWindowsProfile_LicenseType_STATUS{ + "none": ManagedClusterWindowsProfile_LicenseType_STATUS_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server, +} + // KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. type ManagedClusterWorkloadAutoScalerProfileKeda struct { // +kubebuilder:validation:Required @@ -17160,6 +17378,12 @@ const ( PowerState_Code_STATUS_Stopped = PowerState_Code_STATUS("Stopped") ) +// Mapping from string to PowerState_Code_STATUS +var powerState_Code_STATUS_Values = map[string]PowerState_Code_STATUS{ + "running": PowerState_Code_STATUS_Running, + "stopped": PowerState_Code_STATUS_Stopped, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails struct { Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` @@ -17431,6 +17655,12 @@ const ( AzureKeyVaultKms_KeyVaultNetworkAccess_Public = AzureKeyVaultKms_KeyVaultNetworkAccess("Public") ) +// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess +var azureKeyVaultKms_KeyVaultNetworkAccess_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess{ + "private": AzureKeyVaultKms_KeyVaultNetworkAccess_Private, + "public": AzureKeyVaultKms_KeyVaultNetworkAccess_Public, +} + type AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS string const ( @@ -17438,6 +17668,12 @@ const ( AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public = AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS("Public") ) +// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS +var azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS{ + "private": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Private, + "public": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public, +} + // Contains information about SSH certificate public key data. type ContainerServiceSshPublicKey struct { // +kubebuilder:validation:Required @@ -18593,6 +18829,16 @@ const ( ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating = ManagedClusterPodIdentity_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ManagedClusterPodIdentity_ProvisioningState_STATUS +var managedClusterPodIdentity_ProvisioningState_STATUS_Values = map[string]ManagedClusterPodIdentity_ProvisioningState_STATUS{ + "assigned": ManagedClusterPodIdentity_ProvisioningState_STATUS_Assigned, + "canceled": ManagedClusterPodIdentity_ProvisioningState_STATUS_Canceled, + "deleting": ManagedClusterPodIdentity_ProvisioningState_STATUS_Deleting, + "failed": ManagedClusterPodIdentity_ProvisioningState_STATUS_Failed, + "succeeded": ManagedClusterPodIdentity_ProvisioningState_STATUS_Succeeded, + "updating": ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating, +} + // Microsoft Defender settings for the security profile threat detection. type ManagedClusterSecurityProfileDefenderSecurityMonitoring struct { // Enabled: Whether to enable Defender threat detection diff --git a/v2/api/containerservice/v1api20230201/managed_clusters_agent_pool_types_gen.go b/v2/api/containerservice/v1api20230201/managed_clusters_agent_pool_types_gen.go index 4d56134ae9e..6a5f603c045 100644 --- a/v2/api/containerservice/v1api20230201/managed_clusters_agent_pool_types_gen.go +++ b/v2/api/containerservice/v1api20230201/managed_clusters_agent_pool_types_gen.go @@ -1222,8 +1222,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -1250,8 +1251,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -1279,8 +1281,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -1312,24 +1315,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -1372,24 +1378,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode(*source.ScaleDownMode) - pool.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values) + pool.ScaleDownMode = &scaleDownModeTemp } else { pool.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -1407,8 +1416,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - pool.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + pool.Type = &typeTemp } else { pool.Type = nil } @@ -1438,8 +1448,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime) - pool.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values) + pool.WorkloadRuntime = &workloadRuntimeTemp } else { pool.WorkloadRuntime = nil } @@ -2488,8 +2499,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -2514,8 +2526,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -2543,8 +2556,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -2572,24 +2586,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -2611,8 +2628,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // PropertiesType if source.PropertiesType != nil { - propertiesType := AgentPoolType_STATUS(*source.PropertiesType) - pool.PropertiesType = &propertiesType + propertiesType := *source.PropertiesType + propertiesTypeTemp := genruntime.ToEnum(propertiesType, agentPoolType_STATUS_Values) + pool.PropertiesType = &propertiesTypeTemp } else { pool.PropertiesType = nil } @@ -2625,24 +2643,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode) - pool.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values) + pool.ScaleDownMode = &scaleDownModeTemp } else { pool.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -2681,8 +2702,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime) - pool.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values) + pool.WorkloadRuntime = &workloadRuntimeTemp } else { pool.WorkloadRuntime = nil } @@ -2982,6 +3004,12 @@ const ( AgentPoolMode_User = AgentPoolMode("User") ) +// Mapping from string to AgentPoolMode +var agentPoolMode_Values = map[string]AgentPoolMode{ + "system": AgentPoolMode_System, + "user": AgentPoolMode_User, +} + // A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions // and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools type AgentPoolMode_STATUS string @@ -2991,6 +3019,12 @@ const ( AgentPoolMode_STATUS_User = AgentPoolMode_STATUS("User") ) +// Mapping from string to AgentPoolMode_STATUS +var agentPoolMode_STATUS_Values = map[string]AgentPoolMode_STATUS{ + "system": AgentPoolMode_STATUS_System, + "user": AgentPoolMode_STATUS_User, +} + // The type of Agent Pool. // +kubebuilder:validation:Enum={"AvailabilitySet","VirtualMachineScaleSets"} type AgentPoolType string @@ -3000,6 +3034,12 @@ const ( AgentPoolType_VirtualMachineScaleSets = AgentPoolType("VirtualMachineScaleSets") ) +// Mapping from string to AgentPoolType +var agentPoolType_Values = map[string]AgentPoolType{ + "availabilityset": AgentPoolType_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_VirtualMachineScaleSets, +} + // The type of Agent Pool. type AgentPoolType_STATUS string @@ -3008,6 +3048,12 @@ const ( AgentPoolType_STATUS_VirtualMachineScaleSets = AgentPoolType_STATUS("VirtualMachineScaleSets") ) +// Mapping from string to AgentPoolType_STATUS +var agentPoolType_STATUS_Values = map[string]AgentPoolType_STATUS{ + "availabilityset": AgentPoolType_STATUS_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_STATUS_VirtualMachineScaleSets, +} + // Settings for upgrading an agentpool type AgentPoolUpgradeSettings struct { // MaxSurge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it @@ -3306,6 +3352,15 @@ const ( GPUInstanceProfile_MIG7G = GPUInstanceProfile("MIG7g") ) +// Mapping from string to GPUInstanceProfile +var gPUInstanceProfile_Values = map[string]GPUInstanceProfile{ + "mig1g": GPUInstanceProfile_MIG1G, + "mig2g": GPUInstanceProfile_MIG2G, + "mig3g": GPUInstanceProfile_MIG3G, + "mig4g": GPUInstanceProfile_MIG4G, + "mig7g": GPUInstanceProfile_MIG7G, +} + // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. type GPUInstanceProfile_STATUS string @@ -3317,6 +3372,15 @@ const ( GPUInstanceProfile_STATUS_MIG7G = GPUInstanceProfile_STATUS("MIG7g") ) +// Mapping from string to GPUInstanceProfile_STATUS +var gPUInstanceProfile_STATUS_Values = map[string]GPUInstanceProfile_STATUS{ + "mig1g": GPUInstanceProfile_STATUS_MIG1G, + "mig2g": GPUInstanceProfile_STATUS_MIG2G, + "mig3g": GPUInstanceProfile_STATUS_MIG3G, + "mig4g": GPUInstanceProfile_STATUS_MIG4G, + "mig7g": GPUInstanceProfile_STATUS_MIG7G, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type KubeletConfig struct { // AllowedUnsafeSysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). @@ -3879,6 +3943,12 @@ const ( KubeletDiskType_Temporary = KubeletDiskType("Temporary") ) +// Mapping from string to KubeletDiskType +var kubeletDiskType_Values = map[string]KubeletDiskType{ + "os": KubeletDiskType_OS, + "temporary": KubeletDiskType_Temporary, +} + // Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. type KubeletDiskType_STATUS string @@ -3887,6 +3957,12 @@ const ( KubeletDiskType_STATUS_Temporary = KubeletDiskType_STATUS("Temporary") ) +// Mapping from string to KubeletDiskType_STATUS +var kubeletDiskType_STATUS_Values = map[string]KubeletDiskType_STATUS{ + "os": KubeletDiskType_STATUS_OS, + "temporary": KubeletDiskType_STATUS_Temporary, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type LinuxOSConfig struct { // SwapFileSizeMB: The size in MB of a swap file that will be created on each node. @@ -4197,6 +4273,12 @@ const ( OSDiskType_Managed = OSDiskType("Managed") ) +// Mapping from string to OSDiskType +var oSDiskType_Values = map[string]OSDiskType{ + "ephemeral": OSDiskType_Ephemeral, + "managed": OSDiskType_Managed, +} + // The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, // defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral // OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). @@ -4207,6 +4289,12 @@ const ( OSDiskType_STATUS_Managed = OSDiskType_STATUS("Managed") ) +// Mapping from string to OSDiskType_STATUS +var oSDiskType_STATUS_Values = map[string]OSDiskType_STATUS{ + "ephemeral": OSDiskType_STATUS_Ephemeral, + "managed": OSDiskType_STATUS_Managed, +} + // Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when // Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. // +kubebuilder:validation:Enum={"CBLMariner","Ubuntu","Windows2019","Windows2022"} @@ -4219,6 +4307,14 @@ const ( OSSKU_Windows2022 = OSSKU("Windows2022") ) +// Mapping from string to OSSKU +var oSSKU_Values = map[string]OSSKU{ + "cblmariner": OSSKU_CBLMariner, + "ubuntu": OSSKU_Ubuntu, + "windows2019": OSSKU_Windows2019, + "windows2022": OSSKU_Windows2022, +} + // Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when // Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. type OSSKU_STATUS string @@ -4230,6 +4326,14 @@ const ( OSSKU_STATUS_Windows2022 = OSSKU_STATUS("Windows2022") ) +// Mapping from string to OSSKU_STATUS +var oSSKU_STATUS_Values = map[string]OSSKU_STATUS{ + "cblmariner": OSSKU_STATUS_CBLMariner, + "ubuntu": OSSKU_STATUS_Ubuntu, + "windows2019": OSSKU_STATUS_Windows2019, + "windows2022": OSSKU_STATUS_Windows2022, +} + // The operating system type. The default is Linux. // +kubebuilder:validation:Enum={"Linux","Windows"} type OSType string @@ -4239,6 +4343,12 @@ const ( OSType_Windows = OSType("Windows") ) +// Mapping from string to OSType +var oSType_Values = map[string]OSType{ + "linux": OSType_Linux, + "windows": OSType_Windows, +} + // The operating system type. The default is Linux. type OSType_STATUS string @@ -4247,6 +4357,12 @@ const ( OSType_STATUS_Windows = OSType_STATUS("Windows") ) +// Mapping from string to OSType_STATUS +var oSType_STATUS_Values = map[string]OSType_STATUS{ + "linux": OSType_STATUS_Linux, + "windows": OSType_STATUS_Windows, +} + // Describes the Power State of the cluster type PowerState struct { // Code: Tells whether the cluster is Running or Stopped @@ -4297,8 +4413,9 @@ func (state *PowerState) AssignProperties_From_PowerState(source *v20230201s.Pow // Code if source.Code != nil { - code := PowerState_Code(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -4341,6 +4458,12 @@ const ( ScaleDownMode_Delete = ScaleDownMode("Delete") ) +// Mapping from string to ScaleDownMode +var scaleDownMode_Values = map[string]ScaleDownMode{ + "deallocate": ScaleDownMode_Deallocate, + "delete": ScaleDownMode_Delete, +} + // Describes how VMs are added to or removed from Agent Pools. See [billing // states](https://docs.microsoft.com/azure/virtual-machines/states-billing). type ScaleDownMode_STATUS string @@ -4350,6 +4473,12 @@ const ( ScaleDownMode_STATUS_Delete = ScaleDownMode_STATUS("Delete") ) +// Mapping from string to ScaleDownMode_STATUS +var scaleDownMode_STATUS_Values = map[string]ScaleDownMode_STATUS{ + "deallocate": ScaleDownMode_STATUS_Deallocate, + "delete": ScaleDownMode_STATUS_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) // +kubebuilder:validation:Enum={"Deallocate","Delete"} @@ -4360,6 +4489,12 @@ const ( ScaleSetEvictionPolicy_Delete = ScaleSetEvictionPolicy("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy +var scaleSetEvictionPolicy_Values = map[string]ScaleSetEvictionPolicy{ + "deallocate": ScaleSetEvictionPolicy_Deallocate, + "delete": ScaleSetEvictionPolicy_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) type ScaleSetEvictionPolicy_STATUS string @@ -4369,6 +4504,12 @@ const ( ScaleSetEvictionPolicy_STATUS_Delete = ScaleSetEvictionPolicy_STATUS("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy_STATUS +var scaleSetEvictionPolicy_STATUS_Values = map[string]ScaleSetEvictionPolicy_STATUS{ + "deallocate": ScaleSetEvictionPolicy_STATUS_Deallocate, + "delete": ScaleSetEvictionPolicy_STATUS_Delete, +} + // The Virtual Machine Scale Set priority. // +kubebuilder:validation:Enum={"Regular","Spot"} type ScaleSetPriority string @@ -4378,6 +4519,12 @@ const ( ScaleSetPriority_Spot = ScaleSetPriority("Spot") ) +// Mapping from string to ScaleSetPriority +var scaleSetPriority_Values = map[string]ScaleSetPriority{ + "regular": ScaleSetPriority_Regular, + "spot": ScaleSetPriority_Spot, +} + // The Virtual Machine Scale Set priority. type ScaleSetPriority_STATUS string @@ -4386,6 +4533,12 @@ const ( ScaleSetPriority_STATUS_Spot = ScaleSetPriority_STATUS("Spot") ) +// Mapping from string to ScaleSetPriority_STATUS +var scaleSetPriority_STATUS_Values = map[string]ScaleSetPriority_STATUS{ + "regular": ScaleSetPriority_STATUS_Regular, + "spot": ScaleSetPriority_STATUS_Spot, +} + // Determines the type of workload a node can run. // +kubebuilder:validation:Enum={"OCIContainer","WasmWasi"} type WorkloadRuntime string @@ -4395,6 +4548,12 @@ const ( WorkloadRuntime_WasmWasi = WorkloadRuntime("WasmWasi") ) +// Mapping from string to WorkloadRuntime +var workloadRuntime_Values = map[string]WorkloadRuntime{ + "ocicontainer": WorkloadRuntime_OCIContainer, + "wasmwasi": WorkloadRuntime_WasmWasi, +} + // Determines the type of workload a node can run. type WorkloadRuntime_STATUS string @@ -4403,6 +4562,12 @@ const ( WorkloadRuntime_STATUS_WasmWasi = WorkloadRuntime_STATUS("WasmWasi") ) +// Mapping from string to WorkloadRuntime_STATUS +var workloadRuntime_STATUS_Values = map[string]WorkloadRuntime_STATUS{ + "ocicontainer": WorkloadRuntime_STATUS_OCIContainer, + "wasmwasi": WorkloadRuntime_STATUS_WasmWasi, +} + // +kubebuilder:validation:Enum={"Running","Stopped"} type PowerState_Code string @@ -4411,6 +4576,12 @@ const ( PowerState_Code_Stopped = PowerState_Code("Stopped") ) +// Mapping from string to PowerState_Code +var powerState_Code_Values = map[string]PowerState_Code{ + "running": PowerState_Code_Running, + "stopped": PowerState_Code_Stopped, +} + // Sysctl settings for Linux agent nodes. type SysctlConfig struct { // FsAioMaxNr: Sysctl setting fs.aio-max-nr. diff --git a/v2/api/containerservice/v1api20230202preview/managed_cluster_spec_arm_types_gen.go b/v2/api/containerservice/v1api20230202preview/managed_cluster_spec_arm_types_gen.go index 8f008de2fa5..bf9d7ec857d 100644 --- a/v2/api/containerservice/v1api20230202preview/managed_cluster_spec_arm_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/managed_cluster_spec_arm_types_gen.go @@ -279,6 +279,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // The Guardrails profile. type GuardrailsProfile_ARM struct { // ExcludedNamespaces: List of namespaces excluded from guardrails checks @@ -552,6 +557,13 @@ const ( ManagedClusterIdentity_Type_UserAssigned = ManagedClusterIdentity_Type("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type +var managedClusterIdentity_Type_Values = map[string]ManagedClusterIdentity_Type{ + "none": ManagedClusterIdentity_Type_None, + "systemassigned": ManagedClusterIdentity_Type_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_UserAssigned, +} + // Ingress profile for the container service cluster. type ManagedClusterIngressProfile_ARM struct { // WebAppRouting: Web App Routing settings for the ingress profile. @@ -693,6 +705,11 @@ type ManagedClusterSKU_Name string const ManagedClusterSKU_Name_Base = ManagedClusterSKU_Name("Base") +// Mapping from string to ManagedClusterSKU_Name +var managedClusterSKU_Name_Values = map[string]ManagedClusterSKU_Name{ + "base": ManagedClusterSKU_Name_Base, +} + // +kubebuilder:validation:Enum={"Free","Standard"} type ManagedClusterSKU_Tier string @@ -701,6 +718,12 @@ const ( ManagedClusterSKU_Tier_Standard = ManagedClusterSKU_Tier("Standard") ) +// Mapping from string to ManagedClusterSKU_Tier +var managedClusterSKU_Tier_Values = map[string]ManagedClusterSKU_Tier{ + "free": ManagedClusterSKU_Tier_Free, + "standard": ManagedClusterSKU_Tier_Standard, +} + // Storage profile for the container service cluster. type ManagedClusterStorageProfile_ARM struct { // BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile. diff --git a/v2/api/containerservice/v1api20230202preview/managed_cluster_status_arm_types_gen.go b/v2/api/containerservice/v1api20230202preview/managed_cluster_status_arm_types_gen.go index 9e387e1372f..3b143ba93f9 100644 --- a/v2/api/containerservice/v1api20230202preview/managed_cluster_status_arm_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/managed_cluster_status_arm_types_gen.go @@ -329,6 +329,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // The Guardrails profile. type GuardrailsProfile_STATUS_ARM struct { // ExcludedNamespaces: List of namespaces excluded from guardrails checks @@ -639,6 +644,13 @@ const ( ManagedClusterIdentity_Type_STATUS_UserAssigned = ManagedClusterIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type_STATUS +var managedClusterIdentity_Type_STATUS_Values = map[string]ManagedClusterIdentity_Type_STATUS{ + "none": ManagedClusterIdentity_Type_STATUS_None, + "systemassigned": ManagedClusterIdentity_Type_STATUS_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_STATUS_UserAssigned, +} + type ManagedClusterIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` @@ -787,6 +799,11 @@ type ManagedClusterSKU_Name_STATUS string const ManagedClusterSKU_Name_STATUS_Base = ManagedClusterSKU_Name_STATUS("Base") +// Mapping from string to ManagedClusterSKU_Name_STATUS +var managedClusterSKU_Name_STATUS_Values = map[string]ManagedClusterSKU_Name_STATUS{ + "base": ManagedClusterSKU_Name_STATUS_Base, +} + type ManagedClusterSKU_Tier_STATUS string const ( @@ -794,6 +811,12 @@ const ( ManagedClusterSKU_Tier_STATUS_Standard = ManagedClusterSKU_Tier_STATUS("Standard") ) +// Mapping from string to ManagedClusterSKU_Tier_STATUS +var managedClusterSKU_Tier_STATUS_Values = map[string]ManagedClusterSKU_Tier_STATUS{ + "free": ManagedClusterSKU_Tier_STATUS_Free, + "standard": ManagedClusterSKU_Tier_STATUS_Standard, +} + // Storage profile for the container service cluster. type ManagedClusterStorageProfile_STATUS_ARM struct { // BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile. @@ -896,6 +919,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -905,6 +936,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Details about a user assigned identity. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The client ID of the user assigned identity. diff --git a/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen.go index 07226c91281..7f663b395a5 100644 --- a/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/managed_cluster_types_gen.go @@ -1796,8 +1796,9 @@ func (cluster *ManagedCluster_Spec) AssignProperties_From_ManagedCluster_Spec(so // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - cluster.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_Values) + cluster.PublicNetworkAccess = &publicNetworkAccessTemp } else { cluster.PublicNetworkAccess = nil } @@ -3570,8 +3571,9 @@ func (cluster *ManagedCluster_STATUS) AssignProperties_From_ManagedCluster_STATU // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - cluster.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_STATUS_Values) + cluster.PublicNetworkAccess = &publicNetworkAccessTemp } else { cluster.PublicNetworkAccess = nil } @@ -4946,7 +4948,7 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe for ipFamilyIndex, ipFamilyItem := range source.IpFamilies { // Shadow the loop variable to avoid aliasing ipFamilyItem := ipFamilyItem - ipFamilyList[ipFamilyIndex] = ContainerServiceNetworkProfile_IpFamilies(ipFamilyItem) + ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, containerServiceNetworkProfile_IpFamilies_Values) } profile.IpFamilies = ipFamilyList } else { @@ -4979,8 +4981,9 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := LoadBalancerSku(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, loadBalancerSku_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } @@ -4999,48 +5002,54 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // NetworkDataplane if source.NetworkDataplane != nil { - networkDataplane := NetworkDataplane(*source.NetworkDataplane) - profile.NetworkDataplane = &networkDataplane + networkDataplane := *source.NetworkDataplane + networkDataplaneTemp := genruntime.ToEnum(networkDataplane, networkDataplane_Values) + profile.NetworkDataplane = &networkDataplaneTemp } else { profile.NetworkDataplane = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := NetworkMode(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, networkMode_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := NetworkPlugin(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, networkPlugin_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPluginMode if source.NetworkPluginMode != nil { - networkPluginMode := NetworkPluginMode(*source.NetworkPluginMode) - profile.NetworkPluginMode = &networkPluginMode + networkPluginMode := *source.NetworkPluginMode + networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, networkPluginMode_Values) + profile.NetworkPluginMode = &networkPluginModeTemp } else { profile.NetworkPluginMode = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := NetworkPolicy(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, networkPolicy_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -5442,7 +5451,7 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont for ipFamilyIndex, ipFamilyItem := range source.IpFamilies { // Shadow the loop variable to avoid aliasing ipFamilyItem := ipFamilyItem - ipFamilyList[ipFamilyIndex] = ContainerServiceNetworkProfile_IpFamilies_STATUS(ipFamilyItem) + ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, containerServiceNetworkProfile_IpFamilies_STATUS_Values) } profile.IpFamilies = ipFamilyList } else { @@ -5475,8 +5484,9 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := LoadBalancerSku_STATUS(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, loadBalancerSku_STATUS_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } @@ -5495,48 +5505,54 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // NetworkDataplane if source.NetworkDataplane != nil { - networkDataplane := NetworkDataplane_STATUS(*source.NetworkDataplane) - profile.NetworkDataplane = &networkDataplane + networkDataplane := *source.NetworkDataplane + networkDataplaneTemp := genruntime.ToEnum(networkDataplane, networkDataplane_STATUS_Values) + profile.NetworkDataplane = &networkDataplaneTemp } else { profile.NetworkDataplane = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := NetworkMode_STATUS(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, networkMode_STATUS_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := NetworkPlugin_STATUS(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, networkPlugin_STATUS_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPluginMode if source.NetworkPluginMode != nil { - networkPluginMode := NetworkPluginMode_STATUS(*source.NetworkPluginMode) - profile.NetworkPluginMode = &networkPluginMode + networkPluginMode := *source.NetworkPluginMode + networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, networkPluginMode_STATUS_Values) + profile.NetworkPluginMode = &networkPluginModeTemp } else { profile.NetworkPluginMode = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := NetworkPolicy_STATUS(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, networkPolicy_STATUS_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType_STATUS(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_STATUS_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -5907,8 +5923,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -5991,8 +6008,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -6112,8 +6130,9 @@ func (profile *GuardrailsProfile) AssignProperties_From_GuardrailsProfile(source // Level if source.Level != nil { - level := GuardrailsProfile_Level(*source.Level) - profile.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, guardrailsProfile_Level_Values) + profile.Level = &levelTemp } else { profile.Level = nil } @@ -6219,8 +6238,9 @@ func (profile *GuardrailsProfile_STATUS) AssignProperties_From_GuardrailsProfile // Level if source.Level != nil { - level := GuardrailsProfile_Level_STATUS(*source.Level) - profile.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, guardrailsProfile_Level_STATUS_Values) + profile.Level = &levelTemp } else { profile.Level = nil } @@ -7771,8 +7791,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -7799,8 +7820,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -7831,8 +7853,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -7884,24 +7907,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -7936,24 +7962,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode(*source.ScaleDownMode) - profile.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values) + profile.ScaleDownMode = &scaleDownModeTemp } else { profile.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -7971,8 +8000,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -8014,8 +8044,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime) - profile.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values) + profile.WorkloadRuntime = &workloadRuntimeTemp } else { profile.WorkloadRuntime = nil } @@ -8958,8 +8989,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -8981,8 +9013,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -9013,8 +9046,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -9054,24 +9088,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -9099,24 +9136,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode) - profile.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values) + profile.ScaleDownMode = &scaleDownModeTemp } else { profile.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -9134,8 +9174,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Type if source.Type != nil { - typeVar := AgentPoolType_STATUS(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_STATUS_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -9172,8 +9213,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime) - profile.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values) + profile.WorkloadRuntime = &workloadRuntimeTemp } else { profile.WorkloadRuntime = nil } @@ -9996,16 +10038,18 @@ func (profile *ManagedClusterAutoUpgradeProfile) AssignProperties_From_ManagedCl // NodeOSUpgradeChannel if source.NodeOSUpgradeChannel != nil { - nodeOSUpgradeChannel := ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel(*source.NodeOSUpgradeChannel) - profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannel + nodeOSUpgradeChannel := *source.NodeOSUpgradeChannel + nodeOSUpgradeChannelTemp := genruntime.ToEnum(nodeOSUpgradeChannel, managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Values) + profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannelTemp } else { profile.NodeOSUpgradeChannel = nil } // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -10091,16 +10135,18 @@ func (profile *ManagedClusterAutoUpgradeProfile_STATUS) AssignProperties_From_Ma // NodeOSUpgradeChannel if source.NodeOSUpgradeChannel != nil { - nodeOSUpgradeChannel := ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS(*source.NodeOSUpgradeChannel) - profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannel + nodeOSUpgradeChannel := *source.NodeOSUpgradeChannel + nodeOSUpgradeChannelTemp := genruntime.ToEnum(nodeOSUpgradeChannel, managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Values) + profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannelTemp } else { profile.NodeOSUpgradeChannel = nil } // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -10645,8 +10691,9 @@ func (identity *ManagedClusterIdentity) AssignProperties_From_ManagedClusterIden // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -10792,8 +10839,9 @@ func (identity *ManagedClusterIdentity_STATUS) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -11101,8 +11149,9 @@ func (profile *ManagedClusterNodeResourceGroupProfile) AssignProperties_From_Man // RestrictionLevel if source.RestrictionLevel != nil { - restrictionLevel := ManagedClusterNodeResourceGroupProfile_RestrictionLevel(*source.RestrictionLevel) - profile.RestrictionLevel = &restrictionLevel + restrictionLevel := *source.RestrictionLevel + restrictionLevelTemp := genruntime.ToEnum(restrictionLevel, managedClusterNodeResourceGroupProfile_RestrictionLevel_Values) + profile.RestrictionLevel = &restrictionLevelTemp } else { profile.RestrictionLevel = nil } @@ -11170,8 +11219,9 @@ func (profile *ManagedClusterNodeResourceGroupProfile_STATUS) AssignProperties_F // RestrictionLevel if source.RestrictionLevel != nil { - restrictionLevel := ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS(*source.RestrictionLevel) - profile.RestrictionLevel = &restrictionLevel + restrictionLevel := *source.RestrictionLevel + restrictionLevelTemp := genruntime.ToEnum(restrictionLevel, managedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Values) + profile.RestrictionLevel = &restrictionLevelTemp } else { profile.RestrictionLevel = nil } @@ -12185,8 +12235,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile) AssignProperties_From // Expander if source.Expander != nil { - expander := ManagedClusterProperties_AutoScalerProfile_Expander(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -12503,8 +12554,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile_STATUS) AssignProperti // Expander if source.Expander != nil { - expander := ManagedClusterProperties_AutoScalerProfile_Expander_STATUS(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -12639,6 +12691,13 @@ const ( ManagedClusterProperties_PublicNetworkAccess_SecuredByPerimeter = ManagedClusterProperties_PublicNetworkAccess("SecuredByPerimeter") ) +// Mapping from string to ManagedClusterProperties_PublicNetworkAccess +var managedClusterProperties_PublicNetworkAccess_Values = map[string]ManagedClusterProperties_PublicNetworkAccess{ + "disabled": ManagedClusterProperties_PublicNetworkAccess_Disabled, + "enabled": ManagedClusterProperties_PublicNetworkAccess_Enabled, + "securedbyperimeter": ManagedClusterProperties_PublicNetworkAccess_SecuredByPerimeter, +} + type ManagedClusterProperties_PublicNetworkAccess_STATUS string const ( @@ -12647,6 +12706,13 @@ const ( ManagedClusterProperties_PublicNetworkAccess_STATUS_SecuredByPerimeter = ManagedClusterProperties_PublicNetworkAccess_STATUS("SecuredByPerimeter") ) +// Mapping from string to ManagedClusterProperties_PublicNetworkAccess_STATUS +var managedClusterProperties_PublicNetworkAccess_STATUS_Values = map[string]ManagedClusterProperties_PublicNetworkAccess_STATUS{ + "disabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Enabled, + "securedbyperimeter": ManagedClusterProperties_PublicNetworkAccess_STATUS_SecuredByPerimeter, +} + // Security profile for the container service cluster. type ManagedClusterSecurityProfile struct { // AzureKeyVaultKms: Azure Key Vault [key management @@ -13446,16 +13512,18 @@ func (clusterSKU *ManagedClusterSKU) AssignProperties_From_ManagedClusterSKU(sou // Name if source.Name != nil { - name := ManagedClusterSKU_Name(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -13541,16 +13609,18 @@ func (clusterSKU *ManagedClusterSKU_STATUS) AssignProperties_From_ManagedCluster // Name if source.Name != nil { - name := ManagedClusterSKU_Name_STATUS(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_STATUS_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier_STATUS(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_STATUS_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -14195,8 +14265,9 @@ func (profile *ManagedClusterWindowsProfile) AssignProperties_From_ManagedCluste // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -14374,8 +14445,9 @@ func (profile *ManagedClusterWindowsProfile_STATUS) AssignProperties_From_Manage // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType_STATUS(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_STATUS_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -14734,8 +14806,9 @@ func (state *PowerState_STATUS) AssignProperties_From_PowerState_STATUS(source * // Code if source.Code != nil { - code := PowerState_Code_STATUS(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_STATUS_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -15154,8 +15227,9 @@ func (profile *ServiceMeshProfile) AssignProperties_From_ServiceMeshProfile(sour // Mode if source.Mode != nil { - mode := ServiceMeshProfile_Mode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, serviceMeshProfile_Mode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -15261,8 +15335,9 @@ func (profile *ServiceMeshProfile_STATUS) AssignProperties_From_ServiceMeshProfi // Mode if source.Mode != nil { - mode := ServiceMeshProfile_Mode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, serviceMeshProfile_Mode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -15393,8 +15468,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -15407,8 +15483,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -15788,8 +15865,9 @@ func (vaultKms *AzureKeyVaultKms) AssignProperties_From_AzureKeyVaultKms(source // KeyVaultNetworkAccess if source.KeyVaultNetworkAccess != nil { - keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess(*source.KeyVaultNetworkAccess) - vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess + keyVaultNetworkAccess := *source.KeyVaultNetworkAccess + keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_Values) + vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp } else { vaultKms.KeyVaultNetworkAccess = nil } @@ -15928,8 +16006,9 @@ func (vaultKms *AzureKeyVaultKms_STATUS) AssignProperties_From_AzureKeyVaultKms_ // KeyVaultNetworkAccess if source.KeyVaultNetworkAccess != nil { - keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS(*source.KeyVaultNetworkAccess) - vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess + keyVaultNetworkAccess := *source.KeyVaultNetworkAccess + keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values) + vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp } else { vaultKms.KeyVaultNetworkAccess = nil } @@ -15987,6 +16066,12 @@ const ( ContainerServiceNetworkProfile_IpFamilies_IPv6 = ContainerServiceNetworkProfile_IpFamilies("IPv6") ) +// Mapping from string to ContainerServiceNetworkProfile_IpFamilies +var containerServiceNetworkProfile_IpFamilies_Values = map[string]ContainerServiceNetworkProfile_IpFamilies{ + "ipv4": ContainerServiceNetworkProfile_IpFamilies_IPv4, + "ipv6": ContainerServiceNetworkProfile_IpFamilies_IPv6, +} + type ContainerServiceNetworkProfile_IpFamilies_STATUS string const ( @@ -15994,6 +16079,12 @@ const ( ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv6 = ContainerServiceNetworkProfile_IpFamilies_STATUS("IPv6") ) +// Mapping from string to ContainerServiceNetworkProfile_IpFamilies_STATUS +var containerServiceNetworkProfile_IpFamilies_STATUS_Values = map[string]ContainerServiceNetworkProfile_IpFamilies_STATUS{ + "ipv4": ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv4, + "ipv6": ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv6, +} + type ContainerServiceNetworkProfile_KubeProxyConfig struct { // Enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by // default without these customizations). @@ -16103,8 +16194,9 @@ func (config *ContainerServiceNetworkProfile_KubeProxyConfig) AssignProperties_F // Mode if source.Mode != nil { - mode := ContainerServiceNetworkProfile_KubeProxyConfig_Mode(*source.Mode) - config.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, containerServiceNetworkProfile_KubeProxyConfig_Mode_Values) + config.Mode = &modeTemp } else { config.Mode = nil } @@ -16235,8 +16327,9 @@ func (config *ContainerServiceNetworkProfile_KubeProxyConfig_STATUS) AssignPrope // Mode if source.Mode != nil { - mode := ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS(*source.Mode) - config.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, containerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_Values) + config.Mode = &modeTemp } else { config.Mode = nil } @@ -16299,6 +16392,14 @@ const ( ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType +var containerServiceNetworkProfile_OutboundType_Values = map[string]ContainerServiceNetworkProfile_OutboundType{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_LoadBalancer, + "managednatgateway": ContainerServiceNetworkProfile_OutboundType_ManagedNATGateway, + "userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_UserAssignedNATGateway, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting, +} + type ContainerServiceNetworkProfile_OutboundType_STATUS string const ( @@ -16308,6 +16409,14 @@ const ( ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType_STATUS("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType_STATUS +var containerServiceNetworkProfile_OutboundType_STATUS_Values = map[string]ContainerServiceNetworkProfile_OutboundType_STATUS{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_STATUS_LoadBalancer, + "managednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_ManagedNATGateway, + "userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_UserAssignedNATGateway, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting, +} + // SSH configuration for Linux-based VMs running on Azure. type ContainerServiceSshConfiguration struct { // +kubebuilder:validation:Required @@ -16522,6 +16631,13 @@ const ( GuardrailsProfile_Level_Warning = GuardrailsProfile_Level("Warning") ) +// Mapping from string to GuardrailsProfile_Level +var guardrailsProfile_Level_Values = map[string]GuardrailsProfile_Level{ + "enforcement": GuardrailsProfile_Level_Enforcement, + "off": GuardrailsProfile_Level_Off, + "warning": GuardrailsProfile_Level_Warning, +} + type GuardrailsProfile_Level_STATUS string const ( @@ -16530,6 +16646,13 @@ const ( GuardrailsProfile_Level_STATUS_Warning = GuardrailsProfile_Level_STATUS("Warning") ) +// Mapping from string to GuardrailsProfile_Level_STATUS +var guardrailsProfile_Level_STATUS_Values = map[string]GuardrailsProfile_Level_STATUS{ + "enforcement": GuardrailsProfile_Level_STATUS_Enforcement, + "off": GuardrailsProfile_Level_STATUS_Off, + "warning": GuardrailsProfile_Level_STATUS_Warning, +} + // Istio service mesh configuration. type IstioServiceMesh struct { // Components: Istio components configuration. @@ -16723,6 +16846,12 @@ const ( LoadBalancerSku_Standard = LoadBalancerSku("standard") ) +// Mapping from string to LoadBalancerSku +var loadBalancerSku_Values = map[string]LoadBalancerSku{ + "basic": LoadBalancerSku_Basic, + "standard": LoadBalancerSku_Standard, +} + // The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more // information about the differences between load balancer SKUs. type LoadBalancerSku_STATUS string @@ -16732,6 +16861,12 @@ const ( LoadBalancerSku_STATUS_Standard = LoadBalancerSku_STATUS("standard") ) +// Mapping from string to LoadBalancerSku_STATUS +var loadBalancerSku_STATUS_Values = map[string]LoadBalancerSku_STATUS{ + "basic": LoadBalancerSku_STATUS_Basic, + "standard": LoadBalancerSku_STATUS_Standard, +} + // +kubebuilder:validation:Enum={"NodeImage","None","SecurityPatch","Unmanaged"} type ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel string @@ -16742,6 +16877,14 @@ const ( ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Unmanaged = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel("Unmanaged") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel +var managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel{ + "nodeimage": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_None, + "securitypatch": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_SecurityPatch, + "unmanaged": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Unmanaged, +} + type ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS string const ( @@ -16751,6 +16894,14 @@ const ( ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Unmanaged = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS("Unmanaged") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS +var managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS{ + "nodeimage": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_None, + "securitypatch": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_SecurityPatch, + "unmanaged": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Unmanaged, +} + // +kubebuilder:validation:Enum={"node-image","none","patch","rapid","stable"} type ManagedClusterAutoUpgradeProfile_UpgradeChannel string @@ -16762,6 +16913,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel +var managedClusterAutoUpgradeProfile_UpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable, +} + type ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS string const ( @@ -16772,6 +16932,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS +var managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable, +} + // Metrics profile for the prometheus service addon type ManagedClusterAzureMonitorProfileMetrics struct { // +kubebuilder:validation:Required @@ -17530,8 +17699,9 @@ func (profile *ManagedClusterLoadBalancerProfile) AssignProperties_From_ManagedC // BackendPoolType if source.BackendPoolType != nil { - backendPoolType := ManagedClusterLoadBalancerProfile_BackendPoolType(*source.BackendPoolType) - profile.BackendPoolType = &backendPoolType + backendPoolType := *source.BackendPoolType + backendPoolTypeTemp := genruntime.ToEnum(backendPoolType, managedClusterLoadBalancerProfile_BackendPoolType_Values) + profile.BackendPoolType = &backendPoolTypeTemp } else { profile.BackendPoolType = nil } @@ -17834,8 +18004,9 @@ func (profile *ManagedClusterLoadBalancerProfile_STATUS) AssignProperties_From_M // BackendPoolType if source.BackendPoolType != nil { - backendPoolType := ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS(*source.BackendPoolType) - profile.BackendPoolType = &backendPoolType + backendPoolType := *source.BackendPoolType + backendPoolTypeTemp := genruntime.ToEnum(backendPoolType, managedClusterLoadBalancerProfile_BackendPoolType_STATUS_Values) + profile.BackendPoolType = &backendPoolTypeTemp } else { profile.BackendPoolType = nil } @@ -18349,6 +18520,12 @@ const ( ManagedClusterNodeResourceGroupProfile_RestrictionLevel_Unrestricted = ManagedClusterNodeResourceGroupProfile_RestrictionLevel("Unrestricted") ) +// Mapping from string to ManagedClusterNodeResourceGroupProfile_RestrictionLevel +var managedClusterNodeResourceGroupProfile_RestrictionLevel_Values = map[string]ManagedClusterNodeResourceGroupProfile_RestrictionLevel{ + "readonly": ManagedClusterNodeResourceGroupProfile_RestrictionLevel_ReadOnly, + "unrestricted": ManagedClusterNodeResourceGroupProfile_RestrictionLevel_Unrestricted, +} + type ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS string const ( @@ -18356,6 +18533,12 @@ const ( ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Unrestricted = ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS("Unrestricted") ) +// Mapping from string to ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS +var managedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Values = map[string]ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS{ + "readonly": ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_ReadOnly, + "unrestricted": ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Unrestricted, +} + type ManagedClusterOperatorConfigMaps struct { // OIDCIssuerProfile: indicates where the OIDCIssuerProfile config map should be placed. If omitted, no config map will be // created. @@ -18754,8 +18937,9 @@ func (identity *ManagedClusterPodIdentity_STATUS) AssignProperties_From_ManagedC // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ManagedClusterPodIdentity_ProvisioningState_STATUS(*source.ProvisioningState) - identity.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, managedClusterPodIdentity_ProvisioningState_STATUS_Values) + identity.ProvisioningState = &provisioningStateTemp } else { identity.ProvisioningState = nil } @@ -19047,6 +19231,14 @@ const ( ManagedClusterProperties_AutoScalerProfile_Expander_Random = ManagedClusterProperties_AutoScalerProfile_Expander("random") ) +// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander +var managedClusterProperties_AutoScalerProfile_Expander_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander{ + "least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_LeastWaste, + "most-pods": ManagedClusterProperties_AutoScalerProfile_Expander_MostPods, + "priority": ManagedClusterProperties_AutoScalerProfile_Expander_Priority, + "random": ManagedClusterProperties_AutoScalerProfile_Expander_Random, +} + type ManagedClusterProperties_AutoScalerProfile_Expander_STATUS string const ( @@ -19056,6 +19248,14 @@ const ( ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random = ManagedClusterProperties_AutoScalerProfile_Expander_STATUS("random") ) +// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander_STATUS +var managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander_STATUS{ + "least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_LeastWaste, + "most-pods": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_MostPods, + "priority": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Priority, + "random": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random, +} + // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:MinItems=0 type ManagedClusterSecurityProfileCustomCATrustCertificates []string @@ -20446,6 +20646,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_Windows_Server = ManagedClusterWindowsProfile_LicenseType("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType +var managedClusterWindowsProfile_LicenseType_Values = map[string]ManagedClusterWindowsProfile_LicenseType{ + "none": ManagedClusterWindowsProfile_LicenseType_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_Windows_Server, +} + type ManagedClusterWindowsProfile_LicenseType_STATUS string const ( @@ -20453,6 +20659,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server = ManagedClusterWindowsProfile_LicenseType_STATUS("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType_STATUS +var managedClusterWindowsProfile_LicenseType_STATUS_Values = map[string]ManagedClusterWindowsProfile_LicenseType_STATUS{ + "none": ManagedClusterWindowsProfile_LicenseType_STATUS_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server, +} + // KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. type ManagedClusterWorkloadAutoScalerProfileKeda struct { // +kubebuilder:validation:Required @@ -20691,8 +20903,9 @@ func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) // ControlledValues if source.ControlledValues != nil { - controlledValue := ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues(*source.ControlledValues) - autoscaler.ControlledValues = &controlledValue + controlledValue := *source.ControlledValues + controlledValueTemp := genruntime.ToEnum(controlledValue, managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_Values) + autoscaler.ControlledValues = &controlledValueTemp } else { autoscaler.ControlledValues = nil } @@ -20707,8 +20920,9 @@ func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) // UpdateMode if source.UpdateMode != nil { - updateMode := ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode(*source.UpdateMode) - autoscaler.UpdateMode = &updateMode + updateMode := *source.UpdateMode + updateModeTemp := genruntime.ToEnum(updateMode, managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_Values) + autoscaler.UpdateMode = &updateModeTemp } else { autoscaler.UpdateMode = nil } @@ -20811,8 +21025,9 @@ func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_S // ControlledValues if source.ControlledValues != nil { - controlledValue := ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS(*source.ControlledValues) - autoscaler.ControlledValues = &controlledValue + controlledValue := *source.ControlledValues + controlledValueTemp := genruntime.ToEnum(controlledValue, managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS_Values) + autoscaler.ControlledValues = &controlledValueTemp } else { autoscaler.ControlledValues = nil } @@ -20827,8 +21042,9 @@ func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_S // UpdateMode if source.UpdateMode != nil { - updateMode := ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS(*source.UpdateMode) - autoscaler.UpdateMode = &updateMode + updateMode := *source.UpdateMode + updateModeTemp := genruntime.ToEnum(updateMode, managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS_Values) + autoscaler.UpdateMode = &updateModeTemp } else { autoscaler.UpdateMode = nil } @@ -20886,6 +21102,12 @@ const ( NetworkDataplane_Cilium = NetworkDataplane("cilium") ) +// Mapping from string to NetworkDataplane +var networkDataplane_Values = map[string]NetworkDataplane{ + "azure": NetworkDataplane_Azure, + "cilium": NetworkDataplane_Cilium, +} + // Network dataplane used in the Kubernetes cluster. type NetworkDataplane_STATUS string @@ -20894,6 +21116,12 @@ const ( NetworkDataplane_STATUS_Cilium = NetworkDataplane_STATUS("cilium") ) +// Mapping from string to NetworkDataplane_STATUS +var networkDataplane_STATUS_Values = map[string]NetworkDataplane_STATUS{ + "azure": NetworkDataplane_STATUS_Azure, + "cilium": NetworkDataplane_STATUS_Cilium, +} + // This cannot be specified if networkPlugin is anything other than 'azure'. // +kubebuilder:validation:Enum={"bridge","transparent"} type NetworkMode string @@ -20903,6 +21131,12 @@ const ( NetworkMode_Transparent = NetworkMode("transparent") ) +// Mapping from string to NetworkMode +var networkMode_Values = map[string]NetworkMode{ + "bridge": NetworkMode_Bridge, + "transparent": NetworkMode_Transparent, +} + // This cannot be specified if networkPlugin is anything other than 'azure'. type NetworkMode_STATUS string @@ -20911,6 +21145,12 @@ const ( NetworkMode_STATUS_Transparent = NetworkMode_STATUS("transparent") ) +// Mapping from string to NetworkMode_STATUS +var networkMode_STATUS_Values = map[string]NetworkMode_STATUS{ + "bridge": NetworkMode_STATUS_Bridge, + "transparent": NetworkMode_STATUS_Transparent, +} + // Network plugin used for building the Kubernetes network. // +kubebuilder:validation:Enum={"azure","kubenet","none"} type NetworkPlugin string @@ -20921,6 +21161,13 @@ const ( NetworkPlugin_None = NetworkPlugin("none") ) +// Mapping from string to NetworkPlugin +var networkPlugin_Values = map[string]NetworkPlugin{ + "azure": NetworkPlugin_Azure, + "kubenet": NetworkPlugin_Kubenet, + "none": NetworkPlugin_None, +} + // Network plugin used for building the Kubernetes network. type NetworkPlugin_STATUS string @@ -20930,17 +21177,34 @@ const ( NetworkPlugin_STATUS_None = NetworkPlugin_STATUS("none") ) +// Mapping from string to NetworkPlugin_STATUS +var networkPlugin_STATUS_Values = map[string]NetworkPlugin_STATUS{ + "azure": NetworkPlugin_STATUS_Azure, + "kubenet": NetworkPlugin_STATUS_Kubenet, + "none": NetworkPlugin_STATUS_None, +} + // The mode the network plugin should use. // +kubebuilder:validation:Enum={"Overlay"} type NetworkPluginMode string const NetworkPluginMode_Overlay = NetworkPluginMode("Overlay") +// Mapping from string to NetworkPluginMode +var networkPluginMode_Values = map[string]NetworkPluginMode{ + "overlay": NetworkPluginMode_Overlay, +} + // The mode the network plugin should use. type NetworkPluginMode_STATUS string const NetworkPluginMode_STATUS_Overlay = NetworkPluginMode_STATUS("Overlay") +// Mapping from string to NetworkPluginMode_STATUS +var networkPluginMode_STATUS_Values = map[string]NetworkPluginMode_STATUS{ + "overlay": NetworkPluginMode_STATUS_Overlay, +} + // Network policy used for building the Kubernetes network. // +kubebuilder:validation:Enum={"azure","calico","cilium"} type NetworkPolicy string @@ -20951,6 +21215,13 @@ const ( NetworkPolicy_Cilium = NetworkPolicy("cilium") ) +// Mapping from string to NetworkPolicy +var networkPolicy_Values = map[string]NetworkPolicy{ + "azure": NetworkPolicy_Azure, + "calico": NetworkPolicy_Calico, + "cilium": NetworkPolicy_Cilium, +} + // Network policy used for building the Kubernetes network. type NetworkPolicy_STATUS string @@ -20960,6 +21231,13 @@ const ( NetworkPolicy_STATUS_Cilium = NetworkPolicy_STATUS("cilium") ) +// Mapping from string to NetworkPolicy_STATUS +var networkPolicy_STATUS_Values = map[string]NetworkPolicy_STATUS{ + "azure": NetworkPolicy_STATUS_Azure, + "calico": NetworkPolicy_STATUS_Calico, + "cilium": NetworkPolicy_STATUS_Cilium, +} + type PowerState_Code_STATUS string const ( @@ -20967,6 +21245,12 @@ const ( PowerState_Code_STATUS_Stopped = PowerState_Code_STATUS("Stopped") ) +// Mapping from string to PowerState_Code_STATUS +var powerState_Code_STATUS_Values = map[string]PowerState_Code_STATUS{ + "running": PowerState_Code_STATUS_Running, + "stopped": PowerState_Code_STATUS_Stopped, +} + // +kubebuilder:validation:Enum={"Disabled","Istio"} type ServiceMeshProfile_Mode string @@ -20975,6 +21259,12 @@ const ( ServiceMeshProfile_Mode_Istio = ServiceMeshProfile_Mode("Istio") ) +// Mapping from string to ServiceMeshProfile_Mode +var serviceMeshProfile_Mode_Values = map[string]ServiceMeshProfile_Mode{ + "disabled": ServiceMeshProfile_Mode_Disabled, + "istio": ServiceMeshProfile_Mode_Istio, +} + type ServiceMeshProfile_Mode_STATUS string const ( @@ -20982,6 +21272,12 @@ const ( ServiceMeshProfile_Mode_STATUS_Istio = ServiceMeshProfile_Mode_STATUS("Istio") ) +// Mapping from string to ServiceMeshProfile_Mode_STATUS +var serviceMeshProfile_Mode_STATUS_Values = map[string]ServiceMeshProfile_Mode_STATUS{ + "disabled": ServiceMeshProfile_Mode_STATUS_Disabled, + "istio": ServiceMeshProfile_Mode_STATUS_Istio, +} + // Settings for overrides when upgrading a cluster. type UpgradeOverrideSettings struct { // ControlPlaneOverrides: List of upgrade overrides when upgrading a cluster's control plane. @@ -21051,7 +21347,7 @@ func (settings *UpgradeOverrideSettings) AssignProperties_From_UpgradeOverrideSe for controlPlaneOverrideIndex, controlPlaneOverrideItem := range source.ControlPlaneOverrides { // Shadow the loop variable to avoid aliasing controlPlaneOverrideItem := controlPlaneOverrideItem - controlPlaneOverrideList[controlPlaneOverrideIndex] = ControlPlaneUpgradeOverride(controlPlaneOverrideItem) + controlPlaneOverrideList[controlPlaneOverrideIndex] = genruntime.ToEnum(controlPlaneOverrideItem, controlPlaneUpgradeOverride_Values) } settings.ControlPlaneOverrides = controlPlaneOverrideList } else { @@ -21146,7 +21442,7 @@ func (settings *UpgradeOverrideSettings_STATUS) AssignProperties_From_UpgradeOve for controlPlaneOverrideIndex, controlPlaneOverrideItem := range source.ControlPlaneOverrides { // Shadow the loop variable to avoid aliasing controlPlaneOverrideItem := controlPlaneOverrideItem - controlPlaneOverrideList[controlPlaneOverrideIndex] = ControlPlaneUpgradeOverride_STATUS(controlPlaneOverrideItem) + controlPlaneOverrideList[controlPlaneOverrideIndex] = genruntime.ToEnum(controlPlaneOverrideItem, controlPlaneUpgradeOverride_STATUS_Values) } settings.ControlPlaneOverrides = controlPlaneOverrideList } else { @@ -21463,6 +21759,12 @@ const ( AzureKeyVaultKms_KeyVaultNetworkAccess_Public = AzureKeyVaultKms_KeyVaultNetworkAccess("Public") ) +// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess +var azureKeyVaultKms_KeyVaultNetworkAccess_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess{ + "private": AzureKeyVaultKms_KeyVaultNetworkAccess_Private, + "public": AzureKeyVaultKms_KeyVaultNetworkAccess_Public, +} + type AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS string const ( @@ -21470,6 +21772,12 @@ const ( AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public = AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS("Public") ) +// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS +var azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS{ + "private": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Private, + "public": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public, +} + type ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig struct { // Scheduler: IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. Scheduler *ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler `json:"scheduler,omitempty"` @@ -21565,8 +21873,9 @@ func (config *ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig) AssignP // Scheduler if source.Scheduler != nil { - scheduler := ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler(*source.Scheduler) - config.Scheduler = &scheduler + scheduler := *source.Scheduler + schedulerTemp := genruntime.ToEnum(scheduler, containerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_Values) + config.Scheduler = &schedulerTemp } else { config.Scheduler = nil } @@ -21679,8 +21988,9 @@ func (config *ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_STATUS) // Scheduler if source.Scheduler != nil { - scheduler := ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS(*source.Scheduler) - config.Scheduler = &scheduler + scheduler := *source.Scheduler + schedulerTemp := genruntime.ToEnum(scheduler, containerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_Values) + config.Scheduler = &schedulerTemp } else { config.Scheduler = nil } @@ -21739,6 +22049,12 @@ const ( ContainerServiceNetworkProfile_KubeProxyConfig_Mode_IPVS = ContainerServiceNetworkProfile_KubeProxyConfig_Mode("IPVS") ) +// Mapping from string to ContainerServiceNetworkProfile_KubeProxyConfig_Mode +var containerServiceNetworkProfile_KubeProxyConfig_Mode_Values = map[string]ContainerServiceNetworkProfile_KubeProxyConfig_Mode{ + "iptables": ContainerServiceNetworkProfile_KubeProxyConfig_Mode_IPTABLES, + "ipvs": ContainerServiceNetworkProfile_KubeProxyConfig_Mode_IPVS, +} + type ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS string const ( @@ -21746,6 +22062,12 @@ const ( ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_IPVS = ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS("IPVS") ) +// Mapping from string to ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS +var containerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_Values = map[string]ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS{ + "iptables": ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_IPTABLES, + "ipvs": ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_IPVS, +} + // Contains information about SSH certificate public key data. type ContainerServiceSshPublicKey struct { // +kubebuilder:validation:Required @@ -21888,11 +22210,21 @@ type ControlPlaneUpgradeOverride string const ControlPlaneUpgradeOverride_IgnoreKubernetesDeprecations = ControlPlaneUpgradeOverride("IgnoreKubernetesDeprecations") +// Mapping from string to ControlPlaneUpgradeOverride +var controlPlaneUpgradeOverride_Values = map[string]ControlPlaneUpgradeOverride{ + "ignorekubernetesdeprecations": ControlPlaneUpgradeOverride_IgnoreKubernetesDeprecations, +} + // The list of control plane upgrade override settings. type ControlPlaneUpgradeOverride_STATUS string const ControlPlaneUpgradeOverride_STATUS_IgnoreKubernetesDeprecations = ControlPlaneUpgradeOverride_STATUS("IgnoreKubernetesDeprecations") +// Mapping from string to ControlPlaneUpgradeOverride_STATUS +var controlPlaneUpgradeOverride_STATUS_Values = map[string]ControlPlaneUpgradeOverride_STATUS{ + "ignorekubernetesdeprecations": ControlPlaneUpgradeOverride_STATUS_IgnoreKubernetesDeprecations, +} + // Istio components configuration. type IstioComponents struct { // IngressGateways: Istio ingress gateways. @@ -22278,6 +22610,12 @@ const ( ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIPConfiguration = ManagedClusterLoadBalancerProfile_BackendPoolType("NodeIPConfiguration") ) +// Mapping from string to ManagedClusterLoadBalancerProfile_BackendPoolType +var managedClusterLoadBalancerProfile_BackendPoolType_Values = map[string]ManagedClusterLoadBalancerProfile_BackendPoolType{ + "nodeip": ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIP, + "nodeipconfiguration": ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIPConfiguration, +} + type ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS string const ( @@ -22285,6 +22623,12 @@ const ( ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIPConfiguration = ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS("NodeIPConfiguration") ) +// Mapping from string to ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS +var managedClusterLoadBalancerProfile_BackendPoolType_STATUS_Values = map[string]ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS{ + "nodeip": ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIP, + "nodeipconfiguration": ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIPConfiguration, +} + type ManagedClusterLoadBalancerProfile_ManagedOutboundIPs struct { // +kubebuilder:validation:Maximum=100 // +kubebuilder:validation:Minimum=1 @@ -23123,6 +23467,16 @@ const ( ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating = ManagedClusterPodIdentity_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ManagedClusterPodIdentity_ProvisioningState_STATUS +var managedClusterPodIdentity_ProvisioningState_STATUS_Values = map[string]ManagedClusterPodIdentity_ProvisioningState_STATUS{ + "assigned": ManagedClusterPodIdentity_ProvisioningState_STATUS_Assigned, + "canceled": ManagedClusterPodIdentity_ProvisioningState_STATUS_Canceled, + "deleting": ManagedClusterPodIdentity_ProvisioningState_STATUS_Deleting, + "failed": ManagedClusterPodIdentity_ProvisioningState_STATUS_Failed, + "succeeded": ManagedClusterPodIdentity_ProvisioningState_STATUS_Succeeded, + "updating": ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating, +} + // Microsoft Defender settings for the security profile threat detection. type ManagedClusterSecurityProfileDefenderSecurityMonitoring struct { // Enabled: Whether to enable Defender threat detection @@ -23284,6 +23638,12 @@ const ( ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_RequestsOnly = ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues("RequestsOnly") ) +// Mapping from string to ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues +var managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_Values = map[string]ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues{ + "requestsandlimits": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_RequestsAndLimits, + "requestsonly": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_RequestsOnly, +} + type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS string const ( @@ -23291,6 +23651,12 @@ const ( ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS_RequestsOnly = ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS("RequestsOnly") ) +// Mapping from string to ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS +var managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS_Values = map[string]ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS{ + "requestsandlimits": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS_RequestsAndLimits, + "requestsonly": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_ControlledValues_STATUS_RequestsOnly, +} + // +kubebuilder:validation:Enum={"Auto","Initial","Off","Recreate"} type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode string @@ -23301,6 +23667,14 @@ const ( ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_Recreate = ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode("Recreate") ) +// Mapping from string to ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode +var managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_Values = map[string]ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode{ + "auto": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_Auto, + "initial": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_Initial, + "off": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_Off, + "recreate": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_Recreate, +} + type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS string const ( @@ -23310,6 +23684,14 @@ const ( ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS_Recreate = ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS("Recreate") ) +// Mapping from string to ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS +var managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS_Values = map[string]ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS{ + "auto": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS_Auto, + "initial": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS_Initial, + "off": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS_Off, + "recreate": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_UpdateMode_STATUS_Recreate, +} + // A reference to an Azure resource. type ResourceReference struct { // Reference: The fully qualified Azure resource id. @@ -23461,6 +23843,12 @@ const ( ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_RoundRobin = ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler("RoundRobin") ) +// Mapping from string to ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler +var containerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_Values = map[string]ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler{ + "leastconnection": ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_LeastConnection, + "roundrobin": ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_RoundRobin, +} + type ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS string const ( @@ -23468,6 +23856,12 @@ const ( ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_RoundRobin = ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS("RoundRobin") ) +// Mapping from string to ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS +var containerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_Values = map[string]ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS{ + "leastconnection": ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_LeastConnection, + "roundrobin": ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_RoundRobin, +} + // Istio ingress gateway configuration. For now, we support up to one external ingress gateway named // `aks-istio-ingressgateway-external` and one internal ingress gateway named `aks-istio-ingressgateway-internal`. type IstioIngressGateway struct { @@ -23544,8 +23938,9 @@ func (gateway *IstioIngressGateway) AssignProperties_From_IstioIngressGateway(so // Mode if source.Mode != nil { - mode := IstioIngressGateway_Mode(*source.Mode) - gateway.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, istioIngressGateway_Mode_Values) + gateway.Mode = &modeTemp } else { gateway.Mode = nil } @@ -23639,8 +24034,9 @@ func (gateway *IstioIngressGateway_STATUS) AssignProperties_From_IstioIngressGat // Mode if source.Mode != nil { - mode := IstioIngressGateway_Mode_STATUS(*source.Mode) - gateway.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, istioIngressGateway_Mode_STATUS_Values) + gateway.Mode = &modeTemp } else { gateway.Mode = nil } @@ -23771,6 +24167,12 @@ const ( IstioIngressGateway_Mode_Internal = IstioIngressGateway_Mode("Internal") ) +// Mapping from string to IstioIngressGateway_Mode +var istioIngressGateway_Mode_Values = map[string]IstioIngressGateway_Mode{ + "external": IstioIngressGateway_Mode_External, + "internal": IstioIngressGateway_Mode_Internal, +} + type IstioIngressGateway_Mode_STATUS string const ( @@ -23778,6 +24180,12 @@ const ( IstioIngressGateway_Mode_STATUS_Internal = IstioIngressGateway_Mode_STATUS("Internal") ) +// Mapping from string to IstioIngressGateway_Mode_STATUS +var istioIngressGateway_Mode_STATUS_Values = map[string]IstioIngressGateway_Mode_STATUS{ + "external": IstioIngressGateway_Mode_STATUS_External, + "internal": IstioIngressGateway_Mode_STATUS_Internal, +} + // An error response from the pod identity provisioning. type ManagedClusterPodIdentityProvisioningErrorBody_STATUS struct { // Code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. diff --git a/v2/api/containerservice/v1api20230202preview/managed_clusters_agent_pool_types_gen.go b/v2/api/containerservice/v1api20230202preview/managed_clusters_agent_pool_types_gen.go index df5c9a829c3..d307f7fac29 100644 --- a/v2/api/containerservice/v1api20230202preview/managed_clusters_agent_pool_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/managed_clusters_agent_pool_types_gen.go @@ -1340,8 +1340,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -1368,8 +1369,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -1400,8 +1402,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -1445,24 +1448,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -1505,24 +1511,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode(*source.ScaleDownMode) - pool.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values) + pool.ScaleDownMode = &scaleDownModeTemp } else { pool.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -1540,8 +1549,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - pool.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + pool.Type = &typeTemp } else { pool.Type = nil } @@ -1583,8 +1593,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime) - pool.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values) + pool.WorkloadRuntime = &workloadRuntimeTemp } else { pool.WorkloadRuntime = nil } @@ -2756,8 +2767,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -2782,8 +2794,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -2814,8 +2827,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -2855,24 +2869,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -2894,8 +2911,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // PropertiesType if source.PropertiesType != nil { - propertiesType := AgentPoolType_STATUS(*source.PropertiesType) - pool.PropertiesType = &propertiesType + propertiesType := *source.PropertiesType + propertiesTypeTemp := genruntime.ToEnum(propertiesType, agentPoolType_STATUS_Values) + pool.PropertiesType = &propertiesTypeTemp } else { pool.PropertiesType = nil } @@ -2908,24 +2926,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode) - pool.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values) + pool.ScaleDownMode = &scaleDownModeTemp } else { pool.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -2976,8 +2997,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime) - pool.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values) + pool.WorkloadRuntime = &workloadRuntimeTemp } else { pool.WorkloadRuntime = nil } @@ -3315,6 +3337,12 @@ const ( AgentPoolMode_User = AgentPoolMode("User") ) +// Mapping from string to AgentPoolMode +var agentPoolMode_Values = map[string]AgentPoolMode{ + "system": AgentPoolMode_System, + "user": AgentPoolMode_User, +} + // A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions // and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools type AgentPoolMode_STATUS string @@ -3324,6 +3352,12 @@ const ( AgentPoolMode_STATUS_User = AgentPoolMode_STATUS("User") ) +// Mapping from string to AgentPoolMode_STATUS +var agentPoolMode_STATUS_Values = map[string]AgentPoolMode_STATUS{ + "system": AgentPoolMode_STATUS_System, + "user": AgentPoolMode_STATUS_User, +} + // Network settings of an agent pool. type AgentPoolNetworkProfile struct { // AllowedHostPorts: The port ranges that are allowed to access. The specified ranges are allowed to overlap. @@ -3699,6 +3733,12 @@ const ( AgentPoolType_VirtualMachineScaleSets = AgentPoolType("VirtualMachineScaleSets") ) +// Mapping from string to AgentPoolType +var agentPoolType_Values = map[string]AgentPoolType{ + "availabilityset": AgentPoolType_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_VirtualMachineScaleSets, +} + // The type of Agent Pool. type AgentPoolType_STATUS string @@ -3707,6 +3747,12 @@ const ( AgentPoolType_STATUS_VirtualMachineScaleSets = AgentPoolType_STATUS("VirtualMachineScaleSets") ) +// Mapping from string to AgentPoolType_STATUS +var agentPoolType_STATUS_Values = map[string]AgentPoolType_STATUS{ + "availabilityset": AgentPoolType_STATUS_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_STATUS_VirtualMachineScaleSets, +} + // Settings for upgrading an agentpool type AgentPoolUpgradeSettings struct { // MaxSurge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it @@ -4017,6 +4063,15 @@ const ( GPUInstanceProfile_MIG7G = GPUInstanceProfile("MIG7g") ) +// Mapping from string to GPUInstanceProfile +var gPUInstanceProfile_Values = map[string]GPUInstanceProfile{ + "mig1g": GPUInstanceProfile_MIG1G, + "mig2g": GPUInstanceProfile_MIG2G, + "mig3g": GPUInstanceProfile_MIG3G, + "mig4g": GPUInstanceProfile_MIG4G, + "mig7g": GPUInstanceProfile_MIG7G, +} + // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. type GPUInstanceProfile_STATUS string @@ -4028,6 +4083,15 @@ const ( GPUInstanceProfile_STATUS_MIG7G = GPUInstanceProfile_STATUS("MIG7g") ) +// Mapping from string to GPUInstanceProfile_STATUS +var gPUInstanceProfile_STATUS_Values = map[string]GPUInstanceProfile_STATUS{ + "mig1g": GPUInstanceProfile_STATUS_MIG1G, + "mig2g": GPUInstanceProfile_STATUS_MIG2G, + "mig3g": GPUInstanceProfile_STATUS_MIG3G, + "mig4g": GPUInstanceProfile_STATUS_MIG4G, + "mig7g": GPUInstanceProfile_STATUS_MIG7G, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type KubeletConfig struct { // AllowedUnsafeSysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). @@ -4590,6 +4654,12 @@ const ( KubeletDiskType_Temporary = KubeletDiskType("Temporary") ) +// Mapping from string to KubeletDiskType +var kubeletDiskType_Values = map[string]KubeletDiskType{ + "os": KubeletDiskType_OS, + "temporary": KubeletDiskType_Temporary, +} + // Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. type KubeletDiskType_STATUS string @@ -4598,6 +4668,12 @@ const ( KubeletDiskType_STATUS_Temporary = KubeletDiskType_STATUS("Temporary") ) +// Mapping from string to KubeletDiskType_STATUS +var kubeletDiskType_STATUS_Values = map[string]KubeletDiskType_STATUS{ + "os": KubeletDiskType_STATUS_OS, + "temporary": KubeletDiskType_STATUS_Temporary, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type LinuxOSConfig struct { // SwapFileSizeMB: The size in MB of a swap file that will be created on each node. @@ -4908,6 +4984,12 @@ const ( OSDiskType_Managed = OSDiskType("Managed") ) +// Mapping from string to OSDiskType +var oSDiskType_Values = map[string]OSDiskType{ + "ephemeral": OSDiskType_Ephemeral, + "managed": OSDiskType_Managed, +} + // The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, // defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral // OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). @@ -4918,6 +5000,12 @@ const ( OSDiskType_STATUS_Managed = OSDiskType_STATUS("Managed") ) +// Mapping from string to OSDiskType_STATUS +var oSDiskType_STATUS_Values = map[string]OSDiskType_STATUS{ + "ephemeral": OSDiskType_STATUS_Ephemeral, + "managed": OSDiskType_STATUS_Managed, +} + // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. // +kubebuilder:validation:Enum={"CBLMariner","Mariner","Ubuntu","Windows2019","Windows2022"} @@ -4931,6 +5019,15 @@ const ( OSSKU_Windows2022 = OSSKU("Windows2022") ) +// Mapping from string to OSSKU +var oSSKU_Values = map[string]OSSKU{ + "cblmariner": OSSKU_CBLMariner, + "mariner": OSSKU_Mariner, + "ubuntu": OSSKU_Ubuntu, + "windows2019": OSSKU_Windows2019, + "windows2022": OSSKU_Windows2022, +} + // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. type OSSKU_STATUS string @@ -4943,6 +5040,15 @@ const ( OSSKU_STATUS_Windows2022 = OSSKU_STATUS("Windows2022") ) +// Mapping from string to OSSKU_STATUS +var oSSKU_STATUS_Values = map[string]OSSKU_STATUS{ + "cblmariner": OSSKU_STATUS_CBLMariner, + "mariner": OSSKU_STATUS_Mariner, + "ubuntu": OSSKU_STATUS_Ubuntu, + "windows2019": OSSKU_STATUS_Windows2019, + "windows2022": OSSKU_STATUS_Windows2022, +} + // The operating system type. The default is Linux. // +kubebuilder:validation:Enum={"Linux","Windows"} type OSType string @@ -4952,6 +5058,12 @@ const ( OSType_Windows = OSType("Windows") ) +// Mapping from string to OSType +var oSType_Values = map[string]OSType{ + "linux": OSType_Linux, + "windows": OSType_Windows, +} + // The operating system type. The default is Linux. type OSType_STATUS string @@ -4960,6 +5072,12 @@ const ( OSType_STATUS_Windows = OSType_STATUS("Windows") ) +// Mapping from string to OSType_STATUS +var oSType_STATUS_Values = map[string]OSType_STATUS{ + "linux": OSType_STATUS_Linux, + "windows": OSType_STATUS_Windows, +} + // Describes the Power State of the cluster type PowerState struct { // Code: Tells whether the cluster is Running or Stopped @@ -5010,8 +5128,9 @@ func (state *PowerState) AssignProperties_From_PowerState(source *v20230202ps.Po // Code if source.Code != nil { - code := PowerState_Code(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -5054,6 +5173,12 @@ const ( ScaleDownMode_Delete = ScaleDownMode("Delete") ) +// Mapping from string to ScaleDownMode +var scaleDownMode_Values = map[string]ScaleDownMode{ + "deallocate": ScaleDownMode_Deallocate, + "delete": ScaleDownMode_Delete, +} + // Describes how VMs are added to or removed from Agent Pools. See [billing // states](https://docs.microsoft.com/azure/virtual-machines/states-billing). type ScaleDownMode_STATUS string @@ -5063,6 +5188,12 @@ const ( ScaleDownMode_STATUS_Delete = ScaleDownMode_STATUS("Delete") ) +// Mapping from string to ScaleDownMode_STATUS +var scaleDownMode_STATUS_Values = map[string]ScaleDownMode_STATUS{ + "deallocate": ScaleDownMode_STATUS_Deallocate, + "delete": ScaleDownMode_STATUS_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) // +kubebuilder:validation:Enum={"Deallocate","Delete"} @@ -5073,6 +5204,12 @@ const ( ScaleSetEvictionPolicy_Delete = ScaleSetEvictionPolicy("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy +var scaleSetEvictionPolicy_Values = map[string]ScaleSetEvictionPolicy{ + "deallocate": ScaleSetEvictionPolicy_Deallocate, + "delete": ScaleSetEvictionPolicy_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) type ScaleSetEvictionPolicy_STATUS string @@ -5082,6 +5219,12 @@ const ( ScaleSetEvictionPolicy_STATUS_Delete = ScaleSetEvictionPolicy_STATUS("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy_STATUS +var scaleSetEvictionPolicy_STATUS_Values = map[string]ScaleSetEvictionPolicy_STATUS{ + "deallocate": ScaleSetEvictionPolicy_STATUS_Deallocate, + "delete": ScaleSetEvictionPolicy_STATUS_Delete, +} + // The Virtual Machine Scale Set priority. // +kubebuilder:validation:Enum={"Regular","Spot"} type ScaleSetPriority string @@ -5091,6 +5234,12 @@ const ( ScaleSetPriority_Spot = ScaleSetPriority("Spot") ) +// Mapping from string to ScaleSetPriority +var scaleSetPriority_Values = map[string]ScaleSetPriority{ + "regular": ScaleSetPriority_Regular, + "spot": ScaleSetPriority_Spot, +} + // The Virtual Machine Scale Set priority. type ScaleSetPriority_STATUS string @@ -5099,6 +5248,12 @@ const ( ScaleSetPriority_STATUS_Spot = ScaleSetPriority_STATUS("Spot") ) +// Mapping from string to ScaleSetPriority_STATUS +var scaleSetPriority_STATUS_Values = map[string]ScaleSetPriority_STATUS{ + "regular": ScaleSetPriority_STATUS_Regular, + "spot": ScaleSetPriority_STATUS_Spot, +} + // Determines the type of workload a node can run. // +kubebuilder:validation:Enum={"KataMshvVmIsolation","OCIContainer","WasmWasi"} type WorkloadRuntime string @@ -5109,6 +5264,13 @@ const ( WorkloadRuntime_WasmWasi = WorkloadRuntime("WasmWasi") ) +// Mapping from string to WorkloadRuntime +var workloadRuntime_Values = map[string]WorkloadRuntime{ + "katamshvvmisolation": WorkloadRuntime_KataMshvVmIsolation, + "ocicontainer": WorkloadRuntime_OCIContainer, + "wasmwasi": WorkloadRuntime_WasmWasi, +} + // Determines the type of workload a node can run. type WorkloadRuntime_STATUS string @@ -5118,6 +5280,13 @@ const ( WorkloadRuntime_STATUS_WasmWasi = WorkloadRuntime_STATUS("WasmWasi") ) +// Mapping from string to WorkloadRuntime_STATUS +var workloadRuntime_STATUS_Values = map[string]WorkloadRuntime_STATUS{ + "katamshvvmisolation": WorkloadRuntime_STATUS_KataMshvVmIsolation, + "ocicontainer": WorkloadRuntime_STATUS_OCIContainer, + "wasmwasi": WorkloadRuntime_STATUS_WasmWasi, +} + // Contains the IPTag associated with the object. type IPTag struct { // IpTagType: The IP tag type. Example: RoutingPreference. @@ -5389,8 +5558,9 @@ func (portRange *PortRange) AssignProperties_From_PortRange(source *v20230202ps. // Protocol if source.Protocol != nil { - protocol := PortRange_Protocol(*source.Protocol) - portRange.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, portRange_Protocol_Values) + portRange.Protocol = &protocolTemp } else { portRange.Protocol = nil } @@ -5500,8 +5670,9 @@ func (portRange *PortRange_STATUS) AssignProperties_From_PortRange_STATUS(source // Protocol if source.Protocol != nil { - protocol := PortRange_Protocol_STATUS(*source.Protocol) - portRange.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, portRange_Protocol_STATUS_Values) + portRange.Protocol = &protocolTemp } else { portRange.Protocol = nil } @@ -5548,6 +5719,12 @@ const ( PowerState_Code_Stopped = PowerState_Code("Stopped") ) +// Mapping from string to PowerState_Code +var powerState_Code_Values = map[string]PowerState_Code{ + "running": PowerState_Code_Running, + "stopped": PowerState_Code_Stopped, +} + // Sysctl settings for Linux agent nodes. type SysctlConfig struct { // FsAioMaxNr: Sysctl setting fs.aio-max-nr. @@ -6681,6 +6858,12 @@ const ( PortRange_Protocol_UDP = PortRange_Protocol("UDP") ) +// Mapping from string to PortRange_Protocol +var portRange_Protocol_Values = map[string]PortRange_Protocol{ + "tcp": PortRange_Protocol_TCP, + "udp": PortRange_Protocol_UDP, +} + type PortRange_Protocol_STATUS string const ( @@ -6688,6 +6871,12 @@ const ( PortRange_Protocol_STATUS_UDP = PortRange_Protocol_STATUS("UDP") ) +// Mapping from string to PortRange_Protocol_STATUS +var portRange_Protocol_STATUS_Values = map[string]PortRange_Protocol_STATUS{ + "tcp": PortRange_Protocol_STATUS_TCP, + "udp": PortRange_Protocol_STATUS_UDP, +} + func init() { SchemeBuilder.Register(&ManagedClustersAgentPool{}, &ManagedClustersAgentPoolList{}) } diff --git a/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen.go b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen.go index 37d7bdd26f2..eb8bb1e9071 100644 --- a/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/managed_clusters_trusted_access_role_binding_status_arm_types_gen.go @@ -43,3 +43,12 @@ const ( TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Succeeded = TrustedAccessRoleBindingProperties_ProvisioningState_STATUS("Succeeded") TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Updating = TrustedAccessRoleBindingProperties_ProvisioningState_STATUS("Updating") ) + +// Mapping from string to TrustedAccessRoleBindingProperties_ProvisioningState_STATUS +var trustedAccessRoleBindingProperties_ProvisioningState_STATUS_Values = map[string]TrustedAccessRoleBindingProperties_ProvisioningState_STATUS{ + "canceled": TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Canceled, + "deleting": TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Deleting, + "failed": TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Failed, + "succeeded": TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Succeeded, + "updating": TrustedAccessRoleBindingProperties_ProvisioningState_STATUS_Updating, +} diff --git a/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen.go b/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen.go index ca80cd45d13..6fe497feb10 100644 --- a/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen.go +++ b/v2/api/containerservice/v1api20230202preview/trusted_access_role_binding_types_gen.go @@ -728,8 +728,9 @@ func (binding *ManagedClusters_TrustedAccessRoleBinding_STATUS) AssignProperties // ProvisioningState if source.ProvisioningState != nil { - provisioningState := TrustedAccessRoleBindingProperties_ProvisioningState_STATUS(*source.ProvisioningState) - binding.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, trustedAccessRoleBindingProperties_ProvisioningState_STATUS_Values) + binding.ProvisioningState = &provisioningStateTemp } else { binding.ProvisioningState = nil } diff --git a/v2/api/containerservice/v1api20230315preview/fleet_status_arm_types_gen.go b/v2/api/containerservice/v1api20230315preview/fleet_status_arm_types_gen.go index a205d11086d..130e136e589 100644 --- a/v2/api/containerservice/v1api20230315preview/fleet_status_arm_types_gen.go +++ b/v2/api/containerservice/v1api20230315preview/fleet_status_arm_types_gen.go @@ -85,6 +85,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -93,3 +101,11 @@ const ( SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} diff --git a/v2/api/containerservice/v1api20230315preview/fleet_types_gen.go b/v2/api/containerservice/v1api20230315preview/fleet_types_gen.go index 5ffebf6edb0..688b653460c 100644 --- a/v2/api/containerservice/v1api20230315preview/fleet_types_gen.go +++ b/v2/api/containerservice/v1api20230315preview/fleet_types_gen.go @@ -873,8 +873,9 @@ func (fleet *Fleet_STATUS) AssignProperties_From_Fleet_STATUS(source *v20230315p // ProvisioningState if source.ProvisioningState != nil { - provisioningState := FleetProvisioningState_STATUS(*source.ProvisioningState) - fleet.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, fleetProvisioningState_STATUS_Values) + fleet.ProvisioningState = &provisioningStateTemp } else { fleet.ProvisioningState = nil } @@ -1226,6 +1227,16 @@ const ( FleetProvisioningState_STATUS_Updating = FleetProvisioningState_STATUS("Updating") ) +// Mapping from string to FleetProvisioningState_STATUS +var fleetProvisioningState_STATUS_Values = map[string]FleetProvisioningState_STATUS{ + "canceled": FleetProvisioningState_STATUS_Canceled, + "creating": FleetProvisioningState_STATUS_Creating, + "deleting": FleetProvisioningState_STATUS_Deleting, + "failed": FleetProvisioningState_STATUS_Failed, + "succeeded": FleetProvisioningState_STATUS_Succeeded, + "updating": FleetProvisioningState_STATUS_Updating, +} + // Metadata pertaining to creation and last modification of the resource. type SystemData_STATUS struct { // CreatedAt: The timestamp of resource creation (UTC). @@ -1312,8 +1323,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -1326,8 +1338,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } diff --git a/v2/api/containerservice/v1api20230315preview/fleets_member_types_gen.go b/v2/api/containerservice/v1api20230315preview/fleets_member_types_gen.go index 75ac4f10b08..3a6351623f1 100644 --- a/v2/api/containerservice/v1api20230315preview/fleets_member_types_gen.go +++ b/v2/api/containerservice/v1api20230315preview/fleets_member_types_gen.go @@ -768,8 +768,9 @@ func (member *Fleets_Member_STATUS) AssignProperties_From_Fleets_Member_STATUS(s // ProvisioningState if source.ProvisioningState != nil { - provisioningState := FleetMemberProvisioningState_STATUS(*source.ProvisioningState) - member.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, fleetMemberProvisioningState_STATUS_Values) + member.ProvisioningState = &provisioningStateTemp } else { member.ProvisioningState = nil } @@ -862,6 +863,16 @@ const ( FleetMemberProvisioningState_STATUS_Updating = FleetMemberProvisioningState_STATUS("Updating") ) +// Mapping from string to FleetMemberProvisioningState_STATUS +var fleetMemberProvisioningState_STATUS_Values = map[string]FleetMemberProvisioningState_STATUS{ + "canceled": FleetMemberProvisioningState_STATUS_Canceled, + "failed": FleetMemberProvisioningState_STATUS_Failed, + "joining": FleetMemberProvisioningState_STATUS_Joining, + "leaving": FleetMemberProvisioningState_STATUS_Leaving, + "succeeded": FleetMemberProvisioningState_STATUS_Succeeded, + "updating": FleetMemberProvisioningState_STATUS_Updating, +} + func init() { SchemeBuilder.Register(&FleetsMember{}, &FleetsMemberList{}) } diff --git a/v2/api/containerservice/v1api20230315preview/fleets_update_run_types_gen.go b/v2/api/containerservice/v1api20230315preview/fleets_update_run_types_gen.go index 68eef0abb9f..d3d5866b5e6 100644 --- a/v2/api/containerservice/v1api20230315preview/fleets_update_run_types_gen.go +++ b/v2/api/containerservice/v1api20230315preview/fleets_update_run_types_gen.go @@ -851,8 +851,9 @@ func (updateRun *Fleets_UpdateRun_STATUS) AssignProperties_From_Fleets_UpdateRun // ProvisioningState if source.ProvisioningState != nil { - provisioningState := UpdateRunProvisioningState_STATUS(*source.ProvisioningState) - updateRun.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, updateRunProvisioningState_STATUS_Values) + updateRun.ProvisioningState = &provisioningStateTemp } else { updateRun.ProvisioningState = nil } @@ -1199,6 +1200,13 @@ const ( UpdateRunProvisioningState_STATUS_Succeeded = UpdateRunProvisioningState_STATUS("Succeeded") ) +// Mapping from string to UpdateRunProvisioningState_STATUS +var updateRunProvisioningState_STATUS_Values = map[string]UpdateRunProvisioningState_STATUS{ + "canceled": UpdateRunProvisioningState_STATUS_Canceled, + "failed": UpdateRunProvisioningState_STATUS_Failed, + "succeeded": UpdateRunProvisioningState_STATUS_Succeeded, +} + // The status of a UpdateRun. type UpdateRunStatus_STATUS struct { // Stages: The stages composing an update run. Stages are run sequentially withing an UpdateRun. @@ -1643,8 +1651,9 @@ func (upgrade *ManagedClusterUpgradeSpec) AssignProperties_From_ManagedClusterUp // Type if source.Type != nil { - typeVar := ManagedClusterUpgradeType(*source.Type) - upgrade.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterUpgradeType_Values) + upgrade.Type = &typeTemp } else { upgrade.Type = nil } @@ -1747,8 +1756,9 @@ func (upgrade *ManagedClusterUpgradeSpec_STATUS) AssignProperties_From_ManagedCl // Type if source.Type != nil { - typeVar := ManagedClusterUpgradeType_STATUS(*source.Type) - upgrade.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterUpgradeType_STATUS_Values) + upgrade.Type = &typeTemp } else { upgrade.Type = nil } @@ -2383,8 +2393,9 @@ func (status *UpdateStatus_STATUS) AssignProperties_From_UpdateStatus_STATUS(sou // State if source.State != nil { - state := UpdateState_STATUS(*source.State) - status.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, updateState_STATUS_Values) + status.State = &stateTemp } else { status.State = nil } @@ -2631,6 +2642,12 @@ const ( ManagedClusterUpgradeType_NodeImageOnly = ManagedClusterUpgradeType("NodeImageOnly") ) +// Mapping from string to ManagedClusterUpgradeType +var managedClusterUpgradeType_Values = map[string]ManagedClusterUpgradeType{ + "full": ManagedClusterUpgradeType_Full, + "nodeimageonly": ManagedClusterUpgradeType_NodeImageOnly, +} + // The type of upgrade to perform when targeting ManagedClusters. type ManagedClusterUpgradeType_STATUS string @@ -2639,6 +2656,12 @@ const ( ManagedClusterUpgradeType_STATUS_NodeImageOnly = ManagedClusterUpgradeType_STATUS("NodeImageOnly") ) +// Mapping from string to ManagedClusterUpgradeType_STATUS +var managedClusterUpgradeType_STATUS_Values = map[string]ManagedClusterUpgradeType_STATUS{ + "full": ManagedClusterUpgradeType_STATUS_Full, + "nodeimageonly": ManagedClusterUpgradeType_STATUS_NodeImageOnly, +} + // A group to be updated. type UpdateGroup struct { // +kubebuilder:validation:Required @@ -2961,6 +2984,16 @@ const ( UpdateState_STATUS_Stopping = UpdateState_STATUS("Stopping") ) +// Mapping from string to UpdateState_STATUS +var updateState_STATUS_Values = map[string]UpdateState_STATUS{ + "completed": UpdateState_STATUS_Completed, + "failed": UpdateState_STATUS_Failed, + "notstarted": UpdateState_STATUS_NotStarted, + "running": UpdateState_STATUS_Running, + "stopped": UpdateState_STATUS_Stopped, + "stopping": UpdateState_STATUS_Stopping, +} + // The status of the wait duration. type WaitStatus_STATUS struct { // Status: The status of the wait duration. diff --git a/v2/api/containerservice/v1api20231001/managed_cluster_spec_arm_types_gen.go b/v2/api/containerservice/v1api20231001/managed_cluster_spec_arm_types_gen.go index b254653f620..78f770222c2 100644 --- a/v2/api/containerservice/v1api20231001/managed_cluster_spec_arm_types_gen.go +++ b/v2/api/containerservice/v1api20231001/managed_cluster_spec_arm_types_gen.go @@ -270,6 +270,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile_ARM struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -510,6 +515,13 @@ const ( ManagedClusterIdentity_Type_UserAssigned = ManagedClusterIdentity_Type("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type +var managedClusterIdentity_Type_Values = map[string]ManagedClusterIdentity_Type{ + "none": ManagedClusterIdentity_Type_None, + "systemassigned": ManagedClusterIdentity_Type_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_UserAssigned, +} + // The OIDC issuer profile of the Managed Cluster. type ManagedClusterOIDCIssuerProfile_ARM struct { // Enabled: Whether the OIDC issuer is enabled. @@ -629,6 +641,11 @@ type ManagedClusterSKU_Name string const ManagedClusterSKU_Name_Base = ManagedClusterSKU_Name("Base") +// Mapping from string to ManagedClusterSKU_Name +var managedClusterSKU_Name_Values = map[string]ManagedClusterSKU_Name{ + "base": ManagedClusterSKU_Name_Base, +} + // +kubebuilder:validation:Enum={"Free","Premium","Standard"} type ManagedClusterSKU_Tier string @@ -638,6 +655,13 @@ const ( ManagedClusterSKU_Tier_Standard = ManagedClusterSKU_Tier("Standard") ) +// Mapping from string to ManagedClusterSKU_Tier +var managedClusterSKU_Tier_Values = map[string]ManagedClusterSKU_Tier{ + "free": ManagedClusterSKU_Tier_Free, + "premium": ManagedClusterSKU_Tier_Premium, + "standard": ManagedClusterSKU_Tier_Standard, +} + // Storage profile for the container service cluster. type ManagedClusterStorageProfile_ARM struct { // BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile. diff --git a/v2/api/containerservice/v1api20231001/managed_cluster_status_arm_types_gen.go b/v2/api/containerservice/v1api20231001/managed_cluster_status_arm_types_gen.go index 3b247479ce7..fcae0be1e9a 100644 --- a/v2/api/containerservice/v1api20231001/managed_cluster_status_arm_types_gen.go +++ b/v2/api/containerservice/v1api20231001/managed_cluster_status_arm_types_gen.go @@ -327,6 +327,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile_STATUS_ARM struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -599,6 +604,13 @@ const ( ManagedClusterIdentity_Type_STATUS_UserAssigned = ManagedClusterIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type_STATUS +var managedClusterIdentity_Type_STATUS_Values = map[string]ManagedClusterIdentity_Type_STATUS{ + "none": ManagedClusterIdentity_Type_STATUS_None, + "systemassigned": ManagedClusterIdentity_Type_STATUS_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_STATUS_UserAssigned, +} + type ManagedClusterIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` @@ -725,6 +737,11 @@ type ManagedClusterSKU_Name_STATUS string const ManagedClusterSKU_Name_STATUS_Base = ManagedClusterSKU_Name_STATUS("Base") +// Mapping from string to ManagedClusterSKU_Name_STATUS +var managedClusterSKU_Name_STATUS_Values = map[string]ManagedClusterSKU_Name_STATUS{ + "base": ManagedClusterSKU_Name_STATUS_Base, +} + type ManagedClusterSKU_Tier_STATUS string const ( @@ -733,6 +750,13 @@ const ( ManagedClusterSKU_Tier_STATUS_Standard = ManagedClusterSKU_Tier_STATUS("Standard") ) +// Mapping from string to ManagedClusterSKU_Tier_STATUS +var managedClusterSKU_Tier_STATUS_Values = map[string]ManagedClusterSKU_Tier_STATUS{ + "free": ManagedClusterSKU_Tier_STATUS_Free, + "premium": ManagedClusterSKU_Tier_STATUS_Premium, + "standard": ManagedClusterSKU_Tier_STATUS_Standard, +} + // Storage profile for the container service cluster. type ManagedClusterStorageProfile_STATUS_ARM struct { // BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile. @@ -837,6 +861,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -846,6 +878,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Details about a user assigned identity. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The client ID of the user assigned identity. diff --git a/v2/api/containerservice/v1api20231001/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20231001/managed_cluster_types_gen.go index 3f1173ec69d..2709422ea78 100644 --- a/v2/api/containerservice/v1api20231001/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20231001/managed_cluster_types_gen.go @@ -1633,8 +1633,9 @@ func (cluster *ManagedCluster_Spec) AssignProperties_From_ManagedCluster_Spec(so // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - cluster.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_Values) + cluster.PublicNetworkAccess = &publicNetworkAccessTemp } else { cluster.PublicNetworkAccess = nil } @@ -1701,8 +1702,9 @@ func (cluster *ManagedCluster_Spec) AssignProperties_From_ManagedCluster_Spec(so // SupportPlan if source.SupportPlan != nil { - supportPlan := KubernetesSupportPlan(*source.SupportPlan) - cluster.SupportPlan = &supportPlan + supportPlan := *source.SupportPlan + supportPlanTemp := genruntime.ToEnum(supportPlan, kubernetesSupportPlan_Values) + cluster.SupportPlan = &supportPlanTemp } else { cluster.SupportPlan = nil } @@ -3635,8 +3637,9 @@ func (cluster *ManagedCluster_STATUS) AssignProperties_From_ManagedCluster_STATU // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - cluster.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_STATUS_Values) + cluster.PublicNetworkAccess = &publicNetworkAccessTemp } else { cluster.PublicNetworkAccess = nil } @@ -3706,8 +3709,9 @@ func (cluster *ManagedCluster_STATUS) AssignProperties_From_ManagedCluster_STATU // SupportPlan if source.SupportPlan != nil { - supportPlan := KubernetesSupportPlan_STATUS(*source.SupportPlan) - cluster.SupportPlan = &supportPlan + supportPlan := *source.SupportPlan + supportPlanTemp := genruntime.ToEnum(supportPlan, kubernetesSupportPlan_STATUS_Values) + cluster.SupportPlan = &supportPlanTemp } else { cluster.SupportPlan = nil } @@ -4972,7 +4976,7 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe for ipFamilyIndex, ipFamilyItem := range source.IpFamilies { // Shadow the loop variable to avoid aliasing ipFamilyItem := ipFamilyItem - ipFamilyList[ipFamilyIndex] = ContainerServiceNetworkProfile_IpFamilies(ipFamilyItem) + ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, containerServiceNetworkProfile_IpFamilies_Values) } profile.IpFamilies = ipFamilyList } else { @@ -4993,8 +4997,9 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := ContainerServiceNetworkProfile_LoadBalancerSku(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, containerServiceNetworkProfile_LoadBalancerSku_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } @@ -5013,48 +5018,54 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // NetworkDataplane if source.NetworkDataplane != nil { - networkDataplane := ContainerServiceNetworkProfile_NetworkDataplane(*source.NetworkDataplane) - profile.NetworkDataplane = &networkDataplane + networkDataplane := *source.NetworkDataplane + networkDataplaneTemp := genruntime.ToEnum(networkDataplane, containerServiceNetworkProfile_NetworkDataplane_Values) + profile.NetworkDataplane = &networkDataplaneTemp } else { profile.NetworkDataplane = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := ContainerServiceNetworkProfile_NetworkMode(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, containerServiceNetworkProfile_NetworkMode_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := NetworkPlugin(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, networkPlugin_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPluginMode if source.NetworkPluginMode != nil { - networkPluginMode := ContainerServiceNetworkProfile_NetworkPluginMode(*source.NetworkPluginMode) - profile.NetworkPluginMode = &networkPluginMode + networkPluginMode := *source.NetworkPluginMode + networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, containerServiceNetworkProfile_NetworkPluginMode_Values) + profile.NetworkPluginMode = &networkPluginModeTemp } else { profile.NetworkPluginMode = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := ContainerServiceNetworkProfile_NetworkPolicy(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, containerServiceNetworkProfile_NetworkPolicy_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -5538,7 +5549,7 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont for ipFamilyIndex, ipFamilyItem := range source.IpFamilies { // Shadow the loop variable to avoid aliasing ipFamilyItem := ipFamilyItem - ipFamilyList[ipFamilyIndex] = ContainerServiceNetworkProfile_IpFamilies_STATUS(ipFamilyItem) + ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, containerServiceNetworkProfile_IpFamilies_STATUS_Values) } profile.IpFamilies = ipFamilyList } else { @@ -5559,8 +5570,9 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := ContainerServiceNetworkProfile_LoadBalancerSku_STATUS(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, containerServiceNetworkProfile_LoadBalancerSku_STATUS_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } @@ -5579,48 +5591,54 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // NetworkDataplane if source.NetworkDataplane != nil { - networkDataplane := ContainerServiceNetworkProfile_NetworkDataplane_STATUS(*source.NetworkDataplane) - profile.NetworkDataplane = &networkDataplane + networkDataplane := *source.NetworkDataplane + networkDataplaneTemp := genruntime.ToEnum(networkDataplane, containerServiceNetworkProfile_NetworkDataplane_STATUS_Values) + profile.NetworkDataplane = &networkDataplaneTemp } else { profile.NetworkDataplane = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := ContainerServiceNetworkProfile_NetworkMode_STATUS(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, containerServiceNetworkProfile_NetworkMode_STATUS_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := ContainerServiceNetworkProfile_NetworkPlugin_STATUS(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, containerServiceNetworkProfile_NetworkPlugin_STATUS_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPluginMode if source.NetworkPluginMode != nil { - networkPluginMode := ContainerServiceNetworkProfile_NetworkPluginMode_STATUS(*source.NetworkPluginMode) - profile.NetworkPluginMode = &networkPluginMode + networkPluginMode := *source.NetworkPluginMode + networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, containerServiceNetworkProfile_NetworkPluginMode_STATUS_Values) + profile.NetworkPluginMode = &networkPluginModeTemp } else { profile.NetworkPluginMode = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := ContainerServiceNetworkProfile_NetworkPolicy_STATUS(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, containerServiceNetworkProfile_NetworkPolicy_STATUS_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType_STATUS(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_STATUS_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -5833,8 +5851,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -5935,8 +5954,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -5981,6 +6001,12 @@ const ( KubernetesSupportPlan_KubernetesOfficial = KubernetesSupportPlan("KubernetesOfficial") ) +// Mapping from string to KubernetesSupportPlan +var kubernetesSupportPlan_Values = map[string]KubernetesSupportPlan{ + "akslongtermsupport": KubernetesSupportPlan_AKSLongTermSupport, + "kubernetesofficial": KubernetesSupportPlan_KubernetesOfficial, +} + // Different support tiers for AKS managed clusters type KubernetesSupportPlan_STATUS string @@ -5989,6 +6015,12 @@ const ( KubernetesSupportPlan_STATUS_KubernetesOfficial = KubernetesSupportPlan_STATUS("KubernetesOfficial") ) +// Mapping from string to KubernetesSupportPlan_STATUS +var kubernetesSupportPlan_STATUS_Values = map[string]KubernetesSupportPlan_STATUS{ + "akslongtermsupport": KubernetesSupportPlan_STATUS_AKSLongTermSupport, + "kubernetesofficial": KubernetesSupportPlan_STATUS_KubernetesOfficial, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -7487,8 +7519,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -7515,8 +7548,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -7544,8 +7578,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -7597,24 +7632,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -7649,24 +7687,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode(*source.ScaleDownMode) - profile.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values) + profile.ScaleDownMode = &scaleDownModeTemp } else { profile.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -7684,8 +7725,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -7715,8 +7757,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime) - profile.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values) + profile.WorkloadRuntime = &workloadRuntimeTemp } else { profile.WorkloadRuntime = nil } @@ -8858,8 +8901,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -8881,8 +8925,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -8910,8 +8955,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -8951,24 +8997,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -8996,24 +9045,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode) - profile.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values) + profile.ScaleDownMode = &scaleDownModeTemp } else { profile.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -9031,8 +9083,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Type if source.Type != nil { - typeVar := AgentPoolType_STATUS(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_STATUS_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -9057,8 +9110,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime) - profile.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values) + profile.WorkloadRuntime = &workloadRuntimeTemp } else { profile.WorkloadRuntime = nil } @@ -9801,16 +9855,18 @@ func (profile *ManagedClusterAutoUpgradeProfile) AssignProperties_From_ManagedCl // NodeOSUpgradeChannel if source.NodeOSUpgradeChannel != nil { - nodeOSUpgradeChannel := ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel(*source.NodeOSUpgradeChannel) - profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannel + nodeOSUpgradeChannel := *source.NodeOSUpgradeChannel + nodeOSUpgradeChannelTemp := genruntime.ToEnum(nodeOSUpgradeChannel, managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Values) + profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannelTemp } else { profile.NodeOSUpgradeChannel = nil } // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -9919,16 +9975,18 @@ func (profile *ManagedClusterAutoUpgradeProfile_STATUS) AssignProperties_From_Ma // NodeOSUpgradeChannel if source.NodeOSUpgradeChannel != nil { - nodeOSUpgradeChannel := ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS(*source.NodeOSUpgradeChannel) - profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannel + nodeOSUpgradeChannel := *source.NodeOSUpgradeChannel + nodeOSUpgradeChannelTemp := genruntime.ToEnum(nodeOSUpgradeChannel, managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Values) + profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannelTemp } else { profile.NodeOSUpgradeChannel = nil } // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -10547,8 +10605,9 @@ func (identity *ManagedClusterIdentity) AssignProperties_From_ManagedClusterIden // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -10792,8 +10851,9 @@ func (identity *ManagedClusterIdentity_STATUS) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -11941,8 +12001,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile) AssignProperties_From // Expander if source.Expander != nil { - expander := ManagedClusterProperties_AutoScalerProfile_Expander(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -12322,8 +12383,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile_STATUS) AssignProperti // Expander if source.Expander != nil { - expander := ManagedClusterProperties_AutoScalerProfile_Expander_STATUS(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -12457,6 +12519,12 @@ const ( ManagedClusterProperties_PublicNetworkAccess_Enabled = ManagedClusterProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to ManagedClusterProperties_PublicNetworkAccess +var managedClusterProperties_PublicNetworkAccess_Values = map[string]ManagedClusterProperties_PublicNetworkAccess{ + "disabled": ManagedClusterProperties_PublicNetworkAccess_Disabled, + "enabled": ManagedClusterProperties_PublicNetworkAccess_Enabled, +} + type ManagedClusterProperties_PublicNetworkAccess_STATUS string const ( @@ -12464,6 +12532,12 @@ const ( ManagedClusterProperties_PublicNetworkAccess_STATUS_Enabled = ManagedClusterProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ManagedClusterProperties_PublicNetworkAccess_STATUS +var managedClusterProperties_PublicNetworkAccess_STATUS_Values = map[string]ManagedClusterProperties_PublicNetworkAccess_STATUS{ + "disabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Enabled, +} + // Security profile for the container service cluster. type ManagedClusterSecurityProfile struct { // AzureKeyVaultKms: Azure Key Vault [key management @@ -13205,16 +13279,18 @@ func (clusterSKU *ManagedClusterSKU) AssignProperties_From_ManagedClusterSKU(sou // Name if source.Name != nil { - name := ManagedClusterSKU_Name(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -13323,16 +13399,18 @@ func (clusterSKU *ManagedClusterSKU_STATUS) AssignProperties_From_ManagedCluster // Name if source.Name != nil { - name := ManagedClusterSKU_Name_STATUS(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_STATUS_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier_STATUS(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_STATUS_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -14032,8 +14110,9 @@ func (profile *ManagedClusterWindowsProfile) AssignProperties_From_ManagedCluste // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -14252,8 +14331,9 @@ func (profile *ManagedClusterWindowsProfile_STATUS) AssignProperties_From_Manage // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType_STATUS(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_STATUS_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -14647,8 +14727,9 @@ func (state *PowerState_STATUS) AssignProperties_From_PowerState_STATUS(source * // Code if source.Code != nil { - code := PowerState_Code_STATUS(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_STATUS_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -15094,8 +15175,9 @@ func (profile *ServiceMeshProfile) AssignProperties_From_ServiceMeshProfile(sour // Mode if source.Mode != nil { - mode := ServiceMeshProfile_Mode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, serviceMeshProfile_Mode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -15228,8 +15310,9 @@ func (profile *ServiceMeshProfile_STATUS) AssignProperties_From_ServiceMeshProfi // Mode if source.Mode != nil { - mode := ServiceMeshProfile_Mode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, serviceMeshProfile_Mode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -15360,8 +15443,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -15374,8 +15458,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -15776,8 +15861,9 @@ func (vaultKms *AzureKeyVaultKms) AssignProperties_From_AzureKeyVaultKms(source // KeyVaultNetworkAccess if source.KeyVaultNetworkAccess != nil { - keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess(*source.KeyVaultNetworkAccess) - vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess + keyVaultNetworkAccess := *source.KeyVaultNetworkAccess + keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_Values) + vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp } else { vaultKms.KeyVaultNetworkAccess = nil } @@ -15950,8 +16036,9 @@ func (vaultKms *AzureKeyVaultKms_STATUS) AssignProperties_From_AzureKeyVaultKms_ // KeyVaultNetworkAccess if source.KeyVaultNetworkAccess != nil { - keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS(*source.KeyVaultNetworkAccess) - vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess + keyVaultNetworkAccess := *source.KeyVaultNetworkAccess + keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values) + vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp } else { vaultKms.KeyVaultNetworkAccess = nil } @@ -16009,6 +16096,12 @@ const ( ContainerServiceNetworkProfile_IpFamilies_IPv6 = ContainerServiceNetworkProfile_IpFamilies("IPv6") ) +// Mapping from string to ContainerServiceNetworkProfile_IpFamilies +var containerServiceNetworkProfile_IpFamilies_Values = map[string]ContainerServiceNetworkProfile_IpFamilies{ + "ipv4": ContainerServiceNetworkProfile_IpFamilies_IPv4, + "ipv6": ContainerServiceNetworkProfile_IpFamilies_IPv6, +} + type ContainerServiceNetworkProfile_IpFamilies_STATUS string const ( @@ -16016,6 +16109,12 @@ const ( ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv6 = ContainerServiceNetworkProfile_IpFamilies_STATUS("IPv6") ) +// Mapping from string to ContainerServiceNetworkProfile_IpFamilies_STATUS +var containerServiceNetworkProfile_IpFamilies_STATUS_Values = map[string]ContainerServiceNetworkProfile_IpFamilies_STATUS{ + "ipv4": ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv4, + "ipv6": ContainerServiceNetworkProfile_IpFamilies_STATUS_IPv6, +} + // +kubebuilder:validation:Enum={"basic","standard"} type ContainerServiceNetworkProfile_LoadBalancerSku string @@ -16024,6 +16123,12 @@ const ( ContainerServiceNetworkProfile_LoadBalancerSku_Standard = ContainerServiceNetworkProfile_LoadBalancerSku("standard") ) +// Mapping from string to ContainerServiceNetworkProfile_LoadBalancerSku +var containerServiceNetworkProfile_LoadBalancerSku_Values = map[string]ContainerServiceNetworkProfile_LoadBalancerSku{ + "basic": ContainerServiceNetworkProfile_LoadBalancerSku_Basic, + "standard": ContainerServiceNetworkProfile_LoadBalancerSku_Standard, +} + type ContainerServiceNetworkProfile_LoadBalancerSku_STATUS string const ( @@ -16031,6 +16136,12 @@ const ( ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Standard = ContainerServiceNetworkProfile_LoadBalancerSku_STATUS("standard") ) +// Mapping from string to ContainerServiceNetworkProfile_LoadBalancerSku_STATUS +var containerServiceNetworkProfile_LoadBalancerSku_STATUS_Values = map[string]ContainerServiceNetworkProfile_LoadBalancerSku_STATUS{ + "basic": ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Basic, + "standard": ContainerServiceNetworkProfile_LoadBalancerSku_STATUS_Standard, +} + // +kubebuilder:validation:Enum={"azure","cilium"} type ContainerServiceNetworkProfile_NetworkDataplane string @@ -16039,6 +16150,12 @@ const ( ContainerServiceNetworkProfile_NetworkDataplane_Cilium = ContainerServiceNetworkProfile_NetworkDataplane("cilium") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkDataplane +var containerServiceNetworkProfile_NetworkDataplane_Values = map[string]ContainerServiceNetworkProfile_NetworkDataplane{ + "azure": ContainerServiceNetworkProfile_NetworkDataplane_Azure, + "cilium": ContainerServiceNetworkProfile_NetworkDataplane_Cilium, +} + type ContainerServiceNetworkProfile_NetworkDataplane_STATUS string const ( @@ -16046,6 +16163,12 @@ const ( ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Cilium = ContainerServiceNetworkProfile_NetworkDataplane_STATUS("cilium") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkDataplane_STATUS +var containerServiceNetworkProfile_NetworkDataplane_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkDataplane_STATUS{ + "azure": ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Azure, + "cilium": ContainerServiceNetworkProfile_NetworkDataplane_STATUS_Cilium, +} + // +kubebuilder:validation:Enum={"bridge","transparent"} type ContainerServiceNetworkProfile_NetworkMode string @@ -16054,6 +16177,12 @@ const ( ContainerServiceNetworkProfile_NetworkMode_Transparent = ContainerServiceNetworkProfile_NetworkMode("transparent") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkMode +var containerServiceNetworkProfile_NetworkMode_Values = map[string]ContainerServiceNetworkProfile_NetworkMode{ + "bridge": ContainerServiceNetworkProfile_NetworkMode_Bridge, + "transparent": ContainerServiceNetworkProfile_NetworkMode_Transparent, +} + type ContainerServiceNetworkProfile_NetworkMode_STATUS string const ( @@ -16061,6 +16190,12 @@ const ( ContainerServiceNetworkProfile_NetworkMode_STATUS_Transparent = ContainerServiceNetworkProfile_NetworkMode_STATUS("transparent") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkMode_STATUS +var containerServiceNetworkProfile_NetworkMode_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkMode_STATUS{ + "bridge": ContainerServiceNetworkProfile_NetworkMode_STATUS_Bridge, + "transparent": ContainerServiceNetworkProfile_NetworkMode_STATUS_Transparent, +} + type ContainerServiceNetworkProfile_NetworkPlugin_STATUS string const ( @@ -16069,15 +16204,32 @@ const ( ContainerServiceNetworkProfile_NetworkPlugin_STATUS_None = ContainerServiceNetworkProfile_NetworkPlugin_STATUS("none") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPlugin_STATUS +var containerServiceNetworkProfile_NetworkPlugin_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPlugin_STATUS{ + "azure": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Azure, + "kubenet": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_Kubenet, + "none": ContainerServiceNetworkProfile_NetworkPlugin_STATUS_None, +} + // +kubebuilder:validation:Enum={"overlay"} type ContainerServiceNetworkProfile_NetworkPluginMode string const ContainerServiceNetworkProfile_NetworkPluginMode_Overlay = ContainerServiceNetworkProfile_NetworkPluginMode("overlay") +// Mapping from string to ContainerServiceNetworkProfile_NetworkPluginMode +var containerServiceNetworkProfile_NetworkPluginMode_Values = map[string]ContainerServiceNetworkProfile_NetworkPluginMode{ + "overlay": ContainerServiceNetworkProfile_NetworkPluginMode_Overlay, +} + type ContainerServiceNetworkProfile_NetworkPluginMode_STATUS string const ContainerServiceNetworkProfile_NetworkPluginMode_STATUS_Overlay = ContainerServiceNetworkProfile_NetworkPluginMode_STATUS("overlay") +// Mapping from string to ContainerServiceNetworkProfile_NetworkPluginMode_STATUS +var containerServiceNetworkProfile_NetworkPluginMode_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPluginMode_STATUS{ + "overlay": ContainerServiceNetworkProfile_NetworkPluginMode_STATUS_Overlay, +} + // +kubebuilder:validation:Enum={"azure","calico","cilium"} type ContainerServiceNetworkProfile_NetworkPolicy string @@ -16087,6 +16239,13 @@ const ( ContainerServiceNetworkProfile_NetworkPolicy_Cilium = ContainerServiceNetworkProfile_NetworkPolicy("cilium") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPolicy +var containerServiceNetworkProfile_NetworkPolicy_Values = map[string]ContainerServiceNetworkProfile_NetworkPolicy{ + "azure": ContainerServiceNetworkProfile_NetworkPolicy_Azure, + "calico": ContainerServiceNetworkProfile_NetworkPolicy_Calico, + "cilium": ContainerServiceNetworkProfile_NetworkPolicy_Cilium, +} + type ContainerServiceNetworkProfile_NetworkPolicy_STATUS string const ( @@ -16095,6 +16254,13 @@ const ( ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Cilium = ContainerServiceNetworkProfile_NetworkPolicy_STATUS("cilium") ) +// Mapping from string to ContainerServiceNetworkProfile_NetworkPolicy_STATUS +var containerServiceNetworkProfile_NetworkPolicy_STATUS_Values = map[string]ContainerServiceNetworkProfile_NetworkPolicy_STATUS{ + "azure": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Azure, + "calico": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Calico, + "cilium": ContainerServiceNetworkProfile_NetworkPolicy_STATUS_Cilium, +} + // +kubebuilder:validation:Enum={"loadBalancer","managedNATGateway","userAssignedNATGateway","userDefinedRouting"} type ContainerServiceNetworkProfile_OutboundType string @@ -16105,6 +16271,14 @@ const ( ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType +var containerServiceNetworkProfile_OutboundType_Values = map[string]ContainerServiceNetworkProfile_OutboundType{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_LoadBalancer, + "managednatgateway": ContainerServiceNetworkProfile_OutboundType_ManagedNATGateway, + "userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_UserAssignedNATGateway, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting, +} + type ContainerServiceNetworkProfile_OutboundType_STATUS string const ( @@ -16114,6 +16288,14 @@ const ( ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType_STATUS("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType_STATUS +var containerServiceNetworkProfile_OutboundType_STATUS_Values = map[string]ContainerServiceNetworkProfile_OutboundType_STATUS{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_STATUS_LoadBalancer, + "managednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_ManagedNATGateway, + "userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_UserAssignedNATGateway, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting, +} + // SSH configuration for Linux-based VMs running on Azure. type ContainerServiceSshConfiguration struct { // +kubebuilder:validation:Required @@ -17017,6 +17199,13 @@ const ( ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Unmanaged = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel("Unmanaged") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel +var managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel{ + "nodeimage": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_None, + "unmanaged": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Unmanaged, +} + type ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS string const ( @@ -17025,6 +17214,13 @@ const ( ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Unmanaged = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS("Unmanaged") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS +var managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS{ + "nodeimage": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_None, + "unmanaged": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Unmanaged, +} + // +kubebuilder:validation:Enum={"node-image","none","patch","rapid","stable"} type ManagedClusterAutoUpgradeProfile_UpgradeChannel string @@ -17036,6 +17232,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel +var managedClusterAutoUpgradeProfile_UpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable, +} + type ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS string const ( @@ -17046,6 +17251,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS +var managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable, +} + // Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes // infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See // aka.ms/AzureManagedPrometheus for an overview. @@ -17599,8 +17813,9 @@ func (profile *ManagedClusterLoadBalancerProfile) AssignProperties_From_ManagedC // BackendPoolType if source.BackendPoolType != nil { - backendPoolType := ManagedClusterLoadBalancerProfile_BackendPoolType(*source.BackendPoolType) - profile.BackendPoolType = &backendPoolType + backendPoolType := *source.BackendPoolType + backendPoolTypeTemp := genruntime.ToEnum(backendPoolType, managedClusterLoadBalancerProfile_BackendPoolType_Values) + profile.BackendPoolType = &backendPoolTypeTemp } else { profile.BackendPoolType = nil } @@ -17996,8 +18211,9 @@ func (profile *ManagedClusterLoadBalancerProfile_STATUS) AssignProperties_From_M // BackendPoolType if source.BackendPoolType != nil { - backendPoolType := ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS(*source.BackendPoolType) - profile.BackendPoolType = &backendPoolType + backendPoolType := *source.BackendPoolType + backendPoolTypeTemp := genruntime.ToEnum(backendPoolType, managedClusterLoadBalancerProfile_BackendPoolType_STATUS_Values) + profile.BackendPoolType = &backendPoolTypeTemp } else { profile.BackendPoolType = nil } @@ -18974,8 +19190,9 @@ func (identity *ManagedClusterPodIdentity_STATUS) AssignProperties_From_ManagedC // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ManagedClusterPodIdentity_ProvisioningState_STATUS(*source.ProvisioningState) - identity.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, managedClusterPodIdentity_ProvisioningState_STATUS_Values) + identity.ProvisioningState = &provisioningStateTemp } else { identity.ProvisioningState = nil } @@ -19283,6 +19500,14 @@ const ( ManagedClusterProperties_AutoScalerProfile_Expander_Random = ManagedClusterProperties_AutoScalerProfile_Expander("random") ) +// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander +var managedClusterProperties_AutoScalerProfile_Expander_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander{ + "least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_LeastWaste, + "most-pods": ManagedClusterProperties_AutoScalerProfile_Expander_MostPods, + "priority": ManagedClusterProperties_AutoScalerProfile_Expander_Priority, + "random": ManagedClusterProperties_AutoScalerProfile_Expander_Random, +} + type ManagedClusterProperties_AutoScalerProfile_Expander_STATUS string const ( @@ -19292,6 +19517,14 @@ const ( ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random = ManagedClusterProperties_AutoScalerProfile_Expander_STATUS("random") ) +// Mapping from string to ManagedClusterProperties_AutoScalerProfile_Expander_STATUS +var managedClusterProperties_AutoScalerProfile_Expander_STATUS_Values = map[string]ManagedClusterProperties_AutoScalerProfile_Expander_STATUS{ + "least-waste": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_LeastWaste, + "most-pods": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_MostPods, + "priority": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Priority, + "random": ManagedClusterProperties_AutoScalerProfile_Expander_STATUS_Random, +} + // Microsoft Defender settings for the security profile. type ManagedClusterSecurityProfileDefender struct { // LogAnalyticsWorkspaceResourceReference: Resource ID of the Log Analytics workspace to be associated with Microsoft @@ -20609,6 +20842,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_Windows_Server = ManagedClusterWindowsProfile_LicenseType("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType +var managedClusterWindowsProfile_LicenseType_Values = map[string]ManagedClusterWindowsProfile_LicenseType{ + "none": ManagedClusterWindowsProfile_LicenseType_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_Windows_Server, +} + type ManagedClusterWindowsProfile_LicenseType_STATUS string const ( @@ -20616,6 +20855,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server = ManagedClusterWindowsProfile_LicenseType_STATUS("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType_STATUS +var managedClusterWindowsProfile_LicenseType_STATUS_Values = map[string]ManagedClusterWindowsProfile_LicenseType_STATUS{ + "none": ManagedClusterWindowsProfile_LicenseType_STATUS_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server, +} + // KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. type ManagedClusterWorkloadAutoScalerProfileKeda struct { // +kubebuilder:validation:Required @@ -20963,6 +21208,13 @@ const ( NetworkPlugin_None = NetworkPlugin("none") ) +// Mapping from string to NetworkPlugin +var networkPlugin_Values = map[string]NetworkPlugin{ + "azure": NetworkPlugin_Azure, + "kubenet": NetworkPlugin_Kubenet, + "none": NetworkPlugin_None, +} + type PowerState_Code_STATUS string const ( @@ -20970,6 +21222,12 @@ const ( PowerState_Code_STATUS_Stopped = PowerState_Code_STATUS("Stopped") ) +// Mapping from string to PowerState_Code_STATUS +var powerState_Code_STATUS_Values = map[string]PowerState_Code_STATUS{ + "running": PowerState_Code_STATUS_Running, + "stopped": PowerState_Code_STATUS_Stopped, +} + // +kubebuilder:validation:Enum={"Disabled","Istio"} type ServiceMeshProfile_Mode string @@ -20978,6 +21236,12 @@ const ( ServiceMeshProfile_Mode_Istio = ServiceMeshProfile_Mode("Istio") ) +// Mapping from string to ServiceMeshProfile_Mode +var serviceMeshProfile_Mode_Values = map[string]ServiceMeshProfile_Mode{ + "disabled": ServiceMeshProfile_Mode_Disabled, + "istio": ServiceMeshProfile_Mode_Istio, +} + type ServiceMeshProfile_Mode_STATUS string const ( @@ -20985,6 +21249,12 @@ const ( ServiceMeshProfile_Mode_STATUS_Istio = ServiceMeshProfile_Mode_STATUS("Istio") ) +// Mapping from string to ServiceMeshProfile_Mode_STATUS +var serviceMeshProfile_Mode_STATUS_Values = map[string]ServiceMeshProfile_Mode_STATUS{ + "disabled": ServiceMeshProfile_Mode_STATUS_Disabled, + "istio": ServiceMeshProfile_Mode_STATUS_Istio, +} + // Settings for overrides when upgrading a cluster. type UpgradeOverrideSettings struct { // ForceUpgrade: Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade @@ -21490,6 +21760,12 @@ const ( AzureKeyVaultKms_KeyVaultNetworkAccess_Public = AzureKeyVaultKms_KeyVaultNetworkAccess("Public") ) +// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess +var azureKeyVaultKms_KeyVaultNetworkAccess_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess{ + "private": AzureKeyVaultKms_KeyVaultNetworkAccess_Private, + "public": AzureKeyVaultKms_KeyVaultNetworkAccess_Public, +} + type AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS string const ( @@ -21497,6 +21773,12 @@ const ( AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public = AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS("Public") ) +// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS +var azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS{ + "private": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Private, + "public": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public, +} + // Contains information about SSH certificate public key data. type ContainerServiceSshPublicKey struct { // +kubebuilder:validation:Required @@ -22403,6 +22685,12 @@ const ( ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIPConfiguration = ManagedClusterLoadBalancerProfile_BackendPoolType("NodeIPConfiguration") ) +// Mapping from string to ManagedClusterLoadBalancerProfile_BackendPoolType +var managedClusterLoadBalancerProfile_BackendPoolType_Values = map[string]ManagedClusterLoadBalancerProfile_BackendPoolType{ + "nodeip": ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIP, + "nodeipconfiguration": ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIPConfiguration, +} + type ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS string const ( @@ -22410,6 +22698,12 @@ const ( ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIPConfiguration = ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS("NodeIPConfiguration") ) +// Mapping from string to ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS +var managedClusterLoadBalancerProfile_BackendPoolType_STATUS_Values = map[string]ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS{ + "nodeip": ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIP, + "nodeipconfiguration": ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIPConfiguration, +} + type ManagedClusterLoadBalancerProfile_ManagedOutboundIPs struct { // +kubebuilder:validation:Maximum=100 // +kubebuilder:validation:Minimum=1 @@ -23336,6 +23630,16 @@ const ( ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating = ManagedClusterPodIdentity_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ManagedClusterPodIdentity_ProvisioningState_STATUS +var managedClusterPodIdentity_ProvisioningState_STATUS_Values = map[string]ManagedClusterPodIdentity_ProvisioningState_STATUS{ + "assigned": ManagedClusterPodIdentity_ProvisioningState_STATUS_Assigned, + "canceled": ManagedClusterPodIdentity_ProvisioningState_STATUS_Canceled, + "deleting": ManagedClusterPodIdentity_ProvisioningState_STATUS_Deleting, + "failed": ManagedClusterPodIdentity_ProvisioningState_STATUS_Failed, + "succeeded": ManagedClusterPodIdentity_ProvisioningState_STATUS_Succeeded, + "updating": ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating, +} + // Microsoft Defender settings for the security profile threat detection. type ManagedClusterSecurityProfileDefenderSecurityMonitoring struct { // Enabled: Whether to enable Defender threat detection @@ -23952,8 +24256,9 @@ func (gateway *IstioIngressGateway) AssignProperties_From_IstioIngressGateway(so // Mode if source.Mode != nil { - mode := IstioIngressGateway_Mode(*source.Mode) - gateway.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, istioIngressGateway_Mode_Values) + gateway.Mode = &modeTemp } else { gateway.Mode = nil } @@ -24070,8 +24375,9 @@ func (gateway *IstioIngressGateway_STATUS) AssignProperties_From_IstioIngressGat // Mode if source.Mode != nil { - mode := IstioIngressGateway_Mode_STATUS(*source.Mode) - gateway.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, istioIngressGateway_Mode_STATUS_Values) + gateway.Mode = &modeTemp } else { gateway.Mode = nil } @@ -24516,6 +24822,12 @@ const ( IstioIngressGateway_Mode_Internal = IstioIngressGateway_Mode("Internal") ) +// Mapping from string to IstioIngressGateway_Mode +var istioIngressGateway_Mode_Values = map[string]IstioIngressGateway_Mode{ + "external": IstioIngressGateway_Mode_External, + "internal": IstioIngressGateway_Mode_Internal, +} + type IstioIngressGateway_Mode_STATUS string const ( @@ -24523,6 +24835,12 @@ const ( IstioIngressGateway_Mode_STATUS_Internal = IstioIngressGateway_Mode_STATUS("Internal") ) +// Mapping from string to IstioIngressGateway_Mode_STATUS +var istioIngressGateway_Mode_STATUS_Values = map[string]IstioIngressGateway_Mode_STATUS{ + "external": IstioIngressGateway_Mode_STATUS_External, + "internal": IstioIngressGateway_Mode_STATUS_Internal, +} + // An error response from the pod identity provisioning. type ManagedClusterPodIdentityProvisioningErrorBody_STATUS struct { // Code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. diff --git a/v2/api/containerservice/v1api20231001/managed_clusters_agent_pool_types_gen.go b/v2/api/containerservice/v1api20231001/managed_clusters_agent_pool_types_gen.go index 13cf180cc0f..9415fcb01a0 100644 --- a/v2/api/containerservice/v1api20231001/managed_clusters_agent_pool_types_gen.go +++ b/v2/api/containerservice/v1api20231001/managed_clusters_agent_pool_types_gen.go @@ -1270,8 +1270,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -1298,8 +1299,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -1327,8 +1329,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -1372,24 +1375,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -1432,24 +1438,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode(*source.ScaleDownMode) - pool.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values) + pool.ScaleDownMode = &scaleDownModeTemp } else { pool.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -1467,8 +1476,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - pool.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + pool.Type = &typeTemp } else { pool.Type = nil } @@ -1498,8 +1508,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime) - pool.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values) + pool.WorkloadRuntime = &workloadRuntimeTemp } else { pool.WorkloadRuntime = nil } @@ -2052,8 +2063,9 @@ func (pool *ManagedClusters_AgentPool_Spec) Initialize_From_ManagedClusters_Agen // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - pool.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + pool.Type = &typeTemp } else { pool.Type = nil } @@ -2853,8 +2865,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -2879,8 +2892,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -2908,8 +2922,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -2949,24 +2964,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -2988,8 +3006,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // PropertiesType if source.PropertiesType != nil { - propertiesType := AgentPoolType_STATUS(*source.PropertiesType) - pool.PropertiesType = &propertiesType + propertiesType := *source.PropertiesType + propertiesTypeTemp := genruntime.ToEnum(propertiesType, agentPoolType_STATUS_Values) + pool.PropertiesType = &propertiesTypeTemp } else { pool.PropertiesType = nil } @@ -3002,24 +3021,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode) - pool.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values) + pool.ScaleDownMode = &scaleDownModeTemp } else { pool.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -3058,8 +3080,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime) - pool.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values) + pool.WorkloadRuntime = &workloadRuntimeTemp } else { pool.WorkloadRuntime = nil } @@ -3374,6 +3397,12 @@ const ( AgentPoolMode_User = AgentPoolMode("User") ) +// Mapping from string to AgentPoolMode +var agentPoolMode_Values = map[string]AgentPoolMode{ + "system": AgentPoolMode_System, + "user": AgentPoolMode_User, +} + // A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions // and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools type AgentPoolMode_STATUS string @@ -3383,6 +3412,12 @@ const ( AgentPoolMode_STATUS_User = AgentPoolMode_STATUS("User") ) +// Mapping from string to AgentPoolMode_STATUS +var agentPoolMode_STATUS_Values = map[string]AgentPoolMode_STATUS{ + "system": AgentPoolMode_STATUS_System, + "user": AgentPoolMode_STATUS_User, +} + // Network settings of an agent pool. type AgentPoolNetworkProfile struct { // AllowedHostPorts: The port ranges that are allowed to access. The specified ranges are allowed to overlap. @@ -3801,6 +3836,12 @@ const ( AgentPoolType_VirtualMachineScaleSets = AgentPoolType("VirtualMachineScaleSets") ) +// Mapping from string to AgentPoolType +var agentPoolType_Values = map[string]AgentPoolType{ + "availabilityset": AgentPoolType_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_VirtualMachineScaleSets, +} + // The type of Agent Pool. type AgentPoolType_STATUS string @@ -3809,6 +3850,12 @@ const ( AgentPoolType_STATUS_VirtualMachineScaleSets = AgentPoolType_STATUS("VirtualMachineScaleSets") ) +// Mapping from string to AgentPoolType_STATUS +var agentPoolType_STATUS_Values = map[string]AgentPoolType_STATUS{ + "availabilityset": AgentPoolType_STATUS_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_STATUS_VirtualMachineScaleSets, +} + // Settings for upgrading an agentpool type AgentPoolUpgradeSettings struct { // +kubebuilder:validation:Maximum=1440 @@ -4192,6 +4239,15 @@ const ( GPUInstanceProfile_MIG7G = GPUInstanceProfile("MIG7g") ) +// Mapping from string to GPUInstanceProfile +var gPUInstanceProfile_Values = map[string]GPUInstanceProfile{ + "mig1g": GPUInstanceProfile_MIG1G, + "mig2g": GPUInstanceProfile_MIG2G, + "mig3g": GPUInstanceProfile_MIG3G, + "mig4g": GPUInstanceProfile_MIG4G, + "mig7g": GPUInstanceProfile_MIG7G, +} + // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. type GPUInstanceProfile_STATUS string @@ -4203,6 +4259,15 @@ const ( GPUInstanceProfile_STATUS_MIG7G = GPUInstanceProfile_STATUS("MIG7g") ) +// Mapping from string to GPUInstanceProfile_STATUS +var gPUInstanceProfile_STATUS_Values = map[string]GPUInstanceProfile_STATUS{ + "mig1g": GPUInstanceProfile_STATUS_MIG1G, + "mig2g": GPUInstanceProfile_STATUS_MIG2G, + "mig3g": GPUInstanceProfile_STATUS_MIG3G, + "mig4g": GPUInstanceProfile_STATUS_MIG4G, + "mig7g": GPUInstanceProfile_STATUS_MIG7G, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type KubeletConfig struct { // AllowedUnsafeSysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). @@ -4820,6 +4885,12 @@ const ( KubeletDiskType_Temporary = KubeletDiskType("Temporary") ) +// Mapping from string to KubeletDiskType +var kubeletDiskType_Values = map[string]KubeletDiskType{ + "os": KubeletDiskType_OS, + "temporary": KubeletDiskType_Temporary, +} + // Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. type KubeletDiskType_STATUS string @@ -4828,6 +4899,12 @@ const ( KubeletDiskType_STATUS_Temporary = KubeletDiskType_STATUS("Temporary") ) +// Mapping from string to KubeletDiskType_STATUS +var kubeletDiskType_STATUS_Values = map[string]KubeletDiskType_STATUS{ + "os": KubeletDiskType_STATUS_OS, + "temporary": KubeletDiskType_STATUS_Temporary, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type LinuxOSConfig struct { // SwapFileSizeMB: The size in MB of a swap file that will be created on each node. @@ -5166,6 +5243,12 @@ const ( OSDiskType_Managed = OSDiskType("Managed") ) +// Mapping from string to OSDiskType +var oSDiskType_Values = map[string]OSDiskType{ + "ephemeral": OSDiskType_Ephemeral, + "managed": OSDiskType_Managed, +} + // The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, // defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral // OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). @@ -5176,6 +5259,12 @@ const ( OSDiskType_STATUS_Managed = OSDiskType_STATUS("Managed") ) +// Mapping from string to OSDiskType_STATUS +var oSDiskType_STATUS_Values = map[string]OSDiskType_STATUS{ + "ephemeral": OSDiskType_STATUS_Ephemeral, + "managed": OSDiskType_STATUS_Managed, +} + // Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when // Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. // +kubebuilder:validation:Enum={"AzureLinux","CBLMariner","Ubuntu","Windows2019","Windows2022"} @@ -5189,6 +5278,15 @@ const ( OSSKU_Windows2022 = OSSKU("Windows2022") ) +// Mapping from string to OSSKU +var oSSKU_Values = map[string]OSSKU{ + "azurelinux": OSSKU_AzureLinux, + "cblmariner": OSSKU_CBLMariner, + "ubuntu": OSSKU_Ubuntu, + "windows2019": OSSKU_Windows2019, + "windows2022": OSSKU_Windows2022, +} + // Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when // Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. type OSSKU_STATUS string @@ -5201,6 +5299,15 @@ const ( OSSKU_STATUS_Windows2022 = OSSKU_STATUS("Windows2022") ) +// Mapping from string to OSSKU_STATUS +var oSSKU_STATUS_Values = map[string]OSSKU_STATUS{ + "azurelinux": OSSKU_STATUS_AzureLinux, + "cblmariner": OSSKU_STATUS_CBLMariner, + "ubuntu": OSSKU_STATUS_Ubuntu, + "windows2019": OSSKU_STATUS_Windows2019, + "windows2022": OSSKU_STATUS_Windows2022, +} + // The operating system type. The default is Linux. // +kubebuilder:validation:Enum={"Linux","Windows"} type OSType string @@ -5210,6 +5317,12 @@ const ( OSType_Windows = OSType("Windows") ) +// Mapping from string to OSType +var oSType_Values = map[string]OSType{ + "linux": OSType_Linux, + "windows": OSType_Windows, +} + // The operating system type. The default is Linux. type OSType_STATUS string @@ -5218,6 +5331,12 @@ const ( OSType_STATUS_Windows = OSType_STATUS("Windows") ) +// Mapping from string to OSType_STATUS +var oSType_STATUS_Values = map[string]OSType_STATUS{ + "linux": OSType_STATUS_Linux, + "windows": OSType_STATUS_Windows, +} + // Describes the Power State of the cluster type PowerState struct { // Code: Tells whether the cluster is Running or Stopped @@ -5268,8 +5387,9 @@ func (state *PowerState) AssignProperties_From_PowerState(source *v20231001s.Pow // Code if source.Code != nil { - code := PowerState_Code(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -5327,6 +5447,12 @@ const ( ScaleDownMode_Delete = ScaleDownMode("Delete") ) +// Mapping from string to ScaleDownMode +var scaleDownMode_Values = map[string]ScaleDownMode{ + "deallocate": ScaleDownMode_Deallocate, + "delete": ScaleDownMode_Delete, +} + // Describes how VMs are added to or removed from Agent Pools. See [billing // states](https://docs.microsoft.com/azure/virtual-machines/states-billing). type ScaleDownMode_STATUS string @@ -5336,6 +5462,12 @@ const ( ScaleDownMode_STATUS_Delete = ScaleDownMode_STATUS("Delete") ) +// Mapping from string to ScaleDownMode_STATUS +var scaleDownMode_STATUS_Values = map[string]ScaleDownMode_STATUS{ + "deallocate": ScaleDownMode_STATUS_Deallocate, + "delete": ScaleDownMode_STATUS_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) // +kubebuilder:validation:Enum={"Deallocate","Delete"} @@ -5346,6 +5478,12 @@ const ( ScaleSetEvictionPolicy_Delete = ScaleSetEvictionPolicy("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy +var scaleSetEvictionPolicy_Values = map[string]ScaleSetEvictionPolicy{ + "deallocate": ScaleSetEvictionPolicy_Deallocate, + "delete": ScaleSetEvictionPolicy_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) type ScaleSetEvictionPolicy_STATUS string @@ -5355,6 +5493,12 @@ const ( ScaleSetEvictionPolicy_STATUS_Delete = ScaleSetEvictionPolicy_STATUS("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy_STATUS +var scaleSetEvictionPolicy_STATUS_Values = map[string]ScaleSetEvictionPolicy_STATUS{ + "deallocate": ScaleSetEvictionPolicy_STATUS_Deallocate, + "delete": ScaleSetEvictionPolicy_STATUS_Delete, +} + // The Virtual Machine Scale Set priority. // +kubebuilder:validation:Enum={"Regular","Spot"} type ScaleSetPriority string @@ -5364,6 +5508,12 @@ const ( ScaleSetPriority_Spot = ScaleSetPriority("Spot") ) +// Mapping from string to ScaleSetPriority +var scaleSetPriority_Values = map[string]ScaleSetPriority{ + "regular": ScaleSetPriority_Regular, + "spot": ScaleSetPriority_Spot, +} + // The Virtual Machine Scale Set priority. type ScaleSetPriority_STATUS string @@ -5372,6 +5522,12 @@ const ( ScaleSetPriority_STATUS_Spot = ScaleSetPriority_STATUS("Spot") ) +// Mapping from string to ScaleSetPriority_STATUS +var scaleSetPriority_STATUS_Values = map[string]ScaleSetPriority_STATUS{ + "regular": ScaleSetPriority_STATUS_Regular, + "spot": ScaleSetPriority_STATUS_Spot, +} + // Determines the type of workload a node can run. // +kubebuilder:validation:Enum={"OCIContainer","WasmWasi"} type WorkloadRuntime string @@ -5381,6 +5537,12 @@ const ( WorkloadRuntime_WasmWasi = WorkloadRuntime("WasmWasi") ) +// Mapping from string to WorkloadRuntime +var workloadRuntime_Values = map[string]WorkloadRuntime{ + "ocicontainer": WorkloadRuntime_OCIContainer, + "wasmwasi": WorkloadRuntime_WasmWasi, +} + // Determines the type of workload a node can run. type WorkloadRuntime_STATUS string @@ -5389,6 +5551,12 @@ const ( WorkloadRuntime_STATUS_WasmWasi = WorkloadRuntime_STATUS("WasmWasi") ) +// Mapping from string to WorkloadRuntime_STATUS +var workloadRuntime_STATUS_Values = map[string]WorkloadRuntime_STATUS{ + "ocicontainer": WorkloadRuntime_STATUS_OCIContainer, + "wasmwasi": WorkloadRuntime_STATUS_WasmWasi, +} + // Contains the IPTag associated with the object. type IPTag struct { // IpTagType: The IP tag type. Example: RoutingPreference. @@ -5673,8 +5841,9 @@ func (portRange *PortRange) AssignProperties_From_PortRange(source *v20231001s.P // Protocol if source.Protocol != nil { - protocol := PortRange_Protocol(*source.Protocol) - portRange.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, portRange_Protocol_Values) + portRange.Protocol = &protocolTemp } else { portRange.Protocol = nil } @@ -5815,8 +5984,9 @@ func (portRange *PortRange_STATUS) AssignProperties_From_PortRange_STATUS(source // Protocol if source.Protocol != nil { - protocol := PortRange_Protocol_STATUS(*source.Protocol) - portRange.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, portRange_Protocol_STATUS_Values) + portRange.Protocol = &protocolTemp } else { portRange.Protocol = nil } @@ -5863,6 +6033,12 @@ const ( PowerState_Code_Stopped = PowerState_Code("Stopped") ) +// Mapping from string to PowerState_Code +var powerState_Code_Values = map[string]PowerState_Code{ + "running": PowerState_Code_Running, + "stopped": PowerState_Code_Stopped, +} + // Sysctl settings for Linux agent nodes. type SysctlConfig struct { // FsAioMaxNr: Sysctl setting fs.aio-max-nr. @@ -7143,6 +7319,12 @@ const ( PortRange_Protocol_UDP = PortRange_Protocol("UDP") ) +// Mapping from string to PortRange_Protocol +var portRange_Protocol_Values = map[string]PortRange_Protocol{ + "tcp": PortRange_Protocol_TCP, + "udp": PortRange_Protocol_UDP, +} + type PortRange_Protocol_STATUS string const ( @@ -7150,6 +7332,12 @@ const ( PortRange_Protocol_STATUS_UDP = PortRange_Protocol_STATUS("UDP") ) +// Mapping from string to PortRange_Protocol_STATUS +var portRange_Protocol_STATUS_Values = map[string]PortRange_Protocol_STATUS{ + "tcp": PortRange_Protocol_STATUS_TCP, + "udp": PortRange_Protocol_STATUS_UDP, +} + func init() { SchemeBuilder.Register(&ManagedClustersAgentPool{}, &ManagedClustersAgentPoolList{}) } diff --git a/v2/api/containerservice/v1api20231102preview/managed_cluster_spec_arm_types_gen.go b/v2/api/containerservice/v1api20231102preview/managed_cluster_spec_arm_types_gen.go index e653019f966..2ca8a0de438 100644 --- a/v2/api/containerservice/v1api20231102preview/managed_cluster_spec_arm_types_gen.go +++ b/v2/api/containerservice/v1api20231102preview/managed_cluster_spec_arm_types_gen.go @@ -308,6 +308,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile_ARM struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -598,6 +603,13 @@ const ( ManagedClusterIdentity_Type_UserAssigned = ManagedClusterIdentity_Type("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type +var managedClusterIdentity_Type_Values = map[string]ManagedClusterIdentity_Type{ + "none": ManagedClusterIdentity_Type_None, + "systemassigned": ManagedClusterIdentity_Type_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_UserAssigned, +} + // Ingress profile for the container service cluster. type ManagedClusterIngressProfile_ARM struct { // WebAppRouting: Web App Routing settings for the ingress profile. @@ -767,6 +779,11 @@ type ManagedClusterSKU_Name string const ManagedClusterSKU_Name_Base = ManagedClusterSKU_Name("Base") +// Mapping from string to ManagedClusterSKU_Name +var managedClusterSKU_Name_Values = map[string]ManagedClusterSKU_Name{ + "base": ManagedClusterSKU_Name_Base, +} + // +kubebuilder:validation:Enum={"Free","Premium","Standard"} type ManagedClusterSKU_Tier string @@ -776,6 +793,13 @@ const ( ManagedClusterSKU_Tier_Standard = ManagedClusterSKU_Tier("Standard") ) +// Mapping from string to ManagedClusterSKU_Tier +var managedClusterSKU_Tier_Values = map[string]ManagedClusterSKU_Tier{ + "free": ManagedClusterSKU_Tier_Free, + "premium": ManagedClusterSKU_Tier_Premium, + "standard": ManagedClusterSKU_Tier_Standard, +} + // Storage profile for the container service cluster. type ManagedClusterStorageProfile_ARM struct { // BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile. diff --git a/v2/api/containerservice/v1api20231102preview/managed_cluster_status_arm_types_gen.go b/v2/api/containerservice/v1api20231102preview/managed_cluster_status_arm_types_gen.go index a6ef309a333..e882349c946 100644 --- a/v2/api/containerservice/v1api20231102preview/managed_cluster_status_arm_types_gen.go +++ b/v2/api/containerservice/v1api20231102preview/managed_cluster_status_arm_types_gen.go @@ -364,6 +364,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile_STATUS_ARM struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -690,6 +695,13 @@ const ( ManagedClusterIdentity_Type_STATUS_UserAssigned = ManagedClusterIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ManagedClusterIdentity_Type_STATUS +var managedClusterIdentity_Type_STATUS_Values = map[string]ManagedClusterIdentity_Type_STATUS{ + "none": ManagedClusterIdentity_Type_STATUS_None, + "systemassigned": ManagedClusterIdentity_Type_STATUS_SystemAssigned, + "userassigned": ManagedClusterIdentity_Type_STATUS_UserAssigned, +} + type ManagedClusterIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` @@ -866,6 +878,11 @@ type ManagedClusterSKU_Name_STATUS string const ManagedClusterSKU_Name_STATUS_Base = ManagedClusterSKU_Name_STATUS("Base") +// Mapping from string to ManagedClusterSKU_Name_STATUS +var managedClusterSKU_Name_STATUS_Values = map[string]ManagedClusterSKU_Name_STATUS{ + "base": ManagedClusterSKU_Name_STATUS_Base, +} + type ManagedClusterSKU_Tier_STATUS string const ( @@ -874,6 +891,13 @@ const ( ManagedClusterSKU_Tier_STATUS_Standard = ManagedClusterSKU_Tier_STATUS("Standard") ) +// Mapping from string to ManagedClusterSKU_Tier_STATUS +var managedClusterSKU_Tier_STATUS_Values = map[string]ManagedClusterSKU_Tier_STATUS{ + "free": ManagedClusterSKU_Tier_STATUS_Free, + "premium": ManagedClusterSKU_Tier_STATUS_Premium, + "standard": ManagedClusterSKU_Tier_STATUS_Standard, +} + // Storage profile for the container service cluster. type ManagedClusterStorageProfile_STATUS_ARM struct { // BlobCSIDriver: AzureBlob CSI Driver settings for the storage profile. @@ -992,6 +1016,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -1001,6 +1033,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Details about a user assigned identity. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The client ID of the user assigned identity. diff --git a/v2/api/containerservice/v1api20231102preview/managed_cluster_types_gen.go b/v2/api/containerservice/v1api20231102preview/managed_cluster_types_gen.go index 7562e29a754..de6e01e398e 100644 --- a/v2/api/containerservice/v1api20231102preview/managed_cluster_types_gen.go +++ b/v2/api/containerservice/v1api20231102preview/managed_cluster_types_gen.go @@ -1915,8 +1915,9 @@ func (cluster *ManagedCluster_Spec) AssignProperties_From_ManagedCluster_Spec(so // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - cluster.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_Values) + cluster.PublicNetworkAccess = &publicNetworkAccessTemp } else { cluster.PublicNetworkAccess = nil } @@ -1995,8 +1996,9 @@ func (cluster *ManagedCluster_Spec) AssignProperties_From_ManagedCluster_Spec(so // SupportPlan if source.SupportPlan != nil { - supportPlan := KubernetesSupportPlan(*source.SupportPlan) - cluster.SupportPlan = &supportPlan + supportPlan := *source.SupportPlan + supportPlanTemp := genruntime.ToEnum(supportPlan, kubernetesSupportPlan_Values) + cluster.SupportPlan = &supportPlanTemp } else { cluster.SupportPlan = nil } @@ -3853,8 +3855,9 @@ func (cluster *ManagedCluster_STATUS) AssignProperties_From_ManagedCluster_STATU // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ManagedClusterProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - cluster.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, managedClusterProperties_PublicNetworkAccess_STATUS_Values) + cluster.PublicNetworkAccess = &publicNetworkAccessTemp } else { cluster.PublicNetworkAccess = nil } @@ -3936,8 +3939,9 @@ func (cluster *ManagedCluster_STATUS) AssignProperties_From_ManagedCluster_STATU // SupportPlan if source.SupportPlan != nil { - supportPlan := KubernetesSupportPlan_STATUS(*source.SupportPlan) - cluster.SupportPlan = &supportPlan + supportPlan := *source.SupportPlan + supportPlanTemp := genruntime.ToEnum(supportPlan, kubernetesSupportPlan_STATUS_Values) + cluster.SupportPlan = &supportPlanTemp } else { cluster.SupportPlan = nil } @@ -5299,7 +5303,7 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe for ipFamilyIndex, ipFamilyItem := range source.IpFamilies { // Shadow the loop variable to avoid aliasing ipFamilyItem := ipFamilyItem - ipFamilyList[ipFamilyIndex] = IpFamily(ipFamilyItem) + ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, ipFamily_Values) } profile.IpFamilies = ipFamilyList } else { @@ -5332,8 +5336,9 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := LoadBalancerSku(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, loadBalancerSku_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } @@ -5364,48 +5369,54 @@ func (profile *ContainerServiceNetworkProfile) AssignProperties_From_ContainerSe // NetworkDataplane if source.NetworkDataplane != nil { - networkDataplane := NetworkDataplane(*source.NetworkDataplane) - profile.NetworkDataplane = &networkDataplane + networkDataplane := *source.NetworkDataplane + networkDataplaneTemp := genruntime.ToEnum(networkDataplane, networkDataplane_Values) + profile.NetworkDataplane = &networkDataplaneTemp } else { profile.NetworkDataplane = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := NetworkMode(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, networkMode_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := NetworkPlugin(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, networkPlugin_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPluginMode if source.NetworkPluginMode != nil { - networkPluginMode := NetworkPluginMode(*source.NetworkPluginMode) - profile.NetworkPluginMode = &networkPluginMode + networkPluginMode := *source.NetworkPluginMode + networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, networkPluginMode_Values) + profile.NetworkPluginMode = &networkPluginModeTemp } else { profile.NetworkPluginMode = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := NetworkPolicy(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, networkPolicy_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -5813,7 +5824,7 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont for ipFamilyIndex, ipFamilyItem := range source.IpFamilies { // Shadow the loop variable to avoid aliasing ipFamilyItem := ipFamilyItem - ipFamilyList[ipFamilyIndex] = IpFamily_STATUS(ipFamilyItem) + ipFamilyList[ipFamilyIndex] = genruntime.ToEnum(ipFamilyItem, ipFamily_STATUS_Values) } profile.IpFamilies = ipFamilyList } else { @@ -5846,8 +5857,9 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // LoadBalancerSku if source.LoadBalancerSku != nil { - loadBalancerSku := LoadBalancerSku_STATUS(*source.LoadBalancerSku) - profile.LoadBalancerSku = &loadBalancerSku + loadBalancerSku := *source.LoadBalancerSku + loadBalancerSkuTemp := genruntime.ToEnum(loadBalancerSku, loadBalancerSku_STATUS_Values) + profile.LoadBalancerSku = &loadBalancerSkuTemp } else { profile.LoadBalancerSku = nil } @@ -5878,48 +5890,54 @@ func (profile *ContainerServiceNetworkProfile_STATUS) AssignProperties_From_Cont // NetworkDataplane if source.NetworkDataplane != nil { - networkDataplane := NetworkDataplane_STATUS(*source.NetworkDataplane) - profile.NetworkDataplane = &networkDataplane + networkDataplane := *source.NetworkDataplane + networkDataplaneTemp := genruntime.ToEnum(networkDataplane, networkDataplane_STATUS_Values) + profile.NetworkDataplane = &networkDataplaneTemp } else { profile.NetworkDataplane = nil } // NetworkMode if source.NetworkMode != nil { - networkMode := NetworkMode_STATUS(*source.NetworkMode) - profile.NetworkMode = &networkMode + networkMode := *source.NetworkMode + networkModeTemp := genruntime.ToEnum(networkMode, networkMode_STATUS_Values) + profile.NetworkMode = &networkModeTemp } else { profile.NetworkMode = nil } // NetworkPlugin if source.NetworkPlugin != nil { - networkPlugin := NetworkPlugin_STATUS(*source.NetworkPlugin) - profile.NetworkPlugin = &networkPlugin + networkPlugin := *source.NetworkPlugin + networkPluginTemp := genruntime.ToEnum(networkPlugin, networkPlugin_STATUS_Values) + profile.NetworkPlugin = &networkPluginTemp } else { profile.NetworkPlugin = nil } // NetworkPluginMode if source.NetworkPluginMode != nil { - networkPluginMode := NetworkPluginMode_STATUS(*source.NetworkPluginMode) - profile.NetworkPluginMode = &networkPluginMode + networkPluginMode := *source.NetworkPluginMode + networkPluginModeTemp := genruntime.ToEnum(networkPluginMode, networkPluginMode_STATUS_Values) + profile.NetworkPluginMode = &networkPluginModeTemp } else { profile.NetworkPluginMode = nil } // NetworkPolicy if source.NetworkPolicy != nil { - networkPolicy := NetworkPolicy_STATUS(*source.NetworkPolicy) - profile.NetworkPolicy = &networkPolicy + networkPolicy := *source.NetworkPolicy + networkPolicyTemp := genruntime.ToEnum(networkPolicy, networkPolicy_STATUS_Values) + profile.NetworkPolicy = &networkPolicyTemp } else { profile.NetworkPolicy = nil } // OutboundType if source.OutboundType != nil { - outboundType := ContainerServiceNetworkProfile_OutboundType_STATUS(*source.OutboundType) - profile.OutboundType = &outboundType + outboundType := *source.OutboundType + outboundTypeTemp := genruntime.ToEnum(outboundType, containerServiceNetworkProfile_OutboundType_STATUS_Values) + profile.OutboundType = &outboundTypeTemp } else { profile.OutboundType = nil } @@ -6299,8 +6317,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -6383,8 +6402,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -6429,6 +6449,12 @@ const ( KubernetesSupportPlan_KubernetesOfficial = KubernetesSupportPlan("KubernetesOfficial") ) +// Mapping from string to KubernetesSupportPlan +var kubernetesSupportPlan_Values = map[string]KubernetesSupportPlan{ + "akslongtermsupport": KubernetesSupportPlan_AKSLongTermSupport, + "kubernetesofficial": KubernetesSupportPlan_KubernetesOfficial, +} + // Different support tiers for AKS managed clusters type KubernetesSupportPlan_STATUS string @@ -6437,6 +6463,12 @@ const ( KubernetesSupportPlan_STATUS_KubernetesOfficial = KubernetesSupportPlan_STATUS("KubernetesOfficial") ) +// Mapping from string to KubernetesSupportPlan_STATUS +var kubernetesSupportPlan_STATUS_Values = map[string]KubernetesSupportPlan_STATUS{ + "akslongtermsupport": KubernetesSupportPlan_STATUS_AKSLongTermSupport, + "kubernetesofficial": KubernetesSupportPlan_STATUS_KubernetesOfficial, +} + // For more details see [managed AAD on AKS](https://docs.microsoft.com/azure/aks/managed-aad). type ManagedClusterAADProfile struct { // AdminGroupObjectIDs: The list of AAD group object IDs that will have admin role of the cluster. @@ -8090,8 +8122,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -8130,8 +8163,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -8162,8 +8196,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -8218,24 +8253,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -8270,24 +8308,27 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode(*source.ScaleDownMode) - profile.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values) + profile.ScaleDownMode = &scaleDownModeTemp } else { profile.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -8317,8 +8358,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -8390,8 +8432,9 @@ func (profile *ManagedClusterAgentPoolProfile) AssignProperties_From_ManagedClus // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime) - profile.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values) + profile.WorkloadRuntime = &workloadRuntimeTemp } else { profile.WorkloadRuntime = nil } @@ -9499,8 +9542,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - profile.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + profile.GpuInstanceProfile = &gpuInstanceProfileTemp } else { profile.GpuInstanceProfile = nil } @@ -9534,8 +9578,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - profile.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + profile.KubeletDiskType = &kubeletDiskTypeTemp } else { profile.KubeletDiskType = nil } @@ -9566,8 +9611,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -9610,24 +9656,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - profile.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + profile.OsDiskType = &osDiskTypeTemp } else { profile.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - profile.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + profile.OsSKU = &osSKUTemp } else { profile.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - profile.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + profile.OsType = &osTypeTemp } else { profile.OsType = nil } @@ -9655,24 +9704,27 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode) - profile.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values) + profile.ScaleDownMode = &scaleDownModeTemp } else { profile.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + profile.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { profile.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - profile.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + profile.ScaleSetPriority = &scaleSetPriorityTemp } else { profile.ScaleSetPriority = nil } @@ -9702,8 +9754,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // Type if source.Type != nil { - typeVar := AgentPoolType_STATUS(*source.Type) - profile.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_STATUS_Values) + profile.Type = &typeTemp } else { profile.Type = nil } @@ -9770,8 +9823,9 @@ func (profile *ManagedClusterAgentPoolProfile_STATUS) AssignProperties_From_Mana // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime) - profile.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values) + profile.WorkloadRuntime = &workloadRuntimeTemp } else { profile.WorkloadRuntime = nil } @@ -10820,16 +10874,18 @@ func (profile *ManagedClusterAutoUpgradeProfile) AssignProperties_From_ManagedCl // NodeOSUpgradeChannel if source.NodeOSUpgradeChannel != nil { - nodeOSUpgradeChannel := ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel(*source.NodeOSUpgradeChannel) - profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannel + nodeOSUpgradeChannel := *source.NodeOSUpgradeChannel + nodeOSUpgradeChannelTemp := genruntime.ToEnum(nodeOSUpgradeChannel, managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Values) + profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannelTemp } else { profile.NodeOSUpgradeChannel = nil } // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -10915,16 +10971,18 @@ func (profile *ManagedClusterAutoUpgradeProfile_STATUS) AssignProperties_From_Ma // NodeOSUpgradeChannel if source.NodeOSUpgradeChannel != nil { - nodeOSUpgradeChannel := ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS(*source.NodeOSUpgradeChannel) - profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannel + nodeOSUpgradeChannel := *source.NodeOSUpgradeChannel + nodeOSUpgradeChannelTemp := genruntime.ToEnum(nodeOSUpgradeChannel, managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Values) + profile.NodeOSUpgradeChannel = &nodeOSUpgradeChannelTemp } else { profile.NodeOSUpgradeChannel = nil } // UpgradeChannel if source.UpgradeChannel != nil { - upgradeChannel := ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS(*source.UpgradeChannel) - profile.UpgradeChannel = &upgradeChannel + upgradeChannel := *source.UpgradeChannel + upgradeChannelTemp := genruntime.ToEnum(upgradeChannel, managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values) + profile.UpgradeChannel = &upgradeChannelTemp } else { profile.UpgradeChannel = nil } @@ -11604,8 +11662,9 @@ func (identity *ManagedClusterIdentity) AssignProperties_From_ManagedClusterIden // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -11804,8 +11863,9 @@ func (identity *ManagedClusterIdentity_STATUS) AssignProperties_From_ManagedClus // Type if source.Type != nil { - typeVar := ManagedClusterIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedClusterIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -12313,8 +12373,9 @@ func (profile *ManagedClusterNodeProvisioningProfile) AssignProperties_From_Mana // Mode if source.Mode != nil { - mode := ManagedClusterNodeProvisioningProfile_Mode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, managedClusterNodeProvisioningProfile_Mode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -12381,8 +12442,9 @@ func (profile *ManagedClusterNodeProvisioningProfile_STATUS) AssignProperties_Fr // Mode if source.Mode != nil { - mode := ManagedClusterNodeProvisioningProfile_Mode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, managedClusterNodeProvisioningProfile_Mode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -12465,8 +12527,9 @@ func (profile *ManagedClusterNodeResourceGroupProfile) AssignProperties_From_Man // RestrictionLevel if source.RestrictionLevel != nil { - restrictionLevel := ManagedClusterNodeResourceGroupProfile_RestrictionLevel(*source.RestrictionLevel) - profile.RestrictionLevel = &restrictionLevel + restrictionLevel := *source.RestrictionLevel + restrictionLevelTemp := genruntime.ToEnum(restrictionLevel, managedClusterNodeResourceGroupProfile_RestrictionLevel_Values) + profile.RestrictionLevel = &restrictionLevelTemp } else { profile.RestrictionLevel = nil } @@ -12534,8 +12597,9 @@ func (profile *ManagedClusterNodeResourceGroupProfile_STATUS) AssignProperties_F // RestrictionLevel if source.RestrictionLevel != nil { - restrictionLevel := ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS(*source.RestrictionLevel) - profile.RestrictionLevel = &restrictionLevel + restrictionLevel := *source.RestrictionLevel + restrictionLevelTemp := genruntime.ToEnum(restrictionLevel, managedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Values) + profile.RestrictionLevel = &restrictionLevelTemp } else { profile.RestrictionLevel = nil } @@ -13613,8 +13677,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile) AssignProperties_From // Expander if source.Expander != nil { - expander := Expander(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, expander_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -14009,8 +14074,9 @@ func (profile *ManagedClusterProperties_AutoScalerProfile_STATUS) AssignProperti // Expander if source.Expander != nil { - expander := Expander_STATUS(*source.Expander) - profile.Expander = &expander + expander := *source.Expander + expanderTemp := genruntime.ToEnum(expander, expander_STATUS_Values) + profile.Expander = &expanderTemp } else { profile.Expander = nil } @@ -14177,6 +14243,13 @@ const ( ManagedClusterProperties_PublicNetworkAccess_SecuredByPerimeter = ManagedClusterProperties_PublicNetworkAccess("SecuredByPerimeter") ) +// Mapping from string to ManagedClusterProperties_PublicNetworkAccess +var managedClusterProperties_PublicNetworkAccess_Values = map[string]ManagedClusterProperties_PublicNetworkAccess{ + "disabled": ManagedClusterProperties_PublicNetworkAccess_Disabled, + "enabled": ManagedClusterProperties_PublicNetworkAccess_Enabled, + "securedbyperimeter": ManagedClusterProperties_PublicNetworkAccess_SecuredByPerimeter, +} + type ManagedClusterProperties_PublicNetworkAccess_STATUS string const ( @@ -14185,6 +14258,13 @@ const ( ManagedClusterProperties_PublicNetworkAccess_STATUS_SecuredByPerimeter = ManagedClusterProperties_PublicNetworkAccess_STATUS("SecuredByPerimeter") ) +// Mapping from string to ManagedClusterProperties_PublicNetworkAccess_STATUS +var managedClusterProperties_PublicNetworkAccess_STATUS_Values = map[string]ManagedClusterProperties_PublicNetworkAccess_STATUS{ + "disabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ManagedClusterProperties_PublicNetworkAccess_STATUS_Enabled, + "securedbyperimeter": ManagedClusterProperties_PublicNetworkAccess_STATUS_SecuredByPerimeter, +} + // Security profile for the container service cluster. type ManagedClusterSecurityProfile struct { // AzureKeyVaultKms: Azure Key Vault [key management @@ -15074,16 +15154,18 @@ func (clusterSKU *ManagedClusterSKU) AssignProperties_From_ManagedClusterSKU(sou // Name if source.Name != nil { - name := ManagedClusterSKU_Name(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -15169,16 +15251,18 @@ func (clusterSKU *ManagedClusterSKU_STATUS) AssignProperties_From_ManagedCluster // Name if source.Name != nil { - name := ManagedClusterSKU_Name_STATUS(*source.Name) - clusterSKU.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, managedClusterSKU_Name_STATUS_Values) + clusterSKU.Name = &nameTemp } else { clusterSKU.Name = nil } // Tier if source.Tier != nil { - tier := ManagedClusterSKU_Tier_STATUS(*source.Tier) - clusterSKU.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, managedClusterSKU_Tier_STATUS_Values) + clusterSKU.Tier = &tierTemp } else { clusterSKU.Tier = nil } @@ -15823,8 +15907,9 @@ func (profile *ManagedClusterWindowsProfile) AssignProperties_From_ManagedCluste // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -16002,8 +16087,9 @@ func (profile *ManagedClusterWindowsProfile_STATUS) AssignProperties_From_Manage // LicenseType if source.LicenseType != nil { - licenseType := ManagedClusterWindowsProfile_LicenseType_STATUS(*source.LicenseType) - profile.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, managedClusterWindowsProfile_LicenseType_STATUS_Values) + profile.LicenseType = &licenseTypeTemp } else { profile.LicenseType = nil } @@ -16362,8 +16448,9 @@ func (state *PowerState_STATUS) AssignProperties_From_PowerState_STATUS(source * // Code if source.Code != nil { - code := PowerState_Code_STATUS(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_STATUS_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -16778,8 +16865,9 @@ func (profile *SafeguardsProfile) AssignProperties_From_SafeguardsProfile(source // Level if source.Level != nil { - level := SafeguardsProfile_Level(*source.Level) - profile.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, safeguardsProfile_Level_Values) + profile.Level = &levelTemp } else { profile.Level = nil } @@ -16885,8 +16973,9 @@ func (profile *SafeguardsProfile_STATUS) AssignProperties_From_SafeguardsProfile // Level if source.Level != nil { - level := SafeguardsProfile_Level_STATUS(*source.Level) - profile.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, safeguardsProfile_Level_STATUS_Values) + profile.Level = &levelTemp } else { profile.Level = nil } @@ -17021,8 +17110,9 @@ func (profile *ServiceMeshProfile) AssignProperties_From_ServiceMeshProfile(sour // Mode if source.Mode != nil { - mode := ServiceMeshProfile_Mode(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, serviceMeshProfile_Mode_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -17128,8 +17218,9 @@ func (profile *ServiceMeshProfile_STATUS) AssignProperties_From_ServiceMeshProfi // Mode if source.Mode != nil { - mode := ServiceMeshProfile_Mode_STATUS(*source.Mode) - profile.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, serviceMeshProfile_Mode_STATUS_Values) + profile.Mode = &modeTemp } else { profile.Mode = nil } @@ -17260,8 +17351,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -17274,8 +17366,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -17655,8 +17748,9 @@ func (vaultKms *AzureKeyVaultKms) AssignProperties_From_AzureKeyVaultKms(source // KeyVaultNetworkAccess if source.KeyVaultNetworkAccess != nil { - keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess(*source.KeyVaultNetworkAccess) - vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess + keyVaultNetworkAccess := *source.KeyVaultNetworkAccess + keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_Values) + vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp } else { vaultKms.KeyVaultNetworkAccess = nil } @@ -17795,8 +17889,9 @@ func (vaultKms *AzureKeyVaultKms_STATUS) AssignProperties_From_AzureKeyVaultKms_ // KeyVaultNetworkAccess if source.KeyVaultNetworkAccess != nil { - keyVaultNetworkAccess := AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS(*source.KeyVaultNetworkAccess) - vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccess + keyVaultNetworkAccess := *source.KeyVaultNetworkAccess + keyVaultNetworkAccessTemp := genruntime.ToEnum(keyVaultNetworkAccess, azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values) + vaultKms.KeyVaultNetworkAccess = &keyVaultNetworkAccessTemp } else { vaultKms.KeyVaultNetworkAccess = nil } @@ -17955,8 +18050,9 @@ func (config *ContainerServiceNetworkProfile_KubeProxyConfig) AssignProperties_F // Mode if source.Mode != nil { - mode := ContainerServiceNetworkProfile_KubeProxyConfig_Mode(*source.Mode) - config.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, containerServiceNetworkProfile_KubeProxyConfig_Mode_Values) + config.Mode = &modeTemp } else { config.Mode = nil } @@ -18087,8 +18183,9 @@ func (config *ContainerServiceNetworkProfile_KubeProxyConfig_STATUS) AssignPrope // Mode if source.Mode != nil { - mode := ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS(*source.Mode) - config.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, containerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_Values) + config.Mode = &modeTemp } else { config.Mode = nil } @@ -18151,6 +18248,14 @@ const ( ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType +var containerServiceNetworkProfile_OutboundType_Values = map[string]ContainerServiceNetworkProfile_OutboundType{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_LoadBalancer, + "managednatgateway": ContainerServiceNetworkProfile_OutboundType_ManagedNATGateway, + "userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_UserAssignedNATGateway, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_UserDefinedRouting, +} + type ContainerServiceNetworkProfile_OutboundType_STATUS string const ( @@ -18160,6 +18265,14 @@ const ( ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting = ContainerServiceNetworkProfile_OutboundType_STATUS("userDefinedRouting") ) +// Mapping from string to ContainerServiceNetworkProfile_OutboundType_STATUS +var containerServiceNetworkProfile_OutboundType_STATUS_Values = map[string]ContainerServiceNetworkProfile_OutboundType_STATUS{ + "loadbalancer": ContainerServiceNetworkProfile_OutboundType_STATUS_LoadBalancer, + "managednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_ManagedNATGateway, + "userassignednatgateway": ContainerServiceNetworkProfile_OutboundType_STATUS_UserAssignedNATGateway, + "userdefinedrouting": ContainerServiceNetworkProfile_OutboundType_STATUS_UserDefinedRouting, +} + // SSH configuration for Linux-based VMs running on Azure. type ContainerServiceSshConfiguration struct { // +kubebuilder:validation:Required @@ -18640,6 +18753,14 @@ const ( Expander_Random = Expander("random") ) +// Mapping from string to Expander +var expander_Values = map[string]Expander{ + "least-waste": Expander_LeastWaste, + "most-pods": Expander_MostPods, + "priority": Expander_Priority, + "random": Expander_Random, +} + // If not specified, the default is 'random'. See // [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more // information. @@ -18652,6 +18773,14 @@ const ( Expander_STATUS_Random = Expander_STATUS("random") ) +// Mapping from string to Expander_STATUS +var expander_STATUS_Values = map[string]Expander_STATUS{ + "least-waste": Expander_STATUS_LeastWaste, + "most-pods": Expander_STATUS_MostPods, + "priority": Expander_STATUS_Priority, + "random": Expander_STATUS_Random, +} + // To determine if address belongs IPv4 or IPv6 family. // +kubebuilder:validation:Enum={"IPv4","IPv6"} type IpFamily string @@ -18661,6 +18790,12 @@ const ( IpFamily_IPv6 = IpFamily("IPv6") ) +// Mapping from string to IpFamily +var ipFamily_Values = map[string]IpFamily{ + "ipv4": IpFamily_IPv4, + "ipv6": IpFamily_IPv6, +} + // To determine if address belongs IPv4 or IPv6 family. type IpFamily_STATUS string @@ -18669,6 +18804,12 @@ const ( IpFamily_STATUS_IPv6 = IpFamily_STATUS("IPv6") ) +// Mapping from string to IpFamily_STATUS +var ipFamily_STATUS_Values = map[string]IpFamily_STATUS{ + "ipv4": IpFamily_STATUS_IPv4, + "ipv6": IpFamily_STATUS_IPv6, +} + // Istio service mesh configuration. type IstioServiceMesh struct { // CertificateAuthority: Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin @@ -19008,6 +19149,12 @@ const ( LoadBalancerSku_Standard = LoadBalancerSku("standard") ) +// Mapping from string to LoadBalancerSku +var loadBalancerSku_Values = map[string]LoadBalancerSku{ + "basic": LoadBalancerSku_Basic, + "standard": LoadBalancerSku_Standard, +} + // The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more // information about the differences between load balancer SKUs. type LoadBalancerSku_STATUS string @@ -19017,6 +19164,12 @@ const ( LoadBalancerSku_STATUS_Standard = LoadBalancerSku_STATUS("standard") ) +// Mapping from string to LoadBalancerSku_STATUS +var loadBalancerSku_STATUS_Values = map[string]LoadBalancerSku_STATUS{ + "basic": LoadBalancerSku_STATUS_Basic, + "standard": LoadBalancerSku_STATUS_Standard, +} + // +kubebuilder:validation:Enum={"NodeImage","None","SecurityPatch","Unmanaged"} type ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel string @@ -19027,6 +19180,14 @@ const ( ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Unmanaged = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel("Unmanaged") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel +var managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel{ + "nodeimage": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_None, + "securitypatch": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_SecurityPatch, + "unmanaged": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_Unmanaged, +} + type ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS string const ( @@ -19036,6 +19197,14 @@ const ( ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Unmanaged = ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS("Unmanaged") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS +var managedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS{ + "nodeimage": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_None, + "securitypatch": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_SecurityPatch, + "unmanaged": ManagedClusterAutoUpgradeProfile_NodeOSUpgradeChannel_STATUS_Unmanaged, +} + // +kubebuilder:validation:Enum={"node-image","none","patch","rapid","stable"} type ManagedClusterAutoUpgradeProfile_UpgradeChannel string @@ -19047,6 +19216,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel +var managedClusterAutoUpgradeProfile_UpgradeChannel_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_Stable, +} + type ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS string const ( @@ -19057,6 +19235,15 @@ const ( ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable = ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS("stable") ) +// Mapping from string to ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS +var managedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Values = map[string]ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS{ + "node-image": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_NodeImage, + "none": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_None, + "patch": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Patch, + "rapid": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Rapid, + "stable": ManagedClusterAutoUpgradeProfile_UpgradeChannel_STATUS_Stable, +} + // Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect out-of-the-box Kubernetes infrastructure // & application logs to send to Azure Monitor. See aka.ms/AzureMonitorContainerInsights for an overview. type ManagedClusterAzureMonitorProfileLogs struct { @@ -20349,8 +20536,9 @@ func (profile *ManagedClusterLoadBalancerProfile) AssignProperties_From_ManagedC // BackendPoolType if source.BackendPoolType != nil { - backendPoolType := ManagedClusterLoadBalancerProfile_BackendPoolType(*source.BackendPoolType) - profile.BackendPoolType = &backendPoolType + backendPoolType := *source.BackendPoolType + backendPoolTypeTemp := genruntime.ToEnum(backendPoolType, managedClusterLoadBalancerProfile_BackendPoolType_Values) + profile.BackendPoolType = &backendPoolTypeTemp } else { profile.BackendPoolType = nil } @@ -20653,8 +20841,9 @@ func (profile *ManagedClusterLoadBalancerProfile_STATUS) AssignProperties_From_M // BackendPoolType if source.BackendPoolType != nil { - backendPoolType := ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS(*source.BackendPoolType) - profile.BackendPoolType = &backendPoolType + backendPoolType := *source.BackendPoolType + backendPoolTypeTemp := genruntime.ToEnum(backendPoolType, managedClusterLoadBalancerProfile_BackendPoolType_STATUS_Values) + profile.BackendPoolType = &backendPoolTypeTemp } else { profile.BackendPoolType = nil } @@ -21168,6 +21357,12 @@ const ( ManagedClusterNodeProvisioningProfile_Mode_Manual = ManagedClusterNodeProvisioningProfile_Mode("Manual") ) +// Mapping from string to ManagedClusterNodeProvisioningProfile_Mode +var managedClusterNodeProvisioningProfile_Mode_Values = map[string]ManagedClusterNodeProvisioningProfile_Mode{ + "auto": ManagedClusterNodeProvisioningProfile_Mode_Auto, + "manual": ManagedClusterNodeProvisioningProfile_Mode_Manual, +} + type ManagedClusterNodeProvisioningProfile_Mode_STATUS string const ( @@ -21175,6 +21370,12 @@ const ( ManagedClusterNodeProvisioningProfile_Mode_STATUS_Manual = ManagedClusterNodeProvisioningProfile_Mode_STATUS("Manual") ) +// Mapping from string to ManagedClusterNodeProvisioningProfile_Mode_STATUS +var managedClusterNodeProvisioningProfile_Mode_STATUS_Values = map[string]ManagedClusterNodeProvisioningProfile_Mode_STATUS{ + "auto": ManagedClusterNodeProvisioningProfile_Mode_STATUS_Auto, + "manual": ManagedClusterNodeProvisioningProfile_Mode_STATUS_Manual, +} + // +kubebuilder:validation:Enum={"ReadOnly","Unrestricted"} type ManagedClusterNodeResourceGroupProfile_RestrictionLevel string @@ -21183,6 +21384,12 @@ const ( ManagedClusterNodeResourceGroupProfile_RestrictionLevel_Unrestricted = ManagedClusterNodeResourceGroupProfile_RestrictionLevel("Unrestricted") ) +// Mapping from string to ManagedClusterNodeResourceGroupProfile_RestrictionLevel +var managedClusterNodeResourceGroupProfile_RestrictionLevel_Values = map[string]ManagedClusterNodeResourceGroupProfile_RestrictionLevel{ + "readonly": ManagedClusterNodeResourceGroupProfile_RestrictionLevel_ReadOnly, + "unrestricted": ManagedClusterNodeResourceGroupProfile_RestrictionLevel_Unrestricted, +} + type ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS string const ( @@ -21190,6 +21397,12 @@ const ( ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Unrestricted = ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS("Unrestricted") ) +// Mapping from string to ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS +var managedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Values = map[string]ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS{ + "readonly": ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_ReadOnly, + "unrestricted": ManagedClusterNodeResourceGroupProfile_RestrictionLevel_STATUS_Unrestricted, +} + type ManagedClusterOperatorConfigMaps struct { // OIDCIssuerProfile: indicates where the OIDCIssuerProfile config map should be placed. If omitted, no config map will be // created. @@ -21588,8 +21801,9 @@ func (identity *ManagedClusterPodIdentity_STATUS) AssignProperties_From_ManagedC // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ManagedClusterPodIdentity_ProvisioningState_STATUS(*source.ProvisioningState) - identity.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, managedClusterPodIdentity_ProvisioningState_STATUS_Values) + identity.ProvisioningState = &provisioningStateTemp } else { identity.ProvisioningState = nil } @@ -23414,6 +23628,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_Windows_Server = ManagedClusterWindowsProfile_LicenseType("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType +var managedClusterWindowsProfile_LicenseType_Values = map[string]ManagedClusterWindowsProfile_LicenseType{ + "none": ManagedClusterWindowsProfile_LicenseType_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_Windows_Server, +} + type ManagedClusterWindowsProfile_LicenseType_STATUS string const ( @@ -23421,6 +23641,12 @@ const ( ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server = ManagedClusterWindowsProfile_LicenseType_STATUS("Windows_Server") ) +// Mapping from string to ManagedClusterWindowsProfile_LicenseType_STATUS +var managedClusterWindowsProfile_LicenseType_STATUS_Values = map[string]ManagedClusterWindowsProfile_LicenseType_STATUS{ + "none": ManagedClusterWindowsProfile_LicenseType_STATUS_None, + "windows_server": ManagedClusterWindowsProfile_LicenseType_STATUS_Windows_Server, +} + // KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. type ManagedClusterWorkloadAutoScalerProfileKeda struct { // +kubebuilder:validation:Required @@ -23640,8 +23866,9 @@ func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) // AddonAutoscaling if source.AddonAutoscaling != nil { - addonAutoscaling := ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling(*source.AddonAutoscaling) - autoscaler.AddonAutoscaling = &addonAutoscaling + addonAutoscaling := *source.AddonAutoscaling + addonAutoscalingTemp := genruntime.ToEnum(addonAutoscaling, managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_Values) + autoscaler.AddonAutoscaling = &addonAutoscalingTemp } else { autoscaler.AddonAutoscaling = nil } @@ -23733,8 +23960,9 @@ func (autoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_S // AddonAutoscaling if source.AddonAutoscaling != nil { - addonAutoscaling := ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS(*source.AddonAutoscaling) - autoscaler.AddonAutoscaling = &addonAutoscaling + addonAutoscaling := *source.AddonAutoscaling + addonAutoscalingTemp := genruntime.ToEnum(addonAutoscaling, managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS_Values) + autoscaler.AddonAutoscaling = &addonAutoscalingTemp } else { autoscaler.AddonAutoscaling = nil } @@ -23792,6 +24020,12 @@ const ( NetworkDataplane_Cilium = NetworkDataplane("cilium") ) +// Mapping from string to NetworkDataplane +var networkDataplane_Values = map[string]NetworkDataplane{ + "azure": NetworkDataplane_Azure, + "cilium": NetworkDataplane_Cilium, +} + // Network dataplane used in the Kubernetes cluster. type NetworkDataplane_STATUS string @@ -23800,6 +24034,12 @@ const ( NetworkDataplane_STATUS_Cilium = NetworkDataplane_STATUS("cilium") ) +// Mapping from string to NetworkDataplane_STATUS +var networkDataplane_STATUS_Values = map[string]NetworkDataplane_STATUS{ + "azure": NetworkDataplane_STATUS_Azure, + "cilium": NetworkDataplane_STATUS_Cilium, +} + // This cannot be specified if networkPlugin is anything other than 'azure'. // +kubebuilder:validation:Enum={"bridge","transparent"} type NetworkMode string @@ -23809,6 +24049,12 @@ const ( NetworkMode_Transparent = NetworkMode("transparent") ) +// Mapping from string to NetworkMode +var networkMode_Values = map[string]NetworkMode{ + "bridge": NetworkMode_Bridge, + "transparent": NetworkMode_Transparent, +} + // This cannot be specified if networkPlugin is anything other than 'azure'. type NetworkMode_STATUS string @@ -23817,6 +24063,12 @@ const ( NetworkMode_STATUS_Transparent = NetworkMode_STATUS("transparent") ) +// Mapping from string to NetworkMode_STATUS +var networkMode_STATUS_Values = map[string]NetworkMode_STATUS{ + "bridge": NetworkMode_STATUS_Bridge, + "transparent": NetworkMode_STATUS_Transparent, +} + // This addon can be used to configure network monitoring and generate network monitoring data in Prometheus format type NetworkMonitoring struct { // Enabled: Enable or disable the network monitoring plugin on the cluster @@ -23980,6 +24232,13 @@ const ( NetworkPlugin_None = NetworkPlugin("none") ) +// Mapping from string to NetworkPlugin +var networkPlugin_Values = map[string]NetworkPlugin{ + "azure": NetworkPlugin_Azure, + "kubenet": NetworkPlugin_Kubenet, + "none": NetworkPlugin_None, +} + // Network plugin used for building the Kubernetes network. type NetworkPlugin_STATUS string @@ -23989,17 +24248,34 @@ const ( NetworkPlugin_STATUS_None = NetworkPlugin_STATUS("none") ) +// Mapping from string to NetworkPlugin_STATUS +var networkPlugin_STATUS_Values = map[string]NetworkPlugin_STATUS{ + "azure": NetworkPlugin_STATUS_Azure, + "kubenet": NetworkPlugin_STATUS_Kubenet, + "none": NetworkPlugin_STATUS_None, +} + // The mode the network plugin should use. // +kubebuilder:validation:Enum={"overlay"} type NetworkPluginMode string const NetworkPluginMode_Overlay = NetworkPluginMode("overlay") +// Mapping from string to NetworkPluginMode +var networkPluginMode_Values = map[string]NetworkPluginMode{ + "overlay": NetworkPluginMode_Overlay, +} + // The mode the network plugin should use. type NetworkPluginMode_STATUS string const NetworkPluginMode_STATUS_Overlay = NetworkPluginMode_STATUS("overlay") +// Mapping from string to NetworkPluginMode_STATUS +var networkPluginMode_STATUS_Values = map[string]NetworkPluginMode_STATUS{ + "overlay": NetworkPluginMode_STATUS_Overlay, +} + // Network policy used for building the Kubernetes network. // +kubebuilder:validation:Enum={"azure","calico","cilium","none"} type NetworkPolicy string @@ -24011,6 +24287,14 @@ const ( NetworkPolicy_None = NetworkPolicy("none") ) +// Mapping from string to NetworkPolicy +var networkPolicy_Values = map[string]NetworkPolicy{ + "azure": NetworkPolicy_Azure, + "calico": NetworkPolicy_Calico, + "cilium": NetworkPolicy_Cilium, + "none": NetworkPolicy_None, +} + // Network policy used for building the Kubernetes network. type NetworkPolicy_STATUS string @@ -24021,6 +24305,14 @@ const ( NetworkPolicy_STATUS_None = NetworkPolicy_STATUS("none") ) +// Mapping from string to NetworkPolicy_STATUS +var networkPolicy_STATUS_Values = map[string]NetworkPolicy_STATUS{ + "azure": NetworkPolicy_STATUS_Azure, + "calico": NetworkPolicy_STATUS_Calico, + "cilium": NetworkPolicy_STATUS_Cilium, + "none": NetworkPolicy_STATUS_None, +} + type PowerState_Code_STATUS string const ( @@ -24028,6 +24320,12 @@ const ( PowerState_Code_STATUS_Stopped = PowerState_Code_STATUS("Stopped") ) +// Mapping from string to PowerState_Code_STATUS +var powerState_Code_STATUS_Values = map[string]PowerState_Code_STATUS{ + "running": PowerState_Code_STATUS_Running, + "stopped": PowerState_Code_STATUS_Stopped, +} + // +kubebuilder:validation:Enum={"Enforcement","Off","Warning"} type SafeguardsProfile_Level string @@ -24037,6 +24335,13 @@ const ( SafeguardsProfile_Level_Warning = SafeguardsProfile_Level("Warning") ) +// Mapping from string to SafeguardsProfile_Level +var safeguardsProfile_Level_Values = map[string]SafeguardsProfile_Level{ + "enforcement": SafeguardsProfile_Level_Enforcement, + "off": SafeguardsProfile_Level_Off, + "warning": SafeguardsProfile_Level_Warning, +} + type SafeguardsProfile_Level_STATUS string const ( @@ -24045,6 +24350,13 @@ const ( SafeguardsProfile_Level_STATUS_Warning = SafeguardsProfile_Level_STATUS("Warning") ) +// Mapping from string to SafeguardsProfile_Level_STATUS +var safeguardsProfile_Level_STATUS_Values = map[string]SafeguardsProfile_Level_STATUS{ + "enforcement": SafeguardsProfile_Level_STATUS_Enforcement, + "off": SafeguardsProfile_Level_STATUS_Off, + "warning": SafeguardsProfile_Level_STATUS_Warning, +} + // +kubebuilder:validation:Enum={"Disabled","Istio"} type ServiceMeshProfile_Mode string @@ -24053,6 +24365,12 @@ const ( ServiceMeshProfile_Mode_Istio = ServiceMeshProfile_Mode("Istio") ) +// Mapping from string to ServiceMeshProfile_Mode +var serviceMeshProfile_Mode_Values = map[string]ServiceMeshProfile_Mode{ + "disabled": ServiceMeshProfile_Mode_Disabled, + "istio": ServiceMeshProfile_Mode_Istio, +} + type ServiceMeshProfile_Mode_STATUS string const ( @@ -24060,6 +24378,12 @@ const ( ServiceMeshProfile_Mode_STATUS_Istio = ServiceMeshProfile_Mode_STATUS("Istio") ) +// Mapping from string to ServiceMeshProfile_Mode_STATUS +var serviceMeshProfile_Mode_STATUS_Values = map[string]ServiceMeshProfile_Mode_STATUS{ + "disabled": ServiceMeshProfile_Mode_STATUS_Disabled, + "istio": ServiceMeshProfile_Mode_STATUS_Istio, +} + // Settings for overrides when upgrading a cluster. type UpgradeOverrideSettings struct { // ForceUpgrade: Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade @@ -24526,6 +24850,12 @@ const ( AzureKeyVaultKms_KeyVaultNetworkAccess_Public = AzureKeyVaultKms_KeyVaultNetworkAccess("Public") ) +// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess +var azureKeyVaultKms_KeyVaultNetworkAccess_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess{ + "private": AzureKeyVaultKms_KeyVaultNetworkAccess_Private, + "public": AzureKeyVaultKms_KeyVaultNetworkAccess_Public, +} + type AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS string const ( @@ -24533,6 +24863,12 @@ const ( AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public = AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS("Public") ) +// Mapping from string to AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS +var azureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Values = map[string]AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS{ + "private": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Private, + "public": AzureKeyVaultKms_KeyVaultNetworkAccess_STATUS_Public, +} + type ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig struct { // Scheduler: IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. Scheduler *ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler `json:"scheduler,omitempty"` @@ -24628,8 +24964,9 @@ func (config *ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig) AssignP // Scheduler if source.Scheduler != nil { - scheduler := ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler(*source.Scheduler) - config.Scheduler = &scheduler + scheduler := *source.Scheduler + schedulerTemp := genruntime.ToEnum(scheduler, containerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_Values) + config.Scheduler = &schedulerTemp } else { config.Scheduler = nil } @@ -24742,8 +25079,9 @@ func (config *ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_STATUS) // Scheduler if source.Scheduler != nil { - scheduler := ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS(*source.Scheduler) - config.Scheduler = &scheduler + scheduler := *source.Scheduler + schedulerTemp := genruntime.ToEnum(scheduler, containerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_Values) + config.Scheduler = &schedulerTemp } else { config.Scheduler = nil } @@ -24802,6 +25140,12 @@ const ( ContainerServiceNetworkProfile_KubeProxyConfig_Mode_IPVS = ContainerServiceNetworkProfile_KubeProxyConfig_Mode("IPVS") ) +// Mapping from string to ContainerServiceNetworkProfile_KubeProxyConfig_Mode +var containerServiceNetworkProfile_KubeProxyConfig_Mode_Values = map[string]ContainerServiceNetworkProfile_KubeProxyConfig_Mode{ + "iptables": ContainerServiceNetworkProfile_KubeProxyConfig_Mode_IPTABLES, + "ipvs": ContainerServiceNetworkProfile_KubeProxyConfig_Mode_IPVS, +} + type ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS string const ( @@ -24809,6 +25153,12 @@ const ( ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_IPVS = ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS("IPVS") ) +// Mapping from string to ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS +var containerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_Values = map[string]ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS{ + "iptables": ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_IPTABLES, + "ipvs": ContainerServiceNetworkProfile_KubeProxyConfig_Mode_STATUS_IPVS, +} + // Contains information about SSH certificate public key data. type ContainerServiceSshPublicKey struct { // +kubebuilder:validation:Required @@ -26227,6 +26577,12 @@ const ( ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIPConfiguration = ManagedClusterLoadBalancerProfile_BackendPoolType("NodeIPConfiguration") ) +// Mapping from string to ManagedClusterLoadBalancerProfile_BackendPoolType +var managedClusterLoadBalancerProfile_BackendPoolType_Values = map[string]ManagedClusterLoadBalancerProfile_BackendPoolType{ + "nodeip": ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIP, + "nodeipconfiguration": ManagedClusterLoadBalancerProfile_BackendPoolType_NodeIPConfiguration, +} + type ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS string const ( @@ -26234,6 +26590,12 @@ const ( ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIPConfiguration = ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS("NodeIPConfiguration") ) +// Mapping from string to ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS +var managedClusterLoadBalancerProfile_BackendPoolType_STATUS_Values = map[string]ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS{ + "nodeip": ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIP, + "nodeipconfiguration": ManagedClusterLoadBalancerProfile_BackendPoolType_STATUS_NodeIPConfiguration, +} + type ManagedClusterLoadBalancerProfile_ManagedOutboundIPs struct { // +kubebuilder:validation:Maximum=100 // +kubebuilder:validation:Minimum=1 @@ -27072,6 +27434,16 @@ const ( ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating = ManagedClusterPodIdentity_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ManagedClusterPodIdentity_ProvisioningState_STATUS +var managedClusterPodIdentity_ProvisioningState_STATUS_Values = map[string]ManagedClusterPodIdentity_ProvisioningState_STATUS{ + "assigned": ManagedClusterPodIdentity_ProvisioningState_STATUS_Assigned, + "canceled": ManagedClusterPodIdentity_ProvisioningState_STATUS_Canceled, + "deleting": ManagedClusterPodIdentity_ProvisioningState_STATUS_Deleting, + "failed": ManagedClusterPodIdentity_ProvisioningState_STATUS_Failed, + "succeeded": ManagedClusterPodIdentity_ProvisioningState_STATUS_Succeeded, + "updating": ManagedClusterPodIdentity_ProvisioningState_STATUS_Updating, +} + // Microsoft Defender settings for the security profile threat detection. type ManagedClusterSecurityProfileDefenderSecurityMonitoring struct { // Enabled: Whether to enable Defender threat detection @@ -27233,6 +27605,12 @@ const ( ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_Enabled = ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling("Enabled") ) +// Mapping from string to ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling +var managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_Values = map[string]ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling{ + "disabled": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_Disabled, + "enabled": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_Enabled, +} + type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS string const ( @@ -27240,6 +27618,12 @@ const ( ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS_Enabled = ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS("Enabled") ) +// Mapping from string to ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS +var managedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS_Values = map[string]ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS{ + "disabled": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS_Disabled, + "enabled": ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler_AddonAutoscaling_STATUS_Enabled, +} + // A reference to an Azure resource. type ResourceReference struct { // Reference: The fully qualified Azure resource id. @@ -27391,6 +27775,12 @@ const ( ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_RoundRobin = ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler("RoundRobin") ) +// Mapping from string to ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler +var containerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_Values = map[string]ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler{ + "leastconnection": ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_LeastConnection, + "roundrobin": ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_RoundRobin, +} + type ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS string const ( @@ -27398,6 +27788,12 @@ const ( ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_RoundRobin = ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS("RoundRobin") ) +// Mapping from string to ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS +var containerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_Values = map[string]ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS{ + "leastconnection": ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_LeastConnection, + "roundrobin": ContainerServiceNetworkProfile_KubeProxyConfig_IpvsConfig_Scheduler_STATUS_RoundRobin, +} + // Istio egress gateway configuration. type IstioEgressGateway struct { // +kubebuilder:validation:Required @@ -27670,8 +28066,9 @@ func (gateway *IstioIngressGateway) AssignProperties_From_IstioIngressGateway(so // Mode if source.Mode != nil { - mode := IstioIngressGateway_Mode(*source.Mode) - gateway.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, istioIngressGateway_Mode_Values) + gateway.Mode = &modeTemp } else { gateway.Mode = nil } @@ -27765,8 +28162,9 @@ func (gateway *IstioIngressGateway_STATUS) AssignProperties_From_IstioIngressGat // Mode if source.Mode != nil { - mode := IstioIngressGateway_Mode_STATUS(*source.Mode) - gateway.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, istioIngressGateway_Mode_STATUS_Values) + gateway.Mode = &modeTemp } else { gateway.Mode = nil } @@ -28339,6 +28737,12 @@ const ( IstioIngressGateway_Mode_Internal = IstioIngressGateway_Mode("Internal") ) +// Mapping from string to IstioIngressGateway_Mode +var istioIngressGateway_Mode_Values = map[string]IstioIngressGateway_Mode{ + "external": IstioIngressGateway_Mode_External, + "internal": IstioIngressGateway_Mode_Internal, +} + type IstioIngressGateway_Mode_STATUS string const ( @@ -28346,6 +28750,12 @@ const ( IstioIngressGateway_Mode_STATUS_Internal = IstioIngressGateway_Mode_STATUS("Internal") ) +// Mapping from string to IstioIngressGateway_Mode_STATUS +var istioIngressGateway_Mode_STATUS_Values = map[string]IstioIngressGateway_Mode_STATUS{ + "external": IstioIngressGateway_Mode_STATUS_External, + "internal": IstioIngressGateway_Mode_STATUS_Internal, +} + // An error response from the pod identity provisioning. type ManagedClusterPodIdentityProvisioningErrorBody_STATUS struct { // Code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. diff --git a/v2/api/containerservice/v1api20231102preview/managed_clusters_agent_pool_types_gen.go b/v2/api/containerservice/v1api20231102preview/managed_clusters_agent_pool_types_gen.go index ba901b22440..0e4cadd97ed 100644 --- a/v2/api/containerservice/v1api20231102preview/managed_clusters_agent_pool_types_gen.go +++ b/v2/api/containerservice/v1api20231102preview/managed_clusters_agent_pool_types_gen.go @@ -1502,8 +1502,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -1542,8 +1543,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -1574,8 +1576,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Mode if source.Mode != nil { - mode := AgentPoolMode(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -1622,24 +1625,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -1682,24 +1688,27 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode(*source.ScaleDownMode) - pool.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_Values) + pool.ScaleDownMode = &scaleDownModeTemp } else { pool.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -1729,8 +1738,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // Type if source.Type != nil { - typeVar := AgentPoolType(*source.Type) - pool.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, agentPoolType_Values) + pool.Type = &typeTemp } else { pool.Type = nil } @@ -1802,8 +1812,9 @@ func (pool *ManagedClusters_AgentPool_Spec) AssignProperties_From_ManagedCluster // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime(*source.WorkloadRuntime) - pool.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_Values) + pool.WorkloadRuntime = &workloadRuntimeTemp } else { pool.WorkloadRuntime = nil } @@ -3158,8 +3169,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // GpuInstanceProfile if source.GpuInstanceProfile != nil { - gpuInstanceProfile := GPUInstanceProfile_STATUS(*source.GpuInstanceProfile) - pool.GpuInstanceProfile = &gpuInstanceProfile + gpuInstanceProfile := *source.GpuInstanceProfile + gpuInstanceProfileTemp := genruntime.ToEnum(gpuInstanceProfile, gPUInstanceProfile_STATUS_Values) + pool.GpuInstanceProfile = &gpuInstanceProfileTemp } else { pool.GpuInstanceProfile = nil } @@ -3196,8 +3208,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // KubeletDiskType if source.KubeletDiskType != nil { - kubeletDiskType := KubeletDiskType_STATUS(*source.KubeletDiskType) - pool.KubeletDiskType = &kubeletDiskType + kubeletDiskType := *source.KubeletDiskType + kubeletDiskTypeTemp := genruntime.ToEnum(kubeletDiskType, kubeletDiskType_STATUS_Values) + pool.KubeletDiskType = &kubeletDiskTypeTemp } else { pool.KubeletDiskType = nil } @@ -3228,8 +3241,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // Mode if source.Mode != nil { - mode := AgentPoolMode_STATUS(*source.Mode) - pool.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, agentPoolMode_STATUS_Values) + pool.Mode = &modeTemp } else { pool.Mode = nil } @@ -3272,24 +3286,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // OsDiskType if source.OsDiskType != nil { - osDiskType := OSDiskType_STATUS(*source.OsDiskType) - pool.OsDiskType = &osDiskType + osDiskType := *source.OsDiskType + osDiskTypeTemp := genruntime.ToEnum(osDiskType, oSDiskType_STATUS_Values) + pool.OsDiskType = &osDiskTypeTemp } else { pool.OsDiskType = nil } // OsSKU if source.OsSKU != nil { - osSKU := OSSKU_STATUS(*source.OsSKU) - pool.OsSKU = &osSKU + osSKU := *source.OsSKU + osSKUTemp := genruntime.ToEnum(osSKU, oSSKU_STATUS_Values) + pool.OsSKU = &osSKUTemp } else { pool.OsSKU = nil } // OsType if source.OsType != nil { - osType := OSType_STATUS(*source.OsType) - pool.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, oSType_STATUS_Values) + pool.OsType = &osTypeTemp } else { pool.OsType = nil } @@ -3311,8 +3328,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // PropertiesType if source.PropertiesType != nil { - propertiesType := AgentPoolType_STATUS(*source.PropertiesType) - pool.PropertiesType = &propertiesType + propertiesType := *source.PropertiesType + propertiesTypeTemp := genruntime.ToEnum(propertiesType, agentPoolType_STATUS_Values) + pool.PropertiesType = &propertiesTypeTemp } else { pool.PropertiesType = nil } @@ -3325,24 +3343,27 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // ScaleDownMode if source.ScaleDownMode != nil { - scaleDownMode := ScaleDownMode_STATUS(*source.ScaleDownMode) - pool.ScaleDownMode = &scaleDownMode + scaleDownMode := *source.ScaleDownMode + scaleDownModeTemp := genruntime.ToEnum(scaleDownMode, scaleDownMode_STATUS_Values) + pool.ScaleDownMode = &scaleDownModeTemp } else { pool.ScaleDownMode = nil } // ScaleSetEvictionPolicy if source.ScaleSetEvictionPolicy != nil { - scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(*source.ScaleSetEvictionPolicy) - pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy + scaleSetEvictionPolicy := *source.ScaleSetEvictionPolicy + scaleSetEvictionPolicyTemp := genruntime.ToEnum(scaleSetEvictionPolicy, scaleSetEvictionPolicy_STATUS_Values) + pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicyTemp } else { pool.ScaleSetEvictionPolicy = nil } // ScaleSetPriority if source.ScaleSetPriority != nil { - scaleSetPriority := ScaleSetPriority_STATUS(*source.ScaleSetPriority) - pool.ScaleSetPriority = &scaleSetPriority + scaleSetPriority := *source.ScaleSetPriority + scaleSetPriorityTemp := genruntime.ToEnum(scaleSetPriority, scaleSetPriority_STATUS_Values) + pool.ScaleSetPriority = &scaleSetPriorityTemp } else { pool.ScaleSetPriority = nil } @@ -3435,8 +3456,9 @@ func (pool *ManagedClusters_AgentPool_STATUS) AssignProperties_From_ManagedClust // WorkloadRuntime if source.WorkloadRuntime != nil { - workloadRuntime := WorkloadRuntime_STATUS(*source.WorkloadRuntime) - pool.WorkloadRuntime = &workloadRuntime + workloadRuntime := *source.WorkloadRuntime + workloadRuntimeTemp := genruntime.ToEnum(workloadRuntime, workloadRuntime_STATUS_Values) + pool.WorkloadRuntime = &workloadRuntimeTemp } else { pool.WorkloadRuntime = nil } @@ -4153,6 +4175,12 @@ const ( AgentPoolMode_User = AgentPoolMode("User") ) +// Mapping from string to AgentPoolMode +var agentPoolMode_Values = map[string]AgentPoolMode{ + "system": AgentPoolMode_System, + "user": AgentPoolMode_User, +} + // A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions // and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools type AgentPoolMode_STATUS string @@ -4162,6 +4190,12 @@ const ( AgentPoolMode_STATUS_User = AgentPoolMode_STATUS("User") ) +// Mapping from string to AgentPoolMode_STATUS +var agentPoolMode_STATUS_Values = map[string]AgentPoolMode_STATUS{ + "system": AgentPoolMode_STATUS_System, + "user": AgentPoolMode_STATUS_User, +} + // Network settings of an agent pool. type AgentPoolNetworkProfile struct { // AllowedHostPorts: The port ranges that are allowed to access. The specified ranges are allowed to overlap. @@ -4626,8 +4660,9 @@ func (profile *AgentPoolSecurityProfile) AssignProperties_From_AgentPoolSecurity // SshAccess if source.SshAccess != nil { - sshAccess := AgentPoolSSHAccess(*source.SshAccess) - profile.SshAccess = &sshAccess + sshAccess := *source.SshAccess + sshAccessTemp := genruntime.ToEnum(sshAccess, agentPoolSSHAccess_Values) + profile.SshAccess = &sshAccessTemp } else { profile.SshAccess = nil } @@ -4747,8 +4782,9 @@ func (profile *AgentPoolSecurityProfile_STATUS) AssignProperties_From_AgentPoolS // SshAccess if source.SshAccess != nil { - sshAccess := AgentPoolSSHAccess_STATUS(*source.SshAccess) - profile.SshAccess = &sshAccess + sshAccess := *source.SshAccess + sshAccessTemp := genruntime.ToEnum(sshAccess, agentPoolSSHAccess_STATUS_Values) + profile.SshAccess = &sshAccessTemp } else { profile.SshAccess = nil } @@ -4807,6 +4843,13 @@ const ( AgentPoolType_VirtualMachines = AgentPoolType("VirtualMachines") ) +// Mapping from string to AgentPoolType +var agentPoolType_Values = map[string]AgentPoolType{ + "availabilityset": AgentPoolType_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_VirtualMachineScaleSets, + "virtualmachines": AgentPoolType_VirtualMachines, +} + // The type of Agent Pool. type AgentPoolType_STATUS string @@ -4816,6 +4859,13 @@ const ( AgentPoolType_STATUS_VirtualMachines = AgentPoolType_STATUS("VirtualMachines") ) +// Mapping from string to AgentPoolType_STATUS +var agentPoolType_STATUS_Values = map[string]AgentPoolType_STATUS{ + "availabilityset": AgentPoolType_STATUS_AvailabilitySet, + "virtualmachinescalesets": AgentPoolType_STATUS_VirtualMachineScaleSets, + "virtualmachines": AgentPoolType_STATUS_VirtualMachines, +} + // Settings for upgrading an agentpool type AgentPoolUpgradeSettings struct { // +kubebuilder:validation:Maximum=1440 @@ -5228,6 +5278,15 @@ const ( GPUInstanceProfile_MIG7G = GPUInstanceProfile("MIG7g") ) +// Mapping from string to GPUInstanceProfile +var gPUInstanceProfile_Values = map[string]GPUInstanceProfile{ + "mig1g": GPUInstanceProfile_MIG1G, + "mig2g": GPUInstanceProfile_MIG2G, + "mig3g": GPUInstanceProfile_MIG3G, + "mig4g": GPUInstanceProfile_MIG4G, + "mig7g": GPUInstanceProfile_MIG7G, +} + // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. type GPUInstanceProfile_STATUS string @@ -5239,6 +5298,15 @@ const ( GPUInstanceProfile_STATUS_MIG7G = GPUInstanceProfile_STATUS("MIG7g") ) +// Mapping from string to GPUInstanceProfile_STATUS +var gPUInstanceProfile_STATUS_Values = map[string]GPUInstanceProfile_STATUS{ + "mig1g": GPUInstanceProfile_STATUS_MIG1G, + "mig2g": GPUInstanceProfile_STATUS_MIG2G, + "mig3g": GPUInstanceProfile_STATUS_MIG3G, + "mig4g": GPUInstanceProfile_STATUS_MIG4G, + "mig7g": GPUInstanceProfile_STATUS_MIG7G, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type KubeletConfig struct { // AllowedUnsafeSysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). @@ -5801,6 +5869,12 @@ const ( KubeletDiskType_Temporary = KubeletDiskType("Temporary") ) +// Mapping from string to KubeletDiskType +var kubeletDiskType_Values = map[string]KubeletDiskType{ + "os": KubeletDiskType_OS, + "temporary": KubeletDiskType_Temporary, +} + // Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. type KubeletDiskType_STATUS string @@ -5809,6 +5883,12 @@ const ( KubeletDiskType_STATUS_Temporary = KubeletDiskType_STATUS("Temporary") ) +// Mapping from string to KubeletDiskType_STATUS +var kubeletDiskType_STATUS_Values = map[string]KubeletDiskType_STATUS{ + "os": KubeletDiskType_STATUS_OS, + "temporary": KubeletDiskType_STATUS_Temporary, +} + // See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details. type LinuxOSConfig struct { // SwapFileSizeMB: The size in MB of a swap file that will be created on each node. @@ -6119,6 +6199,12 @@ const ( OSDiskType_Managed = OSDiskType("Managed") ) +// Mapping from string to OSDiskType +var oSDiskType_Values = map[string]OSDiskType{ + "ephemeral": OSDiskType_Ephemeral, + "managed": OSDiskType_Managed, +} + // The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, // defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral // OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). @@ -6129,6 +6215,12 @@ const ( OSDiskType_STATUS_Managed = OSDiskType_STATUS("Managed") ) +// Mapping from string to OSDiskType_STATUS +var oSDiskType_STATUS_Values = map[string]OSDiskType_STATUS{ + "ephemeral": OSDiskType_STATUS_Ephemeral, + "managed": OSDiskType_STATUS_Managed, +} + // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. // +kubebuilder:validation:Enum={"AzureLinux","CBLMariner","Mariner","Ubuntu","Windows2019","Windows2022","WindowsAnnual"} @@ -6144,6 +6236,17 @@ const ( OSSKU_WindowsAnnual = OSSKU("WindowsAnnual") ) +// Mapping from string to OSSKU +var oSSKU_Values = map[string]OSSKU{ + "azurelinux": OSSKU_AzureLinux, + "cblmariner": OSSKU_CBLMariner, + "mariner": OSSKU_Mariner, + "ubuntu": OSSKU_Ubuntu, + "windows2019": OSSKU_Windows2019, + "windows2022": OSSKU_Windows2022, + "windowsannual": OSSKU_WindowsAnnual, +} + // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. type OSSKU_STATUS string @@ -6158,6 +6261,17 @@ const ( OSSKU_STATUS_WindowsAnnual = OSSKU_STATUS("WindowsAnnual") ) +// Mapping from string to OSSKU_STATUS +var oSSKU_STATUS_Values = map[string]OSSKU_STATUS{ + "azurelinux": OSSKU_STATUS_AzureLinux, + "cblmariner": OSSKU_STATUS_CBLMariner, + "mariner": OSSKU_STATUS_Mariner, + "ubuntu": OSSKU_STATUS_Ubuntu, + "windows2019": OSSKU_STATUS_Windows2019, + "windows2022": OSSKU_STATUS_Windows2022, + "windowsannual": OSSKU_STATUS_WindowsAnnual, +} + // The operating system type. The default is Linux. // +kubebuilder:validation:Enum={"Linux","Windows"} type OSType string @@ -6167,6 +6281,12 @@ const ( OSType_Windows = OSType("Windows") ) +// Mapping from string to OSType +var oSType_Values = map[string]OSType{ + "linux": OSType_Linux, + "windows": OSType_Windows, +} + // The operating system type. The default is Linux. type OSType_STATUS string @@ -6175,6 +6295,12 @@ const ( OSType_STATUS_Windows = OSType_STATUS("Windows") ) +// Mapping from string to OSType_STATUS +var oSType_STATUS_Values = map[string]OSType_STATUS{ + "linux": OSType_STATUS_Linux, + "windows": OSType_STATUS_Windows, +} + // Describes the Power State of the cluster type PowerState struct { // Code: Tells whether the cluster is Running or Stopped @@ -6225,8 +6351,9 @@ func (state *PowerState) AssignProperties_From_PowerState(source *v20231102ps.Po // Code if source.Code != nil { - code := PowerState_Code(*source.Code) - state.Code = &code + code := *source.Code + codeTemp := genruntime.ToEnum(code, powerState_Code_Values) + state.Code = &codeTemp } else { state.Code = nil } @@ -6269,6 +6396,12 @@ const ( ScaleDownMode_Delete = ScaleDownMode("Delete") ) +// Mapping from string to ScaleDownMode +var scaleDownMode_Values = map[string]ScaleDownMode{ + "deallocate": ScaleDownMode_Deallocate, + "delete": ScaleDownMode_Delete, +} + // Describes how VMs are added to or removed from Agent Pools. See [billing // states](https://docs.microsoft.com/azure/virtual-machines/states-billing). type ScaleDownMode_STATUS string @@ -6278,6 +6411,12 @@ const ( ScaleDownMode_STATUS_Delete = ScaleDownMode_STATUS("Delete") ) +// Mapping from string to ScaleDownMode_STATUS +var scaleDownMode_STATUS_Values = map[string]ScaleDownMode_STATUS{ + "deallocate": ScaleDownMode_STATUS_Deallocate, + "delete": ScaleDownMode_STATUS_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) // +kubebuilder:validation:Enum={"Deallocate","Delete"} @@ -6288,6 +6427,12 @@ const ( ScaleSetEvictionPolicy_Delete = ScaleSetEvictionPolicy("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy +var scaleSetEvictionPolicy_Values = map[string]ScaleSetEvictionPolicy{ + "deallocate": ScaleSetEvictionPolicy_Deallocate, + "delete": ScaleSetEvictionPolicy_Delete, +} + // The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information // about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) type ScaleSetEvictionPolicy_STATUS string @@ -6297,6 +6442,12 @@ const ( ScaleSetEvictionPolicy_STATUS_Delete = ScaleSetEvictionPolicy_STATUS("Delete") ) +// Mapping from string to ScaleSetEvictionPolicy_STATUS +var scaleSetEvictionPolicy_STATUS_Values = map[string]ScaleSetEvictionPolicy_STATUS{ + "deallocate": ScaleSetEvictionPolicy_STATUS_Deallocate, + "delete": ScaleSetEvictionPolicy_STATUS_Delete, +} + // The Virtual Machine Scale Set priority. // +kubebuilder:validation:Enum={"Regular","Spot"} type ScaleSetPriority string @@ -6306,6 +6457,12 @@ const ( ScaleSetPriority_Spot = ScaleSetPriority("Spot") ) +// Mapping from string to ScaleSetPriority +var scaleSetPriority_Values = map[string]ScaleSetPriority{ + "regular": ScaleSetPriority_Regular, + "spot": ScaleSetPriority_Spot, +} + // The Virtual Machine Scale Set priority. type ScaleSetPriority_STATUS string @@ -6314,6 +6471,12 @@ const ( ScaleSetPriority_STATUS_Spot = ScaleSetPriority_STATUS("Spot") ) +// Mapping from string to ScaleSetPriority_STATUS +var scaleSetPriority_STATUS_Values = map[string]ScaleSetPriority_STATUS{ + "regular": ScaleSetPriority_STATUS_Regular, + "spot": ScaleSetPriority_STATUS_Spot, +} + // Current status on a group of nodes of the same vm size. type VirtualMachineNodes struct { // Count: Number of nodes. @@ -6676,6 +6839,13 @@ const ( WorkloadRuntime_WasmWasi = WorkloadRuntime("WasmWasi") ) +// Mapping from string to WorkloadRuntime +var workloadRuntime_Values = map[string]WorkloadRuntime{ + "katamshvvmisolation": WorkloadRuntime_KataMshvVmIsolation, + "ocicontainer": WorkloadRuntime_OCIContainer, + "wasmwasi": WorkloadRuntime_WasmWasi, +} + // Determines the type of workload a node can run. type WorkloadRuntime_STATUS string @@ -6685,6 +6855,13 @@ const ( WorkloadRuntime_STATUS_WasmWasi = WorkloadRuntime_STATUS("WasmWasi") ) +// Mapping from string to WorkloadRuntime_STATUS +var workloadRuntime_STATUS_Values = map[string]WorkloadRuntime_STATUS{ + "katamshvvmisolation": WorkloadRuntime_STATUS_KataMshvVmIsolation, + "ocicontainer": WorkloadRuntime_STATUS_OCIContainer, + "wasmwasi": WorkloadRuntime_STATUS_WasmWasi, +} + // SSH access method of an agent pool. // +kubebuilder:validation:Enum={"Disabled","LocalUser"} type AgentPoolSSHAccess string @@ -6694,6 +6871,12 @@ const ( AgentPoolSSHAccess_LocalUser = AgentPoolSSHAccess("LocalUser") ) +// Mapping from string to AgentPoolSSHAccess +var agentPoolSSHAccess_Values = map[string]AgentPoolSSHAccess{ + "disabled": AgentPoolSSHAccess_Disabled, + "localuser": AgentPoolSSHAccess_LocalUser, +} + // SSH access method of an agent pool. type AgentPoolSSHAccess_STATUS string @@ -6702,6 +6885,12 @@ const ( AgentPoolSSHAccess_STATUS_LocalUser = AgentPoolSSHAccess_STATUS("LocalUser") ) +// Mapping from string to AgentPoolSSHAccess_STATUS +var agentPoolSSHAccess_STATUS_Values = map[string]AgentPoolSSHAccess_STATUS{ + "disabled": AgentPoolSSHAccess_STATUS_Disabled, + "localuser": AgentPoolSSHAccess_STATUS_LocalUser, +} + // Contains the IPTag associated with the object. type IPTag struct { // IpTagType: The IP tag type. Example: RoutingPreference. @@ -6973,8 +7162,9 @@ func (portRange *PortRange) AssignProperties_From_PortRange(source *v20231102ps. // Protocol if source.Protocol != nil { - protocol := PortRange_Protocol(*source.Protocol) - portRange.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, portRange_Protocol_Values) + portRange.Protocol = &protocolTemp } else { portRange.Protocol = nil } @@ -7084,8 +7274,9 @@ func (portRange *PortRange_STATUS) AssignProperties_From_PortRange_STATUS(source // Protocol if source.Protocol != nil { - protocol := PortRange_Protocol_STATUS(*source.Protocol) - portRange.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, portRange_Protocol_STATUS_Values) + portRange.Protocol = &protocolTemp } else { portRange.Protocol = nil } @@ -7132,6 +7323,12 @@ const ( PowerState_Code_Stopped = PowerState_Code("Stopped") ) +// Mapping from string to PowerState_Code +var powerState_Code_Values = map[string]PowerState_Code{ + "running": PowerState_Code_Running, + "stopped": PowerState_Code_Stopped, +} + // Specifications on how to scale a VirtualMachines agent pool. type ScaleProfile struct { // Manual: Specifications on how to scale the VirtualMachines agent pool to a fixed size. @@ -8685,6 +8882,12 @@ const ( PortRange_Protocol_UDP = PortRange_Protocol("UDP") ) +// Mapping from string to PortRange_Protocol +var portRange_Protocol_Values = map[string]PortRange_Protocol{ + "tcp": PortRange_Protocol_TCP, + "udp": PortRange_Protocol_UDP, +} + type PortRange_Protocol_STATUS string const ( @@ -8692,6 +8895,12 @@ const ( PortRange_Protocol_STATUS_UDP = PortRange_Protocol_STATUS("UDP") ) +// Mapping from string to PortRange_Protocol_STATUS +var portRange_Protocol_STATUS_Values = map[string]PortRange_Protocol_STATUS{ + "tcp": PortRange_Protocol_STATUS_TCP, + "udp": PortRange_Protocol_STATUS_UDP, +} + func init() { SchemeBuilder.Register(&ManagedClustersAgentPool{}, &ManagedClustersAgentPoolList{}) } diff --git a/v2/api/datafactory/v1api20180601/factory_spec_arm_types_gen.go b/v2/api/datafactory/v1api20180601/factory_spec_arm_types_gen.go index de301ffa56d..73036bb709e 100644 --- a/v2/api/datafactory/v1api20180601/factory_spec_arm_types_gen.go +++ b/v2/api/datafactory/v1api20180601/factory_spec_arm_types_gen.go @@ -93,6 +93,13 @@ const ( FactoryIdentity_Type_UserAssigned = FactoryIdentity_Type("UserAssigned") ) +// Mapping from string to FactoryIdentity_Type +var factoryIdentity_Type_Values = map[string]FactoryIdentity_Type{ + "systemassigned": FactoryIdentity_Type_SystemAssigned, + "systemassigned,userassigned": FactoryIdentity_Type_SystemAssignedUserAssigned, + "userassigned": FactoryIdentity_Type_UserAssigned, +} + type FactoryRepoConfiguration_ARM struct { // FactoryGitHub: Mutually exclusive with all other properties FactoryGitHub *FactoryGitHubConfiguration_ARM `json:"factoryGitHubConfiguration,omitempty"` diff --git a/v2/api/datafactory/v1api20180601/factory_status_arm_types_gen.go b/v2/api/datafactory/v1api20180601/factory_status_arm_types_gen.go index 6f00907fef6..d758a11674d 100644 --- a/v2/api/datafactory/v1api20180601/factory_status_arm_types_gen.go +++ b/v2/api/datafactory/v1api20180601/factory_status_arm_types_gen.go @@ -103,6 +103,13 @@ const ( FactoryIdentity_Type_STATUS_UserAssigned = FactoryIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to FactoryIdentity_Type_STATUS +var factoryIdentity_Type_STATUS_Values = map[string]FactoryIdentity_Type_STATUS{ + "systemassigned": FactoryIdentity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": FactoryIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": FactoryIdentity_Type_STATUS_UserAssigned, +} + type FactoryRepoConfiguration_STATUS_ARM struct { // FactoryGitHub: Mutually exclusive with all other properties FactoryGitHub *FactoryGitHubConfiguration_STATUS_ARM `json:"factoryGitHubConfiguration,omitempty"` diff --git a/v2/api/datafactory/v1api20180601/factory_types_gen.go b/v2/api/datafactory/v1api20180601/factory_types_gen.go index 44e433a5e65..9f3d124efda 100644 --- a/v2/api/datafactory/v1api20180601/factory_types_gen.go +++ b/v2/api/datafactory/v1api20180601/factory_types_gen.go @@ -713,8 +713,9 @@ func (factory *Factory_Spec) AssignProperties_From_Factory_Spec(source *v2018060 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := FactoryProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - factory.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, factoryProperties_PublicNetworkAccess_Values) + factory.PublicNetworkAccess = &publicNetworkAccessTemp } else { factory.PublicNetworkAccess = nil } @@ -1336,8 +1337,9 @@ func (factory *Factory_STATUS) AssignProperties_From_Factory_STATUS(source *v201 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := FactoryProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - factory.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, factoryProperties_PublicNetworkAccess_STATUS_Values) + factory.PublicNetworkAccess = &publicNetworkAccessTemp } else { factory.PublicNetworkAccess = nil } @@ -1902,8 +1904,9 @@ func (identity *FactoryIdentity) AssignProperties_From_FactoryIdentity(source *v // Type if source.Type != nil { - typeVar := FactoryIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, factoryIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2069,8 +2072,9 @@ func (identity *FactoryIdentity_STATUS) AssignProperties_From_FactoryIdentity_ST // Type if source.Type != nil { - typeVar := FactoryIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, factoryIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2143,6 +2147,12 @@ const ( FactoryProperties_PublicNetworkAccess_Enabled = FactoryProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to FactoryProperties_PublicNetworkAccess +var factoryProperties_PublicNetworkAccess_Values = map[string]FactoryProperties_PublicNetworkAccess{ + "disabled": FactoryProperties_PublicNetworkAccess_Disabled, + "enabled": FactoryProperties_PublicNetworkAccess_Enabled, +} + type FactoryProperties_PublicNetworkAccess_STATUS string const ( @@ -2150,6 +2160,12 @@ const ( FactoryProperties_PublicNetworkAccess_STATUS_Enabled = FactoryProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to FactoryProperties_PublicNetworkAccess_STATUS +var factoryProperties_PublicNetworkAccess_STATUS_Values = map[string]FactoryProperties_PublicNetworkAccess_STATUS{ + "disabled": FactoryProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": FactoryProperties_PublicNetworkAccess_STATUS_Enabled, +} + type FactoryRepoConfiguration struct { // FactoryGitHub: Mutually exclusive with all other properties FactoryGitHub *FactoryGitHubConfiguration `json:"factoryGitHubConfiguration,omitempty"` @@ -2519,8 +2535,9 @@ func (specification *GlobalParameterSpecification) AssignProperties_From_GlobalP // Type if source.Type != nil { - typeVar := GlobalParameterSpecification_Type(*source.Type) - specification.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, globalParameterSpecification_Type_Values) + specification.Type = &typeTemp } else { specification.Type = nil } @@ -2653,8 +2670,9 @@ func (specification *GlobalParameterSpecification_STATUS) AssignProperties_From_ // Type if source.Type != nil { - typeVar := GlobalParameterSpecification_Type_STATUS(*source.Type) - specification.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, globalParameterSpecification_Type_STATUS_Values) + specification.Type = &typeTemp } else { specification.Type = nil } @@ -3256,8 +3274,9 @@ func (configuration *FactoryGitHubConfiguration) AssignProperties_From_FactoryGi // Type if source.Type != nil { - typeVar := FactoryGitHubConfiguration_Type(*source.Type) - configuration.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, factoryGitHubConfiguration_Type_Values) + configuration.Type = &typeTemp } else { configuration.Type = nil } @@ -3545,8 +3564,9 @@ func (configuration *FactoryGitHubConfiguration_STATUS) AssignProperties_From_Fa // Type if source.Type != nil { - typeVar := FactoryGitHubConfiguration_Type_STATUS(*source.Type) - configuration.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, factoryGitHubConfiguration_Type_STATUS_Values) + configuration.Type = &typeTemp } else { configuration.Type = nil } @@ -3820,8 +3840,9 @@ func (configuration *FactoryVSTSConfiguration) AssignProperties_From_FactoryVSTS // Type if source.Type != nil { - typeVar := FactoryVSTSConfiguration_Type(*source.Type) - configuration.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, factoryVSTSConfiguration_Type_Values) + configuration.Type = &typeTemp } else { configuration.Type = nil } @@ -4059,8 +4080,9 @@ func (configuration *FactoryVSTSConfiguration_STATUS) AssignProperties_From_Fact // Type if source.Type != nil { - typeVar := FactoryVSTSConfiguration_Type_STATUS(*source.Type) - configuration.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, factoryVSTSConfiguration_Type_STATUS_Values) + configuration.Type = &typeTemp } else { configuration.Type = nil } @@ -4134,6 +4156,16 @@ const ( GlobalParameterSpecification_Type_String = GlobalParameterSpecification_Type("String") ) +// Mapping from string to GlobalParameterSpecification_Type +var globalParameterSpecification_Type_Values = map[string]GlobalParameterSpecification_Type{ + "array": GlobalParameterSpecification_Type_Array, + "bool": GlobalParameterSpecification_Type_Bool, + "float": GlobalParameterSpecification_Type_Float, + "int": GlobalParameterSpecification_Type_Int, + "object": GlobalParameterSpecification_Type_Object, + "string": GlobalParameterSpecification_Type_String, +} + type GlobalParameterSpecification_Type_STATUS string const ( @@ -4145,6 +4177,16 @@ const ( GlobalParameterSpecification_Type_STATUS_String = GlobalParameterSpecification_Type_STATUS("String") ) +// Mapping from string to GlobalParameterSpecification_Type_STATUS +var globalParameterSpecification_Type_STATUS_Values = map[string]GlobalParameterSpecification_Type_STATUS{ + "array": GlobalParameterSpecification_Type_STATUS_Array, + "bool": GlobalParameterSpecification_Type_STATUS_Bool, + "float": GlobalParameterSpecification_Type_STATUS_Float, + "int": GlobalParameterSpecification_Type_STATUS_Int, + "object": GlobalParameterSpecification_Type_STATUS_Object, + "string": GlobalParameterSpecification_Type_STATUS_String, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails struct { Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` @@ -4184,19 +4226,39 @@ type FactoryGitHubConfiguration_Type string const FactoryGitHubConfiguration_Type_FactoryGitHubConfiguration = FactoryGitHubConfiguration_Type("FactoryGitHubConfiguration") +// Mapping from string to FactoryGitHubConfiguration_Type +var factoryGitHubConfiguration_Type_Values = map[string]FactoryGitHubConfiguration_Type{ + "factorygithubconfiguration": FactoryGitHubConfiguration_Type_FactoryGitHubConfiguration, +} + type FactoryGitHubConfiguration_Type_STATUS string const FactoryGitHubConfiguration_Type_STATUS_FactoryGitHubConfiguration = FactoryGitHubConfiguration_Type_STATUS("FactoryGitHubConfiguration") +// Mapping from string to FactoryGitHubConfiguration_Type_STATUS +var factoryGitHubConfiguration_Type_STATUS_Values = map[string]FactoryGitHubConfiguration_Type_STATUS{ + "factorygithubconfiguration": FactoryGitHubConfiguration_Type_STATUS_FactoryGitHubConfiguration, +} + // +kubebuilder:validation:Enum={"FactoryVSTSConfiguration"} type FactoryVSTSConfiguration_Type string const FactoryVSTSConfiguration_Type_FactoryVSTSConfiguration = FactoryVSTSConfiguration_Type("FactoryVSTSConfiguration") +// Mapping from string to FactoryVSTSConfiguration_Type +var factoryVSTSConfiguration_Type_Values = map[string]FactoryVSTSConfiguration_Type{ + "factoryvstsconfiguration": FactoryVSTSConfiguration_Type_FactoryVSTSConfiguration, +} + type FactoryVSTSConfiguration_Type_STATUS string const FactoryVSTSConfiguration_Type_STATUS_FactoryVSTSConfiguration = FactoryVSTSConfiguration_Type_STATUS("FactoryVSTSConfiguration") +// Mapping from string to FactoryVSTSConfiguration_Type_STATUS +var factoryVSTSConfiguration_Type_STATUS_Values = map[string]FactoryVSTSConfiguration_Type_STATUS{ + "factoryvstsconfiguration": FactoryVSTSConfiguration_Type_STATUS_FactoryVSTSConfiguration, +} + // Client secret information for factory's bring your own app repository configuration. type GitHubClientSecret struct { // ByoaSecretAkvUrl: Bring your own app client secret AKV URL. diff --git a/v2/api/dataprotection/v1api20230101/backup_vault_resource_status_arm_types_gen.go b/v2/api/dataprotection/v1api20230101/backup_vault_resource_status_arm_types_gen.go index 683b6b874ac..d287100f45f 100644 --- a/v2/api/dataprotection/v1api20230101/backup_vault_resource_status_arm_types_gen.go +++ b/v2/api/dataprotection/v1api20230101/backup_vault_resource_status_arm_types_gen.go @@ -104,6 +104,15 @@ const ( BackupVault_ProvisioningState_STATUS_Updating = BackupVault_ProvisioningState_STATUS("Updating") ) +// Mapping from string to BackupVault_ProvisioningState_STATUS +var backupVault_ProvisioningState_STATUS_Values = map[string]BackupVault_ProvisioningState_STATUS{ + "failed": BackupVault_ProvisioningState_STATUS_Failed, + "provisioning": BackupVault_ProvisioningState_STATUS_Provisioning, + "succeeded": BackupVault_ProvisioningState_STATUS_Succeeded, + "unknown": BackupVault_ProvisioningState_STATUS_Unknown, + "updating": BackupVault_ProvisioningState_STATUS_Updating, +} + type BackupVault_ResourceMoveState_STATUS string const ( @@ -119,6 +128,20 @@ const ( BackupVault_ResourceMoveState_STATUS_Unknown = BackupVault_ResourceMoveState_STATUS("Unknown") ) +// Mapping from string to BackupVault_ResourceMoveState_STATUS +var backupVault_ResourceMoveState_STATUS_Values = map[string]BackupVault_ResourceMoveState_STATUS{ + "commitfailed": BackupVault_ResourceMoveState_STATUS_CommitFailed, + "committimedout": BackupVault_ResourceMoveState_STATUS_CommitTimedout, + "criticalfailure": BackupVault_ResourceMoveState_STATUS_CriticalFailure, + "failed": BackupVault_ResourceMoveState_STATUS_Failed, + "inprogress": BackupVault_ResourceMoveState_STATUS_InProgress, + "movesucceeded": BackupVault_ResourceMoveState_STATUS_MoveSucceeded, + "partialsuccess": BackupVault_ResourceMoveState_STATUS_PartialSuccess, + "preparefailed": BackupVault_ResourceMoveState_STATUS_PrepareFailed, + "preparetimedout": BackupVault_ResourceMoveState_STATUS_PrepareTimedout, + "unknown": BackupVault_ResourceMoveState_STATUS_Unknown, +} + // Class containing feature settings of vault type FeatureSettings_STATUS_ARM struct { // CrossSubscriptionRestoreSettings: CrossSubscriptionRestore Settings @@ -176,6 +199,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -185,6 +216,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Settings for Azure Monitor based alerts type AzureMonitorAlertSettings_STATUS_ARM struct { AlertsForAllJobFailures *AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS `json:"alertsForAllJobFailures,omitempty"` @@ -219,6 +258,13 @@ const ( StorageSetting_DatastoreType_STATUS_VaultStore = StorageSetting_DatastoreType_STATUS("VaultStore") ) +// Mapping from string to StorageSetting_DatastoreType_STATUS +var storageSetting_DatastoreType_STATUS_Values = map[string]StorageSetting_DatastoreType_STATUS{ + "archivestore": StorageSetting_DatastoreType_STATUS_ArchiveStore, + "operationalstore": StorageSetting_DatastoreType_STATUS_OperationalStore, + "vaultstore": StorageSetting_DatastoreType_STATUS_VaultStore, +} + type StorageSetting_Type_STATUS string const ( @@ -227,6 +273,13 @@ const ( StorageSetting_Type_STATUS_ZoneRedundant = StorageSetting_Type_STATUS("ZoneRedundant") ) +// Mapping from string to StorageSetting_Type_STATUS +var storageSetting_Type_STATUS_Values = map[string]StorageSetting_Type_STATUS{ + "georedundant": StorageSetting_Type_STATUS_GeoRedundant, + "locallyredundant": StorageSetting_Type_STATUS_LocallyRedundant, + "zoneredundant": StorageSetting_Type_STATUS_ZoneRedundant, +} + type AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS string const ( @@ -234,6 +287,12 @@ const ( AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS_Enabled = AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS("Enabled") ) +// Mapping from string to AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS +var azureMonitorAlertSettings_AlertsForAllJobFailures_STATUS_Values = map[string]AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS{ + "disabled": AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS_Disabled, + "enabled": AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS_Enabled, +} + type CrossSubscriptionRestoreSettings_State_STATUS string const ( @@ -242,6 +301,13 @@ const ( CrossSubscriptionRestoreSettings_State_STATUS_PermanentlyDisabled = CrossSubscriptionRestoreSettings_State_STATUS("PermanentlyDisabled") ) +// Mapping from string to CrossSubscriptionRestoreSettings_State_STATUS +var crossSubscriptionRestoreSettings_State_STATUS_Values = map[string]CrossSubscriptionRestoreSettings_State_STATUS{ + "disabled": CrossSubscriptionRestoreSettings_State_STATUS_Disabled, + "enabled": CrossSubscriptionRestoreSettings_State_STATUS_Enabled, + "permanentlydisabled": CrossSubscriptionRestoreSettings_State_STATUS_PermanentlyDisabled, +} + type ImmutabilitySettings_State_STATUS string const ( @@ -250,6 +316,13 @@ const ( ImmutabilitySettings_State_STATUS_Unlocked = ImmutabilitySettings_State_STATUS("Unlocked") ) +// Mapping from string to ImmutabilitySettings_State_STATUS +var immutabilitySettings_State_STATUS_Values = map[string]ImmutabilitySettings_State_STATUS{ + "disabled": ImmutabilitySettings_State_STATUS_Disabled, + "locked": ImmutabilitySettings_State_STATUS_Locked, + "unlocked": ImmutabilitySettings_State_STATUS_Unlocked, +} + type SoftDeleteSettings_State_STATUS string const ( @@ -257,3 +330,10 @@ const ( SoftDeleteSettings_State_STATUS_Off = SoftDeleteSettings_State_STATUS("Off") SoftDeleteSettings_State_STATUS_On = SoftDeleteSettings_State_STATUS("On") ) + +// Mapping from string to SoftDeleteSettings_State_STATUS +var softDeleteSettings_State_STATUS_Values = map[string]SoftDeleteSettings_State_STATUS{ + "alwayson": SoftDeleteSettings_State_STATUS_AlwaysOn, + "off": SoftDeleteSettings_State_STATUS_Off, + "on": SoftDeleteSettings_State_STATUS_On, +} diff --git a/v2/api/dataprotection/v1api20230101/backup_vault_spec_arm_types_gen.go b/v2/api/dataprotection/v1api20230101/backup_vault_spec_arm_types_gen.go index 8deb7ed0d66..1bb19fc2473 100644 --- a/v2/api/dataprotection/v1api20230101/backup_vault_spec_arm_types_gen.go +++ b/v2/api/dataprotection/v1api20230101/backup_vault_spec_arm_types_gen.go @@ -123,6 +123,13 @@ const ( StorageSetting_DatastoreType_VaultStore = StorageSetting_DatastoreType("VaultStore") ) +// Mapping from string to StorageSetting_DatastoreType +var storageSetting_DatastoreType_Values = map[string]StorageSetting_DatastoreType{ + "archivestore": StorageSetting_DatastoreType_ArchiveStore, + "operationalstore": StorageSetting_DatastoreType_OperationalStore, + "vaultstore": StorageSetting_DatastoreType_VaultStore, +} + // +kubebuilder:validation:Enum={"GeoRedundant","LocallyRedundant","ZoneRedundant"} type StorageSetting_Type string @@ -132,6 +139,13 @@ const ( StorageSetting_Type_ZoneRedundant = StorageSetting_Type("ZoneRedundant") ) +// Mapping from string to StorageSetting_Type +var storageSetting_Type_Values = map[string]StorageSetting_Type{ + "georedundant": StorageSetting_Type_GeoRedundant, + "locallyredundant": StorageSetting_Type_LocallyRedundant, + "zoneredundant": StorageSetting_Type_ZoneRedundant, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type AzureMonitorAlertSettings_AlertsForAllJobFailures string @@ -140,6 +154,12 @@ const ( AzureMonitorAlertSettings_AlertsForAllJobFailures_Enabled = AzureMonitorAlertSettings_AlertsForAllJobFailures("Enabled") ) +// Mapping from string to AzureMonitorAlertSettings_AlertsForAllJobFailures +var azureMonitorAlertSettings_AlertsForAllJobFailures_Values = map[string]AzureMonitorAlertSettings_AlertsForAllJobFailures{ + "disabled": AzureMonitorAlertSettings_AlertsForAllJobFailures_Disabled, + "enabled": AzureMonitorAlertSettings_AlertsForAllJobFailures_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled","PermanentlyDisabled"} type CrossSubscriptionRestoreSettings_State string @@ -149,6 +169,13 @@ const ( CrossSubscriptionRestoreSettings_State_PermanentlyDisabled = CrossSubscriptionRestoreSettings_State("PermanentlyDisabled") ) +// Mapping from string to CrossSubscriptionRestoreSettings_State +var crossSubscriptionRestoreSettings_State_Values = map[string]CrossSubscriptionRestoreSettings_State{ + "disabled": CrossSubscriptionRestoreSettings_State_Disabled, + "enabled": CrossSubscriptionRestoreSettings_State_Enabled, + "permanentlydisabled": CrossSubscriptionRestoreSettings_State_PermanentlyDisabled, +} + // +kubebuilder:validation:Enum={"Disabled","Locked","Unlocked"} type ImmutabilitySettings_State string @@ -158,6 +185,13 @@ const ( ImmutabilitySettings_State_Unlocked = ImmutabilitySettings_State("Unlocked") ) +// Mapping from string to ImmutabilitySettings_State +var immutabilitySettings_State_Values = map[string]ImmutabilitySettings_State{ + "disabled": ImmutabilitySettings_State_Disabled, + "locked": ImmutabilitySettings_State_Locked, + "unlocked": ImmutabilitySettings_State_Unlocked, +} + // +kubebuilder:validation:Enum={"AlwaysOn","Off","On"} type SoftDeleteSettings_State string @@ -166,3 +200,10 @@ const ( SoftDeleteSettings_State_Off = SoftDeleteSettings_State("Off") SoftDeleteSettings_State_On = SoftDeleteSettings_State("On") ) + +// Mapping from string to SoftDeleteSettings_State +var softDeleteSettings_State_Values = map[string]SoftDeleteSettings_State{ + "alwayson": SoftDeleteSettings_State_AlwaysOn, + "off": SoftDeleteSettings_State_Off, + "on": SoftDeleteSettings_State_On, +} diff --git a/v2/api/dataprotection/v1api20230101/backup_vault_types_gen.go b/v2/api/dataprotection/v1api20230101/backup_vault_types_gen.go index 4129f509d3b..028473ec68b 100644 --- a/v2/api/dataprotection/v1api20230101/backup_vault_types_gen.go +++ b/v2/api/dataprotection/v1api20230101/backup_vault_types_gen.go @@ -1131,8 +1131,9 @@ func (vault *BackupVault_STATUS) AssignProperties_From_BackupVault_STATUS(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := BackupVault_ProvisioningState_STATUS(*source.ProvisioningState) - vault.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, backupVault_ProvisioningState_STATUS_Values) + vault.ProvisioningState = &provisioningStateTemp } else { vault.ProvisioningState = nil } @@ -1151,8 +1152,9 @@ func (vault *BackupVault_STATUS) AssignProperties_From_BackupVault_STATUS(source // ResourceMoveState if source.ResourceMoveState != nil { - resourceMoveState := BackupVault_ResourceMoveState_STATUS(*source.ResourceMoveState) - vault.ResourceMoveState = &resourceMoveState + resourceMoveState := *source.ResourceMoveState + resourceMoveStateTemp := genruntime.ToEnum(resourceMoveState, backupVault_ResourceMoveState_STATUS_Values) + vault.ResourceMoveState = &resourceMoveStateTemp } else { vault.ResourceMoveState = nil } @@ -1874,8 +1876,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -1888,8 +1891,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -2830,16 +2834,18 @@ func (setting *StorageSetting) AssignProperties_From_StorageSetting(source *v202 // DatastoreType if source.DatastoreType != nil { - datastoreType := StorageSetting_DatastoreType(*source.DatastoreType) - setting.DatastoreType = &datastoreType + datastoreType := *source.DatastoreType + datastoreTypeTemp := genruntime.ToEnum(datastoreType, storageSetting_DatastoreType_Values) + setting.DatastoreType = &datastoreTypeTemp } else { setting.DatastoreType = nil } // Type if source.Type != nil { - typeVar := StorageSetting_Type(*source.Type) - setting.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, storageSetting_Type_Values) + setting.Type = &typeTemp } else { setting.Type = nil } @@ -2947,16 +2953,18 @@ func (setting *StorageSetting_STATUS) AssignProperties_From_StorageSetting_STATU // DatastoreType if source.DatastoreType != nil { - datastoreType := StorageSetting_DatastoreType_STATUS(*source.DatastoreType) - setting.DatastoreType = &datastoreType + datastoreType := *source.DatastoreType + datastoreTypeTemp := genruntime.ToEnum(datastoreType, storageSetting_DatastoreType_STATUS_Values) + setting.DatastoreType = &datastoreTypeTemp } else { setting.DatastoreType = nil } // Type if source.Type != nil { - typeVar := StorageSetting_Type_STATUS(*source.Type) - setting.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, storageSetting_Type_STATUS_Values) + setting.Type = &typeTemp } else { setting.Type = nil } @@ -3046,8 +3054,9 @@ func (settings *AzureMonitorAlertSettings) AssignProperties_From_AzureMonitorAle // AlertsForAllJobFailures if source.AlertsForAllJobFailures != nil { - alertsForAllJobFailure := AzureMonitorAlertSettings_AlertsForAllJobFailures(*source.AlertsForAllJobFailures) - settings.AlertsForAllJobFailures = &alertsForAllJobFailure + alertsForAllJobFailure := *source.AlertsForAllJobFailures + alertsForAllJobFailureTemp := genruntime.ToEnum(alertsForAllJobFailure, azureMonitorAlertSettings_AlertsForAllJobFailures_Values) + settings.AlertsForAllJobFailures = &alertsForAllJobFailureTemp } else { settings.AlertsForAllJobFailures = nil } @@ -3129,8 +3138,9 @@ func (settings *AzureMonitorAlertSettings_STATUS) AssignProperties_From_AzureMon // AlertsForAllJobFailures if source.AlertsForAllJobFailures != nil { - alertsForAllJobFailure := AzureMonitorAlertSettings_AlertsForAllJobFailures_STATUS(*source.AlertsForAllJobFailures) - settings.AlertsForAllJobFailures = &alertsForAllJobFailure + alertsForAllJobFailure := *source.AlertsForAllJobFailures + alertsForAllJobFailureTemp := genruntime.ToEnum(alertsForAllJobFailure, azureMonitorAlertSettings_AlertsForAllJobFailures_STATUS_Values) + settings.AlertsForAllJobFailures = &alertsForAllJobFailureTemp } else { settings.AlertsForAllJobFailures = nil } @@ -3213,8 +3223,9 @@ func (settings *CrossSubscriptionRestoreSettings) AssignProperties_From_CrossSub // State if source.State != nil { - state := CrossSubscriptionRestoreSettings_State(*source.State) - settings.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, crossSubscriptionRestoreSettings_State_Values) + settings.State = &stateTemp } else { settings.State = nil } @@ -3297,8 +3308,9 @@ func (settings *CrossSubscriptionRestoreSettings_STATUS) AssignProperties_From_C // State if source.State != nil { - state := CrossSubscriptionRestoreSettings_State_STATUS(*source.State) - settings.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, crossSubscriptionRestoreSettings_State_STATUS_Values) + settings.State = &stateTemp } else { settings.State = nil } @@ -3381,8 +3393,9 @@ func (settings *ImmutabilitySettings) AssignProperties_From_ImmutabilitySettings // State if source.State != nil { - state := ImmutabilitySettings_State(*source.State) - settings.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, immutabilitySettings_State_Values) + settings.State = &stateTemp } else { settings.State = nil } @@ -3465,8 +3478,9 @@ func (settings *ImmutabilitySettings_STATUS) AssignProperties_From_ImmutabilityS // State if source.State != nil { - state := ImmutabilitySettings_State_STATUS(*source.State) - settings.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, immutabilitySettings_State_STATUS_Values) + settings.State = &stateTemp } else { settings.State = nil } @@ -3572,8 +3586,9 @@ func (settings *SoftDeleteSettings) AssignProperties_From_SoftDeleteSettings(sou // State if source.State != nil { - state := SoftDeleteSettings_State(*source.State) - settings.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, softDeleteSettings_State_Values) + settings.State = &stateTemp } else { settings.State = nil } @@ -3689,8 +3704,9 @@ func (settings *SoftDeleteSettings_STATUS) AssignProperties_From_SoftDeleteSetti // State if source.State != nil { - state := SoftDeleteSettings_State_STATUS(*source.State) - settings.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, softDeleteSettings_State_STATUS_Values) + settings.State = &stateTemp } else { settings.State = nil } diff --git a/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_spec_arm_types_gen.go b/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_spec_arm_types_gen.go index 5cdc4ccfc64..c7c7aa18bb2 100644 --- a/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_spec_arm_types_gen.go +++ b/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_spec_arm_types_gen.go @@ -76,6 +76,11 @@ type BackupPolicy_ObjectType string const BackupPolicy_ObjectType_BackupPolicy = BackupPolicy_ObjectType("BackupPolicy") +// Mapping from string to BackupPolicy_ObjectType +var backupPolicy_ObjectType_Values = map[string]BackupPolicy_ObjectType{ + "backuppolicy": BackupPolicy_ObjectType_BackupPolicy, +} + type BasePolicyRule_ARM struct { // AzureBackup: Mutually exclusive with all other properties AzureBackup *AzureBackupRule_ARM `json:"azureBackupRule,omitempty"` @@ -138,11 +143,21 @@ type AzureBackupRule_ObjectType string const AzureBackupRule_ObjectType_AzureBackupRule = AzureBackupRule_ObjectType("AzureBackupRule") +// Mapping from string to AzureBackupRule_ObjectType +var azureBackupRule_ObjectType_Values = map[string]AzureBackupRule_ObjectType{ + "azurebackuprule": AzureBackupRule_ObjectType_AzureBackupRule, +} + // +kubebuilder:validation:Enum={"AzureRetentionRule"} type AzureRetentionRule_ObjectType string const AzureRetentionRule_ObjectType_AzureRetentionRule = AzureRetentionRule_ObjectType("AzureRetentionRule") +// Mapping from string to AzureRetentionRule_ObjectType +var azureRetentionRule_ObjectType_Values = map[string]AzureRetentionRule_ObjectType{ + "azureretentionrule": AzureRetentionRule_ObjectType_AzureRetentionRule, +} + type BackupParameters_ARM struct { // AzureBackupParams: Mutually exclusive with all other properties AzureBackupParams *AzureBackupParams_ARM `json:"azureBackupParams,omitempty"` @@ -256,6 +271,13 @@ const ( DataStoreInfoBase_DataStoreType_VaultStore = DataStoreInfoBase_DataStoreType("VaultStore") ) +// Mapping from string to DataStoreInfoBase_DataStoreType +var dataStoreInfoBase_DataStoreType_Values = map[string]DataStoreInfoBase_DataStoreType{ + "archivestore": DataStoreInfoBase_DataStoreType_ArchiveStore, + "operationalstore": DataStoreInfoBase_DataStoreType_OperationalStore, + "vaultstore": DataStoreInfoBase_DataStoreType_VaultStore, +} + type DeleteOption_ARM struct { // AbsoluteDeleteOption: Mutually exclusive with all other properties AbsoluteDeleteOption *AbsoluteDeleteOption_ARM `json:"absoluteDeleteOption,omitempty"` @@ -325,11 +347,21 @@ type AdhocBasedTriggerContext_ObjectType string const AdhocBasedTriggerContext_ObjectType_AdhocBasedTriggerContext = AdhocBasedTriggerContext_ObjectType("AdhocBasedTriggerContext") +// Mapping from string to AdhocBasedTriggerContext_ObjectType +var adhocBasedTriggerContext_ObjectType_Values = map[string]AdhocBasedTriggerContext_ObjectType{ + "adhocbasedtriggercontext": AdhocBasedTriggerContext_ObjectType_AdhocBasedTriggerContext, +} + // +kubebuilder:validation:Enum={"AzureBackupParams"} type AzureBackupParams_ObjectType string const AzureBackupParams_ObjectType_AzureBackupParams = AzureBackupParams_ObjectType("AzureBackupParams") +// Mapping from string to AzureBackupParams_ObjectType +var azureBackupParams_ObjectType_Values = map[string]AzureBackupParams_ObjectType{ + "azurebackupparams": AzureBackupParams_ObjectType_AzureBackupParams, +} + // Schedule for backup type BackupSchedule_ARM struct { // RepeatingTimeIntervals: ISO 8601 repeating time interval format @@ -394,6 +426,11 @@ type ScheduleBasedTriggerContext_ObjectType string const ScheduleBasedTriggerContext_ObjectType_ScheduleBasedTriggerContext = ScheduleBasedTriggerContext_ObjectType("ScheduleBasedTriggerContext") +// Mapping from string to ScheduleBasedTriggerContext_ObjectType +var scheduleBasedTriggerContext_ObjectType_Values = map[string]ScheduleBasedTriggerContext_ObjectType{ + "schedulebasedtriggercontext": ScheduleBasedTriggerContext_ObjectType_ScheduleBasedTriggerContext, +} + // Tagging criteria type TaggingCriteria_ARM struct { // Criteria: Criteria which decides whether the tag can be applied to a triggered backup. @@ -414,6 +451,11 @@ type AbsoluteDeleteOption_ObjectType string const AbsoluteDeleteOption_ObjectType_AbsoluteDeleteOption = AbsoluteDeleteOption_ObjectType("AbsoluteDeleteOption") +// Mapping from string to AbsoluteDeleteOption_ObjectType +var absoluteDeleteOption_ObjectType_Values = map[string]AbsoluteDeleteOption_ObjectType{ + "absolutedeleteoption": AbsoluteDeleteOption_ObjectType_AbsoluteDeleteOption, +} + type BackupCriteria_ARM struct { // ScheduleBasedBackupCriteria: Mutually exclusive with all other properties ScheduleBasedBackupCriteria *ScheduleBasedBackupCriteria_ARM `json:"scheduleBasedBackupCriteria,omitempty"` @@ -473,16 +515,31 @@ type CopyOnExpiryOption_ObjectType string const CopyOnExpiryOption_ObjectType_CopyOnExpiryOption = CopyOnExpiryOption_ObjectType("CopyOnExpiryOption") +// Mapping from string to CopyOnExpiryOption_ObjectType +var copyOnExpiryOption_ObjectType_Values = map[string]CopyOnExpiryOption_ObjectType{ + "copyonexpiryoption": CopyOnExpiryOption_ObjectType_CopyOnExpiryOption, +} + // +kubebuilder:validation:Enum={"CustomCopyOption"} type CustomCopyOption_ObjectType string const CustomCopyOption_ObjectType_CustomCopyOption = CustomCopyOption_ObjectType("CustomCopyOption") +// Mapping from string to CustomCopyOption_ObjectType +var customCopyOption_ObjectType_Values = map[string]CustomCopyOption_ObjectType{ + "customcopyoption": CustomCopyOption_ObjectType_CustomCopyOption, +} + // +kubebuilder:validation:Enum={"ImmediateCopyOption"} type ImmediateCopyOption_ObjectType string const ImmediateCopyOption_ObjectType_ImmediateCopyOption = ImmediateCopyOption_ObjectType("ImmediateCopyOption") +// Mapping from string to ImmediateCopyOption_ObjectType +var immediateCopyOption_ObjectType_Values = map[string]ImmediateCopyOption_ObjectType{ + "immediatecopyoption": ImmediateCopyOption_ObjectType_ImmediateCopyOption, +} + type ScheduleBasedBackupCriteria_ARM struct { // AbsoluteCriteria: it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" // and should be part of AbsoluteMarker enum @@ -527,6 +584,15 @@ const ( ScheduleBasedBackupCriteria_AbsoluteCriteria_FirstOfYear = ScheduleBasedBackupCriteria_AbsoluteCriteria("FirstOfYear") ) +// Mapping from string to ScheduleBasedBackupCriteria_AbsoluteCriteria +var scheduleBasedBackupCriteria_AbsoluteCriteria_Values = map[string]ScheduleBasedBackupCriteria_AbsoluteCriteria{ + "allbackup": ScheduleBasedBackupCriteria_AbsoluteCriteria_AllBackup, + "firstofday": ScheduleBasedBackupCriteria_AbsoluteCriteria_FirstOfDay, + "firstofmonth": ScheduleBasedBackupCriteria_AbsoluteCriteria_FirstOfMonth, + "firstofweek": ScheduleBasedBackupCriteria_AbsoluteCriteria_FirstOfWeek, + "firstofyear": ScheduleBasedBackupCriteria_AbsoluteCriteria_FirstOfYear, +} + // +kubebuilder:validation:Enum={"Friday","Monday","Saturday","Sunday","Thursday","Tuesday","Wednesday"} type ScheduleBasedBackupCriteria_DaysOfTheWeek string @@ -540,6 +606,17 @@ const ( ScheduleBasedBackupCriteria_DaysOfTheWeek_Wednesday = ScheduleBasedBackupCriteria_DaysOfTheWeek("Wednesday") ) +// Mapping from string to ScheduleBasedBackupCriteria_DaysOfTheWeek +var scheduleBasedBackupCriteria_DaysOfTheWeek_Values = map[string]ScheduleBasedBackupCriteria_DaysOfTheWeek{ + "friday": ScheduleBasedBackupCriteria_DaysOfTheWeek_Friday, + "monday": ScheduleBasedBackupCriteria_DaysOfTheWeek_Monday, + "saturday": ScheduleBasedBackupCriteria_DaysOfTheWeek_Saturday, + "sunday": ScheduleBasedBackupCriteria_DaysOfTheWeek_Sunday, + "thursday": ScheduleBasedBackupCriteria_DaysOfTheWeek_Thursday, + "tuesday": ScheduleBasedBackupCriteria_DaysOfTheWeek_Tuesday, + "wednesday": ScheduleBasedBackupCriteria_DaysOfTheWeek_Wednesday, +} + // +kubebuilder:validation:Enum={"April","August","December","February","January","July","June","March","May","November","October","September"} type ScheduleBasedBackupCriteria_MonthsOfYear string @@ -558,11 +635,32 @@ const ( ScheduleBasedBackupCriteria_MonthsOfYear_September = ScheduleBasedBackupCriteria_MonthsOfYear("September") ) +// Mapping from string to ScheduleBasedBackupCriteria_MonthsOfYear +var scheduleBasedBackupCriteria_MonthsOfYear_Values = map[string]ScheduleBasedBackupCriteria_MonthsOfYear{ + "april": ScheduleBasedBackupCriteria_MonthsOfYear_April, + "august": ScheduleBasedBackupCriteria_MonthsOfYear_August, + "december": ScheduleBasedBackupCriteria_MonthsOfYear_December, + "february": ScheduleBasedBackupCriteria_MonthsOfYear_February, + "january": ScheduleBasedBackupCriteria_MonthsOfYear_January, + "july": ScheduleBasedBackupCriteria_MonthsOfYear_July, + "june": ScheduleBasedBackupCriteria_MonthsOfYear_June, + "march": ScheduleBasedBackupCriteria_MonthsOfYear_March, + "may": ScheduleBasedBackupCriteria_MonthsOfYear_May, + "november": ScheduleBasedBackupCriteria_MonthsOfYear_November, + "october": ScheduleBasedBackupCriteria_MonthsOfYear_October, + "september": ScheduleBasedBackupCriteria_MonthsOfYear_September, +} + // +kubebuilder:validation:Enum={"ScheduleBasedBackupCriteria"} type ScheduleBasedBackupCriteria_ObjectType string const ScheduleBasedBackupCriteria_ObjectType_ScheduleBasedBackupCriteria = ScheduleBasedBackupCriteria_ObjectType("ScheduleBasedBackupCriteria") +// Mapping from string to ScheduleBasedBackupCriteria_ObjectType +var scheduleBasedBackupCriteria_ObjectType_Values = map[string]ScheduleBasedBackupCriteria_ObjectType{ + "schedulebasedbackupcriteria": ScheduleBasedBackupCriteria_ObjectType_ScheduleBasedBackupCriteria, +} + // +kubebuilder:validation:Enum={"First","Fourth","Last","Second","Third"} type ScheduleBasedBackupCriteria_WeeksOfTheMonth string @@ -573,3 +671,12 @@ const ( ScheduleBasedBackupCriteria_WeeksOfTheMonth_Second = ScheduleBasedBackupCriteria_WeeksOfTheMonth("Second") ScheduleBasedBackupCriteria_WeeksOfTheMonth_Third = ScheduleBasedBackupCriteria_WeeksOfTheMonth("Third") ) + +// Mapping from string to ScheduleBasedBackupCriteria_WeeksOfTheMonth +var scheduleBasedBackupCriteria_WeeksOfTheMonth_Values = map[string]ScheduleBasedBackupCriteria_WeeksOfTheMonth{ + "first": ScheduleBasedBackupCriteria_WeeksOfTheMonth_First, + "fourth": ScheduleBasedBackupCriteria_WeeksOfTheMonth_Fourth, + "last": ScheduleBasedBackupCriteria_WeeksOfTheMonth_Last, + "second": ScheduleBasedBackupCriteria_WeeksOfTheMonth_Second, + "third": ScheduleBasedBackupCriteria_WeeksOfTheMonth_Third, +} diff --git a/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_status_arm_types_gen.go b/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_status_arm_types_gen.go index bf229aecd36..a7ba7fdcb66 100644 --- a/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_status_arm_types_gen.go +++ b/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_status_arm_types_gen.go @@ -65,6 +65,11 @@ type BackupPolicy_ObjectType_STATUS string const BackupPolicy_ObjectType_STATUS_BackupPolicy = BackupPolicy_ObjectType_STATUS("BackupPolicy") +// Mapping from string to BackupPolicy_ObjectType_STATUS +var backupPolicy_ObjectType_STATUS_Values = map[string]BackupPolicy_ObjectType_STATUS{ + "backuppolicy": BackupPolicy_ObjectType_STATUS_BackupPolicy, +} + type BasePolicyRule_STATUS_ARM struct { // AzureBackup: Mutually exclusive with all other properties AzureBackup *AzureBackupRule_STATUS_ARM `json:"azureBackupRule,omitempty"` @@ -126,10 +131,20 @@ type AzureBackupRule_ObjectType_STATUS string const AzureBackupRule_ObjectType_STATUS_AzureBackupRule = AzureBackupRule_ObjectType_STATUS("AzureBackupRule") +// Mapping from string to AzureBackupRule_ObjectType_STATUS +var azureBackupRule_ObjectType_STATUS_Values = map[string]AzureBackupRule_ObjectType_STATUS{ + "azurebackuprule": AzureBackupRule_ObjectType_STATUS_AzureBackupRule, +} + type AzureRetentionRule_ObjectType_STATUS string const AzureRetentionRule_ObjectType_STATUS_AzureRetentionRule = AzureRetentionRule_ObjectType_STATUS("AzureRetentionRule") +// Mapping from string to AzureRetentionRule_ObjectType_STATUS +var azureRetentionRule_ObjectType_STATUS_Values = map[string]AzureRetentionRule_ObjectType_STATUS{ + "azureretentionrule": AzureRetentionRule_ObjectType_STATUS_AzureRetentionRule, +} + type BackupParameters_STATUS_ARM struct { // AzureBackupParams: Mutually exclusive with all other properties AzureBackupParams *AzureBackupParams_STATUS_ARM `json:"azureBackupParams,omitempty"` @@ -242,6 +257,13 @@ const ( DataStoreInfoBase_DataStoreType_STATUS_VaultStore = DataStoreInfoBase_DataStoreType_STATUS("VaultStore") ) +// Mapping from string to DataStoreInfoBase_DataStoreType_STATUS +var dataStoreInfoBase_DataStoreType_STATUS_Values = map[string]DataStoreInfoBase_DataStoreType_STATUS{ + "archivestore": DataStoreInfoBase_DataStoreType_STATUS_ArchiveStore, + "operationalstore": DataStoreInfoBase_DataStoreType_STATUS_OperationalStore, + "vaultstore": DataStoreInfoBase_DataStoreType_STATUS_VaultStore, +} + type DeleteOption_STATUS_ARM struct { // AbsoluteDeleteOption: Mutually exclusive with all other properties AbsoluteDeleteOption *AbsoluteDeleteOption_STATUS_ARM `json:"absoluteDeleteOption,omitempty"` @@ -310,10 +332,20 @@ type AdhocBasedTriggerContext_ObjectType_STATUS string const AdhocBasedTriggerContext_ObjectType_STATUS_AdhocBasedTriggerContext = AdhocBasedTriggerContext_ObjectType_STATUS("AdhocBasedTriggerContext") +// Mapping from string to AdhocBasedTriggerContext_ObjectType_STATUS +var adhocBasedTriggerContext_ObjectType_STATUS_Values = map[string]AdhocBasedTriggerContext_ObjectType_STATUS{ + "adhocbasedtriggercontext": AdhocBasedTriggerContext_ObjectType_STATUS_AdhocBasedTriggerContext, +} + type AzureBackupParams_ObjectType_STATUS string const AzureBackupParams_ObjectType_STATUS_AzureBackupParams = AzureBackupParams_ObjectType_STATUS("AzureBackupParams") +// Mapping from string to AzureBackupParams_ObjectType_STATUS +var azureBackupParams_ObjectType_STATUS_Values = map[string]AzureBackupParams_ObjectType_STATUS{ + "azurebackupparams": AzureBackupParams_ObjectType_STATUS_AzureBackupParams, +} + // Schedule for backup type BackupSchedule_STATUS_ARM struct { // RepeatingTimeIntervals: ISO 8601 repeating time interval format @@ -377,6 +409,11 @@ type ScheduleBasedTriggerContext_ObjectType_STATUS string const ScheduleBasedTriggerContext_ObjectType_STATUS_ScheduleBasedTriggerContext = ScheduleBasedTriggerContext_ObjectType_STATUS("ScheduleBasedTriggerContext") +// Mapping from string to ScheduleBasedTriggerContext_ObjectType_STATUS +var scheduleBasedTriggerContext_ObjectType_STATUS_Values = map[string]ScheduleBasedTriggerContext_ObjectType_STATUS{ + "schedulebasedtriggercontext": ScheduleBasedTriggerContext_ObjectType_STATUS_ScheduleBasedTriggerContext, +} + // Tagging criteria type TaggingCriteria_STATUS_ARM struct { // Criteria: Criteria which decides whether the tag can be applied to a triggered backup. @@ -396,6 +433,11 @@ type AbsoluteDeleteOption_ObjectType_STATUS string const AbsoluteDeleteOption_ObjectType_STATUS_AbsoluteDeleteOption = AbsoluteDeleteOption_ObjectType_STATUS("AbsoluteDeleteOption") +// Mapping from string to AbsoluteDeleteOption_ObjectType_STATUS +var absoluteDeleteOption_ObjectType_STATUS_Values = map[string]AbsoluteDeleteOption_ObjectType_STATUS{ + "absolutedeleteoption": AbsoluteDeleteOption_ObjectType_STATUS_AbsoluteDeleteOption, +} + type BackupCriteria_STATUS_ARM struct { // ScheduleBasedBackupCriteria: Mutually exclusive with all other properties ScheduleBasedBackupCriteria *ScheduleBasedBackupCriteria_STATUS_ARM `json:"scheduleBasedBackupCriteria,omitempty"` @@ -460,14 +502,29 @@ type CopyOnExpiryOption_ObjectType_STATUS string const CopyOnExpiryOption_ObjectType_STATUS_CopyOnExpiryOption = CopyOnExpiryOption_ObjectType_STATUS("CopyOnExpiryOption") +// Mapping from string to CopyOnExpiryOption_ObjectType_STATUS +var copyOnExpiryOption_ObjectType_STATUS_Values = map[string]CopyOnExpiryOption_ObjectType_STATUS{ + "copyonexpiryoption": CopyOnExpiryOption_ObjectType_STATUS_CopyOnExpiryOption, +} + type CustomCopyOption_ObjectType_STATUS string const CustomCopyOption_ObjectType_STATUS_CustomCopyOption = CustomCopyOption_ObjectType_STATUS("CustomCopyOption") +// Mapping from string to CustomCopyOption_ObjectType_STATUS +var customCopyOption_ObjectType_STATUS_Values = map[string]CustomCopyOption_ObjectType_STATUS{ + "customcopyoption": CustomCopyOption_ObjectType_STATUS_CustomCopyOption, +} + type ImmediateCopyOption_ObjectType_STATUS string const ImmediateCopyOption_ObjectType_STATUS_ImmediateCopyOption = ImmediateCopyOption_ObjectType_STATUS("ImmediateCopyOption") +// Mapping from string to ImmediateCopyOption_ObjectType_STATUS +var immediateCopyOption_ObjectType_STATUS_Values = map[string]ImmediateCopyOption_ObjectType_STATUS{ + "immediatecopyoption": ImmediateCopyOption_ObjectType_STATUS_ImmediateCopyOption, +} + type ScheduleBasedBackupCriteria_STATUS_ARM struct { // AbsoluteCriteria: it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" // and should be part of AbsoluteMarker enum @@ -511,6 +568,15 @@ const ( ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS_FirstOfYear = ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS("FirstOfYear") ) +// Mapping from string to ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS +var scheduleBasedBackupCriteria_AbsoluteCriteria_STATUS_Values = map[string]ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS{ + "allbackup": ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS_AllBackup, + "firstofday": ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS_FirstOfDay, + "firstofmonth": ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS_FirstOfMonth, + "firstofweek": ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS_FirstOfWeek, + "firstofyear": ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS_FirstOfYear, +} + type ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS string const ( @@ -523,6 +589,17 @@ const ( ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Wednesday = ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS("Wednesday") ) +// Mapping from string to ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS +var scheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Values = map[string]ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS{ + "friday": ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Friday, + "monday": ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Monday, + "saturday": ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Saturday, + "sunday": ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Sunday, + "thursday": ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Thursday, + "tuesday": ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Tuesday, + "wednesday": ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Wednesday, +} + type ScheduleBasedBackupCriteria_MonthsOfYear_STATUS string const ( @@ -540,10 +617,31 @@ const ( ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_September = ScheduleBasedBackupCriteria_MonthsOfYear_STATUS("September") ) +// Mapping from string to ScheduleBasedBackupCriteria_MonthsOfYear_STATUS +var scheduleBasedBackupCriteria_MonthsOfYear_STATUS_Values = map[string]ScheduleBasedBackupCriteria_MonthsOfYear_STATUS{ + "april": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_April, + "august": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_August, + "december": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_December, + "february": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_February, + "january": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_January, + "july": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_July, + "june": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_June, + "march": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_March, + "may": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_May, + "november": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_November, + "october": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_October, + "september": ScheduleBasedBackupCriteria_MonthsOfYear_STATUS_September, +} + type ScheduleBasedBackupCriteria_ObjectType_STATUS string const ScheduleBasedBackupCriteria_ObjectType_STATUS_ScheduleBasedBackupCriteria = ScheduleBasedBackupCriteria_ObjectType_STATUS("ScheduleBasedBackupCriteria") +// Mapping from string to ScheduleBasedBackupCriteria_ObjectType_STATUS +var scheduleBasedBackupCriteria_ObjectType_STATUS_Values = map[string]ScheduleBasedBackupCriteria_ObjectType_STATUS{ + "schedulebasedbackupcriteria": ScheduleBasedBackupCriteria_ObjectType_STATUS_ScheduleBasedBackupCriteria, +} + type ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS string const ( @@ -553,3 +651,12 @@ const ( ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_Second = ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS("Second") ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_Third = ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS("Third") ) + +// Mapping from string to ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS +var scheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_Values = map[string]ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS{ + "first": ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_First, + "fourth": ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_Fourth, + "last": ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_Last, + "second": ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_Second, + "third": ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_Third, +} diff --git a/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_types_gen.go b/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_types_gen.go index 79f52160369..ac734b8cb3f 100644 --- a/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_types_gen.go +++ b/v2/api/dataprotection/v1api20230101/backup_vaults_backup_policy_types_gen.go @@ -1060,8 +1060,9 @@ func (policy *BackupPolicy) AssignProperties_From_BackupPolicy(source *v20230101 // ObjectType if source.ObjectType != nil { - objectType := BackupPolicy_ObjectType(*source.ObjectType) - policy.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, backupPolicy_ObjectType_Values) + policy.ObjectType = &objectTypeTemp } else { policy.ObjectType = nil } @@ -1222,8 +1223,9 @@ func (policy *BackupPolicy_STATUS) AssignProperties_From_BackupPolicy_STATUS(sou // ObjectType if source.ObjectType != nil { - objectType := BackupPolicy_ObjectType_STATUS(*source.ObjectType) - policy.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, backupPolicy_ObjectType_STATUS_Values) + policy.ObjectType = &objectTypeTemp } else { policy.ObjectType = nil } @@ -1752,8 +1754,9 @@ func (rule *AzureBackupRule) AssignProperties_From_AzureBackupRule(source *v2023 // ObjectType if source.ObjectType != nil { - objectType := AzureBackupRule_ObjectType(*source.ObjectType) - rule.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, azureBackupRule_ObjectType_Values) + rule.ObjectType = &objectTypeTemp } else { rule.ObjectType = nil } @@ -1993,8 +1996,9 @@ func (rule *AzureBackupRule_STATUS) AssignProperties_From_AzureBackupRule_STATUS // ObjectType if source.ObjectType != nil { - objectType := AzureBackupRule_ObjectType_STATUS(*source.ObjectType) - rule.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, azureBackupRule_ObjectType_STATUS_Values) + rule.ObjectType = &objectTypeTemp } else { rule.ObjectType = nil } @@ -2203,8 +2207,9 @@ func (rule *AzureRetentionRule) AssignProperties_From_AzureRetentionRule(source // ObjectType if source.ObjectType != nil { - objectType := AzureRetentionRule_ObjectType(*source.ObjectType) - rule.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, azureRetentionRule_ObjectType_Values) + rule.ObjectType = &objectTypeTemp } else { rule.ObjectType = nil } @@ -2394,8 +2399,9 @@ func (rule *AzureRetentionRule_STATUS) AssignProperties_From_AzureRetentionRule_ // ObjectType if source.ObjectType != nil { - objectType := AzureRetentionRule_ObjectType_STATUS(*source.ObjectType) - rule.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, azureRetentionRule_ObjectType_STATUS_Values) + rule.ObjectType = &objectTypeTemp } else { rule.ObjectType = nil } @@ -2724,8 +2730,9 @@ func (base *DataStoreInfoBase) AssignProperties_From_DataStoreInfoBase(source *v // DataStoreType if source.DataStoreType != nil { - dataStoreType := DataStoreInfoBase_DataStoreType(*source.DataStoreType) - base.DataStoreType = &dataStoreType + dataStoreType := *source.DataStoreType + dataStoreTypeTemp := genruntime.ToEnum(dataStoreType, dataStoreInfoBase_DataStoreType_Values) + base.DataStoreType = &dataStoreTypeTemp } else { base.DataStoreType = nil } @@ -2826,8 +2833,9 @@ func (base *DataStoreInfoBase_STATUS) AssignProperties_From_DataStoreInfoBase_ST // DataStoreType if source.DataStoreType != nil { - dataStoreType := DataStoreInfoBase_DataStoreType_STATUS(*source.DataStoreType) - base.DataStoreType = &dataStoreType + dataStoreType := *source.DataStoreType + dataStoreTypeTemp := genruntime.ToEnum(dataStoreType, dataStoreInfoBase_DataStoreType_STATUS_Values) + base.DataStoreType = &dataStoreTypeTemp } else { base.DataStoreType = nil } @@ -3656,8 +3664,9 @@ func (context *AdhocBasedTriggerContext) AssignProperties_From_AdhocBasedTrigger // ObjectType if source.ObjectType != nil { - objectType := AdhocBasedTriggerContext_ObjectType(*source.ObjectType) - context.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, adhocBasedTriggerContext_ObjectType_Values) + context.ObjectType = &objectTypeTemp } else { context.ObjectType = nil } @@ -3786,8 +3795,9 @@ func (context *AdhocBasedTriggerContext_STATUS) AssignProperties_From_AdhocBased // ObjectType if source.ObjectType != nil { - objectType := AdhocBasedTriggerContext_ObjectType_STATUS(*source.ObjectType) - context.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, adhocBasedTriggerContext_ObjectType_STATUS_Values) + context.ObjectType = &objectTypeTemp } else { context.ObjectType = nil } @@ -3909,8 +3919,9 @@ func (params *AzureBackupParams) AssignProperties_From_AzureBackupParams(source // ObjectType if source.ObjectType != nil { - objectType := AzureBackupParams_ObjectType(*source.ObjectType) - params.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, azureBackupParams_ObjectType_Values) + params.ObjectType = &objectTypeTemp } else { params.ObjectType = nil } @@ -4007,8 +4018,9 @@ func (params *AzureBackupParams_STATUS) AssignProperties_From_AzureBackupParams_ // ObjectType if source.ObjectType != nil { - objectType := AzureBackupParams_ObjectType_STATUS(*source.ObjectType) - params.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, azureBackupParams_ObjectType_STATUS_Values) + params.ObjectType = &objectTypeTemp } else { params.ObjectType = nil } @@ -4338,8 +4350,9 @@ func (context *ScheduleBasedTriggerContext) AssignProperties_From_ScheduleBasedT // ObjectType if source.ObjectType != nil { - objectType := ScheduleBasedTriggerContext_ObjectType(*source.ObjectType) - context.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, scheduleBasedTriggerContext_ObjectType_Values) + context.ObjectType = &objectTypeTemp } else { context.ObjectType = nil } @@ -4535,8 +4548,9 @@ func (context *ScheduleBasedTriggerContext_STATUS) AssignProperties_From_Schedul // ObjectType if source.ObjectType != nil { - objectType := ScheduleBasedTriggerContext_ObjectType_STATUS(*source.ObjectType) - context.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, scheduleBasedTriggerContext_ObjectType_STATUS_Values) + context.ObjectType = &objectTypeTemp } else { context.ObjectType = nil } @@ -4996,8 +5010,9 @@ func (option *AbsoluteDeleteOption) AssignProperties_From_AbsoluteDeleteOption(s // ObjectType if source.ObjectType != nil { - objectType := AbsoluteDeleteOption_ObjectType(*source.ObjectType) - option.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, absoluteDeleteOption_ObjectType_Values) + option.ObjectType = &objectTypeTemp } else { option.ObjectType = nil } @@ -5094,8 +5109,9 @@ func (option *AbsoluteDeleteOption_STATUS) AssignProperties_From_AbsoluteDeleteO // ObjectType if source.ObjectType != nil { - objectType := AbsoluteDeleteOption_ObjectType_STATUS(*source.ObjectType) - option.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, absoluteDeleteOption_ObjectType_STATUS_Values) + option.ObjectType = &objectTypeTemp } else { option.ObjectType = nil } @@ -6588,8 +6604,9 @@ func (option *CopyOnExpiryOption) AssignProperties_From_CopyOnExpiryOption(sourc // ObjectType if source.ObjectType != nil { - objectType := CopyOnExpiryOption_ObjectType(*source.ObjectType) - option.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, copyOnExpiryOption_ObjectType_Values) + option.ObjectType = &objectTypeTemp } else { option.ObjectType = nil } @@ -6668,8 +6685,9 @@ func (option *CopyOnExpiryOption_STATUS) AssignProperties_From_CopyOnExpiryOptio // ObjectType if source.ObjectType != nil { - objectType := CopyOnExpiryOption_ObjectType_STATUS(*source.ObjectType) - option.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, copyOnExpiryOption_ObjectType_STATUS_Values) + option.ObjectType = &objectTypeTemp } else { option.ObjectType = nil } @@ -6766,8 +6784,9 @@ func (option *CustomCopyOption) AssignProperties_From_CustomCopyOption(source *v // ObjectType if source.ObjectType != nil { - objectType := CustomCopyOption_ObjectType(*source.ObjectType) - option.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, customCopyOption_ObjectType_Values) + option.ObjectType = &objectTypeTemp } else { option.ObjectType = nil } @@ -6864,8 +6883,9 @@ func (option *CustomCopyOption_STATUS) AssignProperties_From_CustomCopyOption_ST // ObjectType if source.ObjectType != nil { - objectType := CustomCopyOption_ObjectType_STATUS(*source.ObjectType) - option.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, customCopyOption_ObjectType_STATUS_Values) + option.ObjectType = &objectTypeTemp } else { option.ObjectType = nil } @@ -6947,8 +6967,9 @@ func (option *ImmediateCopyOption) AssignProperties_From_ImmediateCopyOption(sou // ObjectType if source.ObjectType != nil { - objectType := ImmediateCopyOption_ObjectType(*source.ObjectType) - option.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, immediateCopyOption_ObjectType_Values) + option.ObjectType = &objectTypeTemp } else { option.ObjectType = nil } @@ -7027,8 +7048,9 @@ func (option *ImmediateCopyOption_STATUS) AssignProperties_From_ImmediateCopyOpt // ObjectType if source.ObjectType != nil { - objectType := ImmediateCopyOption_ObjectType_STATUS(*source.ObjectType) - option.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, immediateCopyOption_ObjectType_STATUS_Values) + option.ObjectType = &objectTypeTemp } else { option.ObjectType = nil } @@ -7373,7 +7395,7 @@ func (criteria *ScheduleBasedBackupCriteria) AssignProperties_From_ScheduleBased for absoluteCriterionIndex, absoluteCriterionItem := range source.AbsoluteCriteria { // Shadow the loop variable to avoid aliasing absoluteCriterionItem := absoluteCriterionItem - absoluteCriterionList[absoluteCriterionIndex] = ScheduleBasedBackupCriteria_AbsoluteCriteria(absoluteCriterionItem) + absoluteCriterionList[absoluteCriterionIndex] = genruntime.ToEnum(absoluteCriterionItem, scheduleBasedBackupCriteria_AbsoluteCriteria_Values) } criteria.AbsoluteCriteria = absoluteCriterionList } else { @@ -7404,7 +7426,7 @@ func (criteria *ScheduleBasedBackupCriteria) AssignProperties_From_ScheduleBased for daysOfTheWeekIndex, daysOfTheWeekItem := range source.DaysOfTheWeek { // Shadow the loop variable to avoid aliasing daysOfTheWeekItem := daysOfTheWeekItem - daysOfTheWeekList[daysOfTheWeekIndex] = ScheduleBasedBackupCriteria_DaysOfTheWeek(daysOfTheWeekItem) + daysOfTheWeekList[daysOfTheWeekIndex] = genruntime.ToEnum(daysOfTheWeekItem, scheduleBasedBackupCriteria_DaysOfTheWeek_Values) } criteria.DaysOfTheWeek = daysOfTheWeekList } else { @@ -7417,7 +7439,7 @@ func (criteria *ScheduleBasedBackupCriteria) AssignProperties_From_ScheduleBased for monthsOfYearIndex, monthsOfYearItem := range source.MonthsOfYear { // Shadow the loop variable to avoid aliasing monthsOfYearItem := monthsOfYearItem - monthsOfYearList[monthsOfYearIndex] = ScheduleBasedBackupCriteria_MonthsOfYear(monthsOfYearItem) + monthsOfYearList[monthsOfYearIndex] = genruntime.ToEnum(monthsOfYearItem, scheduleBasedBackupCriteria_MonthsOfYear_Values) } criteria.MonthsOfYear = monthsOfYearList } else { @@ -7426,8 +7448,9 @@ func (criteria *ScheduleBasedBackupCriteria) AssignProperties_From_ScheduleBased // ObjectType if source.ObjectType != nil { - objectType := ScheduleBasedBackupCriteria_ObjectType(*source.ObjectType) - criteria.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, scheduleBasedBackupCriteria_ObjectType_Values) + criteria.ObjectType = &objectTypeTemp } else { criteria.ObjectType = nil } @@ -7441,7 +7464,7 @@ func (criteria *ScheduleBasedBackupCriteria) AssignProperties_From_ScheduleBased for weeksOfTheMonthIndex, weeksOfTheMonthItem := range source.WeeksOfTheMonth { // Shadow the loop variable to avoid aliasing weeksOfTheMonthItem := weeksOfTheMonthItem - weeksOfTheMonthList[weeksOfTheMonthIndex] = ScheduleBasedBackupCriteria_WeeksOfTheMonth(weeksOfTheMonthItem) + weeksOfTheMonthList[weeksOfTheMonthIndex] = genruntime.ToEnum(weeksOfTheMonthItem, scheduleBasedBackupCriteria_WeeksOfTheMonth_Values) } criteria.WeeksOfTheMonth = weeksOfTheMonthList } else { @@ -7730,7 +7753,7 @@ func (criteria *ScheduleBasedBackupCriteria_STATUS) AssignProperties_From_Schedu for absoluteCriterionIndex, absoluteCriterionItem := range source.AbsoluteCriteria { // Shadow the loop variable to avoid aliasing absoluteCriterionItem := absoluteCriterionItem - absoluteCriterionList[absoluteCriterionIndex] = ScheduleBasedBackupCriteria_AbsoluteCriteria_STATUS(absoluteCriterionItem) + absoluteCriterionList[absoluteCriterionIndex] = genruntime.ToEnum(absoluteCriterionItem, scheduleBasedBackupCriteria_AbsoluteCriteria_STATUS_Values) } criteria.AbsoluteCriteria = absoluteCriterionList } else { @@ -7761,7 +7784,7 @@ func (criteria *ScheduleBasedBackupCriteria_STATUS) AssignProperties_From_Schedu for daysOfTheWeekIndex, daysOfTheWeekItem := range source.DaysOfTheWeek { // Shadow the loop variable to avoid aliasing daysOfTheWeekItem := daysOfTheWeekItem - daysOfTheWeekList[daysOfTheWeekIndex] = ScheduleBasedBackupCriteria_DaysOfTheWeek_STATUS(daysOfTheWeekItem) + daysOfTheWeekList[daysOfTheWeekIndex] = genruntime.ToEnum(daysOfTheWeekItem, scheduleBasedBackupCriteria_DaysOfTheWeek_STATUS_Values) } criteria.DaysOfTheWeek = daysOfTheWeekList } else { @@ -7774,7 +7797,7 @@ func (criteria *ScheduleBasedBackupCriteria_STATUS) AssignProperties_From_Schedu for monthsOfYearIndex, monthsOfYearItem := range source.MonthsOfYear { // Shadow the loop variable to avoid aliasing monthsOfYearItem := monthsOfYearItem - monthsOfYearList[monthsOfYearIndex] = ScheduleBasedBackupCriteria_MonthsOfYear_STATUS(monthsOfYearItem) + monthsOfYearList[monthsOfYearIndex] = genruntime.ToEnum(monthsOfYearItem, scheduleBasedBackupCriteria_MonthsOfYear_STATUS_Values) } criteria.MonthsOfYear = monthsOfYearList } else { @@ -7783,8 +7806,9 @@ func (criteria *ScheduleBasedBackupCriteria_STATUS) AssignProperties_From_Schedu // ObjectType if source.ObjectType != nil { - objectType := ScheduleBasedBackupCriteria_ObjectType_STATUS(*source.ObjectType) - criteria.ObjectType = &objectType + objectType := *source.ObjectType + objectTypeTemp := genruntime.ToEnum(objectType, scheduleBasedBackupCriteria_ObjectType_STATUS_Values) + criteria.ObjectType = &objectTypeTemp } else { criteria.ObjectType = nil } @@ -7798,7 +7822,7 @@ func (criteria *ScheduleBasedBackupCriteria_STATUS) AssignProperties_From_Schedu for weeksOfTheMonthIndex, weeksOfTheMonthItem := range source.WeeksOfTheMonth { // Shadow the loop variable to avoid aliasing weeksOfTheMonthItem := weeksOfTheMonthItem - weeksOfTheMonthList[weeksOfTheMonthIndex] = ScheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS(weeksOfTheMonthItem) + weeksOfTheMonthList[weeksOfTheMonthIndex] = genruntime.ToEnum(weeksOfTheMonthItem, scheduleBasedBackupCriteria_WeeksOfTheMonth_STATUS_Values) } criteria.WeeksOfTheMonth = weeksOfTheMonthList } else { diff --git a/v2/api/dbformariadb/v1api20180601/server_spec_arm_types_gen.go b/v2/api/dbformariadb/v1api20180601/server_spec_arm_types_gen.go index cf28ea4e471..c43fbedba20 100644 --- a/v2/api/dbformariadb/v1api20180601/server_spec_arm_types_gen.go +++ b/v2/api/dbformariadb/v1api20180601/server_spec_arm_types_gen.go @@ -230,6 +230,13 @@ const ( Sku_Tier_MemoryOptimized = Sku_Tier("MemoryOptimized") ) +// Mapping from string to Sku_Tier +var sku_Tier_Values = map[string]Sku_Tier{ + "basic": Sku_Tier_Basic, + "generalpurpose": Sku_Tier_GeneralPurpose, + "memoryoptimized": Sku_Tier_MemoryOptimized, +} + // Enforce a minimal Tls version for the server. // +kubebuilder:validation:Enum={"TLS1_0","TLS1_1","TLS1_2","TLSEnforcementDisabled"} type MinimalTlsVersion string @@ -241,6 +248,14 @@ const ( MinimalTlsVersion_TLSEnforcementDisabled = MinimalTlsVersion("TLSEnforcementDisabled") ) +// Mapping from string to MinimalTlsVersion +var minimalTlsVersion_Values = map[string]MinimalTlsVersion{ + "tls1_0": MinimalTlsVersion_TLS1_0, + "tls1_1": MinimalTlsVersion_TLS1_1, + "tls1_2": MinimalTlsVersion_TLS1_2, + "tlsenforcementdisabled": MinimalTlsVersion_TLSEnforcementDisabled, +} + // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' // +kubebuilder:validation:Enum={"Disabled","Enabled"} @@ -251,26 +266,52 @@ const ( PublicNetworkAccess_Enabled = PublicNetworkAccess("Enabled") ) +// Mapping from string to PublicNetworkAccess +var publicNetworkAccess_Values = map[string]PublicNetworkAccess{ + "disabled": PublicNetworkAccess_Disabled, + "enabled": PublicNetworkAccess_Enabled, +} + // +kubebuilder:validation:Enum={"Default"} type ServerPropertiesForDefaultCreate_CreateMode string const ServerPropertiesForDefaultCreate_CreateMode_Default = ServerPropertiesForDefaultCreate_CreateMode("Default") +// Mapping from string to ServerPropertiesForDefaultCreate_CreateMode +var serverPropertiesForDefaultCreate_CreateMode_Values = map[string]ServerPropertiesForDefaultCreate_CreateMode{ + "default": ServerPropertiesForDefaultCreate_CreateMode_Default, +} + // +kubebuilder:validation:Enum={"GeoRestore"} type ServerPropertiesForGeoRestore_CreateMode string const ServerPropertiesForGeoRestore_CreateMode_GeoRestore = ServerPropertiesForGeoRestore_CreateMode("GeoRestore") +// Mapping from string to ServerPropertiesForGeoRestore_CreateMode +var serverPropertiesForGeoRestore_CreateMode_Values = map[string]ServerPropertiesForGeoRestore_CreateMode{ + "georestore": ServerPropertiesForGeoRestore_CreateMode_GeoRestore, +} + // +kubebuilder:validation:Enum={"Replica"} type ServerPropertiesForReplica_CreateMode string const ServerPropertiesForReplica_CreateMode_Replica = ServerPropertiesForReplica_CreateMode("Replica") +// Mapping from string to ServerPropertiesForReplica_CreateMode +var serverPropertiesForReplica_CreateMode_Values = map[string]ServerPropertiesForReplica_CreateMode{ + "replica": ServerPropertiesForReplica_CreateMode_Replica, +} + // +kubebuilder:validation:Enum={"PointInTimeRestore"} type ServerPropertiesForRestore_CreateMode string const ServerPropertiesForRestore_CreateMode_PointInTimeRestore = ServerPropertiesForRestore_CreateMode("PointInTimeRestore") +// Mapping from string to ServerPropertiesForRestore_CreateMode +var serverPropertiesForRestore_CreateMode_Values = map[string]ServerPropertiesForRestore_CreateMode{ + "pointintimerestore": ServerPropertiesForRestore_CreateMode_PointInTimeRestore, +} + // The version of a server. // +kubebuilder:validation:Enum={"10.2","10.3"} type ServerVersion string @@ -280,6 +321,12 @@ const ( ServerVersion_103 = ServerVersion("10.3") ) +// Mapping from string to ServerVersion +var serverVersion_Values = map[string]ServerVersion{ + "10.2": ServerVersion_102, + "10.3": ServerVersion_103, +} + // Enable ssl enforcement or not when connect to server. // +kubebuilder:validation:Enum={"Disabled","Enabled"} type SslEnforcement string @@ -289,6 +336,12 @@ const ( SslEnforcement_Enabled = SslEnforcement("Enabled") ) +// Mapping from string to SslEnforcement +var sslEnforcement_Values = map[string]SslEnforcement{ + "disabled": SslEnforcement_Disabled, + "enabled": SslEnforcement_Enabled, +} + // Storage Profile properties of a server type StorageProfile_ARM struct { // BackupRetentionDays: Backup retention days for the server. @@ -312,6 +365,12 @@ const ( StorageProfile_GeoRedundantBackup_Enabled = StorageProfile_GeoRedundantBackup("Enabled") ) +// Mapping from string to StorageProfile_GeoRedundantBackup +var storageProfile_GeoRedundantBackup_Values = map[string]StorageProfile_GeoRedundantBackup{ + "disabled": StorageProfile_GeoRedundantBackup_Disabled, + "enabled": StorageProfile_GeoRedundantBackup_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type StorageProfile_StorageAutogrow string @@ -319,3 +378,9 @@ const ( StorageProfile_StorageAutogrow_Disabled = StorageProfile_StorageAutogrow("Disabled") StorageProfile_StorageAutogrow_Enabled = StorageProfile_StorageAutogrow("Enabled") ) + +// Mapping from string to StorageProfile_StorageAutogrow +var storageProfile_StorageAutogrow_Values = map[string]StorageProfile_StorageAutogrow{ + "disabled": StorageProfile_StorageAutogrow_Disabled, + "enabled": StorageProfile_StorageAutogrow_Enabled, +} diff --git a/v2/api/dbformariadb/v1api20180601/server_status_arm_types_gen.go b/v2/api/dbformariadb/v1api20180601/server_status_arm_types_gen.go index 0331c7a0292..a107d7576c8 100644 --- a/v2/api/dbformariadb/v1api20180601/server_status_arm_types_gen.go +++ b/v2/api/dbformariadb/v1api20180601/server_status_arm_types_gen.go @@ -107,6 +107,13 @@ const ( Sku_Tier_STATUS_MemoryOptimized = Sku_Tier_STATUS("MemoryOptimized") ) +// Mapping from string to Sku_Tier_STATUS +var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{ + "basic": Sku_Tier_STATUS_Basic, + "generalpurpose": Sku_Tier_STATUS_GeneralPurpose, + "memoryoptimized": Sku_Tier_STATUS_MemoryOptimized, +} + // Storage Profile properties of a server type StorageProfile_STATUS_ARM struct { // BackupRetentionDays: Backup retention days for the server. diff --git a/v2/api/dbformariadb/v1api20180601/server_types_gen.go b/v2/api/dbformariadb/v1api20180601/server_types_gen.go index 985b5d406c4..932e2441362 100644 --- a/v2/api/dbformariadb/v1api20180601/server_types_gen.go +++ b/v2/api/dbformariadb/v1api20180601/server_types_gen.go @@ -1028,8 +1028,9 @@ func (server *Server_STATUS) AssignProperties_From_Server_STATUS(source *v201806 // MinimalTlsVersion if source.MinimalTlsVersion != nil { - minimalTlsVersion := MinimalTlsVersion_STATUS(*source.MinimalTlsVersion) - server.MinimalTlsVersion = &minimalTlsVersion + minimalTlsVersion := *source.MinimalTlsVersion + minimalTlsVersionTemp := genruntime.ToEnum(minimalTlsVersion, minimalTlsVersion_STATUS_Values) + server.MinimalTlsVersion = &minimalTlsVersionTemp } else { server.MinimalTlsVersion = nil } @@ -1057,8 +1058,9 @@ func (server *Server_STATUS) AssignProperties_From_Server_STATUS(source *v201806 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - server.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccess_STATUS_Values) + server.PublicNetworkAccess = &publicNetworkAccessTemp } else { server.PublicNetworkAccess = nil } @@ -1083,8 +1085,9 @@ func (server *Server_STATUS) AssignProperties_From_Server_STATUS(source *v201806 // SslEnforcement if source.SslEnforcement != nil { - sslEnforcement := SslEnforcement_STATUS(*source.SslEnforcement) - server.SslEnforcement = &sslEnforcement + sslEnforcement := *source.SslEnforcement + sslEnforcementTemp := genruntime.ToEnum(sslEnforcement, sslEnforcement_STATUS_Values) + server.SslEnforcement = &sslEnforcementTemp } else { server.SslEnforcement = nil } @@ -1109,16 +1112,18 @@ func (server *Server_STATUS) AssignProperties_From_Server_STATUS(source *v201806 // UserVisibleState if source.UserVisibleState != nil { - userVisibleState := ServerProperties_UserVisibleState_STATUS(*source.UserVisibleState) - server.UserVisibleState = &userVisibleState + userVisibleState := *source.UserVisibleState + userVisibleStateTemp := genruntime.ToEnum(userVisibleState, serverProperties_UserVisibleState_STATUS_Values) + server.UserVisibleState = &userVisibleStateTemp } else { server.UserVisibleState = nil } // Version if source.Version != nil { - version := ServerVersion_STATUS(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_STATUS_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -1271,6 +1276,14 @@ const ( MinimalTlsVersion_STATUS_TLSEnforcementDisabled = MinimalTlsVersion_STATUS("TLSEnforcementDisabled") ) +// Mapping from string to MinimalTlsVersion_STATUS +var minimalTlsVersion_STATUS_Values = map[string]MinimalTlsVersion_STATUS{ + "tls1_0": MinimalTlsVersion_STATUS_TLS1_0, + "tls1_1": MinimalTlsVersion_STATUS_TLS1_1, + "tls1_2": MinimalTlsVersion_STATUS_TLS1_2, + "tlsenforcementdisabled": MinimalTlsVersion_STATUS_TLSEnforcementDisabled, +} + // Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' type PublicNetworkAccess_STATUS string @@ -1280,6 +1293,12 @@ const ( PublicNetworkAccess_STATUS_Enabled = PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to PublicNetworkAccess_STATUS +var publicNetworkAccess_STATUS_Values = map[string]PublicNetworkAccess_STATUS{ + "disabled": PublicNetworkAccess_STATUS_Disabled, + "enabled": PublicNetworkAccess_STATUS_Enabled, +} + // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type ServerOperatorSpec struct { // Secrets: configures where to place Azure generated secrets. @@ -1438,6 +1457,13 @@ const ( ServerProperties_UserVisibleState_STATUS_Ready = ServerProperties_UserVisibleState_STATUS("Ready") ) +// Mapping from string to ServerProperties_UserVisibleState_STATUS +var serverProperties_UserVisibleState_STATUS_Values = map[string]ServerProperties_UserVisibleState_STATUS{ + "disabled": ServerProperties_UserVisibleState_STATUS_Disabled, + "dropping": ServerProperties_UserVisibleState_STATUS_Dropping, + "ready": ServerProperties_UserVisibleState_STATUS_Ready, +} + type ServerPropertiesForCreate struct { // Default: Mutually exclusive with all other properties Default *ServerPropertiesForDefaultCreate `json:"default,omitempty"` @@ -1690,6 +1716,12 @@ const ( ServerVersion_STATUS_103 = ServerVersion_STATUS("10.3") ) +// Mapping from string to ServerVersion_STATUS +var serverVersion_STATUS_Values = map[string]ServerVersion_STATUS{ + "10.2": ServerVersion_STATUS_102, + "10.3": ServerVersion_STATUS_103, +} + // Billing information related properties of a server. type Sku struct { // +kubebuilder:validation:Minimum=0 @@ -1819,8 +1851,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20180601s.Sku) error { // Tier if source.Tier != nil { - tier := Sku_Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -1985,8 +2018,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20180601s.Sku_S // Tier if source.Tier != nil { - tier := Sku_Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -2039,6 +2073,12 @@ const ( SslEnforcement_STATUS_Enabled = SslEnforcement_STATUS("Enabled") ) +// Mapping from string to SslEnforcement_STATUS +var sslEnforcement_STATUS_Values = map[string]SslEnforcement_STATUS{ + "disabled": SslEnforcement_STATUS_Disabled, + "enabled": SslEnforcement_STATUS_Enabled, +} + // Storage Profile properties of a server type StorageProfile_STATUS struct { // BackupRetentionDays: Backup retention days for the server. @@ -2104,16 +2144,18 @@ func (profile *StorageProfile_STATUS) AssignProperties_From_StorageProfile_STATU // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := StorageProfile_GeoRedundantBackup_STATUS(*source.GeoRedundantBackup) - profile.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, storageProfile_GeoRedundantBackup_STATUS_Values) + profile.GeoRedundantBackup = &geoRedundantBackupTemp } else { profile.GeoRedundantBackup = nil } // StorageAutogrow if source.StorageAutogrow != nil { - storageAutogrow := StorageProfile_StorageAutogrow_STATUS(*source.StorageAutogrow) - profile.StorageAutogrow = &storageAutogrow + storageAutogrow := *source.StorageAutogrow + storageAutogrowTemp := genruntime.ToEnum(storageAutogrow, storageProfile_StorageAutogrow_STATUS_Values) + profile.StorageAutogrow = &storageAutogrowTemp } else { profile.StorageAutogrow = nil } @@ -2295,8 +2337,9 @@ func (properties *ServerPrivateEndpointConnectionProperties_STATUS) AssignProper // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS(*source.ProvisioningState) - properties.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, serverPrivateEndpointConnectionProperties_ProvisioningState_STATUS_Values) + properties.ProvisioningState = &provisioningStateTemp } else { properties.ProvisioningState = nil } @@ -2528,32 +2571,36 @@ func (create *ServerPropertiesForDefaultCreate) AssignProperties_From_ServerProp // CreateMode if source.CreateMode != nil { - createMode := ServerPropertiesForDefaultCreate_CreateMode(*source.CreateMode) - create.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverPropertiesForDefaultCreate_CreateMode_Values) + create.CreateMode = &createModeTemp } else { create.CreateMode = nil } // MinimalTlsVersion if source.MinimalTlsVersion != nil { - minimalTlsVersion := MinimalTlsVersion(*source.MinimalTlsVersion) - create.MinimalTlsVersion = &minimalTlsVersion + minimalTlsVersion := *source.MinimalTlsVersion + minimalTlsVersionTemp := genruntime.ToEnum(minimalTlsVersion, minimalTlsVersion_Values) + create.MinimalTlsVersion = &minimalTlsVersionTemp } else { create.MinimalTlsVersion = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccess(*source.PublicNetworkAccess) - create.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccess_Values) + create.PublicNetworkAccess = &publicNetworkAccessTemp } else { create.PublicNetworkAccess = nil } // SslEnforcement if source.SslEnforcement != nil { - sslEnforcement := SslEnforcement(*source.SslEnforcement) - create.SslEnforcement = &sslEnforcement + sslEnforcement := *source.SslEnforcement + sslEnforcementTemp := genruntime.ToEnum(sslEnforcement, sslEnforcement_Values) + create.SslEnforcement = &sslEnforcementTemp } else { create.SslEnforcement = nil } @@ -2572,8 +2619,9 @@ func (create *ServerPropertiesForDefaultCreate) AssignProperties_From_ServerProp // Version if source.Version != nil { - version := ServerVersion(*source.Version) - create.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + create.Version = &versionTemp } else { create.Version = nil } @@ -2808,24 +2856,27 @@ func (restore *ServerPropertiesForGeoRestore) AssignProperties_From_ServerProper // CreateMode if source.CreateMode != nil { - createMode := ServerPropertiesForGeoRestore_CreateMode(*source.CreateMode) - restore.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverPropertiesForGeoRestore_CreateMode_Values) + restore.CreateMode = &createModeTemp } else { restore.CreateMode = nil } // MinimalTlsVersion if source.MinimalTlsVersion != nil { - minimalTlsVersion := MinimalTlsVersion(*source.MinimalTlsVersion) - restore.MinimalTlsVersion = &minimalTlsVersion + minimalTlsVersion := *source.MinimalTlsVersion + minimalTlsVersionTemp := genruntime.ToEnum(minimalTlsVersion, minimalTlsVersion_Values) + restore.MinimalTlsVersion = &minimalTlsVersionTemp } else { restore.MinimalTlsVersion = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccess(*source.PublicNetworkAccess) - restore.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccess_Values) + restore.PublicNetworkAccess = &publicNetworkAccessTemp } else { restore.PublicNetworkAccess = nil } @@ -2835,8 +2886,9 @@ func (restore *ServerPropertiesForGeoRestore) AssignProperties_From_ServerProper // SslEnforcement if source.SslEnforcement != nil { - sslEnforcement := SslEnforcement(*source.SslEnforcement) - restore.SslEnforcement = &sslEnforcement + sslEnforcement := *source.SslEnforcement + sslEnforcementTemp := genruntime.ToEnum(sslEnforcement, sslEnforcement_Values) + restore.SslEnforcement = &sslEnforcementTemp } else { restore.SslEnforcement = nil } @@ -2855,8 +2907,9 @@ func (restore *ServerPropertiesForGeoRestore) AssignProperties_From_ServerProper // Version if source.Version != nil { - version := ServerVersion(*source.Version) - restore.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + restore.Version = &versionTemp } else { restore.Version = nil } @@ -3083,24 +3136,27 @@ func (replica *ServerPropertiesForReplica) AssignProperties_From_ServerPropertie // CreateMode if source.CreateMode != nil { - createMode := ServerPropertiesForReplica_CreateMode(*source.CreateMode) - replica.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverPropertiesForReplica_CreateMode_Values) + replica.CreateMode = &createModeTemp } else { replica.CreateMode = nil } // MinimalTlsVersion if source.MinimalTlsVersion != nil { - minimalTlsVersion := MinimalTlsVersion(*source.MinimalTlsVersion) - replica.MinimalTlsVersion = &minimalTlsVersion + minimalTlsVersion := *source.MinimalTlsVersion + minimalTlsVersionTemp := genruntime.ToEnum(minimalTlsVersion, minimalTlsVersion_Values) + replica.MinimalTlsVersion = &minimalTlsVersionTemp } else { replica.MinimalTlsVersion = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccess(*source.PublicNetworkAccess) - replica.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccess_Values) + replica.PublicNetworkAccess = &publicNetworkAccessTemp } else { replica.PublicNetworkAccess = nil } @@ -3110,8 +3166,9 @@ func (replica *ServerPropertiesForReplica) AssignProperties_From_ServerPropertie // SslEnforcement if source.SslEnforcement != nil { - sslEnforcement := SslEnforcement(*source.SslEnforcement) - replica.SslEnforcement = &sslEnforcement + sslEnforcement := *source.SslEnforcement + sslEnforcementTemp := genruntime.ToEnum(sslEnforcement, sslEnforcement_Values) + replica.SslEnforcement = &sslEnforcementTemp } else { replica.SslEnforcement = nil } @@ -3130,8 +3187,9 @@ func (replica *ServerPropertiesForReplica) AssignProperties_From_ServerPropertie // Version if source.Version != nil { - version := ServerVersion(*source.Version) - replica.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + replica.Version = &versionTemp } else { replica.Version = nil } @@ -3374,24 +3432,27 @@ func (restore *ServerPropertiesForRestore) AssignProperties_From_ServerPropertie // CreateMode if source.CreateMode != nil { - createMode := ServerPropertiesForRestore_CreateMode(*source.CreateMode) - restore.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverPropertiesForRestore_CreateMode_Values) + restore.CreateMode = &createModeTemp } else { restore.CreateMode = nil } // MinimalTlsVersion if source.MinimalTlsVersion != nil { - minimalTlsVersion := MinimalTlsVersion(*source.MinimalTlsVersion) - restore.MinimalTlsVersion = &minimalTlsVersion + minimalTlsVersion := *source.MinimalTlsVersion + minimalTlsVersionTemp := genruntime.ToEnum(minimalTlsVersion, minimalTlsVersion_Values) + restore.MinimalTlsVersion = &minimalTlsVersionTemp } else { restore.MinimalTlsVersion = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccess(*source.PublicNetworkAccess) - restore.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccess_Values) + restore.PublicNetworkAccess = &publicNetworkAccessTemp } else { restore.PublicNetworkAccess = nil } @@ -3404,8 +3465,9 @@ func (restore *ServerPropertiesForRestore) AssignProperties_From_ServerPropertie // SslEnforcement if source.SslEnforcement != nil { - sslEnforcement := SslEnforcement(*source.SslEnforcement) - restore.SslEnforcement = &sslEnforcement + sslEnforcement := *source.SslEnforcement + sslEnforcementTemp := genruntime.ToEnum(sslEnforcement, sslEnforcement_Values) + restore.SslEnforcement = &sslEnforcementTemp } else { restore.SslEnforcement = nil } @@ -3424,8 +3486,9 @@ func (restore *ServerPropertiesForRestore) AssignProperties_From_ServerPropertie // Version if source.Version != nil { - version := ServerVersion(*source.Version) - restore.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + restore.Version = &versionTemp } else { restore.Version = nil } @@ -3515,6 +3578,12 @@ const ( StorageProfile_GeoRedundantBackup_STATUS_Enabled = StorageProfile_GeoRedundantBackup_STATUS("Enabled") ) +// Mapping from string to StorageProfile_GeoRedundantBackup_STATUS +var storageProfile_GeoRedundantBackup_STATUS_Values = map[string]StorageProfile_GeoRedundantBackup_STATUS{ + "disabled": StorageProfile_GeoRedundantBackup_STATUS_Disabled, + "enabled": StorageProfile_GeoRedundantBackup_STATUS_Enabled, +} + type StorageProfile_StorageAutogrow_STATUS string const ( @@ -3522,6 +3591,12 @@ const ( StorageProfile_StorageAutogrow_STATUS_Enabled = StorageProfile_StorageAutogrow_STATUS("Enabled") ) +// Mapping from string to StorageProfile_StorageAutogrow_STATUS +var storageProfile_StorageAutogrow_STATUS_Values = map[string]StorageProfile_StorageAutogrow_STATUS{ + "disabled": StorageProfile_StorageAutogrow_STATUS_Disabled, + "enabled": StorageProfile_StorageAutogrow_STATUS_Enabled, +} + type PrivateEndpointProperty_STATUS struct { // Id: Resource id of the private endpoint. Id *string `json:"id,omitempty"` @@ -3590,6 +3665,15 @@ const ( ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS_Rejecting = ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS("Rejecting") ) +// Mapping from string to ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS +var serverPrivateEndpointConnectionProperties_ProvisioningState_STATUS_Values = map[string]ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS{ + "approving": ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS_Approving, + "dropping": ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS_Dropping, + "failed": ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS_Failed, + "ready": ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS_Ready, + "rejecting": ServerPrivateEndpointConnectionProperties_ProvisioningState_STATUS_Rejecting, +} + type ServerPrivateLinkServiceConnectionStateProperty_STATUS struct { // ActionsRequired: The actions required for private link service connection. ActionsRequired *ServerPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS `json:"actionsRequired,omitempty"` @@ -3642,8 +3726,9 @@ func (property *ServerPrivateLinkServiceConnectionStateProperty_STATUS) AssignPr // ActionsRequired if source.ActionsRequired != nil { - actionsRequired := ServerPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS(*source.ActionsRequired) - property.ActionsRequired = &actionsRequired + actionsRequired := *source.ActionsRequired + actionsRequiredTemp := genruntime.ToEnum(actionsRequired, serverPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_Values) + property.ActionsRequired = &actionsRequiredTemp } else { property.ActionsRequired = nil } @@ -3653,8 +3738,9 @@ func (property *ServerPrivateLinkServiceConnectionStateProperty_STATUS) AssignPr // Status if source.Status != nil { - status := ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS(*source.Status) - property.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, serverPrivateLinkServiceConnectionStateProperty_Status_STATUS_Values) + property.Status = &statusTemp } else { property.Status = nil } @@ -3796,16 +3882,18 @@ func (profile *StorageProfile) AssignProperties_From_StorageProfile(source *v201 // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := StorageProfile_GeoRedundantBackup(*source.GeoRedundantBackup) - profile.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, storageProfile_GeoRedundantBackup_Values) + profile.GeoRedundantBackup = &geoRedundantBackupTemp } else { profile.GeoRedundantBackup = nil } // StorageAutogrow if source.StorageAutogrow != nil { - storageAutogrow := StorageProfile_StorageAutogrow(*source.StorageAutogrow) - profile.StorageAutogrow = &storageAutogrow + storageAutogrow := *source.StorageAutogrow + storageAutogrowTemp := genruntime.ToEnum(storageAutogrow, storageProfile_StorageAutogrow_Values) + profile.StorageAutogrow = &storageAutogrowTemp } else { profile.StorageAutogrow = nil } @@ -3859,6 +3947,11 @@ type ServerPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS stri const ServerPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_None = ServerPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS("None") +// Mapping from string to ServerPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS +var serverPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_Values = map[string]ServerPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS{ + "none": ServerPrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_None, +} + type ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS string const ( @@ -3868,6 +3961,14 @@ const ( ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS_Rejected = ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS("Rejected") ) +// Mapping from string to ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS +var serverPrivateLinkServiceConnectionStateProperty_Status_STATUS_Values = map[string]ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS{ + "approved": ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS_Approved, + "disconnected": ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS_Disconnected, + "pending": ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS_Pending, + "rejected": ServerPrivateLinkServiceConnectionStateProperty_Status_STATUS_Rejected, +} + func init() { SchemeBuilder.Register(&Server{}, &ServerList{}) } diff --git a/v2/api/dbformysql/v1api20210501/flexible_server_spec_arm_types_gen.go b/v2/api/dbformysql/v1api20210501/flexible_server_spec_arm_types_gen.go index c804300cc65..f7b1f53bc15 100644 --- a/v2/api/dbformysql/v1api20210501/flexible_server_spec_arm_types_gen.go +++ b/v2/api/dbformysql/v1api20210501/flexible_server_spec_arm_types_gen.go @@ -139,6 +139,11 @@ type Identity_Type string const Identity_Type_UserAssigned = Identity_Type("UserAssigned") +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "userassigned": Identity_Type_UserAssigned, +} + // Maintenance window of a server. type MaintenanceWindow_ARM struct { // CustomWindow: indicates whether custom window is enabled or disabled @@ -169,6 +174,13 @@ const ( Sku_Tier_MemoryOptimized = Sku_Tier("MemoryOptimized") ) +// Mapping from string to Sku_Tier +var sku_Tier_Values = map[string]Sku_Tier{ + "burstable": Sku_Tier_Burstable, + "generalpurpose": Sku_Tier_GeneralPurpose, + "memoryoptimized": Sku_Tier_MemoryOptimized, +} + // Storage Profile properties of a server type Storage_ARM struct { // AutoGrow: Enable Storage Auto Grow or not. diff --git a/v2/api/dbformysql/v1api20210501/flexible_server_status_arm_types_gen.go b/v2/api/dbformysql/v1api20210501/flexible_server_status_arm_types_gen.go index bb6f32a587c..e16bbcb0546 100644 --- a/v2/api/dbformysql/v1api20210501/flexible_server_status_arm_types_gen.go +++ b/v2/api/dbformysql/v1api20210501/flexible_server_status_arm_types_gen.go @@ -179,6 +179,11 @@ type Identity_Type_STATUS string const Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "userassigned": Identity_Type_STATUS_UserAssigned, +} + // Maintenance window of a server. type MaintenanceWindow_STATUS_ARM struct { // CustomWindow: indicates whether custom window is enabled or disabled @@ -215,6 +220,13 @@ const ( Sku_Tier_STATUS_MemoryOptimized = Sku_Tier_STATUS("MemoryOptimized") ) +// Mapping from string to Sku_Tier_STATUS +var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{ + "burstable": Sku_Tier_STATUS_Burstable, + "generalpurpose": Sku_Tier_STATUS_GeneralPurpose, + "memoryoptimized": Sku_Tier_STATUS_MemoryOptimized, +} + // Storage Profile properties of a server type Storage_STATUS_ARM struct { // AutoGrow: Enable Storage Auto Grow or not. @@ -239,6 +251,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -247,3 +267,11 @@ const ( SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} diff --git a/v2/api/dbformysql/v1api20210501/flexible_server_types_gen.go b/v2/api/dbformysql/v1api20210501/flexible_server_types_gen.go index 659c334cb4d..a70f6ad1e8c 100644 --- a/v2/api/dbformysql/v1api20210501/flexible_server_types_gen.go +++ b/v2/api/dbformysql/v1api20210501/flexible_server_types_gen.go @@ -865,8 +865,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -956,8 +957,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // ReplicationRole if source.ReplicationRole != nil { - replicationRole := ReplicationRole(*source.ReplicationRole) - server.ReplicationRole = &replicationRole + replicationRole := *source.ReplicationRole + replicationRoleTemp := genruntime.ToEnum(replicationRole, replicationRole_Values) + server.ReplicationRole = &replicationRoleTemp } else { server.ReplicationRole = nil } @@ -997,8 +999,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // Version if source.Version != nil { - version := ServerVersion(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -1762,8 +1765,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode_STATUS(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_STATUS_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -1845,8 +1849,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // ReplicationRole if source.ReplicationRole != nil { - replicationRole := ReplicationRole_STATUS(*source.ReplicationRole) - server.ReplicationRole = &replicationRole + replicationRole := *source.ReplicationRole + replicationRoleTemp := genruntime.ToEnum(replicationRole, replicationRole_STATUS_Values) + server.ReplicationRole = &replicationRoleTemp } else { server.ReplicationRole = nil } @@ -1871,8 +1876,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // State if source.State != nil { - state := ServerProperties_State_STATUS(*source.State) - server.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverProperties_State_STATUS_Values) + server.State = &stateTemp } else { server.State = nil } @@ -1909,8 +1915,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // Version if source.Version != nil { - version := ServerVersion_STATUS(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_STATUS_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -2179,8 +2186,9 @@ func (backup *Backup) AssignProperties_From_Backup(source *v20210501s.Backup) er // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := EnableStatusEnum(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, enableStatusEnum_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -2293,8 +2301,9 @@ func (backup *Backup_STATUS) AssignProperties_From_Backup_STATUS(source *v202105 // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := EnableStatusEnum_STATUS(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, enableStatusEnum_STATUS_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -2466,8 +2475,9 @@ func (encryption *DataEncryption) AssignProperties_From_DataEncryption(source *v // Type if source.Type != nil { - typeVar := DataEncryption_Type(*source.Type) - encryption.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, dataEncryption_Type_Values) + encryption.Type = &typeTemp } else { encryption.Type = nil } @@ -2643,8 +2653,9 @@ func (encryption *DataEncryption_STATUS) AssignProperties_From_DataEncryption_ST // Type if source.Type != nil { - typeVar := DataEncryption_Type_STATUS(*source.Type) - encryption.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, dataEncryption_Type_STATUS_Values) + encryption.Type = &typeTemp } else { encryption.Type = nil } @@ -2807,8 +2818,9 @@ func (availability *HighAvailability) AssignProperties_From_HighAvailability(sou // Mode if source.Mode != nil { - mode := HighAvailability_Mode(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -2918,8 +2930,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // Mode if source.Mode != nil { - mode := HighAvailability_Mode_STATUS(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_STATUS_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -2929,8 +2942,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // State if source.State != nil { - state := HighAvailability_State_STATUS(*source.State) - availability.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, highAvailability_State_STATUS_Values) + availability.State = &stateTemp } else { availability.State = nil } @@ -3040,8 +3054,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20210501s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3207,8 +3222,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3731,8 +3747,9 @@ func (network *Network_STATUS) AssignProperties_From_Network_STATUS(source *v202 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := EnableStatusEnum_STATUS(*source.PublicNetworkAccess) - network.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, enableStatusEnum_STATUS_Values) + network.PublicNetworkAccess = &publicNetworkAccessTemp } else { network.PublicNetworkAccess = nil } @@ -3781,6 +3798,13 @@ const ( ReplicationRole_Source = ReplicationRole("Source") ) +// Mapping from string to ReplicationRole +var replicationRole_Values = map[string]ReplicationRole{ + "none": ReplicationRole_None, + "replica": ReplicationRole_Replica, + "source": ReplicationRole_Source, +} + // The replication role. type ReplicationRole_STATUS string @@ -3790,6 +3814,13 @@ const ( ReplicationRole_STATUS_Source = ReplicationRole_STATUS("Source") ) +// Mapping from string to ReplicationRole_STATUS +var replicationRole_STATUS_Values = map[string]ReplicationRole_STATUS{ + "none": ReplicationRole_STATUS_None, + "replica": ReplicationRole_STATUS_Replica, + "source": ReplicationRole_STATUS_Source, +} + // +kubebuilder:validation:Enum={"Default","GeoRestore","PointInTimeRestore","Replica"} type ServerProperties_CreateMode string @@ -3800,6 +3831,14 @@ const ( ServerProperties_CreateMode_Replica = ServerProperties_CreateMode("Replica") ) +// Mapping from string to ServerProperties_CreateMode +var serverProperties_CreateMode_Values = map[string]ServerProperties_CreateMode{ + "default": ServerProperties_CreateMode_Default, + "georestore": ServerProperties_CreateMode_GeoRestore, + "pointintimerestore": ServerProperties_CreateMode_PointInTimeRestore, + "replica": ServerProperties_CreateMode_Replica, +} + type ServerProperties_CreateMode_STATUS string const ( @@ -3809,6 +3848,14 @@ const ( ServerProperties_CreateMode_STATUS_Replica = ServerProperties_CreateMode_STATUS("Replica") ) +// Mapping from string to ServerProperties_CreateMode_STATUS +var serverProperties_CreateMode_STATUS_Values = map[string]ServerProperties_CreateMode_STATUS{ + "default": ServerProperties_CreateMode_STATUS_Default, + "georestore": ServerProperties_CreateMode_STATUS_GeoRestore, + "pointintimerestore": ServerProperties_CreateMode_STATUS_PointInTimeRestore, + "replica": ServerProperties_CreateMode_STATUS_Replica, +} + type ServerProperties_State_STATUS string const ( @@ -3821,6 +3868,17 @@ const ( ServerProperties_State_STATUS_Updating = ServerProperties_State_STATUS("Updating") ) +// Mapping from string to ServerProperties_State_STATUS +var serverProperties_State_STATUS_Values = map[string]ServerProperties_State_STATUS{ + "disabled": ServerProperties_State_STATUS_Disabled, + "dropping": ServerProperties_State_STATUS_Dropping, + "ready": ServerProperties_State_STATUS_Ready, + "starting": ServerProperties_State_STATUS_Starting, + "stopped": ServerProperties_State_STATUS_Stopped, + "stopping": ServerProperties_State_STATUS_Stopping, + "updating": ServerProperties_State_STATUS_Updating, +} + // The version of a server. // +kubebuilder:validation:Enum={"5.7","8.0.21"} type ServerVersion string @@ -3830,6 +3888,12 @@ const ( ServerVersion_8021 = ServerVersion("8.0.21") ) +// Mapping from string to ServerVersion +var serverVersion_Values = map[string]ServerVersion{ + "5.7": ServerVersion_57, + "8.0.21": ServerVersion_8021, +} + // The version of a server. type ServerVersion_STATUS string @@ -3838,6 +3902,12 @@ const ( ServerVersion_STATUS_8021 = ServerVersion_STATUS("8.0.21") ) +// Mapping from string to ServerVersion_STATUS +var serverVersion_STATUS_Values = map[string]ServerVersion_STATUS{ + "5.7": ServerVersion_STATUS_57, + "8.0.21": ServerVersion_STATUS_8021, +} + // Billing information related properties of a server. type Sku struct { // +kubebuilder:validation:Required @@ -3908,8 +3978,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20210501s.Sku) error { // Tier if source.Tier != nil { - tier := Sku_Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -4010,8 +4081,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20210501s.Sku_S // Tier if source.Tier != nil { - tier := Sku_Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -4127,8 +4199,9 @@ func (storage *Storage) AssignProperties_From_Storage(source *v20210501s.Storage // AutoGrow if source.AutoGrow != nil { - autoGrow := EnableStatusEnum(*source.AutoGrow) - storage.AutoGrow = &autoGrow + autoGrow := *source.AutoGrow + autoGrowTemp := genruntime.ToEnum(autoGrow, enableStatusEnum_Values) + storage.AutoGrow = &autoGrowTemp } else { storage.AutoGrow = nil } @@ -4256,8 +4329,9 @@ func (storage *Storage_STATUS) AssignProperties_From_Storage_STATUS(source *v202 // AutoGrow if source.AutoGrow != nil { - autoGrow := EnableStatusEnum_STATUS(*source.AutoGrow) - storage.AutoGrow = &autoGrow + autoGrow := *source.AutoGrow + autoGrowTemp := genruntime.ToEnum(autoGrow, enableStatusEnum_STATUS_Values) + storage.AutoGrow = &autoGrowTemp } else { storage.AutoGrow = nil } @@ -4394,8 +4468,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -4408,8 +4483,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -4470,6 +4546,12 @@ const ( DataEncryption_Type_SystemManaged = DataEncryption_Type("SystemManaged") ) +// Mapping from string to DataEncryption_Type +var dataEncryption_Type_Values = map[string]DataEncryption_Type{ + "azurekeyvault": DataEncryption_Type_AzureKeyVault, + "systemmanaged": DataEncryption_Type_SystemManaged, +} + type DataEncryption_Type_STATUS string const ( @@ -4477,6 +4559,12 @@ const ( DataEncryption_Type_STATUS_SystemManaged = DataEncryption_Type_STATUS("SystemManaged") ) +// Mapping from string to DataEncryption_Type_STATUS +var dataEncryption_Type_STATUS_Values = map[string]DataEncryption_Type_STATUS{ + "azurekeyvault": DataEncryption_Type_STATUS_AzureKeyVault, + "systemmanaged": DataEncryption_Type_STATUS_SystemManaged, +} + // Enum to indicate whether value is 'Enabled' or 'Disabled' // +kubebuilder:validation:Enum={"Disabled","Enabled"} type EnableStatusEnum string @@ -4486,6 +4574,12 @@ const ( EnableStatusEnum_Enabled = EnableStatusEnum("Enabled") ) +// Mapping from string to EnableStatusEnum +var enableStatusEnum_Values = map[string]EnableStatusEnum{ + "disabled": EnableStatusEnum_Disabled, + "enabled": EnableStatusEnum_Enabled, +} + // Enum to indicate whether value is 'Enabled' or 'Disabled' type EnableStatusEnum_STATUS string @@ -4494,6 +4588,12 @@ const ( EnableStatusEnum_STATUS_Enabled = EnableStatusEnum_STATUS("Enabled") ) +// Mapping from string to EnableStatusEnum_STATUS +var enableStatusEnum_STATUS_Values = map[string]EnableStatusEnum_STATUS{ + "disabled": EnableStatusEnum_STATUS_Disabled, + "enabled": EnableStatusEnum_STATUS_Enabled, +} + type FlexibleServerOperatorSecrets struct { // FullyQualifiedDomainName: indicates where the FullyQualifiedDomainName secret should be placed. If omitted, the secret // will not be retrieved from Azure. @@ -4548,6 +4648,13 @@ const ( HighAvailability_Mode_ZoneRedundant = HighAvailability_Mode("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode +var highAvailability_Mode_Values = map[string]HighAvailability_Mode{ + "disabled": HighAvailability_Mode_Disabled, + "samezone": HighAvailability_Mode_SameZone, + "zoneredundant": HighAvailability_Mode_ZoneRedundant, +} + type HighAvailability_Mode_STATUS string const ( @@ -4556,6 +4663,13 @@ const ( HighAvailability_Mode_STATUS_ZoneRedundant = HighAvailability_Mode_STATUS("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode_STATUS +var highAvailability_Mode_STATUS_Values = map[string]HighAvailability_Mode_STATUS{ + "disabled": HighAvailability_Mode_STATUS_Disabled, + "samezone": HighAvailability_Mode_STATUS_SameZone, + "zoneredundant": HighAvailability_Mode_STATUS_ZoneRedundant, +} + type HighAvailability_State_STATUS string const ( @@ -4566,6 +4680,15 @@ const ( HighAvailability_State_STATUS_RemovingStandby = HighAvailability_State_STATUS("RemovingStandby") ) +// Mapping from string to HighAvailability_State_STATUS +var highAvailability_State_STATUS_Values = map[string]HighAvailability_State_STATUS{ + "creatingstandby": HighAvailability_State_STATUS_CreatingStandby, + "failingover": HighAvailability_State_STATUS_FailingOver, + "healthy": HighAvailability_State_STATUS_Healthy, + "notenabled": HighAvailability_State_STATUS_NotEnabled, + "removingstandby": HighAvailability_State_STATUS_RemovingStandby, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails struct { Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` diff --git a/v2/api/dbformysql/v1api20220101/flexible_servers_administrator_status_arm_types_gen.go b/v2/api/dbformysql/v1api20220101/flexible_servers_administrator_status_arm_types_gen.go index 8e6480300f0..22a08249b39 100644 --- a/v2/api/dbformysql/v1api20220101/flexible_servers_administrator_status_arm_types_gen.go +++ b/v2/api/dbformysql/v1api20220101/flexible_servers_administrator_status_arm_types_gen.go @@ -69,6 +69,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -77,3 +85,11 @@ const ( SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} diff --git a/v2/api/dbformysql/v1api20220101/flexible_servers_administrator_types_gen.go b/v2/api/dbformysql/v1api20220101/flexible_servers_administrator_types_gen.go index c0f7d6b0fc9..6c3faba2fca 100644 --- a/v2/api/dbformysql/v1api20220101/flexible_servers_administrator_types_gen.go +++ b/v2/api/dbformysql/v1api20220101/flexible_servers_administrator_types_gen.go @@ -547,8 +547,9 @@ func (administrator *FlexibleServers_Administrator_Spec) AssignProperties_From_F // AdministratorType if source.AdministratorType != nil { - administratorType := AdministratorProperties_AdministratorType(*source.AdministratorType) - administrator.AdministratorType = &administratorType + administratorType := *source.AdministratorType + administratorTypeTemp := genruntime.ToEnum(administratorType, administratorProperties_AdministratorType_Values) + administrator.AdministratorType = &administratorTypeTemp } else { administrator.AdministratorType = nil } @@ -885,8 +886,9 @@ func (administrator *FlexibleServers_Administrator_STATUS) AssignProperties_From // AdministratorType if source.AdministratorType != nil { - administratorType := AdministratorProperties_AdministratorType_STATUS(*source.AdministratorType) - administrator.AdministratorType = &administratorType + administratorType := *source.AdministratorType + administratorTypeTemp := genruntime.ToEnum(administratorType, administratorProperties_AdministratorType_STATUS_Values) + administrator.AdministratorType = &administratorTypeTemp } else { administrator.AdministratorType = nil } @@ -996,10 +998,20 @@ type AdministratorProperties_AdministratorType string const AdministratorProperties_AdministratorType_ActiveDirectory = AdministratorProperties_AdministratorType("ActiveDirectory") +// Mapping from string to AdministratorProperties_AdministratorType +var administratorProperties_AdministratorType_Values = map[string]AdministratorProperties_AdministratorType{ + "activedirectory": AdministratorProperties_AdministratorType_ActiveDirectory, +} + type AdministratorProperties_AdministratorType_STATUS string const AdministratorProperties_AdministratorType_STATUS_ActiveDirectory = AdministratorProperties_AdministratorType_STATUS("ActiveDirectory") +// Mapping from string to AdministratorProperties_AdministratorType_STATUS +var administratorProperties_AdministratorType_STATUS_Values = map[string]AdministratorProperties_AdministratorType_STATUS{ + "activedirectory": AdministratorProperties_AdministratorType_STATUS_ActiveDirectory, +} + // Metadata pertaining to creation and last modification of the resource. type SystemData_STATUS struct { // CreatedAt: The timestamp of resource creation (UTC). @@ -1086,8 +1098,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -1100,8 +1113,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } diff --git a/v2/api/dbformysql/v1api20220101/flexible_servers_configuration_types_gen.go b/v2/api/dbformysql/v1api20220101/flexible_servers_configuration_types_gen.go index 24ff2f91f10..b12545e82da 100644 --- a/v2/api/dbformysql/v1api20220101/flexible_servers_configuration_types_gen.go +++ b/v2/api/dbformysql/v1api20220101/flexible_servers_configuration_types_gen.go @@ -499,7 +499,8 @@ func (configuration *FlexibleServers_Configuration_Spec) AssignProperties_From_F // Source if source.Source != nil { - sourceTemp := ConfigurationProperties_Source(*source.Source) + sourceValue := *source.Source + sourceTemp := genruntime.ToEnum(sourceValue, configurationProperties_Source_Values) configuration.Source = &sourceTemp } else { configuration.Source = nil @@ -865,24 +866,27 @@ func (configuration *FlexibleServers_Configuration_STATUS) AssignProperties_From // IsConfigPendingRestart if source.IsConfigPendingRestart != nil { - isConfigPendingRestart := ConfigurationProperties_IsConfigPendingRestart_STATUS(*source.IsConfigPendingRestart) - configuration.IsConfigPendingRestart = &isConfigPendingRestart + isConfigPendingRestart := *source.IsConfigPendingRestart + isConfigPendingRestartTemp := genruntime.ToEnum(isConfigPendingRestart, configurationProperties_IsConfigPendingRestart_STATUS_Values) + configuration.IsConfigPendingRestart = &isConfigPendingRestartTemp } else { configuration.IsConfigPendingRestart = nil } // IsDynamicConfig if source.IsDynamicConfig != nil { - isDynamicConfig := ConfigurationProperties_IsDynamicConfig_STATUS(*source.IsDynamicConfig) - configuration.IsDynamicConfig = &isDynamicConfig + isDynamicConfig := *source.IsDynamicConfig + isDynamicConfigTemp := genruntime.ToEnum(isDynamicConfig, configurationProperties_IsDynamicConfig_STATUS_Values) + configuration.IsDynamicConfig = &isDynamicConfigTemp } else { configuration.IsDynamicConfig = nil } // IsReadOnly if source.IsReadOnly != nil { - isReadOnly := ConfigurationProperties_IsReadOnly_STATUS(*source.IsReadOnly) - configuration.IsReadOnly = &isReadOnly + isReadOnly := *source.IsReadOnly + isReadOnlyTemp := genruntime.ToEnum(isReadOnly, configurationProperties_IsReadOnly_STATUS_Values) + configuration.IsReadOnly = &isReadOnlyTemp } else { configuration.IsReadOnly = nil } @@ -892,7 +896,8 @@ func (configuration *FlexibleServers_Configuration_STATUS) AssignProperties_From // Source if source.Source != nil { - sourceTemp := ConfigurationProperties_Source_STATUS(*source.Source) + sourceValue := *source.Source + sourceTemp := genruntime.ToEnum(sourceValue, configurationProperties_Source_STATUS_Values) configuration.Source = &sourceTemp } else { configuration.Source = nil @@ -1020,6 +1025,12 @@ const ( ConfigurationProperties_IsConfigPendingRestart_STATUS_True = ConfigurationProperties_IsConfigPendingRestart_STATUS("True") ) +// Mapping from string to ConfigurationProperties_IsConfigPendingRestart_STATUS +var configurationProperties_IsConfigPendingRestart_STATUS_Values = map[string]ConfigurationProperties_IsConfigPendingRestart_STATUS{ + "false": ConfigurationProperties_IsConfigPendingRestart_STATUS_False, + "true": ConfigurationProperties_IsConfigPendingRestart_STATUS_True, +} + type ConfigurationProperties_IsDynamicConfig_STATUS string const ( @@ -1027,6 +1038,12 @@ const ( ConfigurationProperties_IsDynamicConfig_STATUS_True = ConfigurationProperties_IsDynamicConfig_STATUS("True") ) +// Mapping from string to ConfigurationProperties_IsDynamicConfig_STATUS +var configurationProperties_IsDynamicConfig_STATUS_Values = map[string]ConfigurationProperties_IsDynamicConfig_STATUS{ + "false": ConfigurationProperties_IsDynamicConfig_STATUS_False, + "true": ConfigurationProperties_IsDynamicConfig_STATUS_True, +} + type ConfigurationProperties_IsReadOnly_STATUS string const ( @@ -1034,6 +1051,12 @@ const ( ConfigurationProperties_IsReadOnly_STATUS_True = ConfigurationProperties_IsReadOnly_STATUS("True") ) +// Mapping from string to ConfigurationProperties_IsReadOnly_STATUS +var configurationProperties_IsReadOnly_STATUS_Values = map[string]ConfigurationProperties_IsReadOnly_STATUS{ + "false": ConfigurationProperties_IsReadOnly_STATUS_False, + "true": ConfigurationProperties_IsReadOnly_STATUS_True, +} + // +kubebuilder:validation:Enum={"system-default","user-override"} type ConfigurationProperties_Source string @@ -1042,6 +1065,12 @@ const ( ConfigurationProperties_Source_UserOverride = ConfigurationProperties_Source("user-override") ) +// Mapping from string to ConfigurationProperties_Source +var configurationProperties_Source_Values = map[string]ConfigurationProperties_Source{ + "system-default": ConfigurationProperties_Source_SystemDefault, + "user-override": ConfigurationProperties_Source_UserOverride, +} + type ConfigurationProperties_Source_STATUS string const ( @@ -1049,6 +1078,12 @@ const ( ConfigurationProperties_Source_STATUS_UserOverride = ConfigurationProperties_Source_STATUS("user-override") ) +// Mapping from string to ConfigurationProperties_Source_STATUS +var configurationProperties_Source_STATUS_Values = map[string]ConfigurationProperties_Source_STATUS{ + "system-default": ConfigurationProperties_Source_STATUS_SystemDefault, + "user-override": ConfigurationProperties_Source_STATUS_UserOverride, +} + func init() { SchemeBuilder.Register(&FlexibleServersConfiguration{}, &FlexibleServersConfigurationList{}) } diff --git a/v2/api/dbforpostgresql/v1api20210601/flexible_server_spec_arm_types_gen.go b/v2/api/dbforpostgresql/v1api20210601/flexible_server_spec_arm_types_gen.go index 22e345283de..7a39c160471 100644 --- a/v2/api/dbforpostgresql/v1api20210601/flexible_server_spec_arm_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20210601/flexible_server_spec_arm_types_gen.go @@ -133,6 +133,13 @@ const ( Sku_Tier_MemoryOptimized = Sku_Tier("MemoryOptimized") ) +// Mapping from string to Sku_Tier +var sku_Tier_Values = map[string]Sku_Tier{ + "burstable": Sku_Tier_Burstable, + "generalpurpose": Sku_Tier_GeneralPurpose, + "memoryoptimized": Sku_Tier_MemoryOptimized, +} + // Storage properties of a server type Storage_ARM struct { // StorageSizeGB: Max storage allowed for a server. diff --git a/v2/api/dbforpostgresql/v1api20210601/flexible_server_status_arm_types_gen.go b/v2/api/dbforpostgresql/v1api20210601/flexible_server_status_arm_types_gen.go index 70abc00ea8a..3ec336ac9ea 100644 --- a/v2/api/dbforpostgresql/v1api20210601/flexible_server_status_arm_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20210601/flexible_server_status_arm_types_gen.go @@ -167,6 +167,13 @@ const ( Sku_Tier_STATUS_MemoryOptimized = Sku_Tier_STATUS("MemoryOptimized") ) +// Mapping from string to Sku_Tier_STATUS +var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{ + "burstable": Sku_Tier_STATUS_Burstable, + "generalpurpose": Sku_Tier_STATUS_GeneralPurpose, + "memoryoptimized": Sku_Tier_STATUS_MemoryOptimized, +} + // Storage properties of a server type Storage_STATUS_ARM struct { // StorageSizeGB: Max storage allowed for a server. @@ -182,6 +189,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -190,3 +205,11 @@ const ( SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} diff --git a/v2/api/dbforpostgresql/v1api20210601/flexible_server_types_gen.go b/v2/api/dbforpostgresql/v1api20210601/flexible_server_types_gen.go index 6009db34554..5ce339ec6a8 100644 --- a/v2/api/dbforpostgresql/v1api20210601/flexible_server_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20210601/flexible_server_types_gen.go @@ -799,8 +799,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -904,8 +905,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // Version if source.Version != nil { - version := ServerVersion(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -1456,8 +1458,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode_STATUS(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_STATUS_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -1533,8 +1536,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // State if source.State != nil { - state := ServerProperties_State_STATUS(*source.State) - server.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverProperties_State_STATUS_Values) + server.State = &stateTemp } else { server.State = nil } @@ -1571,8 +1575,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // Version if source.Version != nil { - version := ServerVersion_STATUS(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_STATUS_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -1809,8 +1814,9 @@ func (backup *Backup) AssignProperties_From_Backup(source *v20210601s.Backup) er // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := Backup_GeoRedundantBackup(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, backup_GeoRedundantBackup_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -1905,8 +1911,9 @@ func (backup *Backup_STATUS) AssignProperties_From_Backup_STATUS(source *v202106 // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := Backup_GeoRedundantBackup_STATUS(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, backup_GeoRedundantBackup_STATUS_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -2063,8 +2070,9 @@ func (availability *HighAvailability) AssignProperties_From_HighAvailability(sou // Mode if source.Mode != nil { - mode := HighAvailability_Mode(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -2156,8 +2164,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // Mode if source.Mode != nil { - mode := HighAvailability_Mode_STATUS(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_STATUS_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -2167,8 +2176,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // State if source.State != nil { - state := HighAvailability_State_STATUS(*source.State) - availability.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, highAvailability_State_STATUS_Values) + availability.State = &stateTemp } else { availability.State = nil } @@ -2627,8 +2637,9 @@ func (network *Network_STATUS) AssignProperties_From_Network_STATUS(source *v202 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := Network_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - network.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, network_PublicNetworkAccess_STATUS_Values) + network.PublicNetworkAccess = &publicNetworkAccessTemp } else { network.PublicNetworkAccess = nil } @@ -2677,6 +2688,14 @@ const ( ServerProperties_CreateMode_Update = ServerProperties_CreateMode("Update") ) +// Mapping from string to ServerProperties_CreateMode +var serverProperties_CreateMode_Values = map[string]ServerProperties_CreateMode{ + "create": ServerProperties_CreateMode_Create, + "default": ServerProperties_CreateMode_Default, + "pointintimerestore": ServerProperties_CreateMode_PointInTimeRestore, + "update": ServerProperties_CreateMode_Update, +} + type ServerProperties_CreateMode_STATUS string const ( @@ -2686,6 +2705,14 @@ const ( ServerProperties_CreateMode_STATUS_Update = ServerProperties_CreateMode_STATUS("Update") ) +// Mapping from string to ServerProperties_CreateMode_STATUS +var serverProperties_CreateMode_STATUS_Values = map[string]ServerProperties_CreateMode_STATUS{ + "create": ServerProperties_CreateMode_STATUS_Create, + "default": ServerProperties_CreateMode_STATUS_Default, + "pointintimerestore": ServerProperties_CreateMode_STATUS_PointInTimeRestore, + "update": ServerProperties_CreateMode_STATUS_Update, +} + type ServerProperties_State_STATUS string const ( @@ -2698,6 +2725,17 @@ const ( ServerProperties_State_STATUS_Updating = ServerProperties_State_STATUS("Updating") ) +// Mapping from string to ServerProperties_State_STATUS +var serverProperties_State_STATUS_Values = map[string]ServerProperties_State_STATUS{ + "disabled": ServerProperties_State_STATUS_Disabled, + "dropping": ServerProperties_State_STATUS_Dropping, + "ready": ServerProperties_State_STATUS_Ready, + "starting": ServerProperties_State_STATUS_Starting, + "stopped": ServerProperties_State_STATUS_Stopped, + "stopping": ServerProperties_State_STATUS_Stopping, + "updating": ServerProperties_State_STATUS_Updating, +} + // The version of a server. // +kubebuilder:validation:Enum={"11","12","13","14"} type ServerVersion string @@ -2709,6 +2747,14 @@ const ( ServerVersion_14 = ServerVersion("14") ) +// Mapping from string to ServerVersion +var serverVersion_Values = map[string]ServerVersion{ + "11": ServerVersion_11, + "12": ServerVersion_12, + "13": ServerVersion_13, + "14": ServerVersion_14, +} + // The version of a server. type ServerVersion_STATUS string @@ -2719,6 +2765,14 @@ const ( ServerVersion_STATUS_14 = ServerVersion_STATUS("14") ) +// Mapping from string to ServerVersion_STATUS +var serverVersion_STATUS_Values = map[string]ServerVersion_STATUS{ + "11": ServerVersion_STATUS_11, + "12": ServerVersion_STATUS_12, + "13": ServerVersion_STATUS_13, + "14": ServerVersion_STATUS_14, +} + // Sku information related properties of a server. type Sku struct { // +kubebuilder:validation:Required @@ -2789,8 +2843,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20210601s.Sku) error { // Tier if source.Tier != nil { - tier := Sku_Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -2873,8 +2928,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20210601s.Sku_S // Tier if source.Tier != nil { - tier := Sku_Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -3129,8 +3185,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -3143,8 +3200,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -3205,6 +3263,12 @@ const ( Backup_GeoRedundantBackup_Enabled = Backup_GeoRedundantBackup("Enabled") ) +// Mapping from string to Backup_GeoRedundantBackup +var backup_GeoRedundantBackup_Values = map[string]Backup_GeoRedundantBackup{ + "disabled": Backup_GeoRedundantBackup_Disabled, + "enabled": Backup_GeoRedundantBackup_Enabled, +} + type Backup_GeoRedundantBackup_STATUS string const ( @@ -3212,6 +3276,12 @@ const ( Backup_GeoRedundantBackup_STATUS_Enabled = Backup_GeoRedundantBackup_STATUS("Enabled") ) +// Mapping from string to Backup_GeoRedundantBackup_STATUS +var backup_GeoRedundantBackup_STATUS_Values = map[string]Backup_GeoRedundantBackup_STATUS{ + "disabled": Backup_GeoRedundantBackup_STATUS_Disabled, + "enabled": Backup_GeoRedundantBackup_STATUS_Enabled, +} + type FlexibleServerOperatorSecrets struct { // FullyQualifiedDomainName: indicates where the FullyQualifiedDomainName secret should be placed. If omitted, the secret // will not be retrieved from Azure. @@ -3265,6 +3335,12 @@ const ( HighAvailability_Mode_ZoneRedundant = HighAvailability_Mode("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode +var highAvailability_Mode_Values = map[string]HighAvailability_Mode{ + "disabled": HighAvailability_Mode_Disabled, + "zoneredundant": HighAvailability_Mode_ZoneRedundant, +} + type HighAvailability_Mode_STATUS string const ( @@ -3272,6 +3348,12 @@ const ( HighAvailability_Mode_STATUS_ZoneRedundant = HighAvailability_Mode_STATUS("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode_STATUS +var highAvailability_Mode_STATUS_Values = map[string]HighAvailability_Mode_STATUS{ + "disabled": HighAvailability_Mode_STATUS_Disabled, + "zoneredundant": HighAvailability_Mode_STATUS_ZoneRedundant, +} + type HighAvailability_State_STATUS string const ( @@ -3283,6 +3365,16 @@ const ( HighAvailability_State_STATUS_ReplicatingData = HighAvailability_State_STATUS("ReplicatingData") ) +// Mapping from string to HighAvailability_State_STATUS +var highAvailability_State_STATUS_Values = map[string]HighAvailability_State_STATUS{ + "creatingstandby": HighAvailability_State_STATUS_CreatingStandby, + "failingover": HighAvailability_State_STATUS_FailingOver, + "healthy": HighAvailability_State_STATUS_Healthy, + "notenabled": HighAvailability_State_STATUS_NotEnabled, + "removingstandby": HighAvailability_State_STATUS_RemovingStandby, + "replicatingdata": HighAvailability_State_STATUS_ReplicatingData, +} + type Network_PublicNetworkAccess_STATUS string const ( @@ -3290,6 +3382,12 @@ const ( Network_PublicNetworkAccess_STATUS_Enabled = Network_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to Network_PublicNetworkAccess_STATUS +var network_PublicNetworkAccess_STATUS_Values = map[string]Network_PublicNetworkAccess_STATUS{ + "disabled": Network_PublicNetworkAccess_STATUS_Disabled, + "enabled": Network_PublicNetworkAccess_STATUS_Enabled, +} + func init() { SchemeBuilder.Register(&FlexibleServer{}, &FlexibleServerList{}) } diff --git a/v2/api/dbforpostgresql/v1api20210601/flexible_servers_configuration_types_gen.go b/v2/api/dbforpostgresql/v1api20210601/flexible_servers_configuration_types_gen.go index e79eb2ff529..a558ab29479 100644 --- a/v2/api/dbforpostgresql/v1api20210601/flexible_servers_configuration_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20210601/flexible_servers_configuration_types_gen.go @@ -794,8 +794,9 @@ func (configuration *FlexibleServers_Configuration_STATUS) AssignProperties_From // DataType if source.DataType != nil { - dataType := ConfigurationProperties_DataType_STATUS(*source.DataType) - configuration.DataType = &dataType + dataType := *source.DataType + dataTypeTemp := genruntime.ToEnum(dataType, configurationProperties_DataType_STATUS_Values) + configuration.DataType = &dataTypeTemp } else { configuration.DataType = nil } @@ -969,6 +970,14 @@ const ( ConfigurationProperties_DataType_STATUS_Numeric = ConfigurationProperties_DataType_STATUS("Numeric") ) +// Mapping from string to ConfigurationProperties_DataType_STATUS +var configurationProperties_DataType_STATUS_Values = map[string]ConfigurationProperties_DataType_STATUS{ + "boolean": ConfigurationProperties_DataType_STATUS_Boolean, + "enumeration": ConfigurationProperties_DataType_STATUS_Enumeration, + "integer": ConfigurationProperties_DataType_STATUS_Integer, + "numeric": ConfigurationProperties_DataType_STATUS_Numeric, +} + func init() { SchemeBuilder.Register(&FlexibleServersConfiguration{}, &FlexibleServersConfigurationList{}) } diff --git a/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_spec_arm_types_gen.go b/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_spec_arm_types_gen.go index e3dc6cc4d7d..79d5be46627 100644 --- a/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_spec_arm_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_spec_arm_types_gen.go @@ -133,6 +133,13 @@ const ( Sku_Tier_MemoryOptimized = Sku_Tier("MemoryOptimized") ) +// Mapping from string to Sku_Tier +var sku_Tier_Values = map[string]Sku_Tier{ + "burstable": Sku_Tier_Burstable, + "generalpurpose": Sku_Tier_GeneralPurpose, + "memoryoptimized": Sku_Tier_MemoryOptimized, +} + // Storage properties of a server type Storage_ARM struct { // StorageSizeGB: Max storage allowed for a server. diff --git a/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_status_arm_types_gen.go b/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_status_arm_types_gen.go index d5da7c1b428..f011c91646a 100644 --- a/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_status_arm_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_status_arm_types_gen.go @@ -167,6 +167,13 @@ const ( Sku_Tier_STATUS_MemoryOptimized = Sku_Tier_STATUS("MemoryOptimized") ) +// Mapping from string to Sku_Tier_STATUS +var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{ + "burstable": Sku_Tier_STATUS_Burstable, + "generalpurpose": Sku_Tier_STATUS_GeneralPurpose, + "memoryoptimized": Sku_Tier_STATUS_MemoryOptimized, +} + // Storage properties of a server type Storage_STATUS_ARM struct { // StorageSizeGB: Max storage allowed for a server. @@ -182,6 +189,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -190,3 +205,11 @@ const ( SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} diff --git a/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_types_gen.go b/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_types_gen.go index d684476dc30..f1f7c21edf7 100644 --- a/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20220120preview/flexible_server_types_gen.go @@ -838,8 +838,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -943,8 +944,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // Version if source.Version != nil { - version := ServerVersion(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -1495,8 +1497,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode_STATUS(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_STATUS_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -1572,8 +1575,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // State if source.State != nil { - state := ServerProperties_State_STATUS(*source.State) - server.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverProperties_State_STATUS_Values) + server.State = &stateTemp } else { server.State = nil } @@ -1610,8 +1614,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // Version if source.Version != nil { - version := ServerVersion_STATUS(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_STATUS_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -1848,8 +1853,9 @@ func (backup *Backup) AssignProperties_From_Backup(source *v20220120ps.Backup) e // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := Backup_GeoRedundantBackup(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, backup_GeoRedundantBackup_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -1944,8 +1950,9 @@ func (backup *Backup_STATUS) AssignProperties_From_Backup_STATUS(source *v202201 // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := Backup_GeoRedundantBackup_STATUS(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, backup_GeoRedundantBackup_STATUS_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -2129,8 +2136,9 @@ func (availability *HighAvailability) AssignProperties_From_HighAvailability(sou // Mode if source.Mode != nil { - mode := HighAvailability_Mode(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -2222,8 +2230,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // Mode if source.Mode != nil { - mode := HighAvailability_Mode_STATUS(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_STATUS_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -2233,8 +2242,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // State if source.State != nil { - state := HighAvailability_State_STATUS(*source.State) - availability.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, highAvailability_State_STATUS_Values) + availability.State = &stateTemp } else { availability.State = nil } @@ -2693,8 +2703,9 @@ func (network *Network_STATUS) AssignProperties_From_Network_STATUS(source *v202 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := Network_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - network.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, network_PublicNetworkAccess_STATUS_Values) + network.PublicNetworkAccess = &publicNetworkAccessTemp } else { network.PublicNetworkAccess = nil } @@ -2743,6 +2754,14 @@ const ( ServerProperties_CreateMode_Update = ServerProperties_CreateMode("Update") ) +// Mapping from string to ServerProperties_CreateMode +var serverProperties_CreateMode_Values = map[string]ServerProperties_CreateMode{ + "create": ServerProperties_CreateMode_Create, + "default": ServerProperties_CreateMode_Default, + "pointintimerestore": ServerProperties_CreateMode_PointInTimeRestore, + "update": ServerProperties_CreateMode_Update, +} + type ServerProperties_CreateMode_STATUS string const ( @@ -2752,6 +2771,14 @@ const ( ServerProperties_CreateMode_STATUS_Update = ServerProperties_CreateMode_STATUS("Update") ) +// Mapping from string to ServerProperties_CreateMode_STATUS +var serverProperties_CreateMode_STATUS_Values = map[string]ServerProperties_CreateMode_STATUS{ + "create": ServerProperties_CreateMode_STATUS_Create, + "default": ServerProperties_CreateMode_STATUS_Default, + "pointintimerestore": ServerProperties_CreateMode_STATUS_PointInTimeRestore, + "update": ServerProperties_CreateMode_STATUS_Update, +} + type ServerProperties_State_STATUS string const ( @@ -2764,6 +2791,17 @@ const ( ServerProperties_State_STATUS_Updating = ServerProperties_State_STATUS("Updating") ) +// Mapping from string to ServerProperties_State_STATUS +var serverProperties_State_STATUS_Values = map[string]ServerProperties_State_STATUS{ + "disabled": ServerProperties_State_STATUS_Disabled, + "dropping": ServerProperties_State_STATUS_Dropping, + "ready": ServerProperties_State_STATUS_Ready, + "starting": ServerProperties_State_STATUS_Starting, + "stopped": ServerProperties_State_STATUS_Stopped, + "stopping": ServerProperties_State_STATUS_Stopping, + "updating": ServerProperties_State_STATUS_Updating, +} + // The version of a server. // +kubebuilder:validation:Enum={"11","12","13","14"} type ServerVersion string @@ -2775,6 +2813,14 @@ const ( ServerVersion_14 = ServerVersion("14") ) +// Mapping from string to ServerVersion +var serverVersion_Values = map[string]ServerVersion{ + "11": ServerVersion_11, + "12": ServerVersion_12, + "13": ServerVersion_13, + "14": ServerVersion_14, +} + // The version of a server. type ServerVersion_STATUS string @@ -2785,6 +2831,14 @@ const ( ServerVersion_STATUS_14 = ServerVersion_STATUS("14") ) +// Mapping from string to ServerVersion_STATUS +var serverVersion_STATUS_Values = map[string]ServerVersion_STATUS{ + "11": ServerVersion_STATUS_11, + "12": ServerVersion_STATUS_12, + "13": ServerVersion_STATUS_13, + "14": ServerVersion_STATUS_14, +} + // Sku information related properties of a server. type Sku struct { // +kubebuilder:validation:Required @@ -2855,8 +2909,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20220120ps.Sku) error { // Tier if source.Tier != nil { - tier := Sku_Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -2939,8 +2994,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20220120ps.Sku_ // Tier if source.Tier != nil { - tier := Sku_Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -3195,8 +3251,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -3209,8 +3266,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -3271,6 +3329,12 @@ const ( Backup_GeoRedundantBackup_Enabled = Backup_GeoRedundantBackup("Enabled") ) +// Mapping from string to Backup_GeoRedundantBackup +var backup_GeoRedundantBackup_Values = map[string]Backup_GeoRedundantBackup{ + "disabled": Backup_GeoRedundantBackup_Disabled, + "enabled": Backup_GeoRedundantBackup_Enabled, +} + type Backup_GeoRedundantBackup_STATUS string const ( @@ -3278,6 +3342,12 @@ const ( Backup_GeoRedundantBackup_STATUS_Enabled = Backup_GeoRedundantBackup_STATUS("Enabled") ) +// Mapping from string to Backup_GeoRedundantBackup_STATUS +var backup_GeoRedundantBackup_STATUS_Values = map[string]Backup_GeoRedundantBackup_STATUS{ + "disabled": Backup_GeoRedundantBackup_STATUS_Disabled, + "enabled": Backup_GeoRedundantBackup_STATUS_Enabled, +} + type FlexibleServerOperatorConfigMaps struct { // FullyQualifiedDomainName: indicates where the FullyQualifiedDomainName config map should be placed. If omitted, no // config map will be created. @@ -3377,6 +3447,13 @@ const ( HighAvailability_Mode_ZoneRedundant = HighAvailability_Mode("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode +var highAvailability_Mode_Values = map[string]HighAvailability_Mode{ + "disabled": HighAvailability_Mode_Disabled, + "samezone": HighAvailability_Mode_SameZone, + "zoneredundant": HighAvailability_Mode_ZoneRedundant, +} + type HighAvailability_Mode_STATUS string const ( @@ -3385,6 +3462,13 @@ const ( HighAvailability_Mode_STATUS_ZoneRedundant = HighAvailability_Mode_STATUS("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode_STATUS +var highAvailability_Mode_STATUS_Values = map[string]HighAvailability_Mode_STATUS{ + "disabled": HighAvailability_Mode_STATUS_Disabled, + "samezone": HighAvailability_Mode_STATUS_SameZone, + "zoneredundant": HighAvailability_Mode_STATUS_ZoneRedundant, +} + type HighAvailability_State_STATUS string const ( @@ -3396,6 +3480,16 @@ const ( HighAvailability_State_STATUS_ReplicatingData = HighAvailability_State_STATUS("ReplicatingData") ) +// Mapping from string to HighAvailability_State_STATUS +var highAvailability_State_STATUS_Values = map[string]HighAvailability_State_STATUS{ + "creatingstandby": HighAvailability_State_STATUS_CreatingStandby, + "failingover": HighAvailability_State_STATUS_FailingOver, + "healthy": HighAvailability_State_STATUS_Healthy, + "notenabled": HighAvailability_State_STATUS_NotEnabled, + "removingstandby": HighAvailability_State_STATUS_RemovingStandby, + "replicatingdata": HighAvailability_State_STATUS_ReplicatingData, +} + type Network_PublicNetworkAccess_STATUS string const ( @@ -3403,6 +3497,12 @@ const ( Network_PublicNetworkAccess_STATUS_Enabled = Network_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to Network_PublicNetworkAccess_STATUS +var network_PublicNetworkAccess_STATUS_Values = map[string]Network_PublicNetworkAccess_STATUS{ + "disabled": Network_PublicNetworkAccess_STATUS_Disabled, + "enabled": Network_PublicNetworkAccess_STATUS_Enabled, +} + func init() { SchemeBuilder.Register(&FlexibleServer{}, &FlexibleServerList{}) } diff --git a/v2/api/dbforpostgresql/v1api20220120preview/flexible_servers_configuration_types_gen.go b/v2/api/dbforpostgresql/v1api20220120preview/flexible_servers_configuration_types_gen.go index 3e1aa6616be..232c009d8dc 100644 --- a/v2/api/dbforpostgresql/v1api20220120preview/flexible_servers_configuration_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20220120preview/flexible_servers_configuration_types_gen.go @@ -794,8 +794,9 @@ func (configuration *FlexibleServers_Configuration_STATUS) AssignProperties_From // DataType if source.DataType != nil { - dataType := ConfigurationProperties_DataType_STATUS(*source.DataType) - configuration.DataType = &dataType + dataType := *source.DataType + dataTypeTemp := genruntime.ToEnum(dataType, configurationProperties_DataType_STATUS_Values) + configuration.DataType = &dataTypeTemp } else { configuration.DataType = nil } @@ -969,6 +970,14 @@ const ( ConfigurationProperties_DataType_STATUS_Numeric = ConfigurationProperties_DataType_STATUS("Numeric") ) +// Mapping from string to ConfigurationProperties_DataType_STATUS +var configurationProperties_DataType_STATUS_Values = map[string]ConfigurationProperties_DataType_STATUS{ + "boolean": ConfigurationProperties_DataType_STATUS_Boolean, + "enumeration": ConfigurationProperties_DataType_STATUS_Enumeration, + "integer": ConfigurationProperties_DataType_STATUS_Integer, + "numeric": ConfigurationProperties_DataType_STATUS_Numeric, +} + func init() { SchemeBuilder.Register(&FlexibleServersConfiguration{}, &FlexibleServersConfigurationList{}) } diff --git a/v2/api/dbforpostgresql/v1api20221201/flexible_server_spec_arm_types_gen.go b/v2/api/dbforpostgresql/v1api20221201/flexible_server_spec_arm_types_gen.go index 6edc55c19c4..b5ae170ca32 100644 --- a/v2/api/dbforpostgresql/v1api20221201/flexible_server_spec_arm_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20221201/flexible_server_spec_arm_types_gen.go @@ -175,6 +175,13 @@ const ( Sku_Tier_MemoryOptimized = Sku_Tier("MemoryOptimized") ) +// Mapping from string to Sku_Tier +var sku_Tier_Values = map[string]Sku_Tier{ + "burstable": Sku_Tier_Burstable, + "generalpurpose": Sku_Tier_GeneralPurpose, + "memoryoptimized": Sku_Tier_MemoryOptimized, +} + // Storage properties of a server type Storage_ARM struct { // StorageSizeGB: Max storage allowed for a server. @@ -189,6 +196,12 @@ const ( UserAssignedIdentity_Type_UserAssigned = UserAssignedIdentity_Type("UserAssigned") ) +// Mapping from string to UserAssignedIdentity_Type +var userAssignedIdentity_Type_Values = map[string]UserAssignedIdentity_Type{ + "none": UserAssignedIdentity_Type_None, + "userassigned": UserAssignedIdentity_Type_UserAssigned, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/dbforpostgresql/v1api20221201/flexible_server_status_arm_types_gen.go b/v2/api/dbforpostgresql/v1api20221201/flexible_server_status_arm_types_gen.go index 9444bc028a6..d754f7eeb82 100644 --- a/v2/api/dbforpostgresql/v1api20221201/flexible_server_status_arm_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20221201/flexible_server_status_arm_types_gen.go @@ -224,6 +224,13 @@ const ( Sku_Tier_STATUS_MemoryOptimized = Sku_Tier_STATUS("MemoryOptimized") ) +// Mapping from string to Sku_Tier_STATUS +var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{ + "burstable": Sku_Tier_STATUS_Burstable, + "generalpurpose": Sku_Tier_STATUS_GeneralPurpose, + "memoryoptimized": Sku_Tier_STATUS_MemoryOptimized, +} + // Storage properties of a server type Storage_STATUS_ARM struct { // StorageSizeGB: Max storage allowed for a server. @@ -239,6 +246,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -248,6 +263,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + type UserAssignedIdentity_Type_STATUS string const ( @@ -255,6 +278,12 @@ const ( UserAssignedIdentity_Type_STATUS_UserAssigned = UserAssignedIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to UserAssignedIdentity_Type_STATUS +var userAssignedIdentity_Type_STATUS_Values = map[string]UserAssignedIdentity_Type_STATUS{ + "none": UserAssignedIdentity_Type_STATUS_None, + "userassigned": UserAssignedIdentity_Type_STATUS_UserAssigned, +} + // Describes a single user-assigned identity associated with the application. type UserIdentity_STATUS_ARM struct { // ClientId: the client identifier of the Service Principal which this identity represents. diff --git a/v2/api/dbforpostgresql/v1api20221201/flexible_server_types_gen.go b/v2/api/dbforpostgresql/v1api20221201/flexible_server_types_gen.go index 059a488319c..a75e4b3300e 100644 --- a/v2/api/dbforpostgresql/v1api20221201/flexible_server_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20221201/flexible_server_types_gen.go @@ -944,8 +944,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -1038,8 +1039,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // ReplicationRole if source.ReplicationRole != nil { - replicationRole := ReplicationRole(*source.ReplicationRole) - server.ReplicationRole = &replicationRole + replicationRole := *source.ReplicationRole + replicationRoleTemp := genruntime.ToEnum(replicationRole, replicationRole_Values) + server.ReplicationRole = &replicationRoleTemp } else { server.ReplicationRole = nil } @@ -1081,8 +1083,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // Version if source.Version != nil { - version := ServerVersion(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -1924,8 +1927,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode_STATUS(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_STATUS_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -2013,8 +2017,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // ReplicationRole if source.ReplicationRole != nil { - replicationRole := ReplicationRole_STATUS(*source.ReplicationRole) - server.ReplicationRole = &replicationRole + replicationRole := *source.ReplicationRole + replicationRoleTemp := genruntime.ToEnum(replicationRole, replicationRole_STATUS_Values) + server.ReplicationRole = &replicationRoleTemp } else { server.ReplicationRole = nil } @@ -2036,8 +2041,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // State if source.State != nil { - state := ServerProperties_State_STATUS(*source.State) - server.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverProperties_State_STATUS_Values) + server.State = &stateTemp } else { server.State = nil } @@ -2074,8 +2080,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // Version if source.Version != nil { - version := ServerVersion_STATUS(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_STATUS_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -2371,16 +2378,18 @@ func (config *AuthConfig) AssignProperties_From_AuthConfig(source *v20221201s.Au // ActiveDirectoryAuth if source.ActiveDirectoryAuth != nil { - activeDirectoryAuth := AuthConfig_ActiveDirectoryAuth(*source.ActiveDirectoryAuth) - config.ActiveDirectoryAuth = &activeDirectoryAuth + activeDirectoryAuth := *source.ActiveDirectoryAuth + activeDirectoryAuthTemp := genruntime.ToEnum(activeDirectoryAuth, authConfig_ActiveDirectoryAuth_Values) + config.ActiveDirectoryAuth = &activeDirectoryAuthTemp } else { config.ActiveDirectoryAuth = nil } // PasswordAuth if source.PasswordAuth != nil { - passwordAuth := AuthConfig_PasswordAuth(*source.PasswordAuth) - config.PasswordAuth = &passwordAuth + passwordAuth := *source.PasswordAuth + passwordAuthTemp := genruntime.ToEnum(passwordAuth, authConfig_PasswordAuth_Values) + config.PasswordAuth = &passwordAuthTemp } else { config.PasswordAuth = nil } @@ -2506,16 +2515,18 @@ func (config *AuthConfig_STATUS) AssignProperties_From_AuthConfig_STATUS(source // ActiveDirectoryAuth if source.ActiveDirectoryAuth != nil { - activeDirectoryAuth := AuthConfig_ActiveDirectoryAuth_STATUS(*source.ActiveDirectoryAuth) - config.ActiveDirectoryAuth = &activeDirectoryAuth + activeDirectoryAuth := *source.ActiveDirectoryAuth + activeDirectoryAuthTemp := genruntime.ToEnum(activeDirectoryAuth, authConfig_ActiveDirectoryAuth_STATUS_Values) + config.ActiveDirectoryAuth = &activeDirectoryAuthTemp } else { config.ActiveDirectoryAuth = nil } // PasswordAuth if source.PasswordAuth != nil { - passwordAuth := AuthConfig_PasswordAuth_STATUS(*source.PasswordAuth) - config.PasswordAuth = &passwordAuth + passwordAuth := *source.PasswordAuth + passwordAuthTemp := genruntime.ToEnum(passwordAuth, authConfig_PasswordAuth_STATUS_Values) + config.PasswordAuth = &passwordAuthTemp } else { config.PasswordAuth = nil } @@ -2630,8 +2641,9 @@ func (backup *Backup) AssignProperties_From_Backup(source *v20221201s.Backup) er // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := Backup_GeoRedundantBackup(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, backup_GeoRedundantBackup_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -2744,8 +2756,9 @@ func (backup *Backup_STATUS) AssignProperties_From_Backup_STATUS(source *v202212 // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := Backup_GeoRedundantBackup_STATUS(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, backup_GeoRedundantBackup_STATUS_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -2876,8 +2889,9 @@ func (encryption *DataEncryption) AssignProperties_From_DataEncryption(source *v // Type if source.Type != nil { - typeVar := DataEncryption_Type(*source.Type) - encryption.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, dataEncryption_Type_Values) + encryption.Type = &typeTemp } else { encryption.Type = nil } @@ -3007,8 +3021,9 @@ func (encryption *DataEncryption_STATUS) AssignProperties_From_DataEncryption_ST // Type if source.Type != nil { - typeVar := DataEncryption_Type_STATUS(*source.Type) - encryption.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, dataEncryption_Type_STATUS_Values) + encryption.Type = &typeTemp } else { encryption.Type = nil } @@ -3192,8 +3207,9 @@ func (availability *HighAvailability) AssignProperties_From_HighAvailability(sou // Mode if source.Mode != nil { - mode := HighAvailability_Mode(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -3303,8 +3319,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // Mode if source.Mode != nil { - mode := HighAvailability_Mode_STATUS(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_STATUS_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -3314,8 +3331,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // State if source.State != nil { - state := HighAvailability_State_STATUS(*source.State) - availability.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, highAvailability_State_STATUS_Values) + availability.State = &stateTemp } else { availability.State = nil } @@ -3824,8 +3842,9 @@ func (network *Network_STATUS) AssignProperties_From_Network_STATUS(source *v202 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := Network_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - network.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, network_PublicNetworkAccess_STATUS_Values) + network.PublicNetworkAccess = &publicNetworkAccessTemp } else { network.PublicNetworkAccess = nil } @@ -3875,6 +3894,14 @@ const ( ReplicationRole_Primary = ReplicationRole("Primary") ) +// Mapping from string to ReplicationRole +var replicationRole_Values = map[string]ReplicationRole{ + "asyncreplica": ReplicationRole_AsyncReplica, + "geoasyncreplica": ReplicationRole_GeoAsyncReplica, + "none": ReplicationRole_None, + "primary": ReplicationRole_Primary, +} + // Used to indicate role of the server in replication set. type ReplicationRole_STATUS string @@ -3885,6 +3912,14 @@ const ( ReplicationRole_STATUS_Primary = ReplicationRole_STATUS("Primary") ) +// Mapping from string to ReplicationRole_STATUS +var replicationRole_STATUS_Values = map[string]ReplicationRole_STATUS{ + "asyncreplica": ReplicationRole_STATUS_AsyncReplica, + "geoasyncreplica": ReplicationRole_STATUS_GeoAsyncReplica, + "none": ReplicationRole_STATUS_None, + "primary": ReplicationRole_STATUS_Primary, +} + // +kubebuilder:validation:Enum={"Create","Default","GeoRestore","PointInTimeRestore","Replica","Update"} type ServerProperties_CreateMode string @@ -3897,6 +3932,16 @@ const ( ServerProperties_CreateMode_Update = ServerProperties_CreateMode("Update") ) +// Mapping from string to ServerProperties_CreateMode +var serverProperties_CreateMode_Values = map[string]ServerProperties_CreateMode{ + "create": ServerProperties_CreateMode_Create, + "default": ServerProperties_CreateMode_Default, + "georestore": ServerProperties_CreateMode_GeoRestore, + "pointintimerestore": ServerProperties_CreateMode_PointInTimeRestore, + "replica": ServerProperties_CreateMode_Replica, + "update": ServerProperties_CreateMode_Update, +} + type ServerProperties_CreateMode_STATUS string const ( @@ -3908,6 +3953,16 @@ const ( ServerProperties_CreateMode_STATUS_Update = ServerProperties_CreateMode_STATUS("Update") ) +// Mapping from string to ServerProperties_CreateMode_STATUS +var serverProperties_CreateMode_STATUS_Values = map[string]ServerProperties_CreateMode_STATUS{ + "create": ServerProperties_CreateMode_STATUS_Create, + "default": ServerProperties_CreateMode_STATUS_Default, + "georestore": ServerProperties_CreateMode_STATUS_GeoRestore, + "pointintimerestore": ServerProperties_CreateMode_STATUS_PointInTimeRestore, + "replica": ServerProperties_CreateMode_STATUS_Replica, + "update": ServerProperties_CreateMode_STATUS_Update, +} + type ServerProperties_State_STATUS string const ( @@ -3920,6 +3975,17 @@ const ( ServerProperties_State_STATUS_Updating = ServerProperties_State_STATUS("Updating") ) +// Mapping from string to ServerProperties_State_STATUS +var serverProperties_State_STATUS_Values = map[string]ServerProperties_State_STATUS{ + "disabled": ServerProperties_State_STATUS_Disabled, + "dropping": ServerProperties_State_STATUS_Dropping, + "ready": ServerProperties_State_STATUS_Ready, + "starting": ServerProperties_State_STATUS_Starting, + "stopped": ServerProperties_State_STATUS_Stopped, + "stopping": ServerProperties_State_STATUS_Stopping, + "updating": ServerProperties_State_STATUS_Updating, +} + // The version of a server. // +kubebuilder:validation:Enum={"11","12","13","14"} type ServerVersion string @@ -3931,6 +3997,14 @@ const ( ServerVersion_14 = ServerVersion("14") ) +// Mapping from string to ServerVersion +var serverVersion_Values = map[string]ServerVersion{ + "11": ServerVersion_11, + "12": ServerVersion_12, + "13": ServerVersion_13, + "14": ServerVersion_14, +} + // The version of a server. type ServerVersion_STATUS string @@ -3941,6 +4015,14 @@ const ( ServerVersion_STATUS_14 = ServerVersion_STATUS("14") ) +// Mapping from string to ServerVersion_STATUS +var serverVersion_STATUS_Values = map[string]ServerVersion_STATUS{ + "11": ServerVersion_STATUS_11, + "12": ServerVersion_STATUS_12, + "13": ServerVersion_STATUS_13, + "14": ServerVersion_STATUS_14, +} + // Sku information related properties of a server. type Sku struct { // +kubebuilder:validation:Required @@ -4011,8 +4093,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20221201s.Sku) error { // Tier if source.Tier != nil { - tier := Sku_Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -4113,8 +4196,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20221201s.Sku_S // Tier if source.Tier != nil { - tier := Sku_Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -4379,8 +4463,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -4393,8 +4478,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -4514,8 +4600,9 @@ func (identity *UserAssignedIdentity) AssignProperties_From_UserAssignedIdentity // Type if source.Type != nil { - typeVar := UserAssignedIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, userAssignedIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -4674,8 +4761,9 @@ func (identity *UserAssignedIdentity_STATUS) AssignProperties_From_UserAssignedI // Type if source.Type != nil { - typeVar := UserAssignedIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, userAssignedIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -4755,6 +4843,12 @@ const ( AuthConfig_ActiveDirectoryAuth_Enabled = AuthConfig_ActiveDirectoryAuth("Enabled") ) +// Mapping from string to AuthConfig_ActiveDirectoryAuth +var authConfig_ActiveDirectoryAuth_Values = map[string]AuthConfig_ActiveDirectoryAuth{ + "disabled": AuthConfig_ActiveDirectoryAuth_Disabled, + "enabled": AuthConfig_ActiveDirectoryAuth_Enabled, +} + type AuthConfig_ActiveDirectoryAuth_STATUS string const ( @@ -4762,6 +4856,12 @@ const ( AuthConfig_ActiveDirectoryAuth_STATUS_Enabled = AuthConfig_ActiveDirectoryAuth_STATUS("Enabled") ) +// Mapping from string to AuthConfig_ActiveDirectoryAuth_STATUS +var authConfig_ActiveDirectoryAuth_STATUS_Values = map[string]AuthConfig_ActiveDirectoryAuth_STATUS{ + "disabled": AuthConfig_ActiveDirectoryAuth_STATUS_Disabled, + "enabled": AuthConfig_ActiveDirectoryAuth_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type AuthConfig_PasswordAuth string @@ -4770,6 +4870,12 @@ const ( AuthConfig_PasswordAuth_Enabled = AuthConfig_PasswordAuth("Enabled") ) +// Mapping from string to AuthConfig_PasswordAuth +var authConfig_PasswordAuth_Values = map[string]AuthConfig_PasswordAuth{ + "disabled": AuthConfig_PasswordAuth_Disabled, + "enabled": AuthConfig_PasswordAuth_Enabled, +} + type AuthConfig_PasswordAuth_STATUS string const ( @@ -4777,6 +4883,12 @@ const ( AuthConfig_PasswordAuth_STATUS_Enabled = AuthConfig_PasswordAuth_STATUS("Enabled") ) +// Mapping from string to AuthConfig_PasswordAuth_STATUS +var authConfig_PasswordAuth_STATUS_Values = map[string]AuthConfig_PasswordAuth_STATUS{ + "disabled": AuthConfig_PasswordAuth_STATUS_Disabled, + "enabled": AuthConfig_PasswordAuth_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type Backup_GeoRedundantBackup string @@ -4785,6 +4897,12 @@ const ( Backup_GeoRedundantBackup_Enabled = Backup_GeoRedundantBackup("Enabled") ) +// Mapping from string to Backup_GeoRedundantBackup +var backup_GeoRedundantBackup_Values = map[string]Backup_GeoRedundantBackup{ + "disabled": Backup_GeoRedundantBackup_Disabled, + "enabled": Backup_GeoRedundantBackup_Enabled, +} + type Backup_GeoRedundantBackup_STATUS string const ( @@ -4792,6 +4910,12 @@ const ( Backup_GeoRedundantBackup_STATUS_Enabled = Backup_GeoRedundantBackup_STATUS("Enabled") ) +// Mapping from string to Backup_GeoRedundantBackup_STATUS +var backup_GeoRedundantBackup_STATUS_Values = map[string]Backup_GeoRedundantBackup_STATUS{ + "disabled": Backup_GeoRedundantBackup_STATUS_Disabled, + "enabled": Backup_GeoRedundantBackup_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"AzureKeyVault","SystemManaged"} type DataEncryption_Type string @@ -4800,6 +4924,12 @@ const ( DataEncryption_Type_SystemManaged = DataEncryption_Type("SystemManaged") ) +// Mapping from string to DataEncryption_Type +var dataEncryption_Type_Values = map[string]DataEncryption_Type{ + "azurekeyvault": DataEncryption_Type_AzureKeyVault, + "systemmanaged": DataEncryption_Type_SystemManaged, +} + type DataEncryption_Type_STATUS string const ( @@ -4807,6 +4937,12 @@ const ( DataEncryption_Type_STATUS_SystemManaged = DataEncryption_Type_STATUS("SystemManaged") ) +// Mapping from string to DataEncryption_Type_STATUS +var dataEncryption_Type_STATUS_Values = map[string]DataEncryption_Type_STATUS{ + "azurekeyvault": DataEncryption_Type_STATUS_AzureKeyVault, + "systemmanaged": DataEncryption_Type_STATUS_SystemManaged, +} + type FlexibleServerOperatorConfigMaps struct { // FullyQualifiedDomainName: indicates where the FullyQualifiedDomainName config map should be placed. If omitted, no // config map will be created. @@ -4906,6 +5042,13 @@ const ( HighAvailability_Mode_ZoneRedundant = HighAvailability_Mode("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode +var highAvailability_Mode_Values = map[string]HighAvailability_Mode{ + "disabled": HighAvailability_Mode_Disabled, + "samezone": HighAvailability_Mode_SameZone, + "zoneredundant": HighAvailability_Mode_ZoneRedundant, +} + type HighAvailability_Mode_STATUS string const ( @@ -4914,6 +5057,13 @@ const ( HighAvailability_Mode_STATUS_ZoneRedundant = HighAvailability_Mode_STATUS("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode_STATUS +var highAvailability_Mode_STATUS_Values = map[string]HighAvailability_Mode_STATUS{ + "disabled": HighAvailability_Mode_STATUS_Disabled, + "samezone": HighAvailability_Mode_STATUS_SameZone, + "zoneredundant": HighAvailability_Mode_STATUS_ZoneRedundant, +} + type HighAvailability_State_STATUS string const ( @@ -4925,6 +5075,16 @@ const ( HighAvailability_State_STATUS_ReplicatingData = HighAvailability_State_STATUS("ReplicatingData") ) +// Mapping from string to HighAvailability_State_STATUS +var highAvailability_State_STATUS_Values = map[string]HighAvailability_State_STATUS{ + "creatingstandby": HighAvailability_State_STATUS_CreatingStandby, + "failingover": HighAvailability_State_STATUS_FailingOver, + "healthy": HighAvailability_State_STATUS_Healthy, + "notenabled": HighAvailability_State_STATUS_NotEnabled, + "removingstandby": HighAvailability_State_STATUS_RemovingStandby, + "replicatingdata": HighAvailability_State_STATUS_ReplicatingData, +} + type Network_PublicNetworkAccess_STATUS string const ( @@ -4932,6 +5092,12 @@ const ( Network_PublicNetworkAccess_STATUS_Enabled = Network_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to Network_PublicNetworkAccess_STATUS +var network_PublicNetworkAccess_STATUS_Values = map[string]Network_PublicNetworkAccess_STATUS{ + "disabled": Network_PublicNetworkAccess_STATUS_Disabled, + "enabled": Network_PublicNetworkAccess_STATUS_Enabled, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails struct { Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` diff --git a/v2/api/dbforpostgresql/v1api20221201/flexible_servers_configuration_types_gen.go b/v2/api/dbforpostgresql/v1api20221201/flexible_servers_configuration_types_gen.go index 79901e789b7..c15734adb1d 100644 --- a/v2/api/dbforpostgresql/v1api20221201/flexible_servers_configuration_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20221201/flexible_servers_configuration_types_gen.go @@ -806,8 +806,9 @@ func (configuration *FlexibleServers_Configuration_STATUS) AssignProperties_From // DataType if source.DataType != nil { - dataType := ConfigurationProperties_DataType_STATUS(*source.DataType) - configuration.DataType = &dataType + dataType := *source.DataType + dataTypeTemp := genruntime.ToEnum(dataType, configurationProperties_DataType_STATUS_Values) + configuration.DataType = &dataTypeTemp } else { configuration.DataType = nil } @@ -981,6 +982,14 @@ const ( ConfigurationProperties_DataType_STATUS_Numeric = ConfigurationProperties_DataType_STATUS("Numeric") ) +// Mapping from string to ConfigurationProperties_DataType_STATUS +var configurationProperties_DataType_STATUS_Values = map[string]ConfigurationProperties_DataType_STATUS{ + "boolean": ConfigurationProperties_DataType_STATUS_Boolean, + "enumeration": ConfigurationProperties_DataType_STATUS_Enumeration, + "integer": ConfigurationProperties_DataType_STATUS_Integer, + "numeric": ConfigurationProperties_DataType_STATUS_Numeric, +} + func init() { SchemeBuilder.Register(&FlexibleServersConfiguration{}, &FlexibleServersConfigurationList{}) } diff --git a/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_spec_arm_types_gen.go b/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_spec_arm_types_gen.go index 0d491e95330..d2f29d1ff34 100644 --- a/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_spec_arm_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_spec_arm_types_gen.go @@ -204,6 +204,13 @@ const ( Sku_Tier_MemoryOptimized = Sku_Tier("MemoryOptimized") ) +// Mapping from string to Sku_Tier +var sku_Tier_Values = map[string]Sku_Tier{ + "burstable": Sku_Tier_Burstable, + "generalpurpose": Sku_Tier_GeneralPurpose, + "memoryoptimized": Sku_Tier_MemoryOptimized, +} + // Storage properties of a server type Storage_ARM struct { // AutoGrow: Flag to enable / disable Storage Auto grow for flexible server. @@ -234,6 +241,12 @@ const ( UserAssignedIdentity_Type_UserAssigned = UserAssignedIdentity_Type("UserAssigned") ) +// Mapping from string to UserAssignedIdentity_Type +var userAssignedIdentity_Type_Values = map[string]UserAssignedIdentity_Type{ + "none": UserAssignedIdentity_Type_None, + "userassigned": UserAssignedIdentity_Type_UserAssigned, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_status_arm_types_gen.go b/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_status_arm_types_gen.go index 9cf2d8bbc2c..111665ffdbd 100644 --- a/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_status_arm_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_status_arm_types_gen.go @@ -270,6 +270,13 @@ const ( Sku_Tier_STATUS_MemoryOptimized = Sku_Tier_STATUS("MemoryOptimized") ) +// Mapping from string to Sku_Tier_STATUS +var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{ + "burstable": Sku_Tier_STATUS_Burstable, + "generalpurpose": Sku_Tier_STATUS_GeneralPurpose, + "memoryoptimized": Sku_Tier_STATUS_MemoryOptimized, +} + // Storage properties of a server type Storage_STATUS_ARM struct { // AutoGrow: Flag to enable / disable Storage Auto grow for flexible server. @@ -301,6 +308,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -310,6 +325,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + type UserAssignedIdentity_Type_STATUS string const ( @@ -317,6 +340,12 @@ const ( UserAssignedIdentity_Type_STATUS_UserAssigned = UserAssignedIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to UserAssignedIdentity_Type_STATUS +var userAssignedIdentity_Type_STATUS_Values = map[string]UserAssignedIdentity_Type_STATUS{ + "none": UserAssignedIdentity_Type_STATUS_None, + "userassigned": UserAssignedIdentity_Type_STATUS_UserAssigned, +} + // Describes a single user-assigned identity associated with the application. type UserIdentity_STATUS_ARM struct { // ClientId: the client identifier of the Service Principal which this identity represents. diff --git a/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_types_gen.go b/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_types_gen.go index 1ec612c9644..cb754adf138 100644 --- a/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20230601preview/flexible_server_types_gen.go @@ -974,8 +974,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -1080,8 +1081,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // ReplicationRole if source.ReplicationRole != nil { - replicationRole := ReplicationRole(*source.ReplicationRole) - server.ReplicationRole = &replicationRole + replicationRole := *source.ReplicationRole + replicationRoleTemp := genruntime.ToEnum(replicationRole, replicationRole_Values) + server.ReplicationRole = &replicationRoleTemp } else { server.ReplicationRole = nil } @@ -1123,8 +1125,9 @@ func (server *FlexibleServer_Spec) AssignProperties_From_FlexibleServer_Spec(sou // Version if source.Version != nil { - version := ServerVersion(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -1850,8 +1853,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // CreateMode if source.CreateMode != nil { - createMode := ServerProperties_CreateMode_STATUS(*source.CreateMode) - server.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, serverProperties_CreateMode_STATUS_Values) + server.CreateMode = &createModeTemp } else { server.CreateMode = nil } @@ -1969,8 +1973,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // ReplicationRole if source.ReplicationRole != nil { - replicationRole := ReplicationRole_STATUS(*source.ReplicationRole) - server.ReplicationRole = &replicationRole + replicationRole := *source.ReplicationRole + replicationRoleTemp := genruntime.ToEnum(replicationRole, replicationRole_STATUS_Values) + server.ReplicationRole = &replicationRoleTemp } else { server.ReplicationRole = nil } @@ -1992,8 +1997,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // State if source.State != nil { - state := ServerProperties_State_STATUS(*source.State) - server.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverProperties_State_STATUS_Values) + server.State = &stateTemp } else { server.State = nil } @@ -2030,8 +2036,9 @@ func (server *FlexibleServer_STATUS) AssignProperties_From_FlexibleServer_STATUS // Version if source.Version != nil { - version := ServerVersion_STATUS(*source.Version) - server.Version = &version + version := *source.Version + versionTemp := genruntime.ToEnum(version, serverVersion_STATUS_Values) + server.Version = &versionTemp } else { server.Version = nil } @@ -2357,16 +2364,18 @@ func (config *AuthConfig) AssignProperties_From_AuthConfig(source *v20230601ps.A // ActiveDirectoryAuth if source.ActiveDirectoryAuth != nil { - activeDirectoryAuth := AuthConfig_ActiveDirectoryAuth(*source.ActiveDirectoryAuth) - config.ActiveDirectoryAuth = &activeDirectoryAuth + activeDirectoryAuth := *source.ActiveDirectoryAuth + activeDirectoryAuthTemp := genruntime.ToEnum(activeDirectoryAuth, authConfig_ActiveDirectoryAuth_Values) + config.ActiveDirectoryAuth = &activeDirectoryAuthTemp } else { config.ActiveDirectoryAuth = nil } // PasswordAuth if source.PasswordAuth != nil { - passwordAuth := AuthConfig_PasswordAuth(*source.PasswordAuth) - config.PasswordAuth = &passwordAuth + passwordAuth := *source.PasswordAuth + passwordAuthTemp := genruntime.ToEnum(passwordAuth, authConfig_PasswordAuth_Values) + config.PasswordAuth = &passwordAuthTemp } else { config.PasswordAuth = nil } @@ -2466,16 +2475,18 @@ func (config *AuthConfig_STATUS) AssignProperties_From_AuthConfig_STATUS(source // ActiveDirectoryAuth if source.ActiveDirectoryAuth != nil { - activeDirectoryAuth := AuthConfig_ActiveDirectoryAuth_STATUS(*source.ActiveDirectoryAuth) - config.ActiveDirectoryAuth = &activeDirectoryAuth + activeDirectoryAuth := *source.ActiveDirectoryAuth + activeDirectoryAuthTemp := genruntime.ToEnum(activeDirectoryAuth, authConfig_ActiveDirectoryAuth_STATUS_Values) + config.ActiveDirectoryAuth = &activeDirectoryAuthTemp } else { config.ActiveDirectoryAuth = nil } // PasswordAuth if source.PasswordAuth != nil { - passwordAuth := AuthConfig_PasswordAuth_STATUS(*source.PasswordAuth) - config.PasswordAuth = &passwordAuth + passwordAuth := *source.PasswordAuth + passwordAuthTemp := genruntime.ToEnum(passwordAuth, authConfig_PasswordAuth_STATUS_Values) + config.PasswordAuth = &passwordAuthTemp } else { config.PasswordAuth = nil } @@ -2590,8 +2601,9 @@ func (backup *Backup) AssignProperties_From_Backup(source *v20230601ps.Backup) e // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := Backup_GeoRedundantBackup(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, backup_GeoRedundantBackup_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -2686,8 +2698,9 @@ func (backup *Backup_STATUS) AssignProperties_From_Backup_STATUS(source *v202306 // GeoRedundantBackup if source.GeoRedundantBackup != nil { - geoRedundantBackup := Backup_GeoRedundantBackup_STATUS(*source.GeoRedundantBackup) - backup.GeoRedundantBackup = &geoRedundantBackup + geoRedundantBackup := *source.GeoRedundantBackup + geoRedundantBackupTemp := genruntime.ToEnum(geoRedundantBackup, backup_GeoRedundantBackup_STATUS_Values) + backup.GeoRedundantBackup = &geoRedundantBackupTemp } else { backup.GeoRedundantBackup = nil } @@ -2868,8 +2881,9 @@ func (encryption *DataEncryption) AssignProperties_From_DataEncryption(source *v // GeoBackupEncryptionKeyStatus if source.GeoBackupEncryptionKeyStatus != nil { - geoBackupEncryptionKeyStatus := DataEncryption_GeoBackupEncryptionKeyStatus(*source.GeoBackupEncryptionKeyStatus) - encryption.GeoBackupEncryptionKeyStatus = &geoBackupEncryptionKeyStatus + geoBackupEncryptionKeyStatus := *source.GeoBackupEncryptionKeyStatus + geoBackupEncryptionKeyStatusTemp := genruntime.ToEnum(geoBackupEncryptionKeyStatus, dataEncryption_GeoBackupEncryptionKeyStatus_Values) + encryption.GeoBackupEncryptionKeyStatus = &geoBackupEncryptionKeyStatusTemp } else { encryption.GeoBackupEncryptionKeyStatus = nil } @@ -2887,8 +2901,9 @@ func (encryption *DataEncryption) AssignProperties_From_DataEncryption(source *v // PrimaryEncryptionKeyStatus if source.PrimaryEncryptionKeyStatus != nil { - primaryEncryptionKeyStatus := DataEncryption_PrimaryEncryptionKeyStatus(*source.PrimaryEncryptionKeyStatus) - encryption.PrimaryEncryptionKeyStatus = &primaryEncryptionKeyStatus + primaryEncryptionKeyStatus := *source.PrimaryEncryptionKeyStatus + primaryEncryptionKeyStatusTemp := genruntime.ToEnum(primaryEncryptionKeyStatus, dataEncryption_PrimaryEncryptionKeyStatus_Values) + encryption.PrimaryEncryptionKeyStatus = &primaryEncryptionKeyStatusTemp } else { encryption.PrimaryEncryptionKeyStatus = nil } @@ -2906,8 +2921,9 @@ func (encryption *DataEncryption) AssignProperties_From_DataEncryption(source *v // Type if source.Type != nil { - typeVar := DataEncryption_Type(*source.Type) - encryption.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, dataEncryption_Type_Values) + encryption.Type = &typeTemp } else { encryption.Type = nil } @@ -3069,8 +3085,9 @@ func (encryption *DataEncryption_STATUS) AssignProperties_From_DataEncryption_ST // GeoBackupEncryptionKeyStatus if source.GeoBackupEncryptionKeyStatus != nil { - geoBackupEncryptionKeyStatus := DataEncryption_GeoBackupEncryptionKeyStatus_STATUS(*source.GeoBackupEncryptionKeyStatus) - encryption.GeoBackupEncryptionKeyStatus = &geoBackupEncryptionKeyStatus + geoBackupEncryptionKeyStatus := *source.GeoBackupEncryptionKeyStatus + geoBackupEncryptionKeyStatusTemp := genruntime.ToEnum(geoBackupEncryptionKeyStatus, dataEncryption_GeoBackupEncryptionKeyStatus_STATUS_Values) + encryption.GeoBackupEncryptionKeyStatus = &geoBackupEncryptionKeyStatusTemp } else { encryption.GeoBackupEncryptionKeyStatus = nil } @@ -3083,8 +3100,9 @@ func (encryption *DataEncryption_STATUS) AssignProperties_From_DataEncryption_ST // PrimaryEncryptionKeyStatus if source.PrimaryEncryptionKeyStatus != nil { - primaryEncryptionKeyStatus := DataEncryption_PrimaryEncryptionKeyStatus_STATUS(*source.PrimaryEncryptionKeyStatus) - encryption.PrimaryEncryptionKeyStatus = &primaryEncryptionKeyStatus + primaryEncryptionKeyStatus := *source.PrimaryEncryptionKeyStatus + primaryEncryptionKeyStatusTemp := genruntime.ToEnum(primaryEncryptionKeyStatus, dataEncryption_PrimaryEncryptionKeyStatus_STATUS_Values) + encryption.PrimaryEncryptionKeyStatus = &primaryEncryptionKeyStatusTemp } else { encryption.PrimaryEncryptionKeyStatus = nil } @@ -3097,8 +3115,9 @@ func (encryption *DataEncryption_STATUS) AssignProperties_From_DataEncryption_ST // Type if source.Type != nil { - typeVar := DataEncryption_Type_STATUS(*source.Type) - encryption.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, dataEncryption_Type_STATUS_Values) + encryption.Type = &typeTemp } else { encryption.Type = nil } @@ -3304,8 +3323,9 @@ func (availability *HighAvailability) AssignProperties_From_HighAvailability(sou // Mode if source.Mode != nil { - mode := HighAvailability_Mode(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -3397,8 +3417,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // Mode if source.Mode != nil { - mode := HighAvailability_Mode_STATUS(*source.Mode) - availability.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, highAvailability_Mode_STATUS_Values) + availability.Mode = &modeTemp } else { availability.Mode = nil } @@ -3408,8 +3429,9 @@ func (availability *HighAvailability_STATUS) AssignProperties_From_HighAvailabil // State if source.State != nil { - state := HighAvailability_State_STATUS(*source.State) - availability.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, highAvailability_State_STATUS_Values) + availability.State = &stateTemp } else { availability.State = nil } @@ -3794,8 +3816,9 @@ func (network *Network) AssignProperties_From_Network(source *v20230601ps.Networ // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := Network_PublicNetworkAccess(*source.PublicNetworkAccess) - network.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, network_PublicNetworkAccess_Values) + network.PublicNetworkAccess = &publicNetworkAccessTemp } else { network.PublicNetworkAccess = nil } @@ -3907,8 +3930,9 @@ func (network *Network_STATUS) AssignProperties_From_Network_STATUS(source *v202 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := Network_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - network.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, network_PublicNetworkAccess_STATUS_Values) + network.PublicNetworkAccess = &publicNetworkAccessTemp } else { network.PublicNetworkAccess = nil } @@ -4087,24 +4111,27 @@ func (replica *Replica) AssignProperties_From_Replica(source *v20230601ps.Replic // PromoteMode if source.PromoteMode != nil { - promoteMode := Replica_PromoteMode(*source.PromoteMode) - replica.PromoteMode = &promoteMode + promoteMode := *source.PromoteMode + promoteModeTemp := genruntime.ToEnum(promoteMode, replica_PromoteMode_Values) + replica.PromoteMode = &promoteModeTemp } else { replica.PromoteMode = nil } // PromoteOption if source.PromoteOption != nil { - promoteOption := Replica_PromoteOption(*source.PromoteOption) - replica.PromoteOption = &promoteOption + promoteOption := *source.PromoteOption + promoteOptionTemp := genruntime.ToEnum(promoteOption, replica_PromoteOption_Values) + replica.PromoteOption = &promoteOptionTemp } else { replica.PromoteOption = nil } // Role if source.Role != nil { - role := ReplicationRole(*source.Role) - replica.Role = &role + role := *source.Role + roleTemp := genruntime.ToEnum(role, replicationRole_Values) + replica.Role = &roleTemp } else { replica.Role = nil } @@ -4228,32 +4255,36 @@ func (replica *Replica_STATUS) AssignProperties_From_Replica_STATUS(source *v202 // PromoteMode if source.PromoteMode != nil { - promoteMode := Replica_PromoteMode_STATUS(*source.PromoteMode) - replica.PromoteMode = &promoteMode + promoteMode := *source.PromoteMode + promoteModeTemp := genruntime.ToEnum(promoteMode, replica_PromoteMode_STATUS_Values) + replica.PromoteMode = &promoteModeTemp } else { replica.PromoteMode = nil } // PromoteOption if source.PromoteOption != nil { - promoteOption := Replica_PromoteOption_STATUS(*source.PromoteOption) - replica.PromoteOption = &promoteOption + promoteOption := *source.PromoteOption + promoteOptionTemp := genruntime.ToEnum(promoteOption, replica_PromoteOption_STATUS_Values) + replica.PromoteOption = &promoteOptionTemp } else { replica.PromoteOption = nil } // ReplicationState if source.ReplicationState != nil { - replicationState := Replica_ReplicationState_STATUS(*source.ReplicationState) - replica.ReplicationState = &replicationState + replicationState := *source.ReplicationState + replicationStateTemp := genruntime.ToEnum(replicationState, replica_ReplicationState_STATUS_Values) + replica.ReplicationState = &replicationStateTemp } else { replica.ReplicationState = nil } // Role if source.Role != nil { - role := ReplicationRole_STATUS(*source.Role) - replica.Role = &role + role := *source.Role + roleTemp := genruntime.ToEnum(role, replicationRole_STATUS_Values) + replica.Role = &roleTemp } else { replica.Role = nil } @@ -4324,6 +4355,14 @@ const ( ReplicationRole_Primary = ReplicationRole("Primary") ) +// Mapping from string to ReplicationRole +var replicationRole_Values = map[string]ReplicationRole{ + "asyncreplica": ReplicationRole_AsyncReplica, + "geoasyncreplica": ReplicationRole_GeoAsyncReplica, + "none": ReplicationRole_None, + "primary": ReplicationRole_Primary, +} + // Used to indicate role of the server in replication set. type ReplicationRole_STATUS string @@ -4334,6 +4373,14 @@ const ( ReplicationRole_STATUS_Primary = ReplicationRole_STATUS("Primary") ) +// Mapping from string to ReplicationRole_STATUS +var replicationRole_STATUS_Values = map[string]ReplicationRole_STATUS{ + "asyncreplica": ReplicationRole_STATUS_AsyncReplica, + "geoasyncreplica": ReplicationRole_STATUS_GeoAsyncReplica, + "none": ReplicationRole_STATUS_None, + "primary": ReplicationRole_STATUS_Primary, +} + // +kubebuilder:validation:Enum={"Create","Default","GeoRestore","PointInTimeRestore","Replica","ReviveDropped","Update"} type ServerProperties_CreateMode string @@ -4347,6 +4394,17 @@ const ( ServerProperties_CreateMode_Update = ServerProperties_CreateMode("Update") ) +// Mapping from string to ServerProperties_CreateMode +var serverProperties_CreateMode_Values = map[string]ServerProperties_CreateMode{ + "create": ServerProperties_CreateMode_Create, + "default": ServerProperties_CreateMode_Default, + "georestore": ServerProperties_CreateMode_GeoRestore, + "pointintimerestore": ServerProperties_CreateMode_PointInTimeRestore, + "replica": ServerProperties_CreateMode_Replica, + "revivedropped": ServerProperties_CreateMode_ReviveDropped, + "update": ServerProperties_CreateMode_Update, +} + type ServerProperties_CreateMode_STATUS string const ( @@ -4359,6 +4417,17 @@ const ( ServerProperties_CreateMode_STATUS_Update = ServerProperties_CreateMode_STATUS("Update") ) +// Mapping from string to ServerProperties_CreateMode_STATUS +var serverProperties_CreateMode_STATUS_Values = map[string]ServerProperties_CreateMode_STATUS{ + "create": ServerProperties_CreateMode_STATUS_Create, + "default": ServerProperties_CreateMode_STATUS_Default, + "georestore": ServerProperties_CreateMode_STATUS_GeoRestore, + "pointintimerestore": ServerProperties_CreateMode_STATUS_PointInTimeRestore, + "replica": ServerProperties_CreateMode_STATUS_Replica, + "revivedropped": ServerProperties_CreateMode_STATUS_ReviveDropped, + "update": ServerProperties_CreateMode_STATUS_Update, +} + type ServerProperties_State_STATUS string const ( @@ -4371,6 +4440,17 @@ const ( ServerProperties_State_STATUS_Updating = ServerProperties_State_STATUS("Updating") ) +// Mapping from string to ServerProperties_State_STATUS +var serverProperties_State_STATUS_Values = map[string]ServerProperties_State_STATUS{ + "disabled": ServerProperties_State_STATUS_Disabled, + "dropping": ServerProperties_State_STATUS_Dropping, + "ready": ServerProperties_State_STATUS_Ready, + "starting": ServerProperties_State_STATUS_Starting, + "stopped": ServerProperties_State_STATUS_Stopped, + "stopping": ServerProperties_State_STATUS_Stopping, + "updating": ServerProperties_State_STATUS_Updating, +} + // The version of a server. // +kubebuilder:validation:Enum={"11","12","13","14","15","16"} type ServerVersion string @@ -4384,6 +4464,16 @@ const ( ServerVersion_16 = ServerVersion("16") ) +// Mapping from string to ServerVersion +var serverVersion_Values = map[string]ServerVersion{ + "11": ServerVersion_11, + "12": ServerVersion_12, + "13": ServerVersion_13, + "14": ServerVersion_14, + "15": ServerVersion_15, + "16": ServerVersion_16, +} + // The version of a server. type ServerVersion_STATUS string @@ -4396,6 +4486,16 @@ const ( ServerVersion_STATUS_16 = ServerVersion_STATUS("16") ) +// Mapping from string to ServerVersion_STATUS +var serverVersion_STATUS_Values = map[string]ServerVersion_STATUS{ + "11": ServerVersion_STATUS_11, + "12": ServerVersion_STATUS_12, + "13": ServerVersion_STATUS_13, + "14": ServerVersion_STATUS_14, + "15": ServerVersion_STATUS_15, + "16": ServerVersion_STATUS_16, +} + // Sku information related properties of a server. type Sku struct { // +kubebuilder:validation:Required @@ -4466,8 +4566,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20230601ps.Sku) error { // Tier if source.Tier != nil { - tier := Sku_Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -4550,8 +4651,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20230601ps.Sku_ // Tier if source.Tier != nil { - tier := Sku_Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -4713,8 +4815,9 @@ func (storage *Storage) AssignProperties_From_Storage(source *v20230601ps.Storag // AutoGrow if source.AutoGrow != nil { - autoGrow := Storage_AutoGrow(*source.AutoGrow) - storage.AutoGrow = &autoGrow + autoGrow := *source.AutoGrow + autoGrowTemp := genruntime.ToEnum(autoGrow, storage_AutoGrow_Values) + storage.AutoGrow = &autoGrowTemp } else { storage.AutoGrow = nil } @@ -4730,16 +4833,18 @@ func (storage *Storage) AssignProperties_From_Storage(source *v20230601ps.Storag // Tier if source.Tier != nil { - tier := Storage_Tier(*source.Tier) - storage.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, storage_Tier_Values) + storage.Tier = &tierTemp } else { storage.Tier = nil } // Type if source.Type != nil { - typeVar := Storage_Type(*source.Type) - storage.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, storage_Type_Values) + storage.Type = &typeTemp } else { storage.Type = nil } @@ -4878,8 +4983,9 @@ func (storage *Storage_STATUS) AssignProperties_From_Storage_STATUS(source *v202 // AutoGrow if source.AutoGrow != nil { - autoGrow := Storage_AutoGrow_STATUS(*source.AutoGrow) - storage.AutoGrow = &autoGrow + autoGrow := *source.AutoGrow + autoGrowTemp := genruntime.ToEnum(autoGrow, storage_AutoGrow_STATUS_Values) + storage.AutoGrow = &autoGrowTemp } else { storage.AutoGrow = nil } @@ -4895,16 +5001,18 @@ func (storage *Storage_STATUS) AssignProperties_From_Storage_STATUS(source *v202 // Tier if source.Tier != nil { - tier := Storage_Tier_STATUS(*source.Tier) - storage.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, storage_Tier_STATUS_Values) + storage.Tier = &tierTemp } else { storage.Tier = nil } // Type if source.Type != nil { - typeVar := Storage_Type_STATUS(*source.Type) - storage.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, storage_Type_STATUS_Values) + storage.Type = &typeTemp } else { storage.Type = nil } @@ -5048,8 +5156,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -5062,8 +5171,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -5183,8 +5293,9 @@ func (identity *UserAssignedIdentity) AssignProperties_From_UserAssignedIdentity // Type if source.Type != nil { - typeVar := UserAssignedIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, userAssignedIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -5316,8 +5427,9 @@ func (identity *UserAssignedIdentity_STATUS) AssignProperties_From_UserAssignedI // Type if source.Type != nil { - typeVar := UserAssignedIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, userAssignedIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -5397,6 +5509,12 @@ const ( AuthConfig_ActiveDirectoryAuth_Enabled = AuthConfig_ActiveDirectoryAuth("Enabled") ) +// Mapping from string to AuthConfig_ActiveDirectoryAuth +var authConfig_ActiveDirectoryAuth_Values = map[string]AuthConfig_ActiveDirectoryAuth{ + "disabled": AuthConfig_ActiveDirectoryAuth_Disabled, + "enabled": AuthConfig_ActiveDirectoryAuth_Enabled, +} + type AuthConfig_ActiveDirectoryAuth_STATUS string const ( @@ -5404,6 +5522,12 @@ const ( AuthConfig_ActiveDirectoryAuth_STATUS_Enabled = AuthConfig_ActiveDirectoryAuth_STATUS("Enabled") ) +// Mapping from string to AuthConfig_ActiveDirectoryAuth_STATUS +var authConfig_ActiveDirectoryAuth_STATUS_Values = map[string]AuthConfig_ActiveDirectoryAuth_STATUS{ + "disabled": AuthConfig_ActiveDirectoryAuth_STATUS_Disabled, + "enabled": AuthConfig_ActiveDirectoryAuth_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type AuthConfig_PasswordAuth string @@ -5412,6 +5536,12 @@ const ( AuthConfig_PasswordAuth_Enabled = AuthConfig_PasswordAuth("Enabled") ) +// Mapping from string to AuthConfig_PasswordAuth +var authConfig_PasswordAuth_Values = map[string]AuthConfig_PasswordAuth{ + "disabled": AuthConfig_PasswordAuth_Disabled, + "enabled": AuthConfig_PasswordAuth_Enabled, +} + type AuthConfig_PasswordAuth_STATUS string const ( @@ -5419,6 +5549,12 @@ const ( AuthConfig_PasswordAuth_STATUS_Enabled = AuthConfig_PasswordAuth_STATUS("Enabled") ) +// Mapping from string to AuthConfig_PasswordAuth_STATUS +var authConfig_PasswordAuth_STATUS_Values = map[string]AuthConfig_PasswordAuth_STATUS{ + "disabled": AuthConfig_PasswordAuth_STATUS_Disabled, + "enabled": AuthConfig_PasswordAuth_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type Backup_GeoRedundantBackup string @@ -5427,6 +5563,12 @@ const ( Backup_GeoRedundantBackup_Enabled = Backup_GeoRedundantBackup("Enabled") ) +// Mapping from string to Backup_GeoRedundantBackup +var backup_GeoRedundantBackup_Values = map[string]Backup_GeoRedundantBackup{ + "disabled": Backup_GeoRedundantBackup_Disabled, + "enabled": Backup_GeoRedundantBackup_Enabled, +} + type Backup_GeoRedundantBackup_STATUS string const ( @@ -5434,6 +5576,12 @@ const ( Backup_GeoRedundantBackup_STATUS_Enabled = Backup_GeoRedundantBackup_STATUS("Enabled") ) +// Mapping from string to Backup_GeoRedundantBackup_STATUS +var backup_GeoRedundantBackup_STATUS_Values = map[string]Backup_GeoRedundantBackup_STATUS{ + "disabled": Backup_GeoRedundantBackup_STATUS_Disabled, + "enabled": Backup_GeoRedundantBackup_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Invalid","Valid"} type DataEncryption_GeoBackupEncryptionKeyStatus string @@ -5442,6 +5590,12 @@ const ( DataEncryption_GeoBackupEncryptionKeyStatus_Valid = DataEncryption_GeoBackupEncryptionKeyStatus("Valid") ) +// Mapping from string to DataEncryption_GeoBackupEncryptionKeyStatus +var dataEncryption_GeoBackupEncryptionKeyStatus_Values = map[string]DataEncryption_GeoBackupEncryptionKeyStatus{ + "invalid": DataEncryption_GeoBackupEncryptionKeyStatus_Invalid, + "valid": DataEncryption_GeoBackupEncryptionKeyStatus_Valid, +} + type DataEncryption_GeoBackupEncryptionKeyStatus_STATUS string const ( @@ -5449,6 +5603,12 @@ const ( DataEncryption_GeoBackupEncryptionKeyStatus_STATUS_Valid = DataEncryption_GeoBackupEncryptionKeyStatus_STATUS("Valid") ) +// Mapping from string to DataEncryption_GeoBackupEncryptionKeyStatus_STATUS +var dataEncryption_GeoBackupEncryptionKeyStatus_STATUS_Values = map[string]DataEncryption_GeoBackupEncryptionKeyStatus_STATUS{ + "invalid": DataEncryption_GeoBackupEncryptionKeyStatus_STATUS_Invalid, + "valid": DataEncryption_GeoBackupEncryptionKeyStatus_STATUS_Valid, +} + // +kubebuilder:validation:Enum={"Invalid","Valid"} type DataEncryption_PrimaryEncryptionKeyStatus string @@ -5457,6 +5617,12 @@ const ( DataEncryption_PrimaryEncryptionKeyStatus_Valid = DataEncryption_PrimaryEncryptionKeyStatus("Valid") ) +// Mapping from string to DataEncryption_PrimaryEncryptionKeyStatus +var dataEncryption_PrimaryEncryptionKeyStatus_Values = map[string]DataEncryption_PrimaryEncryptionKeyStatus{ + "invalid": DataEncryption_PrimaryEncryptionKeyStatus_Invalid, + "valid": DataEncryption_PrimaryEncryptionKeyStatus_Valid, +} + type DataEncryption_PrimaryEncryptionKeyStatus_STATUS string const ( @@ -5464,6 +5630,12 @@ const ( DataEncryption_PrimaryEncryptionKeyStatus_STATUS_Valid = DataEncryption_PrimaryEncryptionKeyStatus_STATUS("Valid") ) +// Mapping from string to DataEncryption_PrimaryEncryptionKeyStatus_STATUS +var dataEncryption_PrimaryEncryptionKeyStatus_STATUS_Values = map[string]DataEncryption_PrimaryEncryptionKeyStatus_STATUS{ + "invalid": DataEncryption_PrimaryEncryptionKeyStatus_STATUS_Invalid, + "valid": DataEncryption_PrimaryEncryptionKeyStatus_STATUS_Valid, +} + // +kubebuilder:validation:Enum={"AzureKeyVault","SystemManaged"} type DataEncryption_Type string @@ -5472,6 +5644,12 @@ const ( DataEncryption_Type_SystemManaged = DataEncryption_Type("SystemManaged") ) +// Mapping from string to DataEncryption_Type +var dataEncryption_Type_Values = map[string]DataEncryption_Type{ + "azurekeyvault": DataEncryption_Type_AzureKeyVault, + "systemmanaged": DataEncryption_Type_SystemManaged, +} + type DataEncryption_Type_STATUS string const ( @@ -5479,6 +5657,12 @@ const ( DataEncryption_Type_STATUS_SystemManaged = DataEncryption_Type_STATUS("SystemManaged") ) +// Mapping from string to DataEncryption_Type_STATUS +var dataEncryption_Type_STATUS_Values = map[string]DataEncryption_Type_STATUS{ + "azurekeyvault": DataEncryption_Type_STATUS_AzureKeyVault, + "systemmanaged": DataEncryption_Type_STATUS_SystemManaged, +} + type FlexibleServerOperatorConfigMaps struct { // FullyQualifiedDomainName: indicates where the FullyQualifiedDomainName config map should be placed. If omitted, no // config map will be created. @@ -5578,6 +5762,13 @@ const ( HighAvailability_Mode_ZoneRedundant = HighAvailability_Mode("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode +var highAvailability_Mode_Values = map[string]HighAvailability_Mode{ + "disabled": HighAvailability_Mode_Disabled, + "samezone": HighAvailability_Mode_SameZone, + "zoneredundant": HighAvailability_Mode_ZoneRedundant, +} + type HighAvailability_Mode_STATUS string const ( @@ -5586,6 +5777,13 @@ const ( HighAvailability_Mode_STATUS_ZoneRedundant = HighAvailability_Mode_STATUS("ZoneRedundant") ) +// Mapping from string to HighAvailability_Mode_STATUS +var highAvailability_Mode_STATUS_Values = map[string]HighAvailability_Mode_STATUS{ + "disabled": HighAvailability_Mode_STATUS_Disabled, + "samezone": HighAvailability_Mode_STATUS_SameZone, + "zoneredundant": HighAvailability_Mode_STATUS_ZoneRedundant, +} + type HighAvailability_State_STATUS string const ( @@ -5597,6 +5795,16 @@ const ( HighAvailability_State_STATUS_ReplicatingData = HighAvailability_State_STATUS("ReplicatingData") ) +// Mapping from string to HighAvailability_State_STATUS +var highAvailability_State_STATUS_Values = map[string]HighAvailability_State_STATUS{ + "creatingstandby": HighAvailability_State_STATUS_CreatingStandby, + "failingover": HighAvailability_State_STATUS_FailingOver, + "healthy": HighAvailability_State_STATUS_Healthy, + "notenabled": HighAvailability_State_STATUS_NotEnabled, + "removingstandby": HighAvailability_State_STATUS_RemovingStandby, + "replicatingdata": HighAvailability_State_STATUS_ReplicatingData, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type Network_PublicNetworkAccess string @@ -5605,6 +5813,12 @@ const ( Network_PublicNetworkAccess_Enabled = Network_PublicNetworkAccess("Enabled") ) +// Mapping from string to Network_PublicNetworkAccess +var network_PublicNetworkAccess_Values = map[string]Network_PublicNetworkAccess{ + "disabled": Network_PublicNetworkAccess_Disabled, + "enabled": Network_PublicNetworkAccess_Enabled, +} + type Network_PublicNetworkAccess_STATUS string const ( @@ -5612,6 +5826,12 @@ const ( Network_PublicNetworkAccess_STATUS_Enabled = Network_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to Network_PublicNetworkAccess_STATUS +var network_PublicNetworkAccess_STATUS_Values = map[string]Network_PublicNetworkAccess_STATUS{ + "disabled": Network_PublicNetworkAccess_STATUS_Disabled, + "enabled": Network_PublicNetworkAccess_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"standalone","switchover"} type Replica_PromoteMode string @@ -5620,6 +5840,12 @@ const ( Replica_PromoteMode_Switchover = Replica_PromoteMode("switchover") ) +// Mapping from string to Replica_PromoteMode +var replica_PromoteMode_Values = map[string]Replica_PromoteMode{ + "standalone": Replica_PromoteMode_Standalone, + "switchover": Replica_PromoteMode_Switchover, +} + type Replica_PromoteMode_STATUS string const ( @@ -5627,6 +5853,12 @@ const ( Replica_PromoteMode_STATUS_Switchover = Replica_PromoteMode_STATUS("switchover") ) +// Mapping from string to Replica_PromoteMode_STATUS +var replica_PromoteMode_STATUS_Values = map[string]Replica_PromoteMode_STATUS{ + "standalone": Replica_PromoteMode_STATUS_Standalone, + "switchover": Replica_PromoteMode_STATUS_Switchover, +} + // +kubebuilder:validation:Enum={"forced","planned"} type Replica_PromoteOption string @@ -5635,6 +5867,12 @@ const ( Replica_PromoteOption_Planned = Replica_PromoteOption("planned") ) +// Mapping from string to Replica_PromoteOption +var replica_PromoteOption_Values = map[string]Replica_PromoteOption{ + "forced": Replica_PromoteOption_Forced, + "planned": Replica_PromoteOption_Planned, +} + type Replica_PromoteOption_STATUS string const ( @@ -5642,6 +5880,12 @@ const ( Replica_PromoteOption_STATUS_Planned = Replica_PromoteOption_STATUS("planned") ) +// Mapping from string to Replica_PromoteOption_STATUS +var replica_PromoteOption_STATUS_Values = map[string]Replica_PromoteOption_STATUS{ + "forced": Replica_PromoteOption_STATUS_Forced, + "planned": Replica_PromoteOption_STATUS_Planned, +} + type Replica_ReplicationState_STATUS string const ( @@ -5653,6 +5897,16 @@ const ( Replica_ReplicationState_STATUS_Updating = Replica_ReplicationState_STATUS("Updating") ) +// Mapping from string to Replica_ReplicationState_STATUS +var replica_ReplicationState_STATUS_Values = map[string]Replica_ReplicationState_STATUS{ + "active": Replica_ReplicationState_STATUS_Active, + "broken": Replica_ReplicationState_STATUS_Broken, + "catchup": Replica_ReplicationState_STATUS_Catchup, + "provisioning": Replica_ReplicationState_STATUS_Provisioning, + "reconfiguring": Replica_ReplicationState_STATUS_Reconfiguring, + "updating": Replica_ReplicationState_STATUS_Updating, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type Storage_AutoGrow string @@ -5661,6 +5915,12 @@ const ( Storage_AutoGrow_Enabled = Storage_AutoGrow("Enabled") ) +// Mapping from string to Storage_AutoGrow +var storage_AutoGrow_Values = map[string]Storage_AutoGrow{ + "disabled": Storage_AutoGrow_Disabled, + "enabled": Storage_AutoGrow_Enabled, +} + type Storage_AutoGrow_STATUS string const ( @@ -5668,6 +5928,12 @@ const ( Storage_AutoGrow_STATUS_Enabled = Storage_AutoGrow_STATUS("Enabled") ) +// Mapping from string to Storage_AutoGrow_STATUS +var storage_AutoGrow_STATUS_Values = map[string]Storage_AutoGrow_STATUS{ + "disabled": Storage_AutoGrow_STATUS_Disabled, + "enabled": Storage_AutoGrow_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"P1","P10","P15","P2","P20","P3","P30","P4","P40","P50","P6","P60","P70","P80"} type Storage_Tier string @@ -5688,6 +5954,24 @@ const ( Storage_Tier_P80 = Storage_Tier("P80") ) +// Mapping from string to Storage_Tier +var storage_Tier_Values = map[string]Storage_Tier{ + "p1": Storage_Tier_P1, + "p10": Storage_Tier_P10, + "p15": Storage_Tier_P15, + "p2": Storage_Tier_P2, + "p20": Storage_Tier_P20, + "p3": Storage_Tier_P3, + "p30": Storage_Tier_P30, + "p4": Storage_Tier_P4, + "p40": Storage_Tier_P40, + "p50": Storage_Tier_P50, + "p6": Storage_Tier_P6, + "p60": Storage_Tier_P60, + "p70": Storage_Tier_P70, + "p80": Storage_Tier_P80, +} + type Storage_Tier_STATUS string const ( @@ -5707,6 +5991,24 @@ const ( Storage_Tier_STATUS_P80 = Storage_Tier_STATUS("P80") ) +// Mapping from string to Storage_Tier_STATUS +var storage_Tier_STATUS_Values = map[string]Storage_Tier_STATUS{ + "p1": Storage_Tier_STATUS_P1, + "p10": Storage_Tier_STATUS_P10, + "p15": Storage_Tier_STATUS_P15, + "p2": Storage_Tier_STATUS_P2, + "p20": Storage_Tier_STATUS_P20, + "p3": Storage_Tier_STATUS_P3, + "p30": Storage_Tier_STATUS_P30, + "p4": Storage_Tier_STATUS_P4, + "p40": Storage_Tier_STATUS_P40, + "p50": Storage_Tier_STATUS_P50, + "p6": Storage_Tier_STATUS_P6, + "p60": Storage_Tier_STATUS_P60, + "p70": Storage_Tier_STATUS_P70, + "p80": Storage_Tier_STATUS_P80, +} + // +kubebuilder:validation:Enum={"PremiumV2_LRS","Premium_LRS"} type Storage_Type string @@ -5715,6 +6017,12 @@ const ( Storage_Type_Premium_LRS = Storage_Type("Premium_LRS") ) +// Mapping from string to Storage_Type +var storage_Type_Values = map[string]Storage_Type{ + "premiumv2_lrs": Storage_Type_PremiumV2_LRS, + "premium_lrs": Storage_Type_Premium_LRS, +} + type Storage_Type_STATUS string const ( @@ -5722,6 +6030,12 @@ const ( Storage_Type_STATUS_Premium_LRS = Storage_Type_STATUS("Premium_LRS") ) +// Mapping from string to Storage_Type_STATUS +var storage_Type_STATUS_Values = map[string]Storage_Type_STATUS{ + "premiumv2_lrs": Storage_Type_STATUS_PremiumV2_LRS, + "premium_lrs": Storage_Type_STATUS_Premium_LRS, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails struct { Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` diff --git a/v2/api/dbforpostgresql/v1api20230601preview/flexible_servers_configuration_types_gen.go b/v2/api/dbforpostgresql/v1api20230601preview/flexible_servers_configuration_types_gen.go index d5c17d02800..b6f0f502167 100644 --- a/v2/api/dbforpostgresql/v1api20230601preview/flexible_servers_configuration_types_gen.go +++ b/v2/api/dbforpostgresql/v1api20230601preview/flexible_servers_configuration_types_gen.go @@ -796,8 +796,9 @@ func (configuration *FlexibleServers_Configuration_STATUS) AssignProperties_From // DataType if source.DataType != nil { - dataType := ConfigurationProperties_DataType_STATUS(*source.DataType) - configuration.DataType = &dataType + dataType := *source.DataType + dataTypeTemp := genruntime.ToEnum(dataType, configurationProperties_DataType_STATUS_Values) + configuration.DataType = &dataTypeTemp } else { configuration.DataType = nil } @@ -971,6 +972,14 @@ const ( ConfigurationProperties_DataType_STATUS_Numeric = ConfigurationProperties_DataType_STATUS("Numeric") ) +// Mapping from string to ConfigurationProperties_DataType_STATUS +var configurationProperties_DataType_STATUS_Values = map[string]ConfigurationProperties_DataType_STATUS{ + "boolean": ConfigurationProperties_DataType_STATUS_Boolean, + "enumeration": ConfigurationProperties_DataType_STATUS_Enumeration, + "integer": ConfigurationProperties_DataType_STATUS_Integer, + "numeric": ConfigurationProperties_DataType_STATUS_Numeric, +} + func init() { SchemeBuilder.Register(&FlexibleServersConfiguration{}, &FlexibleServersConfigurationList{}) } diff --git a/v2/api/devices/v1api20210702/iot_hub_spec_arm_types_gen.go b/v2/api/devices/v1api20210702/iot_hub_spec_arm_types_gen.go index 69b8d8586cb..da4efe920d5 100644 --- a/v2/api/devices/v1api20210702/iot_hub_spec_arm_types_gen.go +++ b/v2/api/devices/v1api20210702/iot_hub_spec_arm_types_gen.go @@ -135,6 +135,14 @@ const ( ArmIdentity_Type_UserAssigned = ArmIdentity_Type("UserAssigned") ) +// Mapping from string to ArmIdentity_Type +var armIdentity_Type_Values = map[string]ArmIdentity_Type{ + "none": ArmIdentity_Type_None, + "systemassigned": ArmIdentity_Type_SystemAssigned, + "systemassigned, userassigned": ArmIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ArmIdentity_Type_UserAssigned, +} + // The IoT hub cloud-to-device messaging properties. type CloudToDeviceProperties_ARM struct { // DefaultTtlAsIso8601: The default time to live for cloud-to-device messages in the device queue. See: @@ -168,6 +176,12 @@ const ( IotHubProperties_Features_None = IotHubProperties_Features("None") ) +// Mapping from string to IotHubProperties_Features +var iotHubProperties_Features_Values = map[string]IotHubProperties_Features{ + "devicemanagement": IotHubProperties_Features_DeviceManagement, + "none": IotHubProperties_Features_None, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type IotHubProperties_PublicNetworkAccess string @@ -176,6 +190,12 @@ const ( IotHubProperties_PublicNetworkAccess_Enabled = IotHubProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to IotHubProperties_PublicNetworkAccess +var iotHubProperties_PublicNetworkAccess_Values = map[string]IotHubProperties_PublicNetworkAccess{ + "disabled": IotHubProperties_PublicNetworkAccess_Disabled, + "enabled": IotHubProperties_PublicNetworkAccess_Enabled, +} + // +kubebuilder:validation:Enum={"B1","B2","B3","F1","S1","S2","S3"} type IotHubSkuInfo_Name string @@ -189,6 +209,17 @@ const ( IotHubSkuInfo_Name_S3 = IotHubSkuInfo_Name("S3") ) +// Mapping from string to IotHubSkuInfo_Name +var iotHubSkuInfo_Name_Values = map[string]IotHubSkuInfo_Name{ + "b1": IotHubSkuInfo_Name_B1, + "b2": IotHubSkuInfo_Name_B2, + "b3": IotHubSkuInfo_Name_B3, + "f1": IotHubSkuInfo_Name_F1, + "s1": IotHubSkuInfo_Name_S1, + "s2": IotHubSkuInfo_Name_S2, + "s3": IotHubSkuInfo_Name_S3, +} + // The IP filter rules for the IoT hub. type IpFilterRule_ARM struct { // Action: The desired action for requests captured by this rule. @@ -339,6 +370,12 @@ const ( IpFilterRule_Action_Reject = IpFilterRule_Action("Reject") ) +// Mapping from string to IpFilterRule_Action +var ipFilterRule_Action_Values = map[string]IpFilterRule_Action{ + "accept": IpFilterRule_Action_Accept, + "reject": IpFilterRule_Action_Reject, +} + // The properties of the Managed identity. type ManagedIdentity_ARM struct { // UserAssignedIdentity: The user assigned identity. @@ -365,6 +402,12 @@ const ( NetworkRuleSetProperties_DefaultAction_Deny = NetworkRuleSetProperties_DefaultAction("Deny") ) +// Mapping from string to NetworkRuleSetProperties_DefaultAction +var networkRuleSetProperties_DefaultAction_Values = map[string]NetworkRuleSetProperties_DefaultAction{ + "allow": NetworkRuleSetProperties_DefaultAction_Allow, + "deny": NetworkRuleSetProperties_DefaultAction_Deny, +} + // The properties of a routing rule that your IoT hub uses to route messages to endpoints. type RouteProperties_ARM struct { // Condition: The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true @@ -427,6 +470,25 @@ const ( SharedAccessSignatureAuthorizationRule_Rights_ServiceConnectDeviceConnect = SharedAccessSignatureAuthorizationRule_Rights("ServiceConnect, DeviceConnect") ) +// Mapping from string to SharedAccessSignatureAuthorizationRule_Rights +var sharedAccessSignatureAuthorizationRule_Rights_Values = map[string]SharedAccessSignatureAuthorizationRule_Rights{ + "deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_DeviceConnect, + "registryread": SharedAccessSignatureAuthorizationRule_Rights_RegistryRead, + "registryread, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryReadDeviceConnect, + "registryread, registrywrite": SharedAccessSignatureAuthorizationRule_Rights_RegistryReadRegistryWrite, + "registryread, registrywrite, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryReadRegistryWriteDeviceConnect, + "registryread, registrywrite, serviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryReadRegistryWriteServiceConnect, + "registryread, registrywrite, serviceconnect, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryReadRegistryWriteServiceConnectDeviceConnect, + "registryread, serviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryReadServiceConnect, + "registryread, serviceconnect, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryReadServiceConnectDeviceConnect, + "registrywrite": SharedAccessSignatureAuthorizationRule_Rights_RegistryWrite, + "registrywrite, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryWriteDeviceConnect, + "registrywrite, serviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryWriteServiceConnect, + "registrywrite, serviceconnect, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_RegistryWriteServiceConnectDeviceConnect, + "serviceconnect": SharedAccessSignatureAuthorizationRule_Rights_ServiceConnect, + "serviceconnect, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_ServiceConnectDeviceConnect, +} + // +kubebuilder:validation:Enum={"identityBased","keyBased"} type StorageEndpointProperties_AuthenticationType string @@ -435,16 +497,32 @@ const ( StorageEndpointProperties_AuthenticationType_KeyBased = StorageEndpointProperties_AuthenticationType("keyBased") ) +// Mapping from string to StorageEndpointProperties_AuthenticationType +var storageEndpointProperties_AuthenticationType_Values = map[string]StorageEndpointProperties_AuthenticationType{ + "identitybased": StorageEndpointProperties_AuthenticationType_IdentityBased, + "keybased": StorageEndpointProperties_AuthenticationType_KeyBased, +} + // +kubebuilder:validation:Enum={"DeviceMessages"} type FallbackRouteProperties_Source string const FallbackRouteProperties_Source_DeviceMessages = FallbackRouteProperties_Source("DeviceMessages") +// Mapping from string to FallbackRouteProperties_Source +var fallbackRouteProperties_Source_Values = map[string]FallbackRouteProperties_Source{ + "devicemessages": FallbackRouteProperties_Source_DeviceMessages, +} + // +kubebuilder:validation:Enum={"Allow"} type NetworkRuleSetIpRule_Action string const NetworkRuleSetIpRule_Action_Allow = NetworkRuleSetIpRule_Action("Allow") +// Mapping from string to NetworkRuleSetIpRule_Action +var networkRuleSetIpRule_Action_Values = map[string]NetworkRuleSetIpRule_Action{ + "allow": NetworkRuleSetIpRule_Action_Allow, +} + // +kubebuilder:validation:Enum={"DeviceConnectionStateEvents","DeviceJobLifecycleEvents","DeviceLifecycleEvents","DeviceMessages","Invalid","TwinChangeEvents"} type RouteProperties_Source string @@ -457,6 +535,16 @@ const ( RouteProperties_Source_TwinChangeEvents = RouteProperties_Source("TwinChangeEvents") ) +// Mapping from string to RouteProperties_Source +var routeProperties_Source_Values = map[string]RouteProperties_Source{ + "deviceconnectionstateevents": RouteProperties_Source_DeviceConnectionStateEvents, + "devicejoblifecycleevents": RouteProperties_Source_DeviceJobLifecycleEvents, + "devicelifecycleevents": RouteProperties_Source_DeviceLifecycleEvents, + "devicemessages": RouteProperties_Source_DeviceMessages, + "invalid": RouteProperties_Source_Invalid, + "twinchangeevents": RouteProperties_Source_TwinChangeEvents, +} + // The properties related to an event hub endpoint. type RoutingEventHubProperties_ARM struct { // AuthenticationType: Method used to authenticate against the event hub endpoint @@ -601,6 +689,12 @@ const ( RoutingEventHubProperties_AuthenticationType_KeyBased = RoutingEventHubProperties_AuthenticationType("keyBased") ) +// Mapping from string to RoutingEventHubProperties_AuthenticationType +var routingEventHubProperties_AuthenticationType_Values = map[string]RoutingEventHubProperties_AuthenticationType{ + "identitybased": RoutingEventHubProperties_AuthenticationType_IdentityBased, + "keybased": RoutingEventHubProperties_AuthenticationType_KeyBased, +} + // +kubebuilder:validation:Enum={"identityBased","keyBased"} type RoutingServiceBusQueueEndpointProperties_AuthenticationType string @@ -609,6 +703,12 @@ const ( RoutingServiceBusQueueEndpointProperties_AuthenticationType_KeyBased = RoutingServiceBusQueueEndpointProperties_AuthenticationType("keyBased") ) +// Mapping from string to RoutingServiceBusQueueEndpointProperties_AuthenticationType +var routingServiceBusQueueEndpointProperties_AuthenticationType_Values = map[string]RoutingServiceBusQueueEndpointProperties_AuthenticationType{ + "identitybased": RoutingServiceBusQueueEndpointProperties_AuthenticationType_IdentityBased, + "keybased": RoutingServiceBusQueueEndpointProperties_AuthenticationType_KeyBased, +} + // +kubebuilder:validation:Enum={"identityBased","keyBased"} type RoutingServiceBusTopicEndpointProperties_AuthenticationType string @@ -617,6 +717,12 @@ const ( RoutingServiceBusTopicEndpointProperties_AuthenticationType_KeyBased = RoutingServiceBusTopicEndpointProperties_AuthenticationType("keyBased") ) +// Mapping from string to RoutingServiceBusTopicEndpointProperties_AuthenticationType +var routingServiceBusTopicEndpointProperties_AuthenticationType_Values = map[string]RoutingServiceBusTopicEndpointProperties_AuthenticationType{ + "identitybased": RoutingServiceBusTopicEndpointProperties_AuthenticationType_IdentityBased, + "keybased": RoutingServiceBusTopicEndpointProperties_AuthenticationType_KeyBased, +} + // +kubebuilder:validation:Enum={"identityBased","keyBased"} type RoutingStorageContainerProperties_AuthenticationType string @@ -625,6 +731,12 @@ const ( RoutingStorageContainerProperties_AuthenticationType_KeyBased = RoutingStorageContainerProperties_AuthenticationType("keyBased") ) +// Mapping from string to RoutingStorageContainerProperties_AuthenticationType +var routingStorageContainerProperties_AuthenticationType_Values = map[string]RoutingStorageContainerProperties_AuthenticationType{ + "identitybased": RoutingStorageContainerProperties_AuthenticationType_IdentityBased, + "keybased": RoutingStorageContainerProperties_AuthenticationType_KeyBased, +} + // +kubebuilder:validation:Enum={"Avro","AvroDeflate","JSON"} type RoutingStorageContainerProperties_Encoding string @@ -633,3 +745,10 @@ const ( RoutingStorageContainerProperties_Encoding_AvroDeflate = RoutingStorageContainerProperties_Encoding("AvroDeflate") RoutingStorageContainerProperties_Encoding_JSON = RoutingStorageContainerProperties_Encoding("JSON") ) + +// Mapping from string to RoutingStorageContainerProperties_Encoding +var routingStorageContainerProperties_Encoding_Values = map[string]RoutingStorageContainerProperties_Encoding{ + "avro": RoutingStorageContainerProperties_Encoding_Avro, + "avrodeflate": RoutingStorageContainerProperties_Encoding_AvroDeflate, + "json": RoutingStorageContainerProperties_Encoding_JSON, +} diff --git a/v2/api/devices/v1api20210702/iot_hub_status_arm_types_gen.go b/v2/api/devices/v1api20210702/iot_hub_status_arm_types_gen.go index 88feecad1ab..5f9e4a198bd 100644 --- a/v2/api/devices/v1api20210702/iot_hub_status_arm_types_gen.go +++ b/v2/api/devices/v1api20210702/iot_hub_status_arm_types_gen.go @@ -175,6 +175,14 @@ const ( ArmIdentity_Type_STATUS_UserAssigned = ArmIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ArmIdentity_Type_STATUS +var armIdentity_Type_STATUS_Values = map[string]ArmIdentity_Type_STATUS{ + "none": ArmIdentity_Type_STATUS_None, + "systemassigned": ArmIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": ArmIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ArmIdentity_Type_STATUS_UserAssigned, +} + type ArmUserIdentity_STATUS_ARM struct { ClientId *string `json:"clientId,omitempty"` PrincipalId *string `json:"principalId,omitempty"` @@ -232,6 +240,12 @@ const ( IotHubProperties_Features_STATUS_None = IotHubProperties_Features_STATUS("None") ) +// Mapping from string to IotHubProperties_Features_STATUS +var iotHubProperties_Features_STATUS_Values = map[string]IotHubProperties_Features_STATUS{ + "devicemanagement": IotHubProperties_Features_STATUS_DeviceManagement, + "none": IotHubProperties_Features_STATUS_None, +} + type IotHubProperties_PublicNetworkAccess_STATUS string const ( @@ -239,6 +253,12 @@ const ( IotHubProperties_PublicNetworkAccess_STATUS_Enabled = IotHubProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to IotHubProperties_PublicNetworkAccess_STATUS +var iotHubProperties_PublicNetworkAccess_STATUS_Values = map[string]IotHubProperties_PublicNetworkAccess_STATUS{ + "disabled": IotHubProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": IotHubProperties_PublicNetworkAccess_STATUS_Enabled, +} + type IotHubSkuInfo_Name_STATUS string const ( @@ -251,6 +271,17 @@ const ( IotHubSkuInfo_Name_STATUS_S3 = IotHubSkuInfo_Name_STATUS("S3") ) +// Mapping from string to IotHubSkuInfo_Name_STATUS +var iotHubSkuInfo_Name_STATUS_Values = map[string]IotHubSkuInfo_Name_STATUS{ + "b1": IotHubSkuInfo_Name_STATUS_B1, + "b2": IotHubSkuInfo_Name_STATUS_B2, + "b3": IotHubSkuInfo_Name_STATUS_B3, + "f1": IotHubSkuInfo_Name_STATUS_F1, + "s1": IotHubSkuInfo_Name_STATUS_S1, + "s2": IotHubSkuInfo_Name_STATUS_S2, + "s3": IotHubSkuInfo_Name_STATUS_S3, +} + type IotHubSkuInfo_Tier_STATUS string const ( @@ -259,6 +290,13 @@ const ( IotHubSkuInfo_Tier_STATUS_Standard = IotHubSkuInfo_Tier_STATUS("Standard") ) +// Mapping from string to IotHubSkuInfo_Tier_STATUS +var iotHubSkuInfo_Tier_STATUS_Values = map[string]IotHubSkuInfo_Tier_STATUS{ + "basic": IotHubSkuInfo_Tier_STATUS_Basic, + "free": IotHubSkuInfo_Tier_STATUS_Free, + "standard": IotHubSkuInfo_Tier_STATUS_Standard, +} + // The IP filter rules for the IoT hub. type IpFilterRule_STATUS_ARM struct { // Action: The desired action for requests captured by this rule. @@ -360,6 +398,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -369,6 +415,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // The properties of an enrichment that your IoT hub applies to messages delivered to endpoints. type EnrichmentProperties_STATUS_ARM struct { // EndpointNames: The list of endpoints for which the enrichment is applied to the message. @@ -425,6 +479,12 @@ const ( IotHubLocationDescription_Role_STATUS_Secondary = IotHubLocationDescription_Role_STATUS("secondary") ) +// Mapping from string to IotHubLocationDescription_Role_STATUS +var iotHubLocationDescription_Role_STATUS_Values = map[string]IotHubLocationDescription_Role_STATUS{ + "primary": IotHubLocationDescription_Role_STATUS_Primary, + "secondary": IotHubLocationDescription_Role_STATUS_Secondary, +} + type IpFilterRule_Action_STATUS string const ( @@ -432,6 +492,12 @@ const ( IpFilterRule_Action_STATUS_Reject = IpFilterRule_Action_STATUS("Reject") ) +// Mapping from string to IpFilterRule_Action_STATUS +var ipFilterRule_Action_STATUS_Values = map[string]IpFilterRule_Action_STATUS{ + "accept": IpFilterRule_Action_STATUS_Accept, + "reject": IpFilterRule_Action_STATUS_Reject, +} + // The properties of the Managed identity. type ManagedIdentity_STATUS_ARM struct { // UserAssignedIdentity: The user assigned identity. @@ -457,6 +523,12 @@ const ( NetworkRuleSetProperties_DefaultAction_STATUS_Deny = NetworkRuleSetProperties_DefaultAction_STATUS("Deny") ) +// Mapping from string to NetworkRuleSetProperties_DefaultAction_STATUS +var networkRuleSetProperties_DefaultAction_STATUS_Values = map[string]NetworkRuleSetProperties_DefaultAction_STATUS{ + "allow": NetworkRuleSetProperties_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSetProperties_DefaultAction_STATUS_Deny, +} + // The properties of a routing rule that your IoT hub uses to route messages to endpoints. type RouteProperties_STATUS_ARM struct { // Condition: The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true @@ -518,6 +590,25 @@ const ( SharedAccessSignatureAuthorizationRule_Rights_STATUS_ServiceConnectDeviceConnect = SharedAccessSignatureAuthorizationRule_Rights_STATUS("ServiceConnect, DeviceConnect") ) +// Mapping from string to SharedAccessSignatureAuthorizationRule_Rights_STATUS +var sharedAccessSignatureAuthorizationRule_Rights_STATUS_Values = map[string]SharedAccessSignatureAuthorizationRule_Rights_STATUS{ + "deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_DeviceConnect, + "registryread": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryRead, + "registryread, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryReadDeviceConnect, + "registryread, registrywrite": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryReadRegistryWrite, + "registryread, registrywrite, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryReadRegistryWriteDeviceConnect, + "registryread, registrywrite, serviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryReadRegistryWriteServiceConnect, + "registryread, registrywrite, serviceconnect, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryReadRegistryWriteServiceConnectDeviceConnect, + "registryread, serviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryReadServiceConnect, + "registryread, serviceconnect, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryReadServiceConnectDeviceConnect, + "registrywrite": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryWrite, + "registrywrite, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryWriteDeviceConnect, + "registrywrite, serviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryWriteServiceConnect, + "registrywrite, serviceconnect, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_RegistryWriteServiceConnectDeviceConnect, + "serviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_ServiceConnect, + "serviceconnect, deviceconnect": SharedAccessSignatureAuthorizationRule_Rights_STATUS_ServiceConnectDeviceConnect, +} + type StorageEndpointProperties_AuthenticationType_STATUS string const ( @@ -525,14 +616,30 @@ const ( StorageEndpointProperties_AuthenticationType_STATUS_KeyBased = StorageEndpointProperties_AuthenticationType_STATUS("keyBased") ) +// Mapping from string to StorageEndpointProperties_AuthenticationType_STATUS +var storageEndpointProperties_AuthenticationType_STATUS_Values = map[string]StorageEndpointProperties_AuthenticationType_STATUS{ + "identitybased": StorageEndpointProperties_AuthenticationType_STATUS_IdentityBased, + "keybased": StorageEndpointProperties_AuthenticationType_STATUS_KeyBased, +} + type FallbackRouteProperties_Source_STATUS string const FallbackRouteProperties_Source_STATUS_DeviceMessages = FallbackRouteProperties_Source_STATUS("DeviceMessages") +// Mapping from string to FallbackRouteProperties_Source_STATUS +var fallbackRouteProperties_Source_STATUS_Values = map[string]FallbackRouteProperties_Source_STATUS{ + "devicemessages": FallbackRouteProperties_Source_STATUS_DeviceMessages, +} + type NetworkRuleSetIpRule_Action_STATUS string const NetworkRuleSetIpRule_Action_STATUS_Allow = NetworkRuleSetIpRule_Action_STATUS("Allow") +// Mapping from string to NetworkRuleSetIpRule_Action_STATUS +var networkRuleSetIpRule_Action_STATUS_Values = map[string]NetworkRuleSetIpRule_Action_STATUS{ + "allow": NetworkRuleSetIpRule_Action_STATUS_Allow, +} + type RouteProperties_Source_STATUS string const ( @@ -544,6 +651,16 @@ const ( RouteProperties_Source_STATUS_TwinChangeEvents = RouteProperties_Source_STATUS("TwinChangeEvents") ) +// Mapping from string to RouteProperties_Source_STATUS +var routeProperties_Source_STATUS_Values = map[string]RouteProperties_Source_STATUS{ + "deviceconnectionstateevents": RouteProperties_Source_STATUS_DeviceConnectionStateEvents, + "devicejoblifecycleevents": RouteProperties_Source_STATUS_DeviceJobLifecycleEvents, + "devicelifecycleevents": RouteProperties_Source_STATUS_DeviceLifecycleEvents, + "devicemessages": RouteProperties_Source_STATUS_DeviceMessages, + "invalid": RouteProperties_Source_STATUS_Invalid, + "twinchangeevents": RouteProperties_Source_STATUS_TwinChangeEvents, +} + // The properties related to an event hub endpoint. type RoutingEventHubProperties_STATUS_ARM struct { // AuthenticationType: Method used to authenticate against the event hub endpoint @@ -683,6 +800,12 @@ const ( RoutingEventHubProperties_AuthenticationType_STATUS_KeyBased = RoutingEventHubProperties_AuthenticationType_STATUS("keyBased") ) +// Mapping from string to RoutingEventHubProperties_AuthenticationType_STATUS +var routingEventHubProperties_AuthenticationType_STATUS_Values = map[string]RoutingEventHubProperties_AuthenticationType_STATUS{ + "identitybased": RoutingEventHubProperties_AuthenticationType_STATUS_IdentityBased, + "keybased": RoutingEventHubProperties_AuthenticationType_STATUS_KeyBased, +} + type RoutingServiceBusQueueEndpointProperties_AuthenticationType_STATUS string const ( @@ -690,6 +813,12 @@ const ( RoutingServiceBusQueueEndpointProperties_AuthenticationType_STATUS_KeyBased = RoutingServiceBusQueueEndpointProperties_AuthenticationType_STATUS("keyBased") ) +// Mapping from string to RoutingServiceBusQueueEndpointProperties_AuthenticationType_STATUS +var routingServiceBusQueueEndpointProperties_AuthenticationType_STATUS_Values = map[string]RoutingServiceBusQueueEndpointProperties_AuthenticationType_STATUS{ + "identitybased": RoutingServiceBusQueueEndpointProperties_AuthenticationType_STATUS_IdentityBased, + "keybased": RoutingServiceBusQueueEndpointProperties_AuthenticationType_STATUS_KeyBased, +} + type RoutingServiceBusTopicEndpointProperties_AuthenticationType_STATUS string const ( @@ -697,6 +826,12 @@ const ( RoutingServiceBusTopicEndpointProperties_AuthenticationType_STATUS_KeyBased = RoutingServiceBusTopicEndpointProperties_AuthenticationType_STATUS("keyBased") ) +// Mapping from string to RoutingServiceBusTopicEndpointProperties_AuthenticationType_STATUS +var routingServiceBusTopicEndpointProperties_AuthenticationType_STATUS_Values = map[string]RoutingServiceBusTopicEndpointProperties_AuthenticationType_STATUS{ + "identitybased": RoutingServiceBusTopicEndpointProperties_AuthenticationType_STATUS_IdentityBased, + "keybased": RoutingServiceBusTopicEndpointProperties_AuthenticationType_STATUS_KeyBased, +} + type RoutingStorageContainerProperties_AuthenticationType_STATUS string const ( @@ -704,6 +839,12 @@ const ( RoutingStorageContainerProperties_AuthenticationType_STATUS_KeyBased = RoutingStorageContainerProperties_AuthenticationType_STATUS("keyBased") ) +// Mapping from string to RoutingStorageContainerProperties_AuthenticationType_STATUS +var routingStorageContainerProperties_AuthenticationType_STATUS_Values = map[string]RoutingStorageContainerProperties_AuthenticationType_STATUS{ + "identitybased": RoutingStorageContainerProperties_AuthenticationType_STATUS_IdentityBased, + "keybased": RoutingStorageContainerProperties_AuthenticationType_STATUS_KeyBased, +} + type RoutingStorageContainerProperties_Encoding_STATUS string const ( @@ -711,3 +852,10 @@ const ( RoutingStorageContainerProperties_Encoding_STATUS_AvroDeflate = RoutingStorageContainerProperties_Encoding_STATUS("AvroDeflate") RoutingStorageContainerProperties_Encoding_STATUS_JSON = RoutingStorageContainerProperties_Encoding_STATUS("JSON") ) + +// Mapping from string to RoutingStorageContainerProperties_Encoding_STATUS +var routingStorageContainerProperties_Encoding_STATUS_Values = map[string]RoutingStorageContainerProperties_Encoding_STATUS{ + "avro": RoutingStorageContainerProperties_Encoding_STATUS_Avro, + "avrodeflate": RoutingStorageContainerProperties_Encoding_STATUS_AvroDeflate, + "json": RoutingStorageContainerProperties_Encoding_STATUS_JSON, +} diff --git a/v2/api/devices/v1api20210702/iot_hub_types_gen.go b/v2/api/devices/v1api20210702/iot_hub_types_gen.go index f74240c1d77..687e0acbca8 100644 --- a/v2/api/devices/v1api20210702/iot_hub_types_gen.go +++ b/v2/api/devices/v1api20210702/iot_hub_types_gen.go @@ -1196,8 +1196,9 @@ func (identity *ArmIdentity) AssignProperties_From_ArmIdentity(source *v20210702 // Type if source.Type != nil { - typeVar := ArmIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, armIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1366,8 +1367,9 @@ func (identity *ArmIdentity_STATUS) AssignProperties_From_ArmIdentity_STATUS(sou // Type if source.Type != nil { - typeVar := ArmIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, armIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1995,8 +1997,9 @@ func (properties *IotHubProperties) AssignProperties_From_IotHubProperties(sourc // Features if source.Features != nil { - feature := IotHubProperties_Features(*source.Features) - properties.Features = &feature + feature := *source.Features + featureTemp := genruntime.ToEnum(feature, iotHubProperties_Features_Values) + properties.Features = &featureTemp } else { properties.Features = nil } @@ -2054,8 +2057,9 @@ func (properties *IotHubProperties) AssignProperties_From_IotHubProperties(sourc // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := IotHubProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - properties.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, iotHubProperties_PublicNetworkAccess_Values) + properties.PublicNetworkAccess = &publicNetworkAccessTemp } else { properties.PublicNetworkAccess = nil } @@ -2918,8 +2922,9 @@ func (properties *IotHubProperties_STATUS) AssignProperties_From_IotHubPropertie // Features if source.Features != nil { - feature := IotHubProperties_Features_STATUS(*source.Features) - properties.Features = &feature + feature := *source.Features + featureTemp := genruntime.ToEnum(feature, iotHubProperties_Features_STATUS_Values) + properties.Features = &featureTemp } else { properties.Features = nil } @@ -3019,8 +3024,9 @@ func (properties *IotHubProperties_STATUS) AssignProperties_From_IotHubPropertie // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := IotHubProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - properties.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, iotHubProperties_PublicNetworkAccess_STATUS_Values) + properties.PublicNetworkAccess = &publicNetworkAccessTemp } else { properties.PublicNetworkAccess = nil } @@ -3400,8 +3406,9 @@ func (info *IotHubSkuInfo) AssignProperties_From_IotHubSkuInfo(source *v20210702 // Name if source.Name != nil { - name := IotHubSkuInfo_Name(*source.Name) - info.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, iotHubSkuInfo_Name_Values) + info.Name = &nameTemp } else { info.Name = nil } @@ -3512,16 +3519,18 @@ func (info *IotHubSkuInfo_STATUS) AssignProperties_From_IotHubSkuInfo_STATUS(sou // Name if source.Name != nil { - name := IotHubSkuInfo_Name_STATUS(*source.Name) - info.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, iotHubSkuInfo_Name_STATUS_Values) + info.Name = &nameTemp } else { info.Name = nil } // Tier if source.Tier != nil { - tier := IotHubSkuInfo_Tier_STATUS(*source.Tier) - info.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, iotHubSkuInfo_Tier_STATUS_Values) + info.Tier = &tierTemp } else { info.Tier = nil } @@ -3651,8 +3660,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -3665,8 +3675,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -4369,8 +4380,9 @@ func (description *IotHubLocationDescription_STATUS) AssignProperties_From_IotHu // Role if source.Role != nil { - role := IotHubLocationDescription_Role_STATUS(*source.Role) - description.Role = &role + role := *source.Role + roleTemp := genruntime.ToEnum(role, iotHubLocationDescription_Role_STATUS_Values) + description.Role = &roleTemp } else { description.Role = nil } @@ -4714,8 +4726,9 @@ func (rule *IpFilterRule) AssignProperties_From_IpFilterRule(source *v20210702s. // Action if source.Action != nil { - action := IpFilterRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, ipFilterRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -4834,8 +4847,9 @@ func (rule *IpFilterRule_STATUS) AssignProperties_From_IpFilterRule_STATUS(sourc // Action if source.Action != nil { - action := IpFilterRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, ipFilterRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -5219,8 +5233,9 @@ func (properties *NetworkRuleSetProperties) AssignProperties_From_NetworkRuleSet // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSetProperties_DefaultAction(*source.DefaultAction) - properties.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSetProperties_DefaultAction_Values) + properties.DefaultAction = &defaultActionTemp } else { properties.DefaultAction = nil } @@ -5403,8 +5418,9 @@ func (properties *NetworkRuleSetProperties_STATUS) AssignProperties_From_Network // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSetProperties_DefaultAction_STATUS(*source.DefaultAction) - properties.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSetProperties_DefaultAction_STATUS_Values) + properties.DefaultAction = &defaultActionTemp } else { properties.DefaultAction = nil } @@ -6174,8 +6190,9 @@ func (rule *SharedAccessSignatureAuthorizationRule) AssignProperties_From_Shared // Rights if source.Rights != nil { - right := SharedAccessSignatureAuthorizationRule_Rights(*source.Rights) - rule.Rights = &right + right := *source.Rights + rightTemp := genruntime.ToEnum(right, sharedAccessSignatureAuthorizationRule_Rights_Values) + rule.Rights = &rightTemp } else { rule.Rights = nil } @@ -6276,8 +6293,9 @@ func (rule *SharedAccessSignatureAuthorizationRule_STATUS) AssignProperties_From // Rights if source.Rights != nil { - right := SharedAccessSignatureAuthorizationRule_Rights_STATUS(*source.Rights) - rule.Rights = &right + right := *source.Rights + rightTemp := genruntime.ToEnum(right, sharedAccessSignatureAuthorizationRule_Rights_STATUS_Values) + rule.Rights = &rightTemp } else { rule.Rights = nil } @@ -6436,8 +6454,9 @@ func (properties *StorageEndpointProperties) AssignProperties_From_StorageEndpoi // AuthenticationType if source.AuthenticationType != nil { - authenticationType := StorageEndpointProperties_AuthenticationType(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, storageEndpointProperties_AuthenticationType_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -6624,8 +6643,9 @@ func (properties *StorageEndpointProperties_STATUS) AssignProperties_From_Storag // AuthenticationType if source.AuthenticationType != nil { - authenticationType := StorageEndpointProperties_AuthenticationType_STATUS(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, storageEndpointProperties_AuthenticationType_STATUS_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -7124,7 +7144,8 @@ func (properties *FallbackRouteProperties) AssignProperties_From_FallbackRoutePr // Source if source.Source != nil { - sourceTemp := FallbackRouteProperties_Source(*source.Source) + sourceValue := *source.Source + sourceTemp := genruntime.ToEnum(sourceValue, fallbackRouteProperties_Source_Values) properties.Source = &sourceTemp } else { properties.Source = nil @@ -7318,7 +7339,8 @@ func (properties *FallbackRouteProperties_STATUS) AssignProperties_From_Fallback // Source if source.Source != nil { - sourceTemp := FallbackRouteProperties_Source_STATUS(*source.Source) + sourceValue := *source.Source + sourceTemp := genruntime.ToEnum(sourceValue, fallbackRouteProperties_Source_STATUS_Values) properties.Source = &sourceTemp } else { properties.Source = nil @@ -7838,8 +7860,9 @@ func (rule *NetworkRuleSetIpRule) AssignProperties_From_NetworkRuleSetIpRule(sou // Action if source.Action != nil { - action := NetworkRuleSetIpRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, networkRuleSetIpRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -7958,8 +7981,9 @@ func (rule *NetworkRuleSetIpRule_STATUS) AssignProperties_From_NetworkRuleSetIpR // Action if source.Action != nil { - action := NetworkRuleSetIpRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, networkRuleSetIpRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -8154,7 +8178,8 @@ func (properties *RouteProperties) AssignProperties_From_RouteProperties(source // Source if source.Source != nil { - sourceTemp := RouteProperties_Source(*source.Source) + sourceValue := *source.Source + sourceTemp := genruntime.ToEnum(sourceValue, routeProperties_Source_Values) properties.Source = &sourceTemp } else { properties.Source = nil @@ -8357,7 +8382,8 @@ func (properties *RouteProperties_STATUS) AssignProperties_From_RouteProperties_ // Source if source.Source != nil { - sourceTemp := RouteProperties_Source_STATUS(*source.Source) + sourceValue := *source.Source + sourceTemp := genruntime.ToEnum(sourceValue, routeProperties_Source_STATUS_Values) properties.Source = &sourceTemp } else { properties.Source = nil @@ -9205,8 +9231,9 @@ func (properties *RoutingEventHubProperties) AssignProperties_From_RoutingEventH // AuthenticationType if source.AuthenticationType != nil { - authenticationType := RoutingEventHubProperties_AuthenticationType(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, routingEventHubProperties_AuthenticationType_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -9495,8 +9522,9 @@ func (properties *RoutingEventHubProperties_STATUS) AssignProperties_From_Routin // AuthenticationType if source.AuthenticationType != nil { - authenticationType := RoutingEventHubProperties_AuthenticationType_STATUS(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, routingEventHubProperties_AuthenticationType_STATUS_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -9772,8 +9800,9 @@ func (properties *RoutingServiceBusQueueEndpointProperties) AssignProperties_Fro // AuthenticationType if source.AuthenticationType != nil { - authenticationType := RoutingServiceBusQueueEndpointProperties_AuthenticationType(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, routingServiceBusQueueEndpointProperties_AuthenticationType_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -10062,8 +10091,9 @@ func (properties *RoutingServiceBusQueueEndpointProperties_STATUS) AssignPropert // AuthenticationType if source.AuthenticationType != nil { - authenticationType := RoutingServiceBusQueueEndpointProperties_AuthenticationType_STATUS(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, routingServiceBusQueueEndpointProperties_AuthenticationType_STATUS_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -10339,8 +10369,9 @@ func (properties *RoutingServiceBusTopicEndpointProperties) AssignProperties_Fro // AuthenticationType if source.AuthenticationType != nil { - authenticationType := RoutingServiceBusTopicEndpointProperties_AuthenticationType(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, routingServiceBusTopicEndpointProperties_AuthenticationType_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -10629,8 +10660,9 @@ func (properties *RoutingServiceBusTopicEndpointProperties_STATUS) AssignPropert // AuthenticationType if source.AuthenticationType != nil { - authenticationType := RoutingServiceBusTopicEndpointProperties_AuthenticationType_STATUS(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, routingServiceBusTopicEndpointProperties_AuthenticationType_STATUS_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -10975,8 +11007,9 @@ func (properties *RoutingStorageContainerProperties) AssignProperties_From_Routi // AuthenticationType if source.AuthenticationType != nil { - authenticationType := RoutingStorageContainerProperties_AuthenticationType(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, routingStorageContainerProperties_AuthenticationType_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -11002,8 +11035,9 @@ func (properties *RoutingStorageContainerProperties) AssignProperties_From_Routi // Encoding if source.Encoding != nil { - encoding := RoutingStorageContainerProperties_Encoding(*source.Encoding) - properties.Encoding = &encoding + encoding := *source.Encoding + encodingTemp := genruntime.ToEnum(encoding, routingStorageContainerProperties_Encoding_Values) + properties.Encoding = &encodingTemp } else { properties.Encoding = nil } @@ -11386,8 +11420,9 @@ func (properties *RoutingStorageContainerProperties_STATUS) AssignProperties_Fro // AuthenticationType if source.AuthenticationType != nil { - authenticationType := RoutingStorageContainerProperties_AuthenticationType_STATUS(*source.AuthenticationType) - properties.AuthenticationType = &authenticationType + authenticationType := *source.AuthenticationType + authenticationTypeTemp := genruntime.ToEnum(authenticationType, routingStorageContainerProperties_AuthenticationType_STATUS_Values) + properties.AuthenticationType = &authenticationTypeTemp } else { properties.AuthenticationType = nil } @@ -11400,8 +11435,9 @@ func (properties *RoutingStorageContainerProperties_STATUS) AssignProperties_Fro // Encoding if source.Encoding != nil { - encoding := RoutingStorageContainerProperties_Encoding_STATUS(*source.Encoding) - properties.Encoding = &encoding + encoding := *source.Encoding + encodingTemp := genruntime.ToEnum(encoding, routingStorageContainerProperties_Encoding_STATUS_Values) + properties.Encoding = &encodingTemp } else { properties.Encoding = nil } diff --git a/v2/api/documentdb/v1api20210515/database_account_spec_arm_types_gen.go b/v2/api/documentdb/v1api20210515/database_account_spec_arm_types_gen.go index ebaf82c9524..d8821be3745 100644 --- a/v2/api/documentdb/v1api20210515/database_account_spec_arm_types_gen.go +++ b/v2/api/documentdb/v1api20210515/database_account_spec_arm_types_gen.go @@ -50,6 +50,13 @@ const ( DatabaseAccount_Kind_Spec_Parse = DatabaseAccount_Kind_Spec("Parse") ) +// Mapping from string to DatabaseAccount_Kind_Spec +var databaseAccount_Kind_Spec_Values = map[string]DatabaseAccount_Kind_Spec{ + "globaldocumentdb": DatabaseAccount_Kind_Spec_GlobalDocumentDB, + "mongodb": DatabaseAccount_Kind_Spec_MongoDB, + "parse": DatabaseAccount_Kind_Spec_Parse, +} + // Properties to create and update Azure Cosmos DB database accounts. type DatabaseAccountCreateUpdateProperties_ARM struct { // AnalyticalStorageConfiguration: Analytical storage specific properties. @@ -260,6 +267,14 @@ const ( ManagedServiceIdentity_Type_UserAssigned = ManagedServiceIdentity_Type("UserAssigned") ) +// Mapping from string to ManagedServiceIdentity_Type +var managedServiceIdentity_Type_Values = map[string]ManagedServiceIdentity_Type{ + "none": ManagedServiceIdentity_Type_None, + "systemassigned": ManagedServiceIdentity_Type_SystemAssigned, + "systemassigned,userassigned": ManagedServiceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentity_Type_UserAssigned, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/documentdb/v1api20210515/database_account_status_arm_types_gen.go b/v2/api/documentdb/v1api20210515/database_account_status_arm_types_gen.go index 6ca27c8c84b..ffefe3d4a20 100644 --- a/v2/api/documentdb/v1api20210515/database_account_status_arm_types_gen.go +++ b/v2/api/documentdb/v1api20210515/database_account_status_arm_types_gen.go @@ -37,6 +37,13 @@ const ( DatabaseAccount_Kind_STATUS_Parse = DatabaseAccount_Kind_STATUS("Parse") ) +// Mapping from string to DatabaseAccount_Kind_STATUS +var databaseAccount_Kind_STATUS_Values = map[string]DatabaseAccount_Kind_STATUS{ + "globaldocumentdb": DatabaseAccount_Kind_STATUS_GlobalDocumentDB, + "mongodb": DatabaseAccount_Kind_STATUS_MongoDB, + "parse": DatabaseAccount_Kind_STATUS_Parse, +} + // Properties for the database account. type DatabaseAccountGetProperties_STATUS_ARM struct { // AnalyticalStorageConfiguration: Analytical storage specific properties. @@ -297,6 +304,14 @@ const ( ManagedServiceIdentity_Type_STATUS_UserAssigned = ManagedServiceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ManagedServiceIdentity_Type_STATUS +var managedServiceIdentity_Type_STATUS_Values = map[string]ManagedServiceIdentity_Type_STATUS{ + "none": ManagedServiceIdentity_Type_STATUS_None, + "systemassigned": ManagedServiceIdentity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": ManagedServiceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentity_Type_STATUS_UserAssigned, +} + type ManagedServiceIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/documentdb/v1api20210515/database_account_types_gen.go b/v2/api/documentdb/v1api20210515/database_account_types_gen.go index 52561976f75..6f7948225fe 100644 --- a/v2/api/documentdb/v1api20210515/database_account_types_gen.go +++ b/v2/api/documentdb/v1api20210515/database_account_types_gen.go @@ -1063,8 +1063,9 @@ func (account *DatabaseAccount_Spec) AssignProperties_From_DatabaseAccount_Spec( // ConnectorOffer if source.ConnectorOffer != nil { - connectorOffer := ConnectorOffer(*source.ConnectorOffer) - account.ConnectorOffer = &connectorOffer + connectorOffer := *source.ConnectorOffer + connectorOfferTemp := genruntime.ToEnum(connectorOffer, connectorOffer_Values) + account.ConnectorOffer = &connectorOfferTemp } else { account.ConnectorOffer = nil } @@ -1101,8 +1102,9 @@ func (account *DatabaseAccount_Spec) AssignProperties_From_DatabaseAccount_Spec( // DatabaseAccountOfferType if source.DatabaseAccountOfferType != nil { - databaseAccountOfferType := DatabaseAccountOfferType(*source.DatabaseAccountOfferType) - account.DatabaseAccountOfferType = &databaseAccountOfferType + databaseAccountOfferType := *source.DatabaseAccountOfferType + databaseAccountOfferTypeTemp := genruntime.ToEnum(databaseAccountOfferType, databaseAccountOfferType_Values) + account.DatabaseAccountOfferType = &databaseAccountOfferTypeTemp } else { account.DatabaseAccountOfferType = nil } @@ -1201,8 +1203,9 @@ func (account *DatabaseAccount_Spec) AssignProperties_From_DatabaseAccount_Spec( // Kind if source.Kind != nil { - kind := DatabaseAccount_Kind_Spec(*source.Kind) - account.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, databaseAccount_Kind_Spec_Values) + account.Kind = &kindTemp } else { account.Kind = nil } @@ -1230,8 +1233,9 @@ func (account *DatabaseAccount_Spec) AssignProperties_From_DatabaseAccount_Spec( // NetworkAclBypass if source.NetworkAclBypass != nil { - networkAclBypass := NetworkAclBypass(*source.NetworkAclBypass) - account.NetworkAclBypass = &networkAclBypass + networkAclBypass := *source.NetworkAclBypass + networkAclBypassTemp := genruntime.ToEnum(networkAclBypass, networkAclBypass_Values) + account.NetworkAclBypass = &networkAclBypassTemp } else { account.NetworkAclBypass = nil } @@ -1261,8 +1265,9 @@ func (account *DatabaseAccount_Spec) AssignProperties_From_DatabaseAccount_Spec( // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccess(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccess_Values) + account.PublicNetworkAccess = &publicNetworkAccessTemp } else { account.PublicNetworkAccess = nil } @@ -2481,8 +2486,9 @@ func (account *DatabaseAccount_STATUS) AssignProperties_From_DatabaseAccount_STA // ConnectorOffer if source.ConnectorOffer != nil { - connectorOffer := ConnectorOffer_STATUS(*source.ConnectorOffer) - account.ConnectorOffer = &connectorOffer + connectorOffer := *source.ConnectorOffer + connectorOfferTemp := genruntime.ToEnum(connectorOffer, connectorOffer_STATUS_Values) + account.ConnectorOffer = &connectorOfferTemp } else { account.ConnectorOffer = nil } @@ -2519,8 +2525,9 @@ func (account *DatabaseAccount_STATUS) AssignProperties_From_DatabaseAccount_STA // DatabaseAccountOfferType if source.DatabaseAccountOfferType != nil { - databaseAccountOfferType := DatabaseAccountOfferType_STATUS(*source.DatabaseAccountOfferType) - account.DatabaseAccountOfferType = &databaseAccountOfferType + databaseAccountOfferType := *source.DatabaseAccountOfferType + databaseAccountOfferTypeTemp := genruntime.ToEnum(databaseAccountOfferType, databaseAccountOfferType_STATUS_Values) + account.DatabaseAccountOfferType = &databaseAccountOfferTypeTemp } else { account.DatabaseAccountOfferType = nil } @@ -2643,8 +2650,9 @@ func (account *DatabaseAccount_STATUS) AssignProperties_From_DatabaseAccount_STA // Kind if source.Kind != nil { - kind := DatabaseAccount_Kind_STATUS(*source.Kind) - account.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, databaseAccount_Kind_STATUS_Values) + account.Kind = &kindTemp } else { account.Kind = nil } @@ -2675,8 +2683,9 @@ func (account *DatabaseAccount_STATUS) AssignProperties_From_DatabaseAccount_STA // NetworkAclBypass if source.NetworkAclBypass != nil { - networkAclBypass := NetworkAclBypass_STATUS(*source.NetworkAclBypass) - account.NetworkAclBypass = &networkAclBypass + networkAclBypass := *source.NetworkAclBypass + networkAclBypassTemp := genruntime.ToEnum(networkAclBypass, networkAclBypass_STATUS_Values) + account.NetworkAclBypass = &networkAclBypassTemp } else { account.NetworkAclBypass = nil } @@ -2707,8 +2716,9 @@ func (account *DatabaseAccount_STATUS) AssignProperties_From_DatabaseAccount_STA // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, publicNetworkAccess_STATUS_Values) + account.PublicNetworkAccess = &publicNetworkAccessTemp } else { account.PublicNetworkAccess = nil } @@ -3194,8 +3204,9 @@ func (configuration *AnalyticalStorageConfiguration) AssignProperties_From_Analy // SchemaType if source.SchemaType != nil { - schemaType := AnalyticalStorageSchemaType(*source.SchemaType) - configuration.SchemaType = &schemaType + schemaType := *source.SchemaType + schemaTypeTemp := genruntime.ToEnum(schemaType, analyticalStorageSchemaType_Values) + configuration.SchemaType = &schemaTypeTemp } else { configuration.SchemaType = nil } @@ -3278,8 +3289,9 @@ func (configuration *AnalyticalStorageConfiguration_STATUS) AssignProperties_Fro // SchemaType if source.SchemaType != nil { - schemaType := AnalyticalStorageSchemaType_STATUS(*source.SchemaType) - configuration.SchemaType = &schemaType + schemaType := *source.SchemaType + schemaTypeTemp := genruntime.ToEnum(schemaType, analyticalStorageSchemaType_STATUS_Values) + configuration.SchemaType = &schemaTypeTemp } else { configuration.SchemaType = nil } @@ -3361,8 +3373,9 @@ func (properties *ApiProperties) AssignProperties_From_ApiProperties(source *v20 // ServerVersion if source.ServerVersion != nil { - serverVersion := ApiProperties_ServerVersion(*source.ServerVersion) - properties.ServerVersion = &serverVersion + serverVersion := *source.ServerVersion + serverVersionTemp := genruntime.ToEnum(serverVersion, apiProperties_ServerVersion_Values) + properties.ServerVersion = &serverVersionTemp } else { properties.ServerVersion = nil } @@ -3444,8 +3457,9 @@ func (properties *ApiProperties_STATUS) AssignProperties_From_ApiProperties_STAT // ServerVersion if source.ServerVersion != nil { - serverVersion := ApiProperties_ServerVersion_STATUS(*source.ServerVersion) - properties.ServerVersion = &serverVersion + serverVersion := *source.ServerVersion + serverVersionTemp := genruntime.ToEnum(serverVersion, apiProperties_ServerVersion_STATUS_Values) + properties.ServerVersion = &serverVersionTemp } else { properties.ServerVersion = nil } @@ -3927,11 +3941,21 @@ type ConnectorOffer string const ConnectorOffer_Small = ConnectorOffer("Small") +// Mapping from string to ConnectorOffer +var connectorOffer_Values = map[string]ConnectorOffer{ + "small": ConnectorOffer_Small, +} + // The cassandra connector offer type for the Cosmos DB C* database account. type ConnectorOffer_STATUS string const ConnectorOffer_STATUS_Small = ConnectorOffer_STATUS("Small") +// Mapping from string to ConnectorOffer_STATUS +var connectorOffer_STATUS_Values = map[string]ConnectorOffer_STATUS{ + "small": ConnectorOffer_STATUS_Small, +} + // The consistency policy for the Cosmos DB database account. type ConsistencyPolicy struct { // +kubebuilder:validation:Required @@ -4021,8 +4045,9 @@ func (policy *ConsistencyPolicy) AssignProperties_From_ConsistencyPolicy(source // DefaultConsistencyLevel if source.DefaultConsistencyLevel != nil { - defaultConsistencyLevel := ConsistencyPolicy_DefaultConsistencyLevel(*source.DefaultConsistencyLevel) - policy.DefaultConsistencyLevel = &defaultConsistencyLevel + defaultConsistencyLevel := *source.DefaultConsistencyLevel + defaultConsistencyLevelTemp := genruntime.ToEnum(defaultConsistencyLevel, consistencyPolicy_DefaultConsistencyLevel_Values) + policy.DefaultConsistencyLevel = &defaultConsistencyLevelTemp } else { policy.DefaultConsistencyLevel = nil } @@ -4175,8 +4200,9 @@ func (policy *ConsistencyPolicy_STATUS) AssignProperties_From_ConsistencyPolicy_ // DefaultConsistencyLevel if source.DefaultConsistencyLevel != nil { - defaultConsistencyLevel := ConsistencyPolicy_DefaultConsistencyLevel_STATUS(*source.DefaultConsistencyLevel) - policy.DefaultConsistencyLevel = &defaultConsistencyLevel + defaultConsistencyLevel := *source.DefaultConsistencyLevel + defaultConsistencyLevelTemp := genruntime.ToEnum(defaultConsistencyLevel, consistencyPolicy_DefaultConsistencyLevel_STATUS_Values) + policy.DefaultConsistencyLevel = &defaultConsistencyLevelTemp } else { policy.DefaultConsistencyLevel = nil } @@ -4546,11 +4572,21 @@ type DatabaseAccountOfferType string const DatabaseAccountOfferType_Standard = DatabaseAccountOfferType("Standard") +// Mapping from string to DatabaseAccountOfferType +var databaseAccountOfferType_Values = map[string]DatabaseAccountOfferType{ + "standard": DatabaseAccountOfferType_Standard, +} + // The offer type for the Cosmos DB database account. type DatabaseAccountOfferType_STATUS string const DatabaseAccountOfferType_STATUS_Standard = DatabaseAccountOfferType_STATUS("Standard") +// Mapping from string to DatabaseAccountOfferType_STATUS +var databaseAccountOfferType_STATUS_Values = map[string]DatabaseAccountOfferType_STATUS{ + "standard": DatabaseAccountOfferType_STATUS_Standard, +} + // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type DatabaseAccountOperatorSpec struct { // Secrets: configures where to place Azure generated secrets. @@ -5224,8 +5260,9 @@ func (identity *ManagedServiceIdentity) AssignProperties_From_ManagedServiceIden // Type if source.Type != nil { - typeVar := ManagedServiceIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -5401,8 +5438,9 @@ func (identity *ManagedServiceIdentity_STATUS) AssignProperties_From_ManagedServ // Type if source.Type != nil { - typeVar := ManagedServiceIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -5486,6 +5524,12 @@ const ( NetworkAclBypass_None = NetworkAclBypass("None") ) +// Mapping from string to NetworkAclBypass +var networkAclBypass_Values = map[string]NetworkAclBypass{ + "azureservices": NetworkAclBypass_AzureServices, + "none": NetworkAclBypass_None, +} + // Indicates what services are allowed to bypass firewall checks. type NetworkAclBypass_STATUS string @@ -5494,6 +5538,12 @@ const ( NetworkAclBypass_STATUS_None = NetworkAclBypass_STATUS("None") ) +// Mapping from string to NetworkAclBypass_STATUS +var networkAclBypass_STATUS_Values = map[string]NetworkAclBypass_STATUS{ + "azureservices": NetworkAclBypass_STATUS_AzureServices, + "none": NetworkAclBypass_STATUS_None, +} + // A private endpoint connection type PrivateEndpointConnection_STATUS struct { // Id: Fully qualified resource ID for the resource. Ex - @@ -5563,6 +5613,12 @@ const ( PublicNetworkAccess_Enabled = PublicNetworkAccess("Enabled") ) +// Mapping from string to PublicNetworkAccess +var publicNetworkAccess_Values = map[string]PublicNetworkAccess{ + "disabled": PublicNetworkAccess_Disabled, + "enabled": PublicNetworkAccess_Enabled, +} + // Whether requests from Public Network are allowed type PublicNetworkAccess_STATUS string @@ -5571,6 +5627,12 @@ const ( PublicNetworkAccess_STATUS_Enabled = PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to PublicNetworkAccess_STATUS +var publicNetworkAccess_STATUS_Values = map[string]PublicNetworkAccess_STATUS{ + "disabled": PublicNetworkAccess_STATUS_Disabled, + "enabled": PublicNetworkAccess_STATUS_Enabled, +} + // Virtual Network ACL Rule object type VirtualNetworkRule struct { // IgnoreMissingVNetServiceEndpoint: Create firewall rule before the virtual network has vnet service endpoint enabled. @@ -5804,6 +5866,12 @@ const ( AnalyticalStorageSchemaType_WellDefined = AnalyticalStorageSchemaType("WellDefined") ) +// Mapping from string to AnalyticalStorageSchemaType +var analyticalStorageSchemaType_Values = map[string]AnalyticalStorageSchemaType{ + "fullfidelity": AnalyticalStorageSchemaType_FullFidelity, + "welldefined": AnalyticalStorageSchemaType_WellDefined, +} + // Describes the types of schema for analytical storage. type AnalyticalStorageSchemaType_STATUS string @@ -5812,6 +5880,12 @@ const ( AnalyticalStorageSchemaType_STATUS_WellDefined = AnalyticalStorageSchemaType_STATUS("WellDefined") ) +// Mapping from string to AnalyticalStorageSchemaType_STATUS +var analyticalStorageSchemaType_STATUS_Values = map[string]AnalyticalStorageSchemaType_STATUS{ + "fullfidelity": AnalyticalStorageSchemaType_STATUS_FullFidelity, + "welldefined": AnalyticalStorageSchemaType_STATUS_WellDefined, +} + // +kubebuilder:validation:Enum={"3.2","3.6","4.0"} type ApiProperties_ServerVersion string @@ -5821,6 +5895,13 @@ const ( ApiProperties_ServerVersion_40 = ApiProperties_ServerVersion("4.0") ) +// Mapping from string to ApiProperties_ServerVersion +var apiProperties_ServerVersion_Values = map[string]ApiProperties_ServerVersion{ + "3.2": ApiProperties_ServerVersion_32, + "3.6": ApiProperties_ServerVersion_36, + "4.0": ApiProperties_ServerVersion_40, +} + type ApiProperties_ServerVersion_STATUS string const ( @@ -5829,6 +5910,13 @@ const ( ApiProperties_ServerVersion_STATUS_40 = ApiProperties_ServerVersion_STATUS("4.0") ) +// Mapping from string to ApiProperties_ServerVersion_STATUS +var apiProperties_ServerVersion_STATUS_Values = map[string]ApiProperties_ServerVersion_STATUS{ + "3.2": ApiProperties_ServerVersion_STATUS_32, + "3.6": ApiProperties_ServerVersion_STATUS_36, + "4.0": ApiProperties_ServerVersion_STATUS_40, +} + // +kubebuilder:validation:Enum={"BoundedStaleness","ConsistentPrefix","Eventual","Session","Strong"} type ConsistencyPolicy_DefaultConsistencyLevel string @@ -5840,6 +5928,15 @@ const ( ConsistencyPolicy_DefaultConsistencyLevel_Strong = ConsistencyPolicy_DefaultConsistencyLevel("Strong") ) +// Mapping from string to ConsistencyPolicy_DefaultConsistencyLevel +var consistencyPolicy_DefaultConsistencyLevel_Values = map[string]ConsistencyPolicy_DefaultConsistencyLevel{ + "boundedstaleness": ConsistencyPolicy_DefaultConsistencyLevel_BoundedStaleness, + "consistentprefix": ConsistencyPolicy_DefaultConsistencyLevel_ConsistentPrefix, + "eventual": ConsistencyPolicy_DefaultConsistencyLevel_Eventual, + "session": ConsistencyPolicy_DefaultConsistencyLevel_Session, + "strong": ConsistencyPolicy_DefaultConsistencyLevel_Strong, +} + type ConsistencyPolicy_DefaultConsistencyLevel_STATUS string const ( @@ -5850,6 +5947,15 @@ const ( ConsistencyPolicy_DefaultConsistencyLevel_STATUS_Strong = ConsistencyPolicy_DefaultConsistencyLevel_STATUS("Strong") ) +// Mapping from string to ConsistencyPolicy_DefaultConsistencyLevel_STATUS +var consistencyPolicy_DefaultConsistencyLevel_STATUS_Values = map[string]ConsistencyPolicy_DefaultConsistencyLevel_STATUS{ + "boundedstaleness": ConsistencyPolicy_DefaultConsistencyLevel_STATUS_BoundedStaleness, + "consistentprefix": ConsistencyPolicy_DefaultConsistencyLevel_STATUS_ConsistentPrefix, + "eventual": ConsistencyPolicy_DefaultConsistencyLevel_STATUS_Eventual, + "session": ConsistencyPolicy_DefaultConsistencyLevel_STATUS_Session, + "strong": ConsistencyPolicy_DefaultConsistencyLevel_STATUS_Strong, +} + type ContinuousModeBackupPolicy struct { // +kubebuilder:validation:Required Type *ContinuousModeBackupPolicy_Type `json:"type,omitempty"` @@ -5895,8 +6001,9 @@ func (policy *ContinuousModeBackupPolicy) AssignProperties_From_ContinuousModeBa // Type if source.Type != nil { - typeVar := ContinuousModeBackupPolicy_Type(*source.Type) - policy.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, continuousModeBackupPolicy_Type_Values) + policy.Type = &typeTemp } else { policy.Type = nil } @@ -5974,8 +6081,9 @@ func (policy *ContinuousModeBackupPolicy_STATUS) AssignProperties_From_Continuou // Type if source.Type != nil { - typeVar := ContinuousModeBackupPolicy_Type_STATUS(*source.Type) - policy.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, continuousModeBackupPolicy_Type_STATUS_Values) + policy.Type = &typeTemp } else { policy.Type = nil } @@ -6287,8 +6395,9 @@ func (policy *PeriodicModeBackupPolicy) AssignProperties_From_PeriodicModeBackup // Type if source.Type != nil { - typeVar := PeriodicModeBackupPolicy_Type(*source.Type) - policy.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, periodicModeBackupPolicy_Type_Values) + policy.Type = &typeTemp } else { policy.Type = nil } @@ -6415,8 +6524,9 @@ func (policy *PeriodicModeBackupPolicy_STATUS) AssignProperties_From_PeriodicMod // Type if source.Type != nil { - typeVar := PeriodicModeBackupPolicy_Type_STATUS(*source.Type) - policy.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, periodicModeBackupPolicy_Type_STATUS_Values) + policy.Type = &typeTemp } else { policy.Type = nil } @@ -6500,19 +6610,39 @@ type ContinuousModeBackupPolicy_Type string const ContinuousModeBackupPolicy_Type_Continuous = ContinuousModeBackupPolicy_Type("Continuous") +// Mapping from string to ContinuousModeBackupPolicy_Type +var continuousModeBackupPolicy_Type_Values = map[string]ContinuousModeBackupPolicy_Type{ + "continuous": ContinuousModeBackupPolicy_Type_Continuous, +} + type ContinuousModeBackupPolicy_Type_STATUS string const ContinuousModeBackupPolicy_Type_STATUS_Continuous = ContinuousModeBackupPolicy_Type_STATUS("Continuous") +// Mapping from string to ContinuousModeBackupPolicy_Type_STATUS +var continuousModeBackupPolicy_Type_STATUS_Values = map[string]ContinuousModeBackupPolicy_Type_STATUS{ + "continuous": ContinuousModeBackupPolicy_Type_STATUS_Continuous, +} + // +kubebuilder:validation:Enum={"Periodic"} type PeriodicModeBackupPolicy_Type string const PeriodicModeBackupPolicy_Type_Periodic = PeriodicModeBackupPolicy_Type("Periodic") +// Mapping from string to PeriodicModeBackupPolicy_Type +var periodicModeBackupPolicy_Type_Values = map[string]PeriodicModeBackupPolicy_Type{ + "periodic": PeriodicModeBackupPolicy_Type_Periodic, +} + type PeriodicModeBackupPolicy_Type_STATUS string const PeriodicModeBackupPolicy_Type_STATUS_Periodic = PeriodicModeBackupPolicy_Type_STATUS("Periodic") +// Mapping from string to PeriodicModeBackupPolicy_Type_STATUS +var periodicModeBackupPolicy_Type_STATUS_Values = map[string]PeriodicModeBackupPolicy_Type_STATUS{ + "periodic": PeriodicModeBackupPolicy_Type_STATUS_Periodic, +} + // Configuration values for periodic mode backup type PeriodicModeProperties struct { // +kubebuilder:validation:Minimum=0 diff --git a/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_container_spec_arm_types_gen.go b/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_container_spec_arm_types_gen.go index 91c531b97bc..d626bc70993 100644 --- a/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_container_spec_arm_types_gen.go +++ b/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_container_spec_arm_types_gen.go @@ -139,6 +139,12 @@ const ( ConflictResolutionPolicy_Mode_LastWriterWins = ConflictResolutionPolicy_Mode("LastWriterWins") ) +// Mapping from string to ConflictResolutionPolicy_Mode +var conflictResolutionPolicy_Mode_Values = map[string]ConflictResolutionPolicy_Mode{ + "custom": ConflictResolutionPolicy_Mode_Custom, + "lastwriterwins": ConflictResolutionPolicy_Mode_LastWriterWins, +} + // +kubebuilder:validation:Enum={"Hash","MultiHash","Range"} type ContainerPartitionKey_Kind string @@ -148,6 +154,13 @@ const ( ContainerPartitionKey_Kind_Range = ContainerPartitionKey_Kind("Range") ) +// Mapping from string to ContainerPartitionKey_Kind +var containerPartitionKey_Kind_Values = map[string]ContainerPartitionKey_Kind{ + "hash": ContainerPartitionKey_Kind_Hash, + "multihash": ContainerPartitionKey_Kind_MultiHash, + "range": ContainerPartitionKey_Kind_Range, +} + type ExcludedPath_ARM struct { // Path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard // (/path/*) @@ -173,6 +186,13 @@ const ( IndexingPolicy_IndexingMode_None = IndexingPolicy_IndexingMode("none") ) +// Mapping from string to IndexingPolicy_IndexingMode +var indexingPolicy_IndexingMode_Values = map[string]IndexingPolicy_IndexingMode{ + "consistent": IndexingPolicy_IndexingMode_Consistent, + "lazy": IndexingPolicy_IndexingMode_Lazy, + "none": IndexingPolicy_IndexingMode_None, +} + type SpatialSpec_ARM struct { // Path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard // (/path/*) @@ -196,6 +216,12 @@ const ( CompositePath_Order_Descending = CompositePath_Order("descending") ) +// Mapping from string to CompositePath_Order +var compositePath_Order_Values = map[string]CompositePath_Order{ + "ascending": CompositePath_Order_Ascending, + "descending": CompositePath_Order_Descending, +} + // The indexes for the path. type Indexes_ARM struct { // DataType: The datatype for which the indexing behavior is applied to. @@ -219,6 +245,14 @@ const ( SpatialType_Polygon = SpatialType("Polygon") ) +// Mapping from string to SpatialType +var spatialType_Values = map[string]SpatialType{ + "linestring": SpatialType_LineString, + "multipolygon": SpatialType_MultiPolygon, + "point": SpatialType_Point, + "polygon": SpatialType_Polygon, +} + // +kubebuilder:validation:Enum={"LineString","MultiPolygon","Number","Point","Polygon","String"} type Indexes_DataType string @@ -231,6 +265,16 @@ const ( Indexes_DataType_String = Indexes_DataType("String") ) +// Mapping from string to Indexes_DataType +var indexes_DataType_Values = map[string]Indexes_DataType{ + "linestring": Indexes_DataType_LineString, + "multipolygon": Indexes_DataType_MultiPolygon, + "number": Indexes_DataType_Number, + "point": Indexes_DataType_Point, + "polygon": Indexes_DataType_Polygon, + "string": Indexes_DataType_String, +} + // +kubebuilder:validation:Enum={"Hash","Range","Spatial"} type Indexes_Kind string @@ -239,3 +283,10 @@ const ( Indexes_Kind_Range = Indexes_Kind("Range") Indexes_Kind_Spatial = Indexes_Kind("Spatial") ) + +// Mapping from string to Indexes_Kind +var indexes_Kind_Values = map[string]Indexes_Kind{ + "hash": Indexes_Kind_Hash, + "range": Indexes_Kind_Range, + "spatial": Indexes_Kind_Spatial, +} diff --git a/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_container_status_arm_types_gen.go b/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_container_status_arm_types_gen.go index c3b448da3a0..8d42ae8660c 100644 --- a/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_container_status_arm_types_gen.go +++ b/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_container_status_arm_types_gen.go @@ -135,6 +135,12 @@ const ( ConflictResolutionPolicy_Mode_STATUS_LastWriterWins = ConflictResolutionPolicy_Mode_STATUS("LastWriterWins") ) +// Mapping from string to ConflictResolutionPolicy_Mode_STATUS +var conflictResolutionPolicy_Mode_STATUS_Values = map[string]ConflictResolutionPolicy_Mode_STATUS{ + "custom": ConflictResolutionPolicy_Mode_STATUS_Custom, + "lastwriterwins": ConflictResolutionPolicy_Mode_STATUS_LastWriterWins, +} + type ContainerPartitionKey_Kind_STATUS string const ( @@ -143,6 +149,13 @@ const ( ContainerPartitionKey_Kind_STATUS_Range = ContainerPartitionKey_Kind_STATUS("Range") ) +// Mapping from string to ContainerPartitionKey_Kind_STATUS +var containerPartitionKey_Kind_STATUS_Values = map[string]ContainerPartitionKey_Kind_STATUS{ + "hash": ContainerPartitionKey_Kind_STATUS_Hash, + "multihash": ContainerPartitionKey_Kind_STATUS_MultiHash, + "range": ContainerPartitionKey_Kind_STATUS_Range, +} + type ExcludedPath_STATUS_ARM struct { // Path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard // (/path/*) @@ -167,6 +180,13 @@ const ( IndexingPolicy_IndexingMode_STATUS_None = IndexingPolicy_IndexingMode_STATUS("none") ) +// Mapping from string to IndexingPolicy_IndexingMode_STATUS +var indexingPolicy_IndexingMode_STATUS_Values = map[string]IndexingPolicy_IndexingMode_STATUS{ + "consistent": IndexingPolicy_IndexingMode_STATUS_Consistent, + "lazy": IndexingPolicy_IndexingMode_STATUS_Lazy, + "none": IndexingPolicy_IndexingMode_STATUS_None, +} + type SpatialSpec_STATUS_ARM struct { // Path: The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard // (/path/*) @@ -189,6 +209,12 @@ const ( CompositePath_Order_STATUS_Descending = CompositePath_Order_STATUS("descending") ) +// Mapping from string to CompositePath_Order_STATUS +var compositePath_Order_STATUS_Values = map[string]CompositePath_Order_STATUS{ + "ascending": CompositePath_Order_STATUS_Ascending, + "descending": CompositePath_Order_STATUS_Descending, +} + // The indexes for the path. type Indexes_STATUS_ARM struct { // DataType: The datatype for which the indexing behavior is applied to. @@ -211,6 +237,14 @@ const ( SpatialType_STATUS_Polygon = SpatialType_STATUS("Polygon") ) +// Mapping from string to SpatialType_STATUS +var spatialType_STATUS_Values = map[string]SpatialType_STATUS{ + "linestring": SpatialType_STATUS_LineString, + "multipolygon": SpatialType_STATUS_MultiPolygon, + "point": SpatialType_STATUS_Point, + "polygon": SpatialType_STATUS_Polygon, +} + type Indexes_DataType_STATUS string const ( @@ -222,6 +256,16 @@ const ( Indexes_DataType_STATUS_String = Indexes_DataType_STATUS("String") ) +// Mapping from string to Indexes_DataType_STATUS +var indexes_DataType_STATUS_Values = map[string]Indexes_DataType_STATUS{ + "linestring": Indexes_DataType_STATUS_LineString, + "multipolygon": Indexes_DataType_STATUS_MultiPolygon, + "number": Indexes_DataType_STATUS_Number, + "point": Indexes_DataType_STATUS_Point, + "polygon": Indexes_DataType_STATUS_Polygon, + "string": Indexes_DataType_STATUS_String, +} + type Indexes_Kind_STATUS string const ( @@ -229,3 +273,10 @@ const ( Indexes_Kind_STATUS_Range = Indexes_Kind_STATUS("Range") Indexes_Kind_STATUS_Spatial = Indexes_Kind_STATUS("Spatial") ) + +// Mapping from string to Indexes_Kind_STATUS +var indexes_Kind_STATUS_Values = map[string]Indexes_Kind_STATUS{ + "hash": Indexes_Kind_STATUS_Hash, + "range": Indexes_Kind_STATUS_Range, + "spatial": Indexes_Kind_STATUS_Spatial, +} diff --git a/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_containers_trigger_spec_arm_types_gen.go b/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_containers_trigger_spec_arm_types_gen.go index df2380b47a0..7420c6f3a92 100644 --- a/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_containers_trigger_spec_arm_types_gen.go +++ b/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_containers_trigger_spec_arm_types_gen.go @@ -68,6 +68,15 @@ const ( SqlTriggerResource_TriggerOperation_Update = SqlTriggerResource_TriggerOperation("Update") ) +// Mapping from string to SqlTriggerResource_TriggerOperation +var sqlTriggerResource_TriggerOperation_Values = map[string]SqlTriggerResource_TriggerOperation{ + "all": SqlTriggerResource_TriggerOperation_All, + "create": SqlTriggerResource_TriggerOperation_Create, + "delete": SqlTriggerResource_TriggerOperation_Delete, + "replace": SqlTriggerResource_TriggerOperation_Replace, + "update": SqlTriggerResource_TriggerOperation_Update, +} + // +kubebuilder:validation:Enum={"Post","Pre"} type SqlTriggerResource_TriggerType string @@ -75,3 +84,9 @@ const ( SqlTriggerResource_TriggerType_Post = SqlTriggerResource_TriggerType("Post") SqlTriggerResource_TriggerType_Pre = SqlTriggerResource_TriggerType("Pre") ) + +// Mapping from string to SqlTriggerResource_TriggerType +var sqlTriggerResource_TriggerType_Values = map[string]SqlTriggerResource_TriggerType{ + "post": SqlTriggerResource_TriggerType_Post, + "pre": SqlTriggerResource_TriggerType_Pre, +} diff --git a/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_containers_trigger_status_arm_types_gen.go b/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_containers_trigger_status_arm_types_gen.go index d717dc6e087..05c9d5084f2 100644 --- a/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_containers_trigger_status_arm_types_gen.go +++ b/v2/api/documentdb/v1api20210515/database_accounts_sql_databases_containers_trigger_status_arm_types_gen.go @@ -59,9 +59,24 @@ const ( SqlTriggerGetProperties_Resource_TriggerOperation_STATUS_Update = SqlTriggerGetProperties_Resource_TriggerOperation_STATUS("Update") ) +// Mapping from string to SqlTriggerGetProperties_Resource_TriggerOperation_STATUS +var sqlTriggerGetProperties_Resource_TriggerOperation_STATUS_Values = map[string]SqlTriggerGetProperties_Resource_TriggerOperation_STATUS{ + "all": SqlTriggerGetProperties_Resource_TriggerOperation_STATUS_All, + "create": SqlTriggerGetProperties_Resource_TriggerOperation_STATUS_Create, + "delete": SqlTriggerGetProperties_Resource_TriggerOperation_STATUS_Delete, + "replace": SqlTriggerGetProperties_Resource_TriggerOperation_STATUS_Replace, + "update": SqlTriggerGetProperties_Resource_TriggerOperation_STATUS_Update, +} + type SqlTriggerGetProperties_Resource_TriggerType_STATUS string const ( SqlTriggerGetProperties_Resource_TriggerType_STATUS_Post = SqlTriggerGetProperties_Resource_TriggerType_STATUS("Post") SqlTriggerGetProperties_Resource_TriggerType_STATUS_Pre = SqlTriggerGetProperties_Resource_TriggerType_STATUS("Pre") ) + +// Mapping from string to SqlTriggerGetProperties_Resource_TriggerType_STATUS +var sqlTriggerGetProperties_Resource_TriggerType_STATUS_Values = map[string]SqlTriggerGetProperties_Resource_TriggerType_STATUS{ + "post": SqlTriggerGetProperties_Resource_TriggerType_STATUS_Post, + "pre": SqlTriggerGetProperties_Resource_TriggerType_STATUS_Pre, +} diff --git a/v2/api/documentdb/v1api20210515/sql_database_container_trigger_types_gen.go b/v2/api/documentdb/v1api20210515/sql_database_container_trigger_types_gen.go index 7bb79c90a20..a336d13b167 100644 --- a/v2/api/documentdb/v1api20210515/sql_database_container_trigger_types_gen.go +++ b/v2/api/documentdb/v1api20210515/sql_database_container_trigger_types_gen.go @@ -975,16 +975,18 @@ func (resource *SqlTriggerGetProperties_Resource_STATUS) AssignProperties_From_S // TriggerOperation if source.TriggerOperation != nil { - triggerOperation := SqlTriggerGetProperties_Resource_TriggerOperation_STATUS(*source.TriggerOperation) - resource.TriggerOperation = &triggerOperation + triggerOperation := *source.TriggerOperation + triggerOperationTemp := genruntime.ToEnum(triggerOperation, sqlTriggerGetProperties_Resource_TriggerOperation_STATUS_Values) + resource.TriggerOperation = &triggerOperationTemp } else { resource.TriggerOperation = nil } // TriggerType if source.TriggerType != nil { - triggerType := SqlTriggerGetProperties_Resource_TriggerType_STATUS(*source.TriggerType) - resource.TriggerType = &triggerType + triggerType := *source.TriggerType + triggerTypeTemp := genruntime.ToEnum(triggerType, sqlTriggerGetProperties_Resource_TriggerType_STATUS_Values) + resource.TriggerType = &triggerTypeTemp } else { resource.TriggerType = nil } @@ -1155,16 +1157,18 @@ func (resource *SqlTriggerResource) AssignProperties_From_SqlTriggerResource(sou // TriggerOperation if source.TriggerOperation != nil { - triggerOperation := SqlTriggerResource_TriggerOperation(*source.TriggerOperation) - resource.TriggerOperation = &triggerOperation + triggerOperation := *source.TriggerOperation + triggerOperationTemp := genruntime.ToEnum(triggerOperation, sqlTriggerResource_TriggerOperation_Values) + resource.TriggerOperation = &triggerOperationTemp } else { resource.TriggerOperation = nil } // TriggerType if source.TriggerType != nil { - triggerType := SqlTriggerResource_TriggerType(*source.TriggerType) - resource.TriggerType = &triggerType + triggerType := *source.TriggerType + triggerTypeTemp := genruntime.ToEnum(triggerType, sqlTriggerResource_TriggerType_Values) + resource.TriggerType = &triggerTypeTemp } else { resource.TriggerType = nil } diff --git a/v2/api/documentdb/v1api20210515/sql_database_container_types_gen.go b/v2/api/documentdb/v1api20210515/sql_database_container_types_gen.go index 03c38df9890..fe916decbe2 100644 --- a/v2/api/documentdb/v1api20210515/sql_database_container_types_gen.go +++ b/v2/api/documentdb/v1api20210515/sql_database_container_types_gen.go @@ -1686,8 +1686,9 @@ func (policy *ConflictResolutionPolicy) AssignProperties_From_ConflictResolution // Mode if source.Mode != nil { - mode := ConflictResolutionPolicy_Mode(*source.Mode) - policy.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, conflictResolutionPolicy_Mode_Values) + policy.Mode = &modeTemp } else { policy.Mode = nil } @@ -1806,8 +1807,9 @@ func (policy *ConflictResolutionPolicy_STATUS) AssignProperties_From_ConflictRes // Mode if source.Mode != nil { - mode := ConflictResolutionPolicy_Mode_STATUS(*source.Mode) - policy.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, conflictResolutionPolicy_Mode_STATUS_Values) + policy.Mode = &modeTemp } else { policy.Mode = nil } @@ -1927,8 +1929,9 @@ func (partitionKey *ContainerPartitionKey) AssignProperties_From_ContainerPartit // Kind if source.Kind != nil { - kind := ContainerPartitionKey_Kind(*source.Kind) - partitionKey.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, containerPartitionKey_Kind_Values) + partitionKey.Kind = &kindTemp } else { partitionKey.Kind = nil } @@ -2071,8 +2074,9 @@ func (partitionKey *ContainerPartitionKey_STATUS) AssignProperties_From_Containe // Kind if source.Kind != nil { - kind := ContainerPartitionKey_Kind_STATUS(*source.Kind) - partitionKey.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, containerPartitionKey_Kind_STATUS_Values) + partitionKey.Kind = &kindTemp } else { partitionKey.Kind = nil } @@ -2366,8 +2370,9 @@ func (policy *IndexingPolicy) AssignProperties_From_IndexingPolicy(source *v2021 // IndexingMode if source.IndexingMode != nil { - indexingMode := IndexingPolicy_IndexingMode(*source.IndexingMode) - policy.IndexingMode = &indexingMode + indexingMode := *source.IndexingMode + indexingModeTemp := genruntime.ToEnum(indexingMode, indexingPolicy_IndexingMode_Values) + policy.IndexingMode = &indexingModeTemp } else { policy.IndexingMode = nil } @@ -2785,8 +2790,9 @@ func (policy *IndexingPolicy_STATUS) AssignProperties_From_IndexingPolicy_STATUS // IndexingMode if source.IndexingMode != nil { - indexingMode := IndexingPolicy_IndexingMode_STATUS(*source.IndexingMode) - policy.IndexingMode = &indexingMode + indexingMode := *source.IndexingMode + indexingModeTemp := genruntime.ToEnum(indexingMode, indexingPolicy_IndexingMode_STATUS_Values) + policy.IndexingMode = &indexingModeTemp } else { policy.IndexingMode = nil } @@ -3225,8 +3231,9 @@ func (path *CompositePath) AssignProperties_From_CompositePath(source *v20210515 // Order if source.Order != nil { - order := CompositePath_Order(*source.Order) - path.Order = &order + order := *source.Order + orderTemp := genruntime.ToEnum(order, compositePath_Order_Values) + path.Order = &orderTemp } else { path.Order = nil } @@ -3327,8 +3334,9 @@ func (path *CompositePath_STATUS) AssignProperties_From_CompositePath_STATUS(sou // Order if source.Order != nil { - order := CompositePath_Order_STATUS(*source.Order) - path.Order = &order + order := *source.Order + orderTemp := genruntime.ToEnum(order, compositePath_Order_STATUS_Values) + path.Order = &orderTemp } else { path.Order = nil } @@ -3850,7 +3858,7 @@ func (spatial *SpatialSpec) AssignProperties_From_SpatialSpec(source *v20210515s for typeIndex, typeItem := range source.Types { // Shadow the loop variable to avoid aliasing typeItem := typeItem - typeList[typeIndex] = SpatialType(typeItem) + typeList[typeIndex] = genruntime.ToEnum(typeItem, spatialType_Values) } spatial.Types = typeList } else { @@ -3967,7 +3975,7 @@ func (spatial *SpatialSpec_STATUS) AssignProperties_From_SpatialSpec_STATUS(sour for typeIndex, typeItem := range source.Types { // Shadow the loop variable to avoid aliasing typeItem := typeItem - typeList[typeIndex] = SpatialType_STATUS(typeItem) + typeList[typeIndex] = genruntime.ToEnum(typeItem, spatialType_STATUS_Values) } spatial.Types = typeList } else { @@ -4230,16 +4238,18 @@ func (indexes *Indexes) AssignProperties_From_Indexes(source *v20210515s.Indexes // DataType if source.DataType != nil { - dataType := Indexes_DataType(*source.DataType) - indexes.DataType = &dataType + dataType := *source.DataType + dataTypeTemp := genruntime.ToEnum(dataType, indexes_DataType_Values) + indexes.DataType = &dataTypeTemp } else { indexes.DataType = nil } // Kind if source.Kind != nil { - kind := Indexes_Kind(*source.Kind) - indexes.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, indexes_Kind_Values) + indexes.Kind = &kindTemp } else { indexes.Kind = nil } @@ -4365,16 +4375,18 @@ func (indexes *Indexes_STATUS) AssignProperties_From_Indexes_STATUS(source *v202 // DataType if source.DataType != nil { - dataType := Indexes_DataType_STATUS(*source.DataType) - indexes.DataType = &dataType + dataType := *source.DataType + dataTypeTemp := genruntime.ToEnum(dataType, indexes_DataType_STATUS_Values) + indexes.DataType = &dataTypeTemp } else { indexes.DataType = nil } // Kind if source.Kind != nil { - kind := Indexes_Kind_STATUS(*source.Kind) - indexes.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, indexes_Kind_STATUS_Values) + indexes.Kind = &kindTemp } else { indexes.Kind = nil } diff --git a/v2/api/eventgrid/v1api20200601/domain_status_arm_types_gen.go b/v2/api/eventgrid/v1api20200601/domain_status_arm_types_gen.go index 41af8dc57de..3289c2f757e 100644 --- a/v2/api/eventgrid/v1api20200601/domain_status_arm_types_gen.go +++ b/v2/api/eventgrid/v1api20200601/domain_status_arm_types_gen.go @@ -132,6 +132,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -141,6 +149,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + type JsonInputSchemaMapping_STATUS_ARM struct { // InputSchemaMappingType: Type of the custom mapping InputSchemaMappingType JsonInputSchemaMapping_InputSchemaMappingType_STATUS `json:"inputSchemaMappingType,omitempty"` diff --git a/v2/api/eventgrid/v1api20200601/domain_types_gen.go b/v2/api/eventgrid/v1api20200601/domain_types_gen.go index bd382f78aae..8f6d8423cbc 100644 --- a/v2/api/eventgrid/v1api20200601/domain_types_gen.go +++ b/v2/api/eventgrid/v1api20200601/domain_types_gen.go @@ -582,8 +582,9 @@ func (domain *Domain_Spec) AssignProperties_From_Domain_Spec(source *v20200601s. // InputSchema if source.InputSchema != nil { - inputSchema := DomainProperties_InputSchema(*source.InputSchema) - domain.InputSchema = &inputSchema + inputSchema := *source.InputSchema + inputSchemaTemp := genruntime.ToEnum(inputSchema, domainProperties_InputSchema_Values) + domain.InputSchema = &inputSchemaTemp } else { domain.InputSchema = nil } @@ -613,8 +614,9 @@ func (domain *Domain_Spec) AssignProperties_From_Domain_Spec(source *v20200601s. // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := DomainProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - domain.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, domainProperties_PublicNetworkAccess_Values) + domain.PublicNetworkAccess = &publicNetworkAccessTemp } else { domain.PublicNetworkAccess = nil } @@ -1056,8 +1058,9 @@ func (domain *Domain_STATUS) AssignProperties_From_Domain_STATUS(source *v202006 // InputSchema if source.InputSchema != nil { - inputSchema := DomainProperties_InputSchema_STATUS(*source.InputSchema) - domain.InputSchema = &inputSchema + inputSchema := *source.InputSchema + inputSchemaTemp := genruntime.ToEnum(inputSchema, domainProperties_InputSchema_STATUS_Values) + domain.InputSchema = &inputSchemaTemp } else { domain.InputSchema = nil } @@ -1103,16 +1106,18 @@ func (domain *Domain_STATUS) AssignProperties_From_Domain_STATUS(source *v202006 // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DomainProperties_ProvisioningState_STATUS(*source.ProvisioningState) - domain.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, domainProperties_ProvisioningState_STATUS_Values) + domain.ProvisioningState = &provisioningStateTemp } else { domain.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := DomainProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - domain.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, domainProperties_PublicNetworkAccess_STATUS_Values) + domain.PublicNetworkAccess = &publicNetworkAccessTemp } else { domain.PublicNetworkAccess = nil } @@ -1272,6 +1277,13 @@ const ( DomainProperties_InputSchema_EventGridSchema = DomainProperties_InputSchema("EventGridSchema") ) +// Mapping from string to DomainProperties_InputSchema +var domainProperties_InputSchema_Values = map[string]DomainProperties_InputSchema{ + "cloudeventschemav1_0": DomainProperties_InputSchema_CloudEventSchemaV1_0, + "customeventschema": DomainProperties_InputSchema_CustomEventSchema, + "eventgridschema": DomainProperties_InputSchema_EventGridSchema, +} + type DomainProperties_InputSchema_STATUS string const ( @@ -1280,6 +1292,13 @@ const ( DomainProperties_InputSchema_STATUS_EventGridSchema = DomainProperties_InputSchema_STATUS("EventGridSchema") ) +// Mapping from string to DomainProperties_InputSchema_STATUS +var domainProperties_InputSchema_STATUS_Values = map[string]DomainProperties_InputSchema_STATUS{ + "cloudeventschemav1_0": DomainProperties_InputSchema_STATUS_CloudEventSchemaV1_0, + "customeventschema": DomainProperties_InputSchema_STATUS_CustomEventSchema, + "eventgridschema": DomainProperties_InputSchema_STATUS_EventGridSchema, +} + type DomainProperties_ProvisioningState_STATUS string const ( @@ -1291,6 +1310,16 @@ const ( DomainProperties_ProvisioningState_STATUS_Updating = DomainProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to DomainProperties_ProvisioningState_STATUS +var domainProperties_ProvisioningState_STATUS_Values = map[string]DomainProperties_ProvisioningState_STATUS{ + "canceled": DomainProperties_ProvisioningState_STATUS_Canceled, + "creating": DomainProperties_ProvisioningState_STATUS_Creating, + "deleting": DomainProperties_ProvisioningState_STATUS_Deleting, + "failed": DomainProperties_ProvisioningState_STATUS_Failed, + "succeeded": DomainProperties_ProvisioningState_STATUS_Succeeded, + "updating": DomainProperties_ProvisioningState_STATUS_Updating, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type DomainProperties_PublicNetworkAccess string @@ -1299,6 +1328,12 @@ const ( DomainProperties_PublicNetworkAccess_Enabled = DomainProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to DomainProperties_PublicNetworkAccess +var domainProperties_PublicNetworkAccess_Values = map[string]DomainProperties_PublicNetworkAccess{ + "disabled": DomainProperties_PublicNetworkAccess_Disabled, + "enabled": DomainProperties_PublicNetworkAccess_Enabled, +} + type DomainProperties_PublicNetworkAccess_STATUS string const ( @@ -1306,6 +1341,12 @@ const ( DomainProperties_PublicNetworkAccess_STATUS_Enabled = DomainProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to DomainProperties_PublicNetworkAccess_STATUS +var domainProperties_PublicNetworkAccess_STATUS_Values = map[string]DomainProperties_PublicNetworkAccess_STATUS{ + "disabled": DomainProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": DomainProperties_PublicNetworkAccess_STATUS_Enabled, +} + type InboundIpRule struct { // Action: Action to perform based on the match or no match of the IpMask. Action *InboundIpRule_Action `json:"action,omitempty"` @@ -1370,8 +1411,9 @@ func (rule *InboundIpRule) AssignProperties_From_InboundIpRule(source *v20200601 // Action if source.Action != nil { - action := InboundIpRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, inboundIpRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -1471,8 +1513,9 @@ func (rule *InboundIpRule_STATUS) AssignProperties_From_InboundIpRule_STATUS(sou // Action if source.Action != nil { - action := InboundIpRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, inboundIpRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -1855,8 +1898,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -1869,8 +1913,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -1928,10 +1973,20 @@ type InboundIpRule_Action string const InboundIpRule_Action_Allow = InboundIpRule_Action("Allow") +// Mapping from string to InboundIpRule_Action +var inboundIpRule_Action_Values = map[string]InboundIpRule_Action{ + "allow": InboundIpRule_Action_Allow, +} + type InboundIpRule_Action_STATUS string const InboundIpRule_Action_STATUS_Allow = InboundIpRule_Action_STATUS("Allow") +// Mapping from string to InboundIpRule_Action_STATUS +var inboundIpRule_Action_STATUS_Values = map[string]InboundIpRule_Action_STATUS{ + "allow": InboundIpRule_Action_STATUS_Allow, +} + type JsonInputSchemaMapping struct { // DataVersion: The mapping information for the DataVersion property of the Event Grid Event. DataVersion *JsonFieldWithDefault `json:"dataVersion,omitempty"` @@ -2186,8 +2241,9 @@ func (mapping *JsonInputSchemaMapping) AssignProperties_From_JsonInputSchemaMapp // InputSchemaMappingType if source.InputSchemaMappingType != nil { - inputSchemaMappingType := JsonInputSchemaMapping_InputSchemaMappingType(*source.InputSchemaMappingType) - mapping.InputSchemaMappingType = &inputSchemaMappingType + inputSchemaMappingType := *source.InputSchemaMappingType + inputSchemaMappingTypeTemp := genruntime.ToEnum(inputSchemaMappingType, jsonInputSchemaMapping_InputSchemaMappingType_Values) + mapping.InputSchemaMappingType = &inputSchemaMappingTypeTemp } else { mapping.InputSchemaMappingType = nil } @@ -2584,8 +2640,9 @@ func (mapping *JsonInputSchemaMapping_STATUS) AssignProperties_From_JsonInputSch // InputSchemaMappingType if source.InputSchemaMappingType != nil { - inputSchemaMappingType := JsonInputSchemaMapping_InputSchemaMappingType_STATUS(*source.InputSchemaMappingType) - mapping.InputSchemaMappingType = &inputSchemaMappingType + inputSchemaMappingType := *source.InputSchemaMappingType + inputSchemaMappingTypeTemp := genruntime.ToEnum(inputSchemaMappingType, jsonInputSchemaMapping_InputSchemaMappingType_STATUS_Values) + mapping.InputSchemaMappingType = &inputSchemaMappingTypeTemp } else { mapping.InputSchemaMappingType = nil } @@ -3062,10 +3119,20 @@ type JsonInputSchemaMapping_InputSchemaMappingType string const JsonInputSchemaMapping_InputSchemaMappingType_Json = JsonInputSchemaMapping_InputSchemaMappingType("Json") +// Mapping from string to JsonInputSchemaMapping_InputSchemaMappingType +var jsonInputSchemaMapping_InputSchemaMappingType_Values = map[string]JsonInputSchemaMapping_InputSchemaMappingType{ + "json": JsonInputSchemaMapping_InputSchemaMappingType_Json, +} + type JsonInputSchemaMapping_InputSchemaMappingType_STATUS string const JsonInputSchemaMapping_InputSchemaMappingType_STATUS_Json = JsonInputSchemaMapping_InputSchemaMappingType_STATUS("Json") +// Mapping from string to JsonInputSchemaMapping_InputSchemaMappingType_STATUS +var jsonInputSchemaMapping_InputSchemaMappingType_STATUS_Values = map[string]JsonInputSchemaMapping_InputSchemaMappingType_STATUS{ + "json": JsonInputSchemaMapping_InputSchemaMappingType_STATUS_Json, +} + func init() { SchemeBuilder.Register(&Domain{}, &DomainList{}) } diff --git a/v2/api/eventgrid/v1api20200601/domains_topic_types_gen.go b/v2/api/eventgrid/v1api20200601/domains_topic_types_gen.go index 335ba2b98e7..a7a05e91eb2 100644 --- a/v2/api/eventgrid/v1api20200601/domains_topic_types_gen.go +++ b/v2/api/eventgrid/v1api20200601/domains_topic_types_gen.go @@ -630,8 +630,9 @@ func (topic *Domains_Topic_STATUS) AssignProperties_From_Domains_Topic_STATUS(so // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DomainTopicProperties_ProvisioningState_STATUS(*source.ProvisioningState) - topic.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, domainTopicProperties_ProvisioningState_STATUS_Values) + topic.ProvisioningState = &provisioningStateTemp } else { topic.ProvisioningState = nil } @@ -714,6 +715,16 @@ const ( DomainTopicProperties_ProvisioningState_STATUS_Updating = DomainTopicProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to DomainTopicProperties_ProvisioningState_STATUS +var domainTopicProperties_ProvisioningState_STATUS_Values = map[string]DomainTopicProperties_ProvisioningState_STATUS{ + "canceled": DomainTopicProperties_ProvisioningState_STATUS_Canceled, + "creating": DomainTopicProperties_ProvisioningState_STATUS_Creating, + "deleting": DomainTopicProperties_ProvisioningState_STATUS_Deleting, + "failed": DomainTopicProperties_ProvisioningState_STATUS_Failed, + "succeeded": DomainTopicProperties_ProvisioningState_STATUS_Succeeded, + "updating": DomainTopicProperties_ProvisioningState_STATUS_Updating, +} + func init() { SchemeBuilder.Register(&DomainsTopic{}, &DomainsTopicList{}) } diff --git a/v2/api/eventgrid/v1api20200601/event_subscription_types_gen.go b/v2/api/eventgrid/v1api20200601/event_subscription_types_gen.go index a34f0b9d22e..404a78be965 100644 --- a/v2/api/eventgrid/v1api20200601/event_subscription_types_gen.go +++ b/v2/api/eventgrid/v1api20200601/event_subscription_types_gen.go @@ -602,8 +602,9 @@ func (subscription *EventSubscription_Spec) AssignProperties_From_EventSubscript // EventDeliverySchema if source.EventDeliverySchema != nil { - eventDeliverySchema := EventSubscriptionProperties_EventDeliverySchema(*source.EventDeliverySchema) - subscription.EventDeliverySchema = &eventDeliverySchema + eventDeliverySchema := *source.EventDeliverySchema + eventDeliverySchemaTemp := genruntime.ToEnum(eventDeliverySchema, eventSubscriptionProperties_EventDeliverySchema_Values) + subscription.EventDeliverySchema = &eventDeliverySchemaTemp } else { subscription.EventDeliverySchema = nil } @@ -1098,8 +1099,9 @@ func (subscription *EventSubscription_STATUS) AssignProperties_From_EventSubscri // EventDeliverySchema if source.EventDeliverySchema != nil { - eventDeliverySchema := EventSubscriptionProperties_EventDeliverySchema_STATUS(*source.EventDeliverySchema) - subscription.EventDeliverySchema = &eventDeliverySchema + eventDeliverySchema := *source.EventDeliverySchema + eventDeliverySchemaTemp := genruntime.ToEnum(eventDeliverySchema, eventSubscriptionProperties_EventDeliverySchema_STATUS_Values) + subscription.EventDeliverySchema = &eventDeliverySchemaTemp } else { subscription.EventDeliverySchema = nil } @@ -1130,8 +1132,9 @@ func (subscription *EventSubscription_STATUS) AssignProperties_From_EventSubscri // ProvisioningState if source.ProvisioningState != nil { - provisioningState := EventSubscriptionProperties_ProvisioningState_STATUS(*source.ProvisioningState) - subscription.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, eventSubscriptionProperties_ProvisioningState_STATUS_Values) + subscription.ProvisioningState = &provisioningStateTemp } else { subscription.ProvisioningState = nil } @@ -2697,6 +2700,13 @@ const ( EventSubscriptionProperties_EventDeliverySchema_EventGridSchema = EventSubscriptionProperties_EventDeliverySchema("EventGridSchema") ) +// Mapping from string to EventSubscriptionProperties_EventDeliverySchema +var eventSubscriptionProperties_EventDeliverySchema_Values = map[string]EventSubscriptionProperties_EventDeliverySchema{ + "cloudeventschemav1_0": EventSubscriptionProperties_EventDeliverySchema_CloudEventSchemaV1_0, + "custominputschema": EventSubscriptionProperties_EventDeliverySchema_CustomInputSchema, + "eventgridschema": EventSubscriptionProperties_EventDeliverySchema_EventGridSchema, +} + type EventSubscriptionProperties_EventDeliverySchema_STATUS string const ( @@ -2705,6 +2715,13 @@ const ( EventSubscriptionProperties_EventDeliverySchema_STATUS_EventGridSchema = EventSubscriptionProperties_EventDeliverySchema_STATUS("EventGridSchema") ) +// Mapping from string to EventSubscriptionProperties_EventDeliverySchema_STATUS +var eventSubscriptionProperties_EventDeliverySchema_STATUS_Values = map[string]EventSubscriptionProperties_EventDeliverySchema_STATUS{ + "cloudeventschemav1_0": EventSubscriptionProperties_EventDeliverySchema_STATUS_CloudEventSchemaV1_0, + "custominputschema": EventSubscriptionProperties_EventDeliverySchema_STATUS_CustomInputSchema, + "eventgridschema": EventSubscriptionProperties_EventDeliverySchema_STATUS_EventGridSchema, +} + type EventSubscriptionProperties_ProvisioningState_STATUS string const ( @@ -2717,6 +2734,17 @@ const ( EventSubscriptionProperties_ProvisioningState_STATUS_Updating = EventSubscriptionProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to EventSubscriptionProperties_ProvisioningState_STATUS +var eventSubscriptionProperties_ProvisioningState_STATUS_Values = map[string]EventSubscriptionProperties_ProvisioningState_STATUS{ + "awaitingmanualaction": EventSubscriptionProperties_ProvisioningState_STATUS_AwaitingManualAction, + "canceled": EventSubscriptionProperties_ProvisioningState_STATUS_Canceled, + "creating": EventSubscriptionProperties_ProvisioningState_STATUS_Creating, + "deleting": EventSubscriptionProperties_ProvisioningState_STATUS_Deleting, + "failed": EventSubscriptionProperties_ProvisioningState_STATUS_Failed, + "succeeded": EventSubscriptionProperties_ProvisioningState_STATUS_Succeeded, + "updating": EventSubscriptionProperties_ProvisioningState_STATUS_Updating, +} + // Information about the retry policy for an event subscription. type RetryPolicy struct { // EventTimeToLiveInMinutes: Time To Live (in minutes) for events. @@ -4276,8 +4304,9 @@ func (destination *AzureFunctionEventSubscriptionDestination) AssignProperties_F // EndpointType if source.EndpointType != nil { - endpointType := AzureFunctionEventSubscriptionDestination_EndpointType(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, azureFunctionEventSubscriptionDestination_EndpointType_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -4435,8 +4464,9 @@ func (destination *AzureFunctionEventSubscriptionDestination_STATUS) AssignPrope // EndpointType if source.EndpointType != nil { - endpointType := AzureFunctionEventSubscriptionDestination_EndpointType_STATUS(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, azureFunctionEventSubscriptionDestination_EndpointType_STATUS_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -4552,8 +4582,9 @@ func (destination *EventHubEventSubscriptionDestination) AssignProperties_From_E // EndpointType if source.EndpointType != nil { - endpointType := EventHubEventSubscriptionDestination_EndpointType(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, eventHubEventSubscriptionDestination_EndpointType_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -4668,8 +4699,9 @@ func (destination *EventHubEventSubscriptionDestination_STATUS) AssignProperties // EndpointType if source.EndpointType != nil { - endpointType := EventHubEventSubscriptionDestination_EndpointType_STATUS(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, eventHubEventSubscriptionDestination_EndpointType_STATUS_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -4772,8 +4804,9 @@ func (destination *HybridConnectionEventSubscriptionDestination) AssignPropertie // EndpointType if source.EndpointType != nil { - endpointType := HybridConnectionEventSubscriptionDestination_EndpointType(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, hybridConnectionEventSubscriptionDestination_EndpointType_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -4888,8 +4921,9 @@ func (destination *HybridConnectionEventSubscriptionDestination_STATUS) AssignPr // EndpointType if source.EndpointType != nil { - endpointType := HybridConnectionEventSubscriptionDestination_EndpointType_STATUS(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, hybridConnectionEventSubscriptionDestination_EndpointType_STATUS_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -4993,8 +5027,9 @@ func (destination *ServiceBusQueueEventSubscriptionDestination) AssignProperties // EndpointType if source.EndpointType != nil { - endpointType := ServiceBusQueueEventSubscriptionDestination_EndpointType(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, serviceBusQueueEventSubscriptionDestination_EndpointType_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -5109,8 +5144,9 @@ func (destination *ServiceBusQueueEventSubscriptionDestination_STATUS) AssignPro // EndpointType if source.EndpointType != nil { - endpointType := ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, serviceBusQueueEventSubscriptionDestination_EndpointType_STATUS_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -5214,8 +5250,9 @@ func (destination *ServiceBusTopicEventSubscriptionDestination) AssignProperties // EndpointType if source.EndpointType != nil { - endpointType := ServiceBusTopicEventSubscriptionDestination_EndpointType(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, serviceBusTopicEventSubscriptionDestination_EndpointType_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -5331,8 +5368,9 @@ func (destination *ServiceBusTopicEventSubscriptionDestination_STATUS) AssignPro // EndpointType if source.EndpointType != nil { - endpointType := ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, serviceBusTopicEventSubscriptionDestination_EndpointType_STATUS_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -5454,8 +5492,9 @@ func (destination *StorageBlobDeadLetterDestination) AssignProperties_From_Stora // EndpointType if source.EndpointType != nil { - endpointType := StorageBlobDeadLetterDestination_EndpointType(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, storageBlobDeadLetterDestination_EndpointType_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -5591,8 +5630,9 @@ func (destination *StorageBlobDeadLetterDestination_STATUS) AssignProperties_Fro // EndpointType if source.EndpointType != nil { - endpointType := StorageBlobDeadLetterDestination_EndpointType_STATUS(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, storageBlobDeadLetterDestination_EndpointType_STATUS_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -5715,8 +5755,9 @@ func (destination *StorageQueueEventSubscriptionDestination) AssignProperties_Fr // EndpointType if source.EndpointType != nil { - endpointType := StorageQueueEventSubscriptionDestination_EndpointType(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, storageQueueEventSubscriptionDestination_EndpointType_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -5853,8 +5894,9 @@ func (destination *StorageQueueEventSubscriptionDestination_STATUS) AssignProper // EndpointType if source.EndpointType != nil { - endpointType := StorageQueueEventSubscriptionDestination_EndpointType_STATUS(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, storageQueueEventSubscriptionDestination_EndpointType_STATUS_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -6039,8 +6081,9 @@ func (destination *WebHookEventSubscriptionDestination) AssignProperties_From_We // EndpointType if source.EndpointType != nil { - endpointType := WebHookEventSubscriptionDestination_EndpointType(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, webHookEventSubscriptionDestination_EndpointType_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -6236,8 +6279,9 @@ func (destination *WebHookEventSubscriptionDestination_STATUS) AssignProperties_ // EndpointType if source.EndpointType != nil { - endpointType := WebHookEventSubscriptionDestination_EndpointType_STATUS(*source.EndpointType) - destination.EndpointType = &endpointType + endpointType := *source.EndpointType + endpointTypeTemp := genruntime.ToEnum(endpointType, webHookEventSubscriptionDestination_EndpointType_STATUS_Values) + destination.EndpointType = &endpointTypeTemp } else { destination.EndpointType = nil } @@ -6296,10 +6340,20 @@ type AzureFunctionEventSubscriptionDestination_EndpointType string const AzureFunctionEventSubscriptionDestination_EndpointType_AzureFunction = AzureFunctionEventSubscriptionDestination_EndpointType("AzureFunction") +// Mapping from string to AzureFunctionEventSubscriptionDestination_EndpointType +var azureFunctionEventSubscriptionDestination_EndpointType_Values = map[string]AzureFunctionEventSubscriptionDestination_EndpointType{ + "azurefunction": AzureFunctionEventSubscriptionDestination_EndpointType_AzureFunction, +} + type AzureFunctionEventSubscriptionDestination_EndpointType_STATUS string const AzureFunctionEventSubscriptionDestination_EndpointType_STATUS_AzureFunction = AzureFunctionEventSubscriptionDestination_EndpointType_STATUS("AzureFunction") +// Mapping from string to AzureFunctionEventSubscriptionDestination_EndpointType_STATUS +var azureFunctionEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]AzureFunctionEventSubscriptionDestination_EndpointType_STATUS{ + "azurefunction": AzureFunctionEventSubscriptionDestination_EndpointType_STATUS_AzureFunction, +} + type BoolEqualsAdvancedFilter struct { // Key: The field/property in the event based on which you want to filter. Key *string `json:"key,omitempty"` @@ -6379,8 +6433,9 @@ func (filter *BoolEqualsAdvancedFilter) AssignProperties_From_BoolEqualsAdvanced // OperatorType if source.OperatorType != nil { - operatorType := BoolEqualsAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, boolEqualsAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -6510,8 +6565,9 @@ func (filter *BoolEqualsAdvancedFilter_STATUS) AssignProperties_From_BoolEqualsA // OperatorType if source.OperatorType != nil { - operatorType := BoolEqualsAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, boolEqualsAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -6568,19 +6624,39 @@ type EventHubEventSubscriptionDestination_EndpointType string const EventHubEventSubscriptionDestination_EndpointType_EventHub = EventHubEventSubscriptionDestination_EndpointType("EventHub") +// Mapping from string to EventHubEventSubscriptionDestination_EndpointType +var eventHubEventSubscriptionDestination_EndpointType_Values = map[string]EventHubEventSubscriptionDestination_EndpointType{ + "eventhub": EventHubEventSubscriptionDestination_EndpointType_EventHub, +} + type EventHubEventSubscriptionDestination_EndpointType_STATUS string const EventHubEventSubscriptionDestination_EndpointType_STATUS_EventHub = EventHubEventSubscriptionDestination_EndpointType_STATUS("EventHub") +// Mapping from string to EventHubEventSubscriptionDestination_EndpointType_STATUS +var eventHubEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]EventHubEventSubscriptionDestination_EndpointType_STATUS{ + "eventhub": EventHubEventSubscriptionDestination_EndpointType_STATUS_EventHub, +} + // +kubebuilder:validation:Enum={"HybridConnection"} type HybridConnectionEventSubscriptionDestination_EndpointType string const HybridConnectionEventSubscriptionDestination_EndpointType_HybridConnection = HybridConnectionEventSubscriptionDestination_EndpointType("HybridConnection") +// Mapping from string to HybridConnectionEventSubscriptionDestination_EndpointType +var hybridConnectionEventSubscriptionDestination_EndpointType_Values = map[string]HybridConnectionEventSubscriptionDestination_EndpointType{ + "hybridconnection": HybridConnectionEventSubscriptionDestination_EndpointType_HybridConnection, +} + type HybridConnectionEventSubscriptionDestination_EndpointType_STATUS string const HybridConnectionEventSubscriptionDestination_EndpointType_STATUS_HybridConnection = HybridConnectionEventSubscriptionDestination_EndpointType_STATUS("HybridConnection") +// Mapping from string to HybridConnectionEventSubscriptionDestination_EndpointType_STATUS +var hybridConnectionEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]HybridConnectionEventSubscriptionDestination_EndpointType_STATUS{ + "hybridconnection": HybridConnectionEventSubscriptionDestination_EndpointType_STATUS_HybridConnection, +} + type NumberGreaterThanAdvancedFilter struct { // Key: The field/property in the event based on which you want to filter. Key *string `json:"key,omitempty"` @@ -6660,8 +6736,9 @@ func (filter *NumberGreaterThanAdvancedFilter) AssignProperties_From_NumberGreat // OperatorType if source.OperatorType != nil { - operatorType := NumberGreaterThanAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberGreaterThanAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -6791,8 +6868,9 @@ func (filter *NumberGreaterThanAdvancedFilter_STATUS) AssignProperties_From_Numb // OperatorType if source.OperatorType != nil { - operatorType := NumberGreaterThanAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberGreaterThanAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -6923,8 +7001,9 @@ func (filter *NumberGreaterThanOrEqualsAdvancedFilter) AssignProperties_From_Num // OperatorType if source.OperatorType != nil { - operatorType := NumberGreaterThanOrEqualsAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberGreaterThanOrEqualsAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -7054,8 +7133,9 @@ func (filter *NumberGreaterThanOrEqualsAdvancedFilter_STATUS) AssignProperties_F // OperatorType if source.OperatorType != nil { - operatorType := NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -7184,8 +7264,9 @@ func (filter *NumberInAdvancedFilter) AssignProperties_From_NumberInAdvancedFilt // OperatorType if source.OperatorType != nil { - operatorType := NumberInAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberInAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -7329,8 +7410,9 @@ func (filter *NumberInAdvancedFilter_STATUS) AssignProperties_From_NumberInAdvan // OperatorType if source.OperatorType != nil { - operatorType := NumberInAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberInAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -7471,8 +7553,9 @@ func (filter *NumberLessThanAdvancedFilter) AssignProperties_From_NumberLessThan // OperatorType if source.OperatorType != nil { - operatorType := NumberLessThanAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberLessThanAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -7602,8 +7685,9 @@ func (filter *NumberLessThanAdvancedFilter_STATUS) AssignProperties_From_NumberL // OperatorType if source.OperatorType != nil { - operatorType := NumberLessThanAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberLessThanAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -7734,8 +7818,9 @@ func (filter *NumberLessThanOrEqualsAdvancedFilter) AssignProperties_From_Number // OperatorType if source.OperatorType != nil { - operatorType := NumberLessThanOrEqualsAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberLessThanOrEqualsAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -7865,8 +7950,9 @@ func (filter *NumberLessThanOrEqualsAdvancedFilter_STATUS) AssignProperties_From // OperatorType if source.OperatorType != nil { - operatorType := NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -7995,8 +8081,9 @@ func (filter *NumberNotInAdvancedFilter) AssignProperties_From_NumberNotInAdvanc // OperatorType if source.OperatorType != nil { - operatorType := NumberNotInAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberNotInAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -8140,8 +8227,9 @@ func (filter *NumberNotInAdvancedFilter_STATUS) AssignProperties_From_NumberNotI // OperatorType if source.OperatorType != nil { - operatorType := NumberNotInAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, numberNotInAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -8208,37 +8296,77 @@ type ServiceBusQueueEventSubscriptionDestination_EndpointType string const ServiceBusQueueEventSubscriptionDestination_EndpointType_ServiceBusQueue = ServiceBusQueueEventSubscriptionDestination_EndpointType("ServiceBusQueue") +// Mapping from string to ServiceBusQueueEventSubscriptionDestination_EndpointType +var serviceBusQueueEventSubscriptionDestination_EndpointType_Values = map[string]ServiceBusQueueEventSubscriptionDestination_EndpointType{ + "servicebusqueue": ServiceBusQueueEventSubscriptionDestination_EndpointType_ServiceBusQueue, +} + type ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS string const ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS_ServiceBusQueue = ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS("ServiceBusQueue") +// Mapping from string to ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS +var serviceBusQueueEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS{ + "servicebusqueue": ServiceBusQueueEventSubscriptionDestination_EndpointType_STATUS_ServiceBusQueue, +} + // +kubebuilder:validation:Enum={"ServiceBusTopic"} type ServiceBusTopicEventSubscriptionDestination_EndpointType string const ServiceBusTopicEventSubscriptionDestination_EndpointType_ServiceBusTopic = ServiceBusTopicEventSubscriptionDestination_EndpointType("ServiceBusTopic") +// Mapping from string to ServiceBusTopicEventSubscriptionDestination_EndpointType +var serviceBusTopicEventSubscriptionDestination_EndpointType_Values = map[string]ServiceBusTopicEventSubscriptionDestination_EndpointType{ + "servicebustopic": ServiceBusTopicEventSubscriptionDestination_EndpointType_ServiceBusTopic, +} + type ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS string const ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS_ServiceBusTopic = ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS("ServiceBusTopic") +// Mapping from string to ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS +var serviceBusTopicEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS{ + "servicebustopic": ServiceBusTopicEventSubscriptionDestination_EndpointType_STATUS_ServiceBusTopic, +} + // +kubebuilder:validation:Enum={"StorageBlob"} type StorageBlobDeadLetterDestination_EndpointType string const StorageBlobDeadLetterDestination_EndpointType_StorageBlob = StorageBlobDeadLetterDestination_EndpointType("StorageBlob") +// Mapping from string to StorageBlobDeadLetterDestination_EndpointType +var storageBlobDeadLetterDestination_EndpointType_Values = map[string]StorageBlobDeadLetterDestination_EndpointType{ + "storageblob": StorageBlobDeadLetterDestination_EndpointType_StorageBlob, +} + type StorageBlobDeadLetterDestination_EndpointType_STATUS string const StorageBlobDeadLetterDestination_EndpointType_STATUS_StorageBlob = StorageBlobDeadLetterDestination_EndpointType_STATUS("StorageBlob") +// Mapping from string to StorageBlobDeadLetterDestination_EndpointType_STATUS +var storageBlobDeadLetterDestination_EndpointType_STATUS_Values = map[string]StorageBlobDeadLetterDestination_EndpointType_STATUS{ + "storageblob": StorageBlobDeadLetterDestination_EndpointType_STATUS_StorageBlob, +} + // +kubebuilder:validation:Enum={"StorageQueue"} type StorageQueueEventSubscriptionDestination_EndpointType string const StorageQueueEventSubscriptionDestination_EndpointType_StorageQueue = StorageQueueEventSubscriptionDestination_EndpointType("StorageQueue") +// Mapping from string to StorageQueueEventSubscriptionDestination_EndpointType +var storageQueueEventSubscriptionDestination_EndpointType_Values = map[string]StorageQueueEventSubscriptionDestination_EndpointType{ + "storagequeue": StorageQueueEventSubscriptionDestination_EndpointType_StorageQueue, +} + type StorageQueueEventSubscriptionDestination_EndpointType_STATUS string const StorageQueueEventSubscriptionDestination_EndpointType_STATUS_StorageQueue = StorageQueueEventSubscriptionDestination_EndpointType_STATUS("StorageQueue") +// Mapping from string to StorageQueueEventSubscriptionDestination_EndpointType_STATUS +var storageQueueEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]StorageQueueEventSubscriptionDestination_EndpointType_STATUS{ + "storagequeue": StorageQueueEventSubscriptionDestination_EndpointType_STATUS_StorageQueue, +} + type StringBeginsWithAdvancedFilter struct { // Key: The field/property in the event based on which you want to filter. Key *string `json:"key,omitempty"` @@ -8316,8 +8444,9 @@ func (filter *StringBeginsWithAdvancedFilter) AssignProperties_From_StringBegins // OperatorType if source.OperatorType != nil { - operatorType := StringBeginsWithAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringBeginsWithAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -8431,8 +8560,9 @@ func (filter *StringBeginsWithAdvancedFilter_STATUS) AssignProperties_From_Strin // OperatorType if source.OperatorType != nil { - operatorType := StringBeginsWithAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringBeginsWithAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -8551,8 +8681,9 @@ func (filter *StringContainsAdvancedFilter) AssignProperties_From_StringContains // OperatorType if source.OperatorType != nil { - operatorType := StringContainsAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringContainsAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -8666,8 +8797,9 @@ func (filter *StringContainsAdvancedFilter_STATUS) AssignProperties_From_StringC // OperatorType if source.OperatorType != nil { - operatorType := StringContainsAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringContainsAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -8786,8 +8918,9 @@ func (filter *StringEndsWithAdvancedFilter) AssignProperties_From_StringEndsWith // OperatorType if source.OperatorType != nil { - operatorType := StringEndsWithAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringEndsWithAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -8901,8 +9034,9 @@ func (filter *StringEndsWithAdvancedFilter_STATUS) AssignProperties_From_StringE // OperatorType if source.OperatorType != nil { - operatorType := StringEndsWithAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringEndsWithAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -9021,8 +9155,9 @@ func (filter *StringInAdvancedFilter) AssignProperties_From_StringInAdvancedFilt // OperatorType if source.OperatorType != nil { - operatorType := StringInAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringInAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -9136,8 +9271,9 @@ func (filter *StringInAdvancedFilter_STATUS) AssignProperties_From_StringInAdvan // OperatorType if source.OperatorType != nil { - operatorType := StringInAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringInAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -9256,8 +9392,9 @@ func (filter *StringNotInAdvancedFilter) AssignProperties_From_StringNotInAdvanc // OperatorType if source.OperatorType != nil { - operatorType := StringNotInAdvancedFilter_OperatorType(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringNotInAdvancedFilter_OperatorType_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -9371,8 +9508,9 @@ func (filter *StringNotInAdvancedFilter_STATUS) AssignProperties_From_StringNotI // OperatorType if source.OperatorType != nil { - operatorType := StringNotInAdvancedFilter_OperatorType_STATUS(*source.OperatorType) - filter.OperatorType = &operatorType + operatorType := *source.OperatorType + operatorTypeTemp := genruntime.ToEnum(operatorType, stringNotInAdvancedFilter_OperatorType_STATUS_Values) + filter.OperatorType = &operatorTypeTemp } else { filter.OperatorType = nil } @@ -9419,118 +9557,248 @@ type WebHookEventSubscriptionDestination_EndpointType string const WebHookEventSubscriptionDestination_EndpointType_WebHook = WebHookEventSubscriptionDestination_EndpointType("WebHook") +// Mapping from string to WebHookEventSubscriptionDestination_EndpointType +var webHookEventSubscriptionDestination_EndpointType_Values = map[string]WebHookEventSubscriptionDestination_EndpointType{ + "webhook": WebHookEventSubscriptionDestination_EndpointType_WebHook, +} + type WebHookEventSubscriptionDestination_EndpointType_STATUS string const WebHookEventSubscriptionDestination_EndpointType_STATUS_WebHook = WebHookEventSubscriptionDestination_EndpointType_STATUS("WebHook") +// Mapping from string to WebHookEventSubscriptionDestination_EndpointType_STATUS +var webHookEventSubscriptionDestination_EndpointType_STATUS_Values = map[string]WebHookEventSubscriptionDestination_EndpointType_STATUS{ + "webhook": WebHookEventSubscriptionDestination_EndpointType_STATUS_WebHook, +} + // +kubebuilder:validation:Enum={"BoolEquals"} type BoolEqualsAdvancedFilter_OperatorType string const BoolEqualsAdvancedFilter_OperatorType_BoolEquals = BoolEqualsAdvancedFilter_OperatorType("BoolEquals") +// Mapping from string to BoolEqualsAdvancedFilter_OperatorType +var boolEqualsAdvancedFilter_OperatorType_Values = map[string]BoolEqualsAdvancedFilter_OperatorType{ + "boolequals": BoolEqualsAdvancedFilter_OperatorType_BoolEquals, +} + type BoolEqualsAdvancedFilter_OperatorType_STATUS string const BoolEqualsAdvancedFilter_OperatorType_STATUS_BoolEquals = BoolEqualsAdvancedFilter_OperatorType_STATUS("BoolEquals") +// Mapping from string to BoolEqualsAdvancedFilter_OperatorType_STATUS +var boolEqualsAdvancedFilter_OperatorType_STATUS_Values = map[string]BoolEqualsAdvancedFilter_OperatorType_STATUS{ + "boolequals": BoolEqualsAdvancedFilter_OperatorType_STATUS_BoolEquals, +} + // +kubebuilder:validation:Enum={"NumberGreaterThan"} type NumberGreaterThanAdvancedFilter_OperatorType string const NumberGreaterThanAdvancedFilter_OperatorType_NumberGreaterThan = NumberGreaterThanAdvancedFilter_OperatorType("NumberGreaterThan") +// Mapping from string to NumberGreaterThanAdvancedFilter_OperatorType +var numberGreaterThanAdvancedFilter_OperatorType_Values = map[string]NumberGreaterThanAdvancedFilter_OperatorType{ + "numbergreaterthan": NumberGreaterThanAdvancedFilter_OperatorType_NumberGreaterThan, +} + type NumberGreaterThanAdvancedFilter_OperatorType_STATUS string const NumberGreaterThanAdvancedFilter_OperatorType_STATUS_NumberGreaterThan = NumberGreaterThanAdvancedFilter_OperatorType_STATUS("NumberGreaterThan") +// Mapping from string to NumberGreaterThanAdvancedFilter_OperatorType_STATUS +var numberGreaterThanAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberGreaterThanAdvancedFilter_OperatorType_STATUS{ + "numbergreaterthan": NumberGreaterThanAdvancedFilter_OperatorType_STATUS_NumberGreaterThan, +} + // +kubebuilder:validation:Enum={"NumberGreaterThanOrEquals"} type NumberGreaterThanOrEqualsAdvancedFilter_OperatorType string const NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_NumberGreaterThanOrEquals = NumberGreaterThanOrEqualsAdvancedFilter_OperatorType("NumberGreaterThanOrEquals") +// Mapping from string to NumberGreaterThanOrEqualsAdvancedFilter_OperatorType +var numberGreaterThanOrEqualsAdvancedFilter_OperatorType_Values = map[string]NumberGreaterThanOrEqualsAdvancedFilter_OperatorType{ + "numbergreaterthanorequals": NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_NumberGreaterThanOrEquals, +} + type NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS string const NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS_NumberGreaterThanOrEquals = NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS("NumberGreaterThanOrEquals") +// Mapping from string to NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS +var numberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS{ + "numbergreaterthanorequals": NumberGreaterThanOrEqualsAdvancedFilter_OperatorType_STATUS_NumberGreaterThanOrEquals, +} + // +kubebuilder:validation:Enum={"NumberIn"} type NumberInAdvancedFilter_OperatorType string const NumberInAdvancedFilter_OperatorType_NumberIn = NumberInAdvancedFilter_OperatorType("NumberIn") +// Mapping from string to NumberInAdvancedFilter_OperatorType +var numberInAdvancedFilter_OperatorType_Values = map[string]NumberInAdvancedFilter_OperatorType{ + "numberin": NumberInAdvancedFilter_OperatorType_NumberIn, +} + type NumberInAdvancedFilter_OperatorType_STATUS string const NumberInAdvancedFilter_OperatorType_STATUS_NumberIn = NumberInAdvancedFilter_OperatorType_STATUS("NumberIn") +// Mapping from string to NumberInAdvancedFilter_OperatorType_STATUS +var numberInAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberInAdvancedFilter_OperatorType_STATUS{ + "numberin": NumberInAdvancedFilter_OperatorType_STATUS_NumberIn, +} + // +kubebuilder:validation:Enum={"NumberLessThan"} type NumberLessThanAdvancedFilter_OperatorType string const NumberLessThanAdvancedFilter_OperatorType_NumberLessThan = NumberLessThanAdvancedFilter_OperatorType("NumberLessThan") +// Mapping from string to NumberLessThanAdvancedFilter_OperatorType +var numberLessThanAdvancedFilter_OperatorType_Values = map[string]NumberLessThanAdvancedFilter_OperatorType{ + "numberlessthan": NumberLessThanAdvancedFilter_OperatorType_NumberLessThan, +} + type NumberLessThanAdvancedFilter_OperatorType_STATUS string const NumberLessThanAdvancedFilter_OperatorType_STATUS_NumberLessThan = NumberLessThanAdvancedFilter_OperatorType_STATUS("NumberLessThan") +// Mapping from string to NumberLessThanAdvancedFilter_OperatorType_STATUS +var numberLessThanAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberLessThanAdvancedFilter_OperatorType_STATUS{ + "numberlessthan": NumberLessThanAdvancedFilter_OperatorType_STATUS_NumberLessThan, +} + // +kubebuilder:validation:Enum={"NumberLessThanOrEquals"} type NumberLessThanOrEqualsAdvancedFilter_OperatorType string const NumberLessThanOrEqualsAdvancedFilter_OperatorType_NumberLessThanOrEquals = NumberLessThanOrEqualsAdvancedFilter_OperatorType("NumberLessThanOrEquals") +// Mapping from string to NumberLessThanOrEqualsAdvancedFilter_OperatorType +var numberLessThanOrEqualsAdvancedFilter_OperatorType_Values = map[string]NumberLessThanOrEqualsAdvancedFilter_OperatorType{ + "numberlessthanorequals": NumberLessThanOrEqualsAdvancedFilter_OperatorType_NumberLessThanOrEquals, +} + type NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS string const NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS_NumberLessThanOrEquals = NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS("NumberLessThanOrEquals") +// Mapping from string to NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS +var numberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS{ + "numberlessthanorequals": NumberLessThanOrEqualsAdvancedFilter_OperatorType_STATUS_NumberLessThanOrEquals, +} + // +kubebuilder:validation:Enum={"NumberNotIn"} type NumberNotInAdvancedFilter_OperatorType string const NumberNotInAdvancedFilter_OperatorType_NumberNotIn = NumberNotInAdvancedFilter_OperatorType("NumberNotIn") +// Mapping from string to NumberNotInAdvancedFilter_OperatorType +var numberNotInAdvancedFilter_OperatorType_Values = map[string]NumberNotInAdvancedFilter_OperatorType{ + "numbernotin": NumberNotInAdvancedFilter_OperatorType_NumberNotIn, +} + type NumberNotInAdvancedFilter_OperatorType_STATUS string const NumberNotInAdvancedFilter_OperatorType_STATUS_NumberNotIn = NumberNotInAdvancedFilter_OperatorType_STATUS("NumberNotIn") +// Mapping from string to NumberNotInAdvancedFilter_OperatorType_STATUS +var numberNotInAdvancedFilter_OperatorType_STATUS_Values = map[string]NumberNotInAdvancedFilter_OperatorType_STATUS{ + "numbernotin": NumberNotInAdvancedFilter_OperatorType_STATUS_NumberNotIn, +} + // +kubebuilder:validation:Enum={"StringBeginsWith"} type StringBeginsWithAdvancedFilter_OperatorType string const StringBeginsWithAdvancedFilter_OperatorType_StringBeginsWith = StringBeginsWithAdvancedFilter_OperatorType("StringBeginsWith") +// Mapping from string to StringBeginsWithAdvancedFilter_OperatorType +var stringBeginsWithAdvancedFilter_OperatorType_Values = map[string]StringBeginsWithAdvancedFilter_OperatorType{ + "stringbeginswith": StringBeginsWithAdvancedFilter_OperatorType_StringBeginsWith, +} + type StringBeginsWithAdvancedFilter_OperatorType_STATUS string const StringBeginsWithAdvancedFilter_OperatorType_STATUS_StringBeginsWith = StringBeginsWithAdvancedFilter_OperatorType_STATUS("StringBeginsWith") +// Mapping from string to StringBeginsWithAdvancedFilter_OperatorType_STATUS +var stringBeginsWithAdvancedFilter_OperatorType_STATUS_Values = map[string]StringBeginsWithAdvancedFilter_OperatorType_STATUS{ + "stringbeginswith": StringBeginsWithAdvancedFilter_OperatorType_STATUS_StringBeginsWith, +} + // +kubebuilder:validation:Enum={"StringContains"} type StringContainsAdvancedFilter_OperatorType string const StringContainsAdvancedFilter_OperatorType_StringContains = StringContainsAdvancedFilter_OperatorType("StringContains") +// Mapping from string to StringContainsAdvancedFilter_OperatorType +var stringContainsAdvancedFilter_OperatorType_Values = map[string]StringContainsAdvancedFilter_OperatorType{ + "stringcontains": StringContainsAdvancedFilter_OperatorType_StringContains, +} + type StringContainsAdvancedFilter_OperatorType_STATUS string const StringContainsAdvancedFilter_OperatorType_STATUS_StringContains = StringContainsAdvancedFilter_OperatorType_STATUS("StringContains") +// Mapping from string to StringContainsAdvancedFilter_OperatorType_STATUS +var stringContainsAdvancedFilter_OperatorType_STATUS_Values = map[string]StringContainsAdvancedFilter_OperatorType_STATUS{ + "stringcontains": StringContainsAdvancedFilter_OperatorType_STATUS_StringContains, +} + // +kubebuilder:validation:Enum={"StringEndsWith"} type StringEndsWithAdvancedFilter_OperatorType string const StringEndsWithAdvancedFilter_OperatorType_StringEndsWith = StringEndsWithAdvancedFilter_OperatorType("StringEndsWith") +// Mapping from string to StringEndsWithAdvancedFilter_OperatorType +var stringEndsWithAdvancedFilter_OperatorType_Values = map[string]StringEndsWithAdvancedFilter_OperatorType{ + "stringendswith": StringEndsWithAdvancedFilter_OperatorType_StringEndsWith, +} + type StringEndsWithAdvancedFilter_OperatorType_STATUS string const StringEndsWithAdvancedFilter_OperatorType_STATUS_StringEndsWith = StringEndsWithAdvancedFilter_OperatorType_STATUS("StringEndsWith") +// Mapping from string to StringEndsWithAdvancedFilter_OperatorType_STATUS +var stringEndsWithAdvancedFilter_OperatorType_STATUS_Values = map[string]StringEndsWithAdvancedFilter_OperatorType_STATUS{ + "stringendswith": StringEndsWithAdvancedFilter_OperatorType_STATUS_StringEndsWith, +} + // +kubebuilder:validation:Enum={"StringIn"} type StringInAdvancedFilter_OperatorType string const StringInAdvancedFilter_OperatorType_StringIn = StringInAdvancedFilter_OperatorType("StringIn") +// Mapping from string to StringInAdvancedFilter_OperatorType +var stringInAdvancedFilter_OperatorType_Values = map[string]StringInAdvancedFilter_OperatorType{ + "stringin": StringInAdvancedFilter_OperatorType_StringIn, +} + type StringInAdvancedFilter_OperatorType_STATUS string const StringInAdvancedFilter_OperatorType_STATUS_StringIn = StringInAdvancedFilter_OperatorType_STATUS("StringIn") +// Mapping from string to StringInAdvancedFilter_OperatorType_STATUS +var stringInAdvancedFilter_OperatorType_STATUS_Values = map[string]StringInAdvancedFilter_OperatorType_STATUS{ + "stringin": StringInAdvancedFilter_OperatorType_STATUS_StringIn, +} + // +kubebuilder:validation:Enum={"StringNotIn"} type StringNotInAdvancedFilter_OperatorType string const StringNotInAdvancedFilter_OperatorType_StringNotIn = StringNotInAdvancedFilter_OperatorType("StringNotIn") +// Mapping from string to StringNotInAdvancedFilter_OperatorType +var stringNotInAdvancedFilter_OperatorType_Values = map[string]StringNotInAdvancedFilter_OperatorType{ + "stringnotin": StringNotInAdvancedFilter_OperatorType_StringNotIn, +} + type StringNotInAdvancedFilter_OperatorType_STATUS string const StringNotInAdvancedFilter_OperatorType_STATUS_StringNotIn = StringNotInAdvancedFilter_OperatorType_STATUS("StringNotIn") +// Mapping from string to StringNotInAdvancedFilter_OperatorType_STATUS +var stringNotInAdvancedFilter_OperatorType_STATUS_Values = map[string]StringNotInAdvancedFilter_OperatorType_STATUS{ + "stringnotin": StringNotInAdvancedFilter_OperatorType_STATUS_StringNotIn, +} + func init() { SchemeBuilder.Register(&EventSubscription{}, &EventSubscriptionList{}) } diff --git a/v2/api/eventgrid/v1api20200601/topic_types_gen.go b/v2/api/eventgrid/v1api20200601/topic_types_gen.go index 1b30554d143..ee7d3f2dc5f 100644 --- a/v2/api/eventgrid/v1api20200601/topic_types_gen.go +++ b/v2/api/eventgrid/v1api20200601/topic_types_gen.go @@ -641,8 +641,9 @@ func (topic *Topic_Spec) AssignProperties_From_Topic_Spec(source *v20200601s.Top // InputSchema if source.InputSchema != nil { - inputSchema := TopicProperties_InputSchema(*source.InputSchema) - topic.InputSchema = &inputSchema + inputSchema := *source.InputSchema + inputSchemaTemp := genruntime.ToEnum(inputSchema, topicProperties_InputSchema_Values) + topic.InputSchema = &inputSchemaTemp } else { topic.InputSchema = nil } @@ -684,8 +685,9 @@ func (topic *Topic_Spec) AssignProperties_From_Topic_Spec(source *v20200601s.Top // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := TopicProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - topic.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, topicProperties_PublicNetworkAccess_Values) + topic.PublicNetworkAccess = &publicNetworkAccessTemp } else { topic.PublicNetworkAccess = nil } @@ -1138,8 +1140,9 @@ func (topic *Topic_STATUS) AssignProperties_From_Topic_STATUS(source *v20200601s // InputSchema if source.InputSchema != nil { - inputSchema := TopicProperties_InputSchema_STATUS(*source.InputSchema) - topic.InputSchema = &inputSchema + inputSchema := *source.InputSchema + inputSchemaTemp := genruntime.ToEnum(inputSchema, topicProperties_InputSchema_STATUS_Values) + topic.InputSchema = &inputSchemaTemp } else { topic.InputSchema = nil } @@ -1185,16 +1188,18 @@ func (topic *Topic_STATUS) AssignProperties_From_Topic_STATUS(source *v20200601s // ProvisioningState if source.ProvisioningState != nil { - provisioningState := TopicProperties_ProvisioningState_STATUS(*source.ProvisioningState) - topic.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, topicProperties_ProvisioningState_STATUS_Values) + topic.ProvisioningState = &provisioningStateTemp } else { topic.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := TopicProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - topic.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, topicProperties_PublicNetworkAccess_STATUS_Values) + topic.PublicNetworkAccess = &publicNetworkAccessTemp } else { topic.PublicNetworkAccess = nil } @@ -1492,6 +1497,13 @@ const ( TopicProperties_InputSchema_EventGridSchema = TopicProperties_InputSchema("EventGridSchema") ) +// Mapping from string to TopicProperties_InputSchema +var topicProperties_InputSchema_Values = map[string]TopicProperties_InputSchema{ + "cloudeventschemav1_0": TopicProperties_InputSchema_CloudEventSchemaV1_0, + "customeventschema": TopicProperties_InputSchema_CustomEventSchema, + "eventgridschema": TopicProperties_InputSchema_EventGridSchema, +} + type TopicProperties_InputSchema_STATUS string const ( @@ -1500,6 +1512,13 @@ const ( TopicProperties_InputSchema_STATUS_EventGridSchema = TopicProperties_InputSchema_STATUS("EventGridSchema") ) +// Mapping from string to TopicProperties_InputSchema_STATUS +var topicProperties_InputSchema_STATUS_Values = map[string]TopicProperties_InputSchema_STATUS{ + "cloudeventschemav1_0": TopicProperties_InputSchema_STATUS_CloudEventSchemaV1_0, + "customeventschema": TopicProperties_InputSchema_STATUS_CustomEventSchema, + "eventgridschema": TopicProperties_InputSchema_STATUS_EventGridSchema, +} + type TopicProperties_ProvisioningState_STATUS string const ( @@ -1511,6 +1530,16 @@ const ( TopicProperties_ProvisioningState_STATUS_Updating = TopicProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to TopicProperties_ProvisioningState_STATUS +var topicProperties_ProvisioningState_STATUS_Values = map[string]TopicProperties_ProvisioningState_STATUS{ + "canceled": TopicProperties_ProvisioningState_STATUS_Canceled, + "creating": TopicProperties_ProvisioningState_STATUS_Creating, + "deleting": TopicProperties_ProvisioningState_STATUS_Deleting, + "failed": TopicProperties_ProvisioningState_STATUS_Failed, + "succeeded": TopicProperties_ProvisioningState_STATUS_Succeeded, + "updating": TopicProperties_ProvisioningState_STATUS_Updating, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type TopicProperties_PublicNetworkAccess string @@ -1519,6 +1548,12 @@ const ( TopicProperties_PublicNetworkAccess_Enabled = TopicProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to TopicProperties_PublicNetworkAccess +var topicProperties_PublicNetworkAccess_Values = map[string]TopicProperties_PublicNetworkAccess{ + "disabled": TopicProperties_PublicNetworkAccess_Disabled, + "enabled": TopicProperties_PublicNetworkAccess_Enabled, +} + type TopicProperties_PublicNetworkAccess_STATUS string const ( @@ -1526,6 +1561,12 @@ const ( TopicProperties_PublicNetworkAccess_STATUS_Enabled = TopicProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to TopicProperties_PublicNetworkAccess_STATUS +var topicProperties_PublicNetworkAccess_STATUS_Values = map[string]TopicProperties_PublicNetworkAccess_STATUS{ + "disabled": TopicProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": TopicProperties_PublicNetworkAccess_STATUS_Enabled, +} + type TopicOperatorConfigMaps struct { // Endpoint: indicates where the Endpoint config map should be placed. If omitted, no config map will be created. Endpoint *genruntime.ConfigMapDestination `json:"endpoint,omitempty"` diff --git a/v2/api/eventhub/v1api20211101/namespace_spec_arm_types_gen.go b/v2/api/eventhub/v1api20211101/namespace_spec_arm_types_gen.go index 774f657d574..5095d43f9b7 100644 --- a/v2/api/eventhub/v1api20211101/namespace_spec_arm_types_gen.go +++ b/v2/api/eventhub/v1api20211101/namespace_spec_arm_types_gen.go @@ -107,6 +107,14 @@ const ( Identity_Type_UserAssigned = Identity_Type("UserAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "systemassigned, userassigned": Identity_Type_SystemAssignedUserAssigned, + "userassigned": Identity_Type_UserAssigned, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type Sku_Name string @@ -116,6 +124,13 @@ const ( Sku_Name_Standard = Sku_Name("Standard") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "basic": Sku_Name_Basic, + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type Sku_Tier string @@ -125,6 +140,13 @@ const ( Sku_Tier_Standard = Sku_Tier("Standard") ) +// Mapping from string to Sku_Tier +var sku_Tier_Values = map[string]Sku_Tier{ + "basic": Sku_Tier_Basic, + "premium": Sku_Tier_Premium, + "standard": Sku_Tier_Standard, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/eventhub/v1api20211101/namespace_status_arm_types_gen.go b/v2/api/eventhub/v1api20211101/namespace_status_arm_types_gen.go index b09e6364e87..d8b333ba740 100644 --- a/v2/api/eventhub/v1api20211101/namespace_status_arm_types_gen.go +++ b/v2/api/eventhub/v1api20211101/namespace_status_arm_types_gen.go @@ -151,6 +151,14 @@ const ( Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + // Properties of the PrivateEndpointConnection. type PrivateEndpointConnection_STATUS_ARM struct { // Id: Fully qualified resource ID for the resource. Ex - @@ -166,6 +174,13 @@ const ( Sku_Name_STATUS_Standard = Sku_Name_STATUS("Standard") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "basic": Sku_Name_STATUS_Basic, + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + type Sku_Tier_STATUS string const ( @@ -174,6 +189,13 @@ const ( Sku_Tier_STATUS_Standard = Sku_Tier_STATUS("Standard") ) +// Mapping from string to Sku_Tier_STATUS +var sku_Tier_STATUS_Values = map[string]Sku_Tier_STATUS{ + "basic": Sku_Tier_STATUS_Basic, + "premium": Sku_Tier_STATUS_Premium, + "standard": Sku_Tier_STATUS_Standard, +} + type SystemData_CreatedByType_STATUS string const ( @@ -183,6 +205,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -192,6 +222,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Recognized Dictionary value. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: Client Id of user assigned identity diff --git a/v2/api/eventhub/v1api20211101/namespace_types_gen.go b/v2/api/eventhub/v1api20211101/namespace_types_gen.go index ea3cd27bf0b..6dcc32bb233 100644 --- a/v2/api/eventhub/v1api20211101/namespace_types_gen.go +++ b/v2/api/eventhub/v1api20211101/namespace_types_gen.go @@ -1740,8 +1740,9 @@ func (encryption *Encryption) AssignProperties_From_Encryption(source *v20211101 // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -1924,8 +1925,9 @@ func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(sou // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource_STATUS(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_STATUS_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -2076,8 +2078,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20211101s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2248,8 +2251,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2475,16 +2479,18 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20211101s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Sku_Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -2621,16 +2627,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20211101s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Sku_Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sku_Tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -2760,8 +2768,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -2774,8 +2783,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -2833,10 +2843,20 @@ type Encryption_KeySource string const Encryption_KeySource_MicrosoftKeyVault = Encryption_KeySource("Microsoft.KeyVault") +// Mapping from string to Encryption_KeySource +var encryption_KeySource_Values = map[string]Encryption_KeySource{ + "microsoft.keyvault": Encryption_KeySource_MicrosoftKeyVault, +} + type Encryption_KeySource_STATUS string const Encryption_KeySource_STATUS_MicrosoftKeyVault = Encryption_KeySource_STATUS("Microsoft.KeyVault") +// Mapping from string to Encryption_KeySource_STATUS +var encryption_KeySource_STATUS_Values = map[string]Encryption_KeySource_STATUS{ + "microsoft.keyvault": Encryption_KeySource_STATUS_MicrosoftKeyVault, +} + // Properties to configure keyVault Properties type KeyVaultProperties struct { Identity *UserAssignedIdentityProperties `json:"identity,omitempty"` diff --git a/v2/api/eventhub/v1api20211101/namespaces_authorization_rule_types_gen.go b/v2/api/eventhub/v1api20211101/namespaces_authorization_rule_types_gen.go index a7820c70c57..77430a940c2 100644 --- a/v2/api/eventhub/v1api20211101/namespaces_authorization_rule_types_gen.go +++ b/v2/api/eventhub/v1api20211101/namespaces_authorization_rule_types_gen.go @@ -466,7 +466,7 @@ func (rule *Namespaces_AuthorizationRule_Spec) AssignProperties_From_Namespaces_ for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_AuthorizationRule_Properties_Rights_Spec(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_AuthorizationRule_Properties_Rights_Spec_Values) } rule.Rights = rightList } else { @@ -709,7 +709,7 @@ func (rule *Namespaces_AuthorizationRule_STATUS) AssignProperties_From_Namespace for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_AuthorizationRule_Properties_Rights_STATUS(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_AuthorizationRule_Properties_Rights_STATUS_Values) } rule.Rights = rightList } else { @@ -800,6 +800,13 @@ const ( Namespaces_AuthorizationRule_Properties_Rights_Spec_Send = Namespaces_AuthorizationRule_Properties_Rights_Spec("Send") ) +// Mapping from string to Namespaces_AuthorizationRule_Properties_Rights_Spec +var namespaces_AuthorizationRule_Properties_Rights_Spec_Values = map[string]Namespaces_AuthorizationRule_Properties_Rights_Spec{ + "listen": Namespaces_AuthorizationRule_Properties_Rights_Spec_Listen, + "manage": Namespaces_AuthorizationRule_Properties_Rights_Spec_Manage, + "send": Namespaces_AuthorizationRule_Properties_Rights_Spec_Send, +} + type Namespaces_AuthorizationRule_Properties_Rights_STATUS string const ( @@ -808,6 +815,13 @@ const ( Namespaces_AuthorizationRule_Properties_Rights_STATUS_Send = Namespaces_AuthorizationRule_Properties_Rights_STATUS("Send") ) +// Mapping from string to Namespaces_AuthorizationRule_Properties_Rights_STATUS +var namespaces_AuthorizationRule_Properties_Rights_STATUS_Values = map[string]Namespaces_AuthorizationRule_Properties_Rights_STATUS{ + "listen": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Listen, + "manage": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Manage, + "send": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Send, +} + func init() { SchemeBuilder.Register(&NamespacesAuthorizationRule{}, &NamespacesAuthorizationRuleList{}) } diff --git a/v2/api/eventhub/v1api20211101/namespaces_eventhub_types_gen.go b/v2/api/eventhub/v1api20211101/namespaces_eventhub_types_gen.go index 5ade92cd52f..4ad925933b8 100644 --- a/v2/api/eventhub/v1api20211101/namespaces_eventhub_types_gen.go +++ b/v2/api/eventhub/v1api20211101/namespaces_eventhub_types_gen.go @@ -897,8 +897,9 @@ func (eventhub *Namespaces_Eventhub_STATUS) AssignProperties_From_Namespaces_Eve // Status if source.Status != nil { - status := Namespaces_Eventhub_Properties_Status_STATUS(*source.Status) - eventhub.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, namespaces_Eventhub_Properties_Status_STATUS_Values) + eventhub.Status = &statusTemp } else { eventhub.Status = nil } @@ -1160,8 +1161,9 @@ func (description *CaptureDescription) AssignProperties_From_CaptureDescription( // Encoding if source.Encoding != nil { - encoding := CaptureDescription_Encoding(*source.Encoding) - description.Encoding = &encoding + encoding := *source.Encoding + encodingTemp := genruntime.ToEnum(encoding, captureDescription_Encoding_Values) + description.Encoding = &encodingTemp } else { description.Encoding = nil } @@ -1399,8 +1401,9 @@ func (description *CaptureDescription_STATUS) AssignProperties_From_CaptureDescr // Encoding if source.Encoding != nil { - encoding := CaptureDescription_Encoding_STATUS(*source.Encoding) - description.Encoding = &encoding + encoding := *source.Encoding + encodingTemp := genruntime.ToEnum(encoding, captureDescription_Encoding_STATUS_Values) + description.Encoding = &encodingTemp } else { description.Encoding = nil } @@ -1495,6 +1498,19 @@ const ( Namespaces_Eventhub_Properties_Status_STATUS_Unknown = Namespaces_Eventhub_Properties_Status_STATUS("Unknown") ) +// Mapping from string to Namespaces_Eventhub_Properties_Status_STATUS +var namespaces_Eventhub_Properties_Status_STATUS_Values = map[string]Namespaces_Eventhub_Properties_Status_STATUS{ + "active": Namespaces_Eventhub_Properties_Status_STATUS_Active, + "creating": Namespaces_Eventhub_Properties_Status_STATUS_Creating, + "deleting": Namespaces_Eventhub_Properties_Status_STATUS_Deleting, + "disabled": Namespaces_Eventhub_Properties_Status_STATUS_Disabled, + "receivedisabled": Namespaces_Eventhub_Properties_Status_STATUS_ReceiveDisabled, + "renaming": Namespaces_Eventhub_Properties_Status_STATUS_Renaming, + "restoring": Namespaces_Eventhub_Properties_Status_STATUS_Restoring, + "senddisabled": Namespaces_Eventhub_Properties_Status_STATUS_SendDisabled, + "unknown": Namespaces_Eventhub_Properties_Status_STATUS_Unknown, +} + // +kubebuilder:validation:Enum={"Avro","AvroDeflate"} type CaptureDescription_Encoding string @@ -1503,6 +1519,12 @@ const ( CaptureDescription_Encoding_AvroDeflate = CaptureDescription_Encoding("AvroDeflate") ) +// Mapping from string to CaptureDescription_Encoding +var captureDescription_Encoding_Values = map[string]CaptureDescription_Encoding{ + "avro": CaptureDescription_Encoding_Avro, + "avrodeflate": CaptureDescription_Encoding_AvroDeflate, +} + type CaptureDescription_Encoding_STATUS string const ( @@ -1510,6 +1532,12 @@ const ( CaptureDescription_Encoding_STATUS_AvroDeflate = CaptureDescription_Encoding_STATUS("AvroDeflate") ) +// Mapping from string to CaptureDescription_Encoding_STATUS +var captureDescription_Encoding_STATUS_Values = map[string]CaptureDescription_Encoding_STATUS{ + "avro": CaptureDescription_Encoding_STATUS_Avro, + "avrodeflate": CaptureDescription_Encoding_STATUS_AvroDeflate, +} + // Capture storage details for capture description type Destination struct { // ArchiveNameFormat: Blob naming convention for archive, e.g. diff --git a/v2/api/eventhub/v1api20211101/namespaces_eventhubs_authorization_rule_types_gen.go b/v2/api/eventhub/v1api20211101/namespaces_eventhubs_authorization_rule_types_gen.go index 59132760d2f..c2d500ff475 100644 --- a/v2/api/eventhub/v1api20211101/namespaces_eventhubs_authorization_rule_types_gen.go +++ b/v2/api/eventhub/v1api20211101/namespaces_eventhubs_authorization_rule_types_gen.go @@ -466,7 +466,7 @@ func (rule *Namespaces_Eventhubs_AuthorizationRule_Spec) AssignProperties_From_N for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec_Values) } rule.Rights = rightList } else { @@ -709,7 +709,7 @@ func (rule *Namespaces_Eventhubs_AuthorizationRule_STATUS) AssignProperties_From for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS_Values) } rule.Rights = rightList } else { @@ -800,6 +800,13 @@ const ( Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec_Send = Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec("Send") ) +// Mapping from string to Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec +var namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec_Values = map[string]Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec{ + "listen": Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec_Listen, + "manage": Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec_Manage, + "send": Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_Spec_Send, +} + type Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS string const ( @@ -808,6 +815,13 @@ const ( Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS_Send = Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS("Send") ) +// Mapping from string to Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS +var namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS_Values = map[string]Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS{ + "listen": Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS_Listen, + "manage": Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS_Manage, + "send": Namespaces_Eventhubs_AuthorizationRule_Properties_Rights_STATUS_Send, +} + func init() { SchemeBuilder.Register(&NamespacesEventhubsAuthorizationRule{}, &NamespacesEventhubsAuthorizationRuleList{}) } diff --git a/v2/api/insights/v1api20180301/metric_alert_types_gen.go b/v2/api/insights/v1api20180301/metric_alert_types_gen.go index 6246a7abd23..affd5e2ce8c 100644 --- a/v2/api/insights/v1api20180301/metric_alert_types_gen.go +++ b/v2/api/insights/v1api20180301/metric_alert_types_gen.go @@ -2186,8 +2186,9 @@ func (criteria *MetricAlertMultipleResourceMultipleMetricCriteria) AssignPropert // OdataType if source.OdataType != nil { - odataType := MetricAlertMultipleResourceMultipleMetricCriteria_OdataType(*source.OdataType) - criteria.OdataType = &odataType + odataType := *source.OdataType + odataTypeTemp := genruntime.ToEnum(odataType, metricAlertMultipleResourceMultipleMetricCriteria_OdataType_Values) + criteria.OdataType = &odataTypeTemp } else { criteria.OdataType = nil } @@ -2382,8 +2383,9 @@ func (criteria *MetricAlertMultipleResourceMultipleMetricCriteria_STATUS) Assign // OdataType if source.OdataType != nil { - odataType := MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS(*source.OdataType) - criteria.OdataType = &odataType + odataType := *source.OdataType + odataTypeTemp := genruntime.ToEnum(odataType, metricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS_Values) + criteria.OdataType = &odataTypeTemp } else { criteria.OdataType = nil } @@ -2564,8 +2566,9 @@ func (criteria *MetricAlertSingleResourceMultipleMetricCriteria) AssignPropertie // OdataType if source.OdataType != nil { - odataType := MetricAlertSingleResourceMultipleMetricCriteria_OdataType(*source.OdataType) - criteria.OdataType = &odataType + odataType := *source.OdataType + odataTypeTemp := genruntime.ToEnum(odataType, metricAlertSingleResourceMultipleMetricCriteria_OdataType_Values) + criteria.OdataType = &odataTypeTemp } else { criteria.OdataType = nil } @@ -2760,8 +2763,9 @@ func (criteria *MetricAlertSingleResourceMultipleMetricCriteria_STATUS) AssignPr // OdataType if source.OdataType != nil { - odataType := MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS(*source.OdataType) - criteria.OdataType = &odataType + odataType := *source.OdataType + odataTypeTemp := genruntime.ToEnum(odataType, metricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS_Values) + criteria.OdataType = &odataTypeTemp } else { criteria.OdataType = nil } @@ -2966,8 +2970,9 @@ func (criteria *WebtestLocationAvailabilityCriteria) AssignProperties_From_Webte // OdataType if source.OdataType != nil { - odataType := WebtestLocationAvailabilityCriteria_OdataType(*source.OdataType) - criteria.OdataType = &odataType + odataType := *source.OdataType + odataTypeTemp := genruntime.ToEnum(odataType, webtestLocationAvailabilityCriteria_OdataType_Values) + criteria.OdataType = &odataTypeTemp } else { criteria.OdataType = nil } @@ -3174,8 +3179,9 @@ func (criteria *WebtestLocationAvailabilityCriteria_STATUS) AssignProperties_Fro // OdataType if source.OdataType != nil { - odataType := WebtestLocationAvailabilityCriteria_OdataType_STATUS(*source.OdataType) - criteria.OdataType = &odataType + odataType := *source.OdataType + odataTypeTemp := genruntime.ToEnum(odataType, webtestLocationAvailabilityCriteria_OdataType_STATUS_Values) + criteria.OdataType = &odataTypeTemp } else { criteria.OdataType = nil } @@ -3243,19 +3249,39 @@ type MetricAlertMultipleResourceMultipleMetricCriteria_OdataType string const MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_MicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria = MetricAlertMultipleResourceMultipleMetricCriteria_OdataType("Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria") +// Mapping from string to MetricAlertMultipleResourceMultipleMetricCriteria_OdataType +var metricAlertMultipleResourceMultipleMetricCriteria_OdataType_Values = map[string]MetricAlertMultipleResourceMultipleMetricCriteria_OdataType{ + "microsoft.azure.monitor.multipleresourcemultiplemetriccriteria": MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_MicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria, +} + type MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS string const MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS_MicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria = MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS("Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria") +// Mapping from string to MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS +var metricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS_Values = map[string]MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS{ + "microsoft.azure.monitor.multipleresourcemultiplemetriccriteria": MetricAlertMultipleResourceMultipleMetricCriteria_OdataType_STATUS_MicrosoftAzureMonitorMultipleResourceMultipleMetricCriteria, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"} type MetricAlertSingleResourceMultipleMetricCriteria_OdataType string const MetricAlertSingleResourceMultipleMetricCriteria_OdataType_MicrosoftAzureMonitorSingleResourceMultipleMetricCriteria = MetricAlertSingleResourceMultipleMetricCriteria_OdataType("Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria") +// Mapping from string to MetricAlertSingleResourceMultipleMetricCriteria_OdataType +var metricAlertSingleResourceMultipleMetricCriteria_OdataType_Values = map[string]MetricAlertSingleResourceMultipleMetricCriteria_OdataType{ + "microsoft.azure.monitor.singleresourcemultiplemetriccriteria": MetricAlertSingleResourceMultipleMetricCriteria_OdataType_MicrosoftAzureMonitorSingleResourceMultipleMetricCriteria, +} + type MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS string const MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS_MicrosoftAzureMonitorSingleResourceMultipleMetricCriteria = MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS("Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria") +// Mapping from string to MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS +var metricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS_Values = map[string]MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS{ + "microsoft.azure.monitor.singleresourcemultiplemetriccriteria": MetricAlertSingleResourceMultipleMetricCriteria_OdataType_STATUS_MicrosoftAzureMonitorSingleResourceMultipleMetricCriteria, +} + type MetricCriteria struct { AdditionalProperties map[string]v1.JSON `json:"additionalProperties,omitempty"` @@ -3466,8 +3492,9 @@ func (criteria *MetricCriteria) AssignProperties_From_MetricCriteria(source *v20 // CriterionType if source.CriterionType != nil { - criterionType := MetricCriteria_CriterionType(*source.CriterionType) - criteria.CriterionType = &criterionType + criterionType := *source.CriterionType + criterionTypeTemp := genruntime.ToEnum(criterionType, metricCriteria_CriterionType_Values) + criteria.CriterionType = &criterionTypeTemp } else { criteria.CriterionType = nil } @@ -3501,8 +3528,9 @@ func (criteria *MetricCriteria) AssignProperties_From_MetricCriteria(source *v20 // Operator if source.Operator != nil { - operator := MetricCriteria_Operator(*source.Operator) - criteria.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, metricCriteria_Operator_Values) + criteria.Operator = &operatorTemp } else { criteria.Operator = nil } @@ -3525,8 +3553,9 @@ func (criteria *MetricCriteria) AssignProperties_From_MetricCriteria(source *v20 // TimeAggregation if source.TimeAggregation != nil { - timeAggregation := MetricCriteria_TimeAggregation(*source.TimeAggregation) - criteria.TimeAggregation = &timeAggregation + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, metricCriteria_TimeAggregation_Values) + criteria.TimeAggregation = &timeAggregationTemp } else { criteria.TimeAggregation = nil } @@ -3849,8 +3878,9 @@ func (criteria *MetricCriteria_STATUS) AssignProperties_From_MetricCriteria_STAT // CriterionType if source.CriterionType != nil { - criterionType := MetricCriteria_CriterionType_STATUS(*source.CriterionType) - criteria.CriterionType = &criterionType + criterionType := *source.CriterionType + criterionTypeTemp := genruntime.ToEnum(criterionType, metricCriteria_CriterionType_STATUS_Values) + criteria.CriterionType = &criterionTypeTemp } else { criteria.CriterionType = nil } @@ -3884,8 +3914,9 @@ func (criteria *MetricCriteria_STATUS) AssignProperties_From_MetricCriteria_STAT // Operator if source.Operator != nil { - operator := MetricCriteria_Operator_STATUS(*source.Operator) - criteria.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, metricCriteria_Operator_STATUS_Values) + criteria.Operator = &operatorTemp } else { criteria.Operator = nil } @@ -3908,8 +3939,9 @@ func (criteria *MetricCriteria_STATUS) AssignProperties_From_MetricCriteria_STAT // TimeAggregation if source.TimeAggregation != nil { - timeAggregation := MetricCriteria_TimeAggregation_STATUS(*source.TimeAggregation) - criteria.TimeAggregation = &timeAggregation + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, metricCriteria_TimeAggregation_STATUS_Values) + criteria.TimeAggregation = &timeAggregationTemp } else { criteria.TimeAggregation = nil } @@ -4317,10 +4349,20 @@ type WebtestLocationAvailabilityCriteria_OdataType string const WebtestLocationAvailabilityCriteria_OdataType_MicrosoftAzureMonitorWebtestLocationAvailabilityCriteria = WebtestLocationAvailabilityCriteria_OdataType("Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria") +// Mapping from string to WebtestLocationAvailabilityCriteria_OdataType +var webtestLocationAvailabilityCriteria_OdataType_Values = map[string]WebtestLocationAvailabilityCriteria_OdataType{ + "microsoft.azure.monitor.webtestlocationavailabilitycriteria": WebtestLocationAvailabilityCriteria_OdataType_MicrosoftAzureMonitorWebtestLocationAvailabilityCriteria, +} + type WebtestLocationAvailabilityCriteria_OdataType_STATUS string const WebtestLocationAvailabilityCriteria_OdataType_STATUS_MicrosoftAzureMonitorWebtestLocationAvailabilityCriteria = WebtestLocationAvailabilityCriteria_OdataType_STATUS("Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria") +// Mapping from string to WebtestLocationAvailabilityCriteria_OdataType_STATUS +var webtestLocationAvailabilityCriteria_OdataType_STATUS_Values = map[string]WebtestLocationAvailabilityCriteria_OdataType_STATUS{ + "microsoft.azure.monitor.webtestlocationavailabilitycriteria": WebtestLocationAvailabilityCriteria_OdataType_STATUS_MicrosoftAzureMonitorWebtestLocationAvailabilityCriteria, +} + type DynamicMetricCriteria struct { AdditionalProperties map[string]v1.JSON `json:"additionalProperties,omitempty"` @@ -4574,16 +4616,18 @@ func (criteria *DynamicMetricCriteria) AssignProperties_From_DynamicMetricCriter // AlertSensitivity if source.AlertSensitivity != nil { - alertSensitivity := DynamicMetricCriteria_AlertSensitivity(*source.AlertSensitivity) - criteria.AlertSensitivity = &alertSensitivity + alertSensitivity := *source.AlertSensitivity + alertSensitivityTemp := genruntime.ToEnum(alertSensitivity, dynamicMetricCriteria_AlertSensitivity_Values) + criteria.AlertSensitivity = &alertSensitivityTemp } else { criteria.AlertSensitivity = nil } // CriterionType if source.CriterionType != nil { - criterionType := DynamicMetricCriteria_CriterionType(*source.CriterionType) - criteria.CriterionType = &criterionType + criterionType := *source.CriterionType + criterionTypeTemp := genruntime.ToEnum(criterionType, dynamicMetricCriteria_CriterionType_Values) + criteria.CriterionType = &criterionTypeTemp } else { criteria.CriterionType = nil } @@ -4632,8 +4676,9 @@ func (criteria *DynamicMetricCriteria) AssignProperties_From_DynamicMetricCriter // Operator if source.Operator != nil { - operator := DynamicMetricCriteria_Operator(*source.Operator) - criteria.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, dynamicMetricCriteria_Operator_Values) + criteria.Operator = &operatorTemp } else { criteria.Operator = nil } @@ -4648,8 +4693,9 @@ func (criteria *DynamicMetricCriteria) AssignProperties_From_DynamicMetricCriter // TimeAggregation if source.TimeAggregation != nil { - timeAggregation := DynamicMetricCriteria_TimeAggregation(*source.TimeAggregation) - criteria.TimeAggregation = &timeAggregation + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, dynamicMetricCriteria_TimeAggregation_Values) + criteria.TimeAggregation = &timeAggregationTemp } else { criteria.TimeAggregation = nil } @@ -5028,16 +5074,18 @@ func (criteria *DynamicMetricCriteria_STATUS) AssignProperties_From_DynamicMetri // AlertSensitivity if source.AlertSensitivity != nil { - alertSensitivity := DynamicMetricCriteria_AlertSensitivity_STATUS(*source.AlertSensitivity) - criteria.AlertSensitivity = &alertSensitivity + alertSensitivity := *source.AlertSensitivity + alertSensitivityTemp := genruntime.ToEnum(alertSensitivity, dynamicMetricCriteria_AlertSensitivity_STATUS_Values) + criteria.AlertSensitivity = &alertSensitivityTemp } else { criteria.AlertSensitivity = nil } // CriterionType if source.CriterionType != nil { - criterionType := DynamicMetricCriteria_CriterionType_STATUS(*source.CriterionType) - criteria.CriterionType = &criterionType + criterionType := *source.CriterionType + criterionTypeTemp := genruntime.ToEnum(criterionType, dynamicMetricCriteria_CriterionType_STATUS_Values) + criteria.CriterionType = &criterionTypeTemp } else { criteria.CriterionType = nil } @@ -5086,8 +5134,9 @@ func (criteria *DynamicMetricCriteria_STATUS) AssignProperties_From_DynamicMetri // Operator if source.Operator != nil { - operator := DynamicMetricCriteria_Operator_STATUS(*source.Operator) - criteria.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, dynamicMetricCriteria_Operator_STATUS_Values) + criteria.Operator = &operatorTemp } else { criteria.Operator = nil } @@ -5102,8 +5151,9 @@ func (criteria *DynamicMetricCriteria_STATUS) AssignProperties_From_DynamicMetri // TimeAggregation if source.TimeAggregation != nil { - timeAggregation := DynamicMetricCriteria_TimeAggregation_STATUS(*source.TimeAggregation) - criteria.TimeAggregation = &timeAggregation + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, dynamicMetricCriteria_TimeAggregation_STATUS_Values) + criteria.TimeAggregation = &timeAggregationTemp } else { criteria.TimeAggregation = nil } @@ -5228,10 +5278,20 @@ type MetricCriteria_CriterionType string const MetricCriteria_CriterionType_StaticThresholdCriterion = MetricCriteria_CriterionType("StaticThresholdCriterion") +// Mapping from string to MetricCriteria_CriterionType +var metricCriteria_CriterionType_Values = map[string]MetricCriteria_CriterionType{ + "staticthresholdcriterion": MetricCriteria_CriterionType_StaticThresholdCriterion, +} + type MetricCriteria_CriterionType_STATUS string const MetricCriteria_CriterionType_STATUS_StaticThresholdCriterion = MetricCriteria_CriterionType_STATUS("StaticThresholdCriterion") +// Mapping from string to MetricCriteria_CriterionType_STATUS +var metricCriteria_CriterionType_STATUS_Values = map[string]MetricCriteria_CriterionType_STATUS{ + "staticthresholdcriterion": MetricCriteria_CriterionType_STATUS_StaticThresholdCriterion, +} + // +kubebuilder:validation:Enum={"Equals","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual"} type MetricCriteria_Operator string @@ -5243,6 +5303,15 @@ const ( MetricCriteria_Operator_LessThanOrEqual = MetricCriteria_Operator("LessThanOrEqual") ) +// Mapping from string to MetricCriteria_Operator +var metricCriteria_Operator_Values = map[string]MetricCriteria_Operator{ + "equals": MetricCriteria_Operator_Equals, + "greaterthan": MetricCriteria_Operator_GreaterThan, + "greaterthanorequal": MetricCriteria_Operator_GreaterThanOrEqual, + "lessthan": MetricCriteria_Operator_LessThan, + "lessthanorequal": MetricCriteria_Operator_LessThanOrEqual, +} + type MetricCriteria_Operator_STATUS string const ( @@ -5253,6 +5322,15 @@ const ( MetricCriteria_Operator_STATUS_LessThanOrEqual = MetricCriteria_Operator_STATUS("LessThanOrEqual") ) +// Mapping from string to MetricCriteria_Operator_STATUS +var metricCriteria_Operator_STATUS_Values = map[string]MetricCriteria_Operator_STATUS{ + "equals": MetricCriteria_Operator_STATUS_Equals, + "greaterthan": MetricCriteria_Operator_STATUS_GreaterThan, + "greaterthanorequal": MetricCriteria_Operator_STATUS_GreaterThanOrEqual, + "lessthan": MetricCriteria_Operator_STATUS_LessThan, + "lessthanorequal": MetricCriteria_Operator_STATUS_LessThanOrEqual, +} + // +kubebuilder:validation:Enum={"Average","Count","Maximum","Minimum","Total"} type MetricCriteria_TimeAggregation string @@ -5264,6 +5342,15 @@ const ( MetricCriteria_TimeAggregation_Total = MetricCriteria_TimeAggregation("Total") ) +// Mapping from string to MetricCriteria_TimeAggregation +var metricCriteria_TimeAggregation_Values = map[string]MetricCriteria_TimeAggregation{ + "average": MetricCriteria_TimeAggregation_Average, + "count": MetricCriteria_TimeAggregation_Count, + "maximum": MetricCriteria_TimeAggregation_Maximum, + "minimum": MetricCriteria_TimeAggregation_Minimum, + "total": MetricCriteria_TimeAggregation_Total, +} + type MetricCriteria_TimeAggregation_STATUS string const ( @@ -5274,6 +5361,15 @@ const ( MetricCriteria_TimeAggregation_STATUS_Total = MetricCriteria_TimeAggregation_STATUS("Total") ) +// Mapping from string to MetricCriteria_TimeAggregation_STATUS +var metricCriteria_TimeAggregation_STATUS_Values = map[string]MetricCriteria_TimeAggregation_STATUS{ + "average": MetricCriteria_TimeAggregation_STATUS_Average, + "count": MetricCriteria_TimeAggregation_STATUS_Count, + "maximum": MetricCriteria_TimeAggregation_STATUS_Maximum, + "minimum": MetricCriteria_TimeAggregation_STATUS_Minimum, + "total": MetricCriteria_TimeAggregation_STATUS_Total, +} + // Specifies a metric dimension. type MetricDimension struct { // +kubebuilder:validation:Required @@ -5504,6 +5600,13 @@ const ( DynamicMetricCriteria_AlertSensitivity_Medium = DynamicMetricCriteria_AlertSensitivity("Medium") ) +// Mapping from string to DynamicMetricCriteria_AlertSensitivity +var dynamicMetricCriteria_AlertSensitivity_Values = map[string]DynamicMetricCriteria_AlertSensitivity{ + "high": DynamicMetricCriteria_AlertSensitivity_High, + "low": DynamicMetricCriteria_AlertSensitivity_Low, + "medium": DynamicMetricCriteria_AlertSensitivity_Medium, +} + type DynamicMetricCriteria_AlertSensitivity_STATUS string const ( @@ -5512,15 +5615,32 @@ const ( DynamicMetricCriteria_AlertSensitivity_STATUS_Medium = DynamicMetricCriteria_AlertSensitivity_STATUS("Medium") ) +// Mapping from string to DynamicMetricCriteria_AlertSensitivity_STATUS +var dynamicMetricCriteria_AlertSensitivity_STATUS_Values = map[string]DynamicMetricCriteria_AlertSensitivity_STATUS{ + "high": DynamicMetricCriteria_AlertSensitivity_STATUS_High, + "low": DynamicMetricCriteria_AlertSensitivity_STATUS_Low, + "medium": DynamicMetricCriteria_AlertSensitivity_STATUS_Medium, +} + // +kubebuilder:validation:Enum={"DynamicThresholdCriterion"} type DynamicMetricCriteria_CriterionType string const DynamicMetricCriteria_CriterionType_DynamicThresholdCriterion = DynamicMetricCriteria_CriterionType("DynamicThresholdCriterion") +// Mapping from string to DynamicMetricCriteria_CriterionType +var dynamicMetricCriteria_CriterionType_Values = map[string]DynamicMetricCriteria_CriterionType{ + "dynamicthresholdcriterion": DynamicMetricCriteria_CriterionType_DynamicThresholdCriterion, +} + type DynamicMetricCriteria_CriterionType_STATUS string const DynamicMetricCriteria_CriterionType_STATUS_DynamicThresholdCriterion = DynamicMetricCriteria_CriterionType_STATUS("DynamicThresholdCriterion") +// Mapping from string to DynamicMetricCriteria_CriterionType_STATUS +var dynamicMetricCriteria_CriterionType_STATUS_Values = map[string]DynamicMetricCriteria_CriterionType_STATUS{ + "dynamicthresholdcriterion": DynamicMetricCriteria_CriterionType_STATUS_DynamicThresholdCriterion, +} + // +kubebuilder:validation:Enum={"GreaterOrLessThan","GreaterThan","LessThan"} type DynamicMetricCriteria_Operator string @@ -5530,6 +5650,13 @@ const ( DynamicMetricCriteria_Operator_LessThan = DynamicMetricCriteria_Operator("LessThan") ) +// Mapping from string to DynamicMetricCriteria_Operator +var dynamicMetricCriteria_Operator_Values = map[string]DynamicMetricCriteria_Operator{ + "greaterorlessthan": DynamicMetricCriteria_Operator_GreaterOrLessThan, + "greaterthan": DynamicMetricCriteria_Operator_GreaterThan, + "lessthan": DynamicMetricCriteria_Operator_LessThan, +} + type DynamicMetricCriteria_Operator_STATUS string const ( @@ -5538,6 +5665,13 @@ const ( DynamicMetricCriteria_Operator_STATUS_LessThan = DynamicMetricCriteria_Operator_STATUS("LessThan") ) +// Mapping from string to DynamicMetricCriteria_Operator_STATUS +var dynamicMetricCriteria_Operator_STATUS_Values = map[string]DynamicMetricCriteria_Operator_STATUS{ + "greaterorlessthan": DynamicMetricCriteria_Operator_STATUS_GreaterOrLessThan, + "greaterthan": DynamicMetricCriteria_Operator_STATUS_GreaterThan, + "lessthan": DynamicMetricCriteria_Operator_STATUS_LessThan, +} + // +kubebuilder:validation:Enum={"Average","Count","Maximum","Minimum","Total"} type DynamicMetricCriteria_TimeAggregation string @@ -5549,6 +5683,15 @@ const ( DynamicMetricCriteria_TimeAggregation_Total = DynamicMetricCriteria_TimeAggregation("Total") ) +// Mapping from string to DynamicMetricCriteria_TimeAggregation +var dynamicMetricCriteria_TimeAggregation_Values = map[string]DynamicMetricCriteria_TimeAggregation{ + "average": DynamicMetricCriteria_TimeAggregation_Average, + "count": DynamicMetricCriteria_TimeAggregation_Count, + "maximum": DynamicMetricCriteria_TimeAggregation_Maximum, + "minimum": DynamicMetricCriteria_TimeAggregation_Minimum, + "total": DynamicMetricCriteria_TimeAggregation_Total, +} + type DynamicMetricCriteria_TimeAggregation_STATUS string const ( @@ -5559,6 +5702,15 @@ const ( DynamicMetricCriteria_TimeAggregation_STATUS_Total = DynamicMetricCriteria_TimeAggregation_STATUS("Total") ) +// Mapping from string to DynamicMetricCriteria_TimeAggregation_STATUS +var dynamicMetricCriteria_TimeAggregation_STATUS_Values = map[string]DynamicMetricCriteria_TimeAggregation_STATUS{ + "average": DynamicMetricCriteria_TimeAggregation_STATUS_Average, + "count": DynamicMetricCriteria_TimeAggregation_STATUS_Count, + "maximum": DynamicMetricCriteria_TimeAggregation_STATUS_Maximum, + "minimum": DynamicMetricCriteria_TimeAggregation_STATUS_Minimum, + "total": DynamicMetricCriteria_TimeAggregation_STATUS_Total, +} + // The minimum number of violations required within the selected lookback time window required to raise an alert. type DynamicThresholdFailingPeriods struct { // +kubebuilder:validation:Required diff --git a/v2/api/insights/v1api20180501preview/webtest_types_gen.go b/v2/api/insights/v1api20180501preview/webtest_types_gen.go index 27674828282..87349df9bef 100644 --- a/v2/api/insights/v1api20180501preview/webtest_types_gen.go +++ b/v2/api/insights/v1api20180501preview/webtest_types_gen.go @@ -746,8 +746,9 @@ func (webtest *Webtest_Spec) AssignProperties_From_Webtest_Spec(source *v2018050 // Kind if source.Kind != nil { - kind := WebTestProperties_Kind(*source.Kind) - webtest.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, webTestProperties_Kind_Values) + webtest.Kind = &kindTemp } else { webtest.Kind = nil } @@ -1409,8 +1410,9 @@ func (webtest *Webtest_STATUS) AssignProperties_From_Webtest_STATUS(source *v201 // Kind if source.Kind != nil { - kind := WebTestProperties_Kind_STATUS(*source.Kind) - webtest.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, webTestProperties_Kind_STATUS_Values) + webtest.Kind = &kindTemp } else { webtest.Kind = nil } @@ -1917,6 +1919,14 @@ const ( WebTestProperties_Kind_Standard = WebTestProperties_Kind("standard") ) +// Mapping from string to WebTestProperties_Kind +var webTestProperties_Kind_Values = map[string]WebTestProperties_Kind{ + "basic": WebTestProperties_Kind_Basic, + "multistep": WebTestProperties_Kind_Multistep, + "ping": WebTestProperties_Kind_Ping, + "standard": WebTestProperties_Kind_Standard, +} + type WebTestProperties_Kind_STATUS string const ( @@ -1926,6 +1936,14 @@ const ( WebTestProperties_Kind_STATUS_Standard = WebTestProperties_Kind_STATUS("standard") ) +// Mapping from string to WebTestProperties_Kind_STATUS +var webTestProperties_Kind_STATUS_Values = map[string]WebTestProperties_Kind_STATUS{ + "basic": WebTestProperties_Kind_STATUS_Basic, + "multistep": WebTestProperties_Kind_STATUS_Multistep, + "ping": WebTestProperties_Kind_STATUS_Ping, + "standard": WebTestProperties_Kind_STATUS_Standard, +} + type WebTestProperties_Request struct { // FollowRedirects: Follow redirects for this web test. FollowRedirects *bool `json:"FollowRedirects,omitempty"` diff --git a/v2/api/insights/v1api20200202/component_types_gen.go b/v2/api/insights/v1api20200202/component_types_gen.go index 141e8eb06c3..787c93777f3 100644 --- a/v2/api/insights/v1api20200202/component_types_gen.go +++ b/v2/api/insights/v1api20200202/component_types_gen.go @@ -798,8 +798,9 @@ func (component *Component_Spec) AssignProperties_From_Component_Spec(source *v2 // Application_Type if source.Application_Type != nil { - applicationType := ApplicationInsightsComponentProperties_Application_Type(*source.Application_Type) - component.Application_Type = &applicationType + applicationType := *source.Application_Type + applicationTypeTemp := genruntime.ToEnum(applicationType, applicationInsightsComponentProperties_Application_Type_Values) + component.Application_Type = &applicationTypeTemp } else { component.Application_Type = nil } @@ -828,8 +829,9 @@ func (component *Component_Spec) AssignProperties_From_Component_Spec(source *v2 // Flow_Type if source.Flow_Type != nil { - flowType := ApplicationInsightsComponentProperties_Flow_Type(*source.Flow_Type) - component.Flow_Type = &flowType + flowType := *source.Flow_Type + flowTypeTemp := genruntime.ToEnum(flowType, applicationInsightsComponentProperties_Flow_Type_Values) + component.Flow_Type = &flowTypeTemp } else { component.Flow_Type = nil } @@ -855,8 +857,9 @@ func (component *Component_Spec) AssignProperties_From_Component_Spec(source *v2 // IngestionMode if source.IngestionMode != nil { - ingestionMode := ApplicationInsightsComponentProperties_IngestionMode(*source.IngestionMode) - component.IngestionMode = &ingestionMode + ingestionMode := *source.IngestionMode + ingestionModeTemp := genruntime.ToEnum(ingestionMode, applicationInsightsComponentProperties_IngestionMode_Values) + component.IngestionMode = &ingestionModeTemp } else { component.IngestionMode = nil } @@ -889,24 +892,27 @@ func (component *Component_Spec) AssignProperties_From_Component_Spec(source *v2 // PublicNetworkAccessForIngestion if source.PublicNetworkAccessForIngestion != nil { - publicNetworkAccessForIngestion := PublicNetworkAccessType(*source.PublicNetworkAccessForIngestion) - component.PublicNetworkAccessForIngestion = &publicNetworkAccessForIngestion + publicNetworkAccessForIngestion := *source.PublicNetworkAccessForIngestion + publicNetworkAccessForIngestionTemp := genruntime.ToEnum(publicNetworkAccessForIngestion, publicNetworkAccessType_Values) + component.PublicNetworkAccessForIngestion = &publicNetworkAccessForIngestionTemp } else { component.PublicNetworkAccessForIngestion = nil } // PublicNetworkAccessForQuery if source.PublicNetworkAccessForQuery != nil { - publicNetworkAccessForQuery := PublicNetworkAccessType(*source.PublicNetworkAccessForQuery) - component.PublicNetworkAccessForQuery = &publicNetworkAccessForQuery + publicNetworkAccessForQuery := *source.PublicNetworkAccessForQuery + publicNetworkAccessForQueryTemp := genruntime.ToEnum(publicNetworkAccessForQuery, publicNetworkAccessType_Values) + component.PublicNetworkAccessForQuery = &publicNetworkAccessForQueryTemp } else { component.PublicNetworkAccessForQuery = nil } // Request_Source if source.Request_Source != nil { - requestSource := ApplicationInsightsComponentProperties_Request_Source(*source.Request_Source) - component.Request_Source = &requestSource + requestSource := *source.Request_Source + requestSourceTemp := genruntime.ToEnum(requestSource, applicationInsightsComponentProperties_Request_Source_Values) + component.Request_Source = &requestSourceTemp } else { component.Request_Source = nil } @@ -1687,8 +1693,9 @@ func (component *Component_STATUS) AssignProperties_From_Component_STATUS(source // Application_Type if source.Application_Type != nil { - applicationType := ApplicationInsightsComponentProperties_Application_Type_STATUS(*source.Application_Type) - component.Application_Type = &applicationType + applicationType := *source.Application_Type + applicationTypeTemp := genruntime.ToEnum(applicationType, applicationInsightsComponentProperties_Application_Type_STATUS_Values) + component.Application_Type = &applicationTypeTemp } else { component.Application_Type = nil } @@ -1723,8 +1730,9 @@ func (component *Component_STATUS) AssignProperties_From_Component_STATUS(source // Flow_Type if source.Flow_Type != nil { - flowType := ApplicationInsightsComponentProperties_Flow_Type_STATUS(*source.Flow_Type) - component.Flow_Type = &flowType + flowType := *source.Flow_Type + flowTypeTemp := genruntime.ToEnum(flowType, applicationInsightsComponentProperties_Flow_Type_STATUS_Values) + component.Flow_Type = &flowTypeTemp } else { component.Flow_Type = nil } @@ -1756,8 +1764,9 @@ func (component *Component_STATUS) AssignProperties_From_Component_STATUS(source // IngestionMode if source.IngestionMode != nil { - ingestionMode := ApplicationInsightsComponentProperties_IngestionMode_STATUS(*source.IngestionMode) - component.IngestionMode = &ingestionMode + ingestionMode := *source.IngestionMode + ingestionModeTemp := genruntime.ToEnum(ingestionMode, applicationInsightsComponentProperties_IngestionMode_STATUS_Values) + component.IngestionMode = &ingestionModeTemp } else { component.IngestionMode = nil } @@ -1803,24 +1812,27 @@ func (component *Component_STATUS) AssignProperties_From_Component_STATUS(source // PublicNetworkAccessForIngestion if source.PublicNetworkAccessForIngestion != nil { - publicNetworkAccessForIngestion := PublicNetworkAccessType_STATUS(*source.PublicNetworkAccessForIngestion) - component.PublicNetworkAccessForIngestion = &publicNetworkAccessForIngestion + publicNetworkAccessForIngestion := *source.PublicNetworkAccessForIngestion + publicNetworkAccessForIngestionTemp := genruntime.ToEnum(publicNetworkAccessForIngestion, publicNetworkAccessType_STATUS_Values) + component.PublicNetworkAccessForIngestion = &publicNetworkAccessForIngestionTemp } else { component.PublicNetworkAccessForIngestion = nil } // PublicNetworkAccessForQuery if source.PublicNetworkAccessForQuery != nil { - publicNetworkAccessForQuery := PublicNetworkAccessType_STATUS(*source.PublicNetworkAccessForQuery) - component.PublicNetworkAccessForQuery = &publicNetworkAccessForQuery + publicNetworkAccessForQuery := *source.PublicNetworkAccessForQuery + publicNetworkAccessForQueryTemp := genruntime.ToEnum(publicNetworkAccessForQuery, publicNetworkAccessType_STATUS_Values) + component.PublicNetworkAccessForQuery = &publicNetworkAccessForQueryTemp } else { component.PublicNetworkAccessForQuery = nil } // Request_Source if source.Request_Source != nil { - requestSource := ApplicationInsightsComponentProperties_Request_Source_STATUS(*source.Request_Source) - component.Request_Source = &requestSource + requestSource := *source.Request_Source + requestSourceTemp := genruntime.ToEnum(requestSource, applicationInsightsComponentProperties_Request_Source_STATUS_Values) + component.Request_Source = &requestSourceTemp } else { component.Request_Source = nil } @@ -2045,6 +2057,12 @@ const ( ApplicationInsightsComponentProperties_Application_Type_Web = ApplicationInsightsComponentProperties_Application_Type("web") ) +// Mapping from string to ApplicationInsightsComponentProperties_Application_Type +var applicationInsightsComponentProperties_Application_Type_Values = map[string]ApplicationInsightsComponentProperties_Application_Type{ + "other": ApplicationInsightsComponentProperties_Application_Type_Other, + "web": ApplicationInsightsComponentProperties_Application_Type_Web, +} + type ApplicationInsightsComponentProperties_Application_Type_STATUS string const ( @@ -2052,15 +2070,31 @@ const ( ApplicationInsightsComponentProperties_Application_Type_STATUS_Web = ApplicationInsightsComponentProperties_Application_Type_STATUS("web") ) +// Mapping from string to ApplicationInsightsComponentProperties_Application_Type_STATUS +var applicationInsightsComponentProperties_Application_Type_STATUS_Values = map[string]ApplicationInsightsComponentProperties_Application_Type_STATUS{ + "other": ApplicationInsightsComponentProperties_Application_Type_STATUS_Other, + "web": ApplicationInsightsComponentProperties_Application_Type_STATUS_Web, +} + // +kubebuilder:validation:Enum={"Bluefield"} type ApplicationInsightsComponentProperties_Flow_Type string const ApplicationInsightsComponentProperties_Flow_Type_Bluefield = ApplicationInsightsComponentProperties_Flow_Type("Bluefield") +// Mapping from string to ApplicationInsightsComponentProperties_Flow_Type +var applicationInsightsComponentProperties_Flow_Type_Values = map[string]ApplicationInsightsComponentProperties_Flow_Type{ + "bluefield": ApplicationInsightsComponentProperties_Flow_Type_Bluefield, +} + type ApplicationInsightsComponentProperties_Flow_Type_STATUS string const ApplicationInsightsComponentProperties_Flow_Type_STATUS_Bluefield = ApplicationInsightsComponentProperties_Flow_Type_STATUS("Bluefield") +// Mapping from string to ApplicationInsightsComponentProperties_Flow_Type_STATUS +var applicationInsightsComponentProperties_Flow_Type_STATUS_Values = map[string]ApplicationInsightsComponentProperties_Flow_Type_STATUS{ + "bluefield": ApplicationInsightsComponentProperties_Flow_Type_STATUS_Bluefield, +} + // +kubebuilder:validation:Enum={"ApplicationInsights","ApplicationInsightsWithDiagnosticSettings","LogAnalytics"} type ApplicationInsightsComponentProperties_IngestionMode string @@ -2070,6 +2104,13 @@ const ( ApplicationInsightsComponentProperties_IngestionMode_LogAnalytics = ApplicationInsightsComponentProperties_IngestionMode("LogAnalytics") ) +// Mapping from string to ApplicationInsightsComponentProperties_IngestionMode +var applicationInsightsComponentProperties_IngestionMode_Values = map[string]ApplicationInsightsComponentProperties_IngestionMode{ + "applicationinsights": ApplicationInsightsComponentProperties_IngestionMode_ApplicationInsights, + "applicationinsightswithdiagnosticsettings": ApplicationInsightsComponentProperties_IngestionMode_ApplicationInsightsWithDiagnosticSettings, + "loganalytics": ApplicationInsightsComponentProperties_IngestionMode_LogAnalytics, +} + type ApplicationInsightsComponentProperties_IngestionMode_STATUS string const ( @@ -2078,15 +2119,32 @@ const ( ApplicationInsightsComponentProperties_IngestionMode_STATUS_LogAnalytics = ApplicationInsightsComponentProperties_IngestionMode_STATUS("LogAnalytics") ) +// Mapping from string to ApplicationInsightsComponentProperties_IngestionMode_STATUS +var applicationInsightsComponentProperties_IngestionMode_STATUS_Values = map[string]ApplicationInsightsComponentProperties_IngestionMode_STATUS{ + "applicationinsights": ApplicationInsightsComponentProperties_IngestionMode_STATUS_ApplicationInsights, + "applicationinsightswithdiagnosticsettings": ApplicationInsightsComponentProperties_IngestionMode_STATUS_ApplicationInsightsWithDiagnosticSettings, + "loganalytics": ApplicationInsightsComponentProperties_IngestionMode_STATUS_LogAnalytics, +} + // +kubebuilder:validation:Enum={"rest"} type ApplicationInsightsComponentProperties_Request_Source string const ApplicationInsightsComponentProperties_Request_Source_Rest = ApplicationInsightsComponentProperties_Request_Source("rest") +// Mapping from string to ApplicationInsightsComponentProperties_Request_Source +var applicationInsightsComponentProperties_Request_Source_Values = map[string]ApplicationInsightsComponentProperties_Request_Source{ + "rest": ApplicationInsightsComponentProperties_Request_Source_Rest, +} + type ApplicationInsightsComponentProperties_Request_Source_STATUS string const ApplicationInsightsComponentProperties_Request_Source_STATUS_Rest = ApplicationInsightsComponentProperties_Request_Source_STATUS("rest") +// Mapping from string to ApplicationInsightsComponentProperties_Request_Source_STATUS +var applicationInsightsComponentProperties_Request_Source_STATUS_Values = map[string]ApplicationInsightsComponentProperties_Request_Source_STATUS{ + "rest": ApplicationInsightsComponentProperties_Request_Source_STATUS_Rest, +} + // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type ComponentOperatorSpec struct { // ConfigMaps: configures where to place operator written ConfigMaps. @@ -2223,6 +2281,12 @@ const ( PublicNetworkAccessType_Enabled = PublicNetworkAccessType("Enabled") ) +// Mapping from string to PublicNetworkAccessType +var publicNetworkAccessType_Values = map[string]PublicNetworkAccessType{ + "disabled": PublicNetworkAccessType_Disabled, + "enabled": PublicNetworkAccessType_Enabled, +} + // The network access type for operating on the Application Insights Component. By default it is Enabled type PublicNetworkAccessType_STATUS string @@ -2231,6 +2295,12 @@ const ( PublicNetworkAccessType_STATUS_Enabled = PublicNetworkAccessType_STATUS("Enabled") ) +// Mapping from string to PublicNetworkAccessType_STATUS +var publicNetworkAccessType_STATUS_Values = map[string]PublicNetworkAccessType_STATUS{ + "disabled": PublicNetworkAccessType_STATUS_Disabled, + "enabled": PublicNetworkAccessType_STATUS_Enabled, +} + type ComponentOperatorConfigMaps struct { // ConnectionString: indicates where the ConnectionString config map should be placed. If omitted, no config map will be // created. diff --git a/v2/api/insights/v1api20220615/scheduled_query_rule_spec_arm_types_gen.go b/v2/api/insights/v1api20220615/scheduled_query_rule_spec_arm_types_gen.go index 7706ca711e2..54b5a6a39d2 100644 --- a/v2/api/insights/v1api20220615/scheduled_query_rule_spec_arm_types_gen.go +++ b/v2/api/insights/v1api20220615/scheduled_query_rule_spec_arm_types_gen.go @@ -45,6 +45,12 @@ const ( ScheduledQueryRule_Kind_Spec_LogToMetric = ScheduledQueryRule_Kind_Spec("LogToMetric") ) +// Mapping from string to ScheduledQueryRule_Kind_Spec +var scheduledQueryRule_Kind_Spec_Values = map[string]ScheduledQueryRule_Kind_Spec{ + "logalert": ScheduledQueryRule_Kind_Spec_LogAlert, + "logtometric": ScheduledQueryRule_Kind_Spec_LogToMetric, +} + // scheduled query rule Definition type ScheduledQueryRuleProperties_ARM struct { // Actions: Actions to invoke when the alert fires. diff --git a/v2/api/insights/v1api20220615/scheduled_query_rule_status_arm_types_gen.go b/v2/api/insights/v1api20220615/scheduled_query_rule_status_arm_types_gen.go index caf533f1473..9768b54bd9e 100644 --- a/v2/api/insights/v1api20220615/scheduled_query_rule_status_arm_types_gen.go +++ b/v2/api/insights/v1api20220615/scheduled_query_rule_status_arm_types_gen.go @@ -43,6 +43,12 @@ const ( ScheduledQueryRule_Kind_STATUS_LogToMetric = ScheduledQueryRule_Kind_STATUS("LogToMetric") ) +// Mapping from string to ScheduledQueryRule_Kind_STATUS +var scheduledQueryRule_Kind_STATUS_Values = map[string]ScheduledQueryRule_Kind_STATUS{ + "logalert": ScheduledQueryRule_Kind_STATUS_LogAlert, + "logtometric": ScheduledQueryRule_Kind_STATUS_LogToMetric, +} + // scheduled query rule Definition type ScheduledQueryRuleProperties_STATUS_ARM struct { // Actions: Actions to invoke when the alert fires. @@ -157,6 +163,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -166,6 +180,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // A condition of the scheduled query rule. type Condition_STATUS_ARM struct { // Dimensions: List of Dimensions conditions diff --git a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go index 631beecef6c..22ae4e2b651 100644 --- a/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go +++ b/v2/api/insights/v1api20220615/scheduled_query_rule_types_gen.go @@ -827,8 +827,9 @@ func (rule *ScheduledQueryRule_Spec) AssignProperties_From_ScheduledQueryRule_Sp // Kind if source.Kind != nil { - kind := ScheduledQueryRule_Kind_Spec(*source.Kind) - rule.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, scheduledQueryRule_Kind_Spec_Values) + rule.Kind = &kindTemp } else { rule.Kind = nil } @@ -1632,8 +1633,9 @@ func (rule *ScheduledQueryRule_STATUS) AssignProperties_From_ScheduledQueryRule_ // Kind if source.Kind != nil { - kind := ScheduledQueryRule_Kind_STATUS(*source.Kind) - rule.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, scheduledQueryRule_Kind_STATUS_Values) + rule.Kind = &kindTemp } else { rule.Kind = nil } @@ -2400,8 +2402,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -2414,8 +2417,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -2693,8 +2697,9 @@ func (condition *Condition) AssignProperties_From_Condition(source *v20220615s.C // Operator if source.Operator != nil { - operator := Condition_Operator(*source.Operator) - condition.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, condition_Operator_Values) + condition.Operator = &operatorTemp } else { condition.Operator = nil } @@ -2720,8 +2725,9 @@ func (condition *Condition) AssignProperties_From_Condition(source *v20220615s.C // TimeAggregation if source.TimeAggregation != nil { - timeAggregation := Condition_TimeAggregation(*source.TimeAggregation) - condition.TimeAggregation = &timeAggregation + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, condition_TimeAggregation_Values) + condition.TimeAggregation = &timeAggregationTemp } else { condition.TimeAggregation = nil } @@ -3042,8 +3048,9 @@ func (condition *Condition_STATUS) AssignProperties_From_Condition_STATUS(source // Operator if source.Operator != nil { - operator := Condition_Operator_STATUS(*source.Operator) - condition.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, condition_Operator_STATUS_Values) + condition.Operator = &operatorTemp } else { condition.Operator = nil } @@ -3064,8 +3071,9 @@ func (condition *Condition_STATUS) AssignProperties_From_Condition_STATUS(source // TimeAggregation if source.TimeAggregation != nil { - timeAggregation := Condition_TimeAggregation_STATUS(*source.TimeAggregation) - condition.TimeAggregation = &timeAggregation + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, condition_TimeAggregation_STATUS_Values) + condition.TimeAggregation = &timeAggregationTemp } else { condition.TimeAggregation = nil } @@ -3351,6 +3359,15 @@ const ( Condition_Operator_LessThanOrEqual = Condition_Operator("LessThanOrEqual") ) +// Mapping from string to Condition_Operator +var condition_Operator_Values = map[string]Condition_Operator{ + "equals": Condition_Operator_Equals, + "greaterthan": Condition_Operator_GreaterThan, + "greaterthanorequal": Condition_Operator_GreaterThanOrEqual, + "lessthan": Condition_Operator_LessThan, + "lessthanorequal": Condition_Operator_LessThanOrEqual, +} + type Condition_Operator_STATUS string const ( @@ -3361,6 +3378,15 @@ const ( Condition_Operator_STATUS_LessThanOrEqual = Condition_Operator_STATUS("LessThanOrEqual") ) +// Mapping from string to Condition_Operator_STATUS +var condition_Operator_STATUS_Values = map[string]Condition_Operator_STATUS{ + "equals": Condition_Operator_STATUS_Equals, + "greaterthan": Condition_Operator_STATUS_GreaterThan, + "greaterthanorequal": Condition_Operator_STATUS_GreaterThanOrEqual, + "lessthan": Condition_Operator_STATUS_LessThan, + "lessthanorequal": Condition_Operator_STATUS_LessThanOrEqual, +} + // +kubebuilder:validation:Enum={"Average","Count","Maximum","Minimum","Total"} type Condition_TimeAggregation string @@ -3372,6 +3398,15 @@ const ( Condition_TimeAggregation_Total = Condition_TimeAggregation("Total") ) +// Mapping from string to Condition_TimeAggregation +var condition_TimeAggregation_Values = map[string]Condition_TimeAggregation{ + "average": Condition_TimeAggregation_Average, + "count": Condition_TimeAggregation_Count, + "maximum": Condition_TimeAggregation_Maximum, + "minimum": Condition_TimeAggregation_Minimum, + "total": Condition_TimeAggregation_Total, +} + type Condition_TimeAggregation_STATUS string const ( @@ -3382,6 +3417,15 @@ const ( Condition_TimeAggregation_STATUS_Total = Condition_TimeAggregation_STATUS("Total") ) +// Mapping from string to Condition_TimeAggregation_STATUS +var condition_TimeAggregation_STATUS_Values = map[string]Condition_TimeAggregation_STATUS{ + "average": Condition_TimeAggregation_STATUS_Average, + "count": Condition_TimeAggregation_STATUS_Count, + "maximum": Condition_TimeAggregation_STATUS_Maximum, + "minimum": Condition_TimeAggregation_STATUS_Minimum, + "total": Condition_TimeAggregation_STATUS_Total, +} + // Dimension splitting and filtering definition type Dimension struct { // +kubebuilder:validation:Required @@ -3466,8 +3510,9 @@ func (dimension *Dimension) AssignProperties_From_Dimension(source *v20220615s.D // Operator if source.Operator != nil { - operator := Dimension_Operator(*source.Operator) - dimension.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, dimension_Operator_Values) + dimension.Operator = &operatorTemp } else { dimension.Operator = nil } @@ -3585,8 +3630,9 @@ func (dimension *Dimension_STATUS) AssignProperties_From_Dimension_STATUS(source // Operator if source.Operator != nil { - operator := Dimension_Operator_STATUS(*source.Operator) - dimension.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, dimension_Operator_STATUS_Values) + dimension.Operator = &operatorTemp } else { dimension.Operator = nil } @@ -3636,6 +3682,12 @@ const ( Dimension_Operator_Include = Dimension_Operator("Include") ) +// Mapping from string to Dimension_Operator +var dimension_Operator_Values = map[string]Dimension_Operator{ + "exclude": Dimension_Operator_Exclude, + "include": Dimension_Operator_Include, +} + type Dimension_Operator_STATUS string const ( @@ -3643,6 +3695,12 @@ const ( Dimension_Operator_STATUS_Include = Dimension_Operator_STATUS("Include") ) +// Mapping from string to Dimension_Operator_STATUS +var dimension_Operator_STATUS_Values = map[string]Dimension_Operator_STATUS{ + "exclude": Dimension_Operator_STATUS_Exclude, + "include": Dimension_Operator_STATUS_Include, +} + func init() { SchemeBuilder.Register(&ScheduledQueryRule{}, &ScheduledQueryRuleList{}) } diff --git a/v2/api/insights/v1api20221001/autoscale_setting_types_gen.go b/v2/api/insights/v1api20221001/autoscale_setting_types_gen.go index 8e3abb94103..e72e014b24e 100644 --- a/v2/api/insights/v1api20221001/autoscale_setting_types_gen.go +++ b/v2/api/insights/v1api20221001/autoscale_setting_types_gen.go @@ -1456,8 +1456,9 @@ func (notification *AutoscaleNotification) AssignProperties_From_AutoscaleNotifi // Operation if source.Operation != nil { - operation := AutoscaleNotification_Operation(*source.Operation) - notification.Operation = &operation + operation := *source.Operation + operationTemp := genruntime.ToEnum(operation, autoscaleNotification_Operation_Values) + notification.Operation = &operationTemp } else { notification.Operation = nil } @@ -1657,8 +1658,9 @@ func (notification *AutoscaleNotification_STATUS) AssignProperties_From_Autoscal // Operation if source.Operation != nil { - operation := AutoscaleNotification_Operation_STATUS(*source.Operation) - notification.Operation = &operation + operation := *source.Operation + operationTemp := genruntime.ToEnum(operation, autoscaleNotification_Operation_STATUS_Values) + notification.Operation = &operationTemp } else { notification.Operation = nil } @@ -2379,8 +2381,9 @@ func (policy *PredictiveAutoscalePolicy) AssignProperties_From_PredictiveAutosca // ScaleMode if source.ScaleMode != nil { - scaleMode := PredictiveAutoscalePolicy_ScaleMode(*source.ScaleMode) - policy.ScaleMode = &scaleMode + scaleMode := *source.ScaleMode + scaleModeTemp := genruntime.ToEnum(scaleMode, predictiveAutoscalePolicy_ScaleMode_Values) + policy.ScaleMode = &scaleModeTemp } else { policy.ScaleMode = nil } @@ -2482,8 +2485,9 @@ func (policy *PredictiveAutoscalePolicy_STATUS) AssignProperties_From_Predictive // ScaleMode if source.ScaleMode != nil { - scaleMode := PredictiveAutoscalePolicy_ScaleMode_STATUS(*source.ScaleMode) - policy.ScaleMode = &scaleMode + scaleMode := *source.ScaleMode + scaleModeTemp := genruntime.ToEnum(scaleMode, predictiveAutoscalePolicy_ScaleMode_STATUS_Values) + policy.ScaleMode = &scaleModeTemp } else { policy.ScaleMode = nil } @@ -2605,8 +2609,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -2619,8 +2624,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -2678,10 +2684,20 @@ type AutoscaleNotification_Operation string const AutoscaleNotification_Operation_Scale = AutoscaleNotification_Operation("Scale") +// Mapping from string to AutoscaleNotification_Operation +var autoscaleNotification_Operation_Values = map[string]AutoscaleNotification_Operation{ + "scale": AutoscaleNotification_Operation_Scale, +} + type AutoscaleNotification_Operation_STATUS string const AutoscaleNotification_Operation_STATUS_Scale = AutoscaleNotification_Operation_STATUS("Scale") +// Mapping from string to AutoscaleNotification_Operation_STATUS +var autoscaleNotification_Operation_STATUS_Values = map[string]AutoscaleNotification_Operation_STATUS{ + "scale": AutoscaleNotification_Operation_STATUS_Scale, +} + // Email notification of an autoscale event. type EmailNotification struct { // CustomEmails: the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored. @@ -2959,6 +2975,13 @@ const ( PredictiveAutoscalePolicy_ScaleMode_ForecastOnly = PredictiveAutoscalePolicy_ScaleMode("ForecastOnly") ) +// Mapping from string to PredictiveAutoscalePolicy_ScaleMode +var predictiveAutoscalePolicy_ScaleMode_Values = map[string]PredictiveAutoscalePolicy_ScaleMode{ + "disabled": PredictiveAutoscalePolicy_ScaleMode_Disabled, + "enabled": PredictiveAutoscalePolicy_ScaleMode_Enabled, + "forecastonly": PredictiveAutoscalePolicy_ScaleMode_ForecastOnly, +} + type PredictiveAutoscalePolicy_ScaleMode_STATUS string const ( @@ -2967,6 +2990,13 @@ const ( PredictiveAutoscalePolicy_ScaleMode_STATUS_ForecastOnly = PredictiveAutoscalePolicy_ScaleMode_STATUS("ForecastOnly") ) +// Mapping from string to PredictiveAutoscalePolicy_ScaleMode_STATUS +var predictiveAutoscalePolicy_ScaleMode_STATUS_Values = map[string]PredictiveAutoscalePolicy_ScaleMode_STATUS{ + "disabled": PredictiveAutoscalePolicy_ScaleMode_STATUS_Disabled, + "enabled": PredictiveAutoscalePolicy_ScaleMode_STATUS_Enabled, + "forecastonly": PredictiveAutoscalePolicy_ScaleMode_STATUS_ForecastOnly, +} + // The repeating times at which this profile begins. This element is not used if the FixedDate element is used. type Recurrence struct { // +kubebuilder:validation:Required @@ -3045,8 +3075,9 @@ func (recurrence *Recurrence) AssignProperties_From_Recurrence(source *v20221001 // Frequency if source.Frequency != nil { - frequency := Recurrence_Frequency(*source.Frequency) - recurrence.Frequency = &frequency + frequency := *source.Frequency + frequencyTemp := genruntime.ToEnum(frequency, recurrence_Frequency_Values) + recurrence.Frequency = &frequencyTemp } else { recurrence.Frequency = nil } @@ -3183,8 +3214,9 @@ func (recurrence *Recurrence_STATUS) AssignProperties_From_Recurrence_STATUS(sou // Frequency if source.Frequency != nil { - frequency := Recurrence_Frequency_STATUS(*source.Frequency) - recurrence.Frequency = &frequency + frequency := *source.Frequency + frequencyTemp := genruntime.ToEnum(frequency, recurrence_Frequency_STATUS_Values) + recurrence.Frequency = &frequencyTemp } else { recurrence.Frequency = nil } @@ -4510,16 +4542,18 @@ func (trigger *MetricTrigger) AssignProperties_From_MetricTrigger(source *v20221 // Operator if source.Operator != nil { - operator := MetricTrigger_Operator(*source.Operator) - trigger.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, metricTrigger_Operator_Values) + trigger.Operator = &operatorTemp } else { trigger.Operator = nil } // Statistic if source.Statistic != nil { - statistic := MetricTrigger_Statistic(*source.Statistic) - trigger.Statistic = &statistic + statistic := *source.Statistic + statisticTemp := genruntime.ToEnum(statistic, metricTrigger_Statistic_Values) + trigger.Statistic = &statisticTemp } else { trigger.Statistic = nil } @@ -4534,8 +4568,9 @@ func (trigger *MetricTrigger) AssignProperties_From_MetricTrigger(source *v20221 // TimeAggregation if source.TimeAggregation != nil { - timeAggregation := MetricTrigger_TimeAggregation(*source.TimeAggregation) - trigger.TimeAggregation = &timeAggregation + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, metricTrigger_TimeAggregation_Values) + trigger.TimeAggregation = &timeAggregationTemp } else { trigger.TimeAggregation = nil } @@ -4915,16 +4950,18 @@ func (trigger *MetricTrigger_STATUS) AssignProperties_From_MetricTrigger_STATUS( // Operator if source.Operator != nil { - operator := MetricTrigger_Operator_STATUS(*source.Operator) - trigger.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, metricTrigger_Operator_STATUS_Values) + trigger.Operator = &operatorTemp } else { trigger.Operator = nil } // Statistic if source.Statistic != nil { - statistic := MetricTrigger_Statistic_STATUS(*source.Statistic) - trigger.Statistic = &statistic + statistic := *source.Statistic + statisticTemp := genruntime.ToEnum(statistic, metricTrigger_Statistic_STATUS_Values) + trigger.Statistic = &statisticTemp } else { trigger.Statistic = nil } @@ -4939,8 +4976,9 @@ func (trigger *MetricTrigger_STATUS) AssignProperties_From_MetricTrigger_STATUS( // TimeAggregation if source.TimeAggregation != nil { - timeAggregation := MetricTrigger_TimeAggregation_STATUS(*source.TimeAggregation) - trigger.TimeAggregation = &timeAggregation + timeAggregation := *source.TimeAggregation + timeAggregationTemp := genruntime.ToEnum(timeAggregation, metricTrigger_TimeAggregation_STATUS_Values) + trigger.TimeAggregation = &timeAggregationTemp } else { trigger.TimeAggregation = nil } @@ -5061,6 +5099,18 @@ const ( Recurrence_Frequency_Year = Recurrence_Frequency("Year") ) +// Mapping from string to Recurrence_Frequency +var recurrence_Frequency_Values = map[string]Recurrence_Frequency{ + "day": Recurrence_Frequency_Day, + "hour": Recurrence_Frequency_Hour, + "minute": Recurrence_Frequency_Minute, + "month": Recurrence_Frequency_Month, + "none": Recurrence_Frequency_None, + "second": Recurrence_Frequency_Second, + "week": Recurrence_Frequency_Week, + "year": Recurrence_Frequency_Year, +} + // +kubebuilder:validation:Enum={"Day","Hour","Minute","Month","None","Second","Week","Year"} type Recurrence_Frequency_STATUS string @@ -5075,6 +5125,18 @@ const ( Recurrence_Frequency_STATUS_Year = Recurrence_Frequency_STATUS("Year") ) +// Mapping from string to Recurrence_Frequency_STATUS +var recurrence_Frequency_STATUS_Values = map[string]Recurrence_Frequency_STATUS{ + "day": Recurrence_Frequency_STATUS_Day, + "hour": Recurrence_Frequency_STATUS_Hour, + "minute": Recurrence_Frequency_STATUS_Minute, + "month": Recurrence_Frequency_STATUS_Month, + "none": Recurrence_Frequency_STATUS_None, + "second": Recurrence_Frequency_STATUS_Second, + "week": Recurrence_Frequency_STATUS_Week, + "year": Recurrence_Frequency_STATUS_Year, +} + // The scheduling constraints for when the profile begins. type RecurrentSchedule struct { // +kubebuilder:validation:Required @@ -5583,16 +5645,18 @@ func (action *ScaleAction) AssignProperties_From_ScaleAction(source *v20221001s. // Direction if source.Direction != nil { - direction := ScaleAction_Direction(*source.Direction) - action.Direction = &direction + direction := *source.Direction + directionTemp := genruntime.ToEnum(direction, scaleAction_Direction_Values) + action.Direction = &directionTemp } else { action.Direction = nil } // Type if source.Type != nil { - typeVar := ScaleAction_Type(*source.Type) - action.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, scaleAction_Type_Values) + action.Type = &typeTemp } else { action.Type = nil } @@ -5741,16 +5805,18 @@ func (action *ScaleAction_STATUS) AssignProperties_From_ScaleAction_STATUS(sourc // Direction if source.Direction != nil { - direction := ScaleAction_Direction_STATUS(*source.Direction) - action.Direction = &direction + direction := *source.Direction + directionTemp := genruntime.ToEnum(direction, scaleAction_Direction_STATUS_Values) + action.Direction = &directionTemp } else { action.Direction = nil } // Type if source.Type != nil { - typeVar := ScaleAction_Type_STATUS(*source.Type) - action.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, scaleAction_Type_STATUS_Values) + action.Type = &typeTemp } else { action.Type = nil } @@ -5812,6 +5878,16 @@ const ( MetricTrigger_Operator_NotEquals = MetricTrigger_Operator("NotEquals") ) +// Mapping from string to MetricTrigger_Operator +var metricTrigger_Operator_Values = map[string]MetricTrigger_Operator{ + "equals": MetricTrigger_Operator_Equals, + "greaterthan": MetricTrigger_Operator_GreaterThan, + "greaterthanorequal": MetricTrigger_Operator_GreaterThanOrEqual, + "lessthan": MetricTrigger_Operator_LessThan, + "lessthanorequal": MetricTrigger_Operator_LessThanOrEqual, + "notequals": MetricTrigger_Operator_NotEquals, +} + // +kubebuilder:validation:Enum={"Equals","GreaterThan","GreaterThanOrEqual","LessThan","LessThanOrEqual","NotEquals"} type MetricTrigger_Operator_STATUS string @@ -5824,6 +5900,16 @@ const ( MetricTrigger_Operator_STATUS_NotEquals = MetricTrigger_Operator_STATUS("NotEquals") ) +// Mapping from string to MetricTrigger_Operator_STATUS +var metricTrigger_Operator_STATUS_Values = map[string]MetricTrigger_Operator_STATUS{ + "equals": MetricTrigger_Operator_STATUS_Equals, + "greaterthan": MetricTrigger_Operator_STATUS_GreaterThan, + "greaterthanorequal": MetricTrigger_Operator_STATUS_GreaterThanOrEqual, + "lessthan": MetricTrigger_Operator_STATUS_LessThan, + "lessthanorequal": MetricTrigger_Operator_STATUS_LessThanOrEqual, + "notequals": MetricTrigger_Operator_STATUS_NotEquals, +} + // +kubebuilder:validation:Enum={"Average","Count","Max","Min","Sum"} type MetricTrigger_Statistic string @@ -5835,6 +5921,15 @@ const ( MetricTrigger_Statistic_Sum = MetricTrigger_Statistic("Sum") ) +// Mapping from string to MetricTrigger_Statistic +var metricTrigger_Statistic_Values = map[string]MetricTrigger_Statistic{ + "average": MetricTrigger_Statistic_Average, + "count": MetricTrigger_Statistic_Count, + "max": MetricTrigger_Statistic_Max, + "min": MetricTrigger_Statistic_Min, + "sum": MetricTrigger_Statistic_Sum, +} + // +kubebuilder:validation:Enum={"Average","Count","Max","Min","Sum"} type MetricTrigger_Statistic_STATUS string @@ -5846,6 +5941,15 @@ const ( MetricTrigger_Statistic_STATUS_Sum = MetricTrigger_Statistic_STATUS("Sum") ) +// Mapping from string to MetricTrigger_Statistic_STATUS +var metricTrigger_Statistic_STATUS_Values = map[string]MetricTrigger_Statistic_STATUS{ + "average": MetricTrigger_Statistic_STATUS_Average, + "count": MetricTrigger_Statistic_STATUS_Count, + "max": MetricTrigger_Statistic_STATUS_Max, + "min": MetricTrigger_Statistic_STATUS_Min, + "sum": MetricTrigger_Statistic_STATUS_Sum, +} + // +kubebuilder:validation:Enum={"Average","Count","Last","Maximum","Minimum","Total"} type MetricTrigger_TimeAggregation string @@ -5858,6 +5962,16 @@ const ( MetricTrigger_TimeAggregation_Total = MetricTrigger_TimeAggregation("Total") ) +// Mapping from string to MetricTrigger_TimeAggregation +var metricTrigger_TimeAggregation_Values = map[string]MetricTrigger_TimeAggregation{ + "average": MetricTrigger_TimeAggregation_Average, + "count": MetricTrigger_TimeAggregation_Count, + "last": MetricTrigger_TimeAggregation_Last, + "maximum": MetricTrigger_TimeAggregation_Maximum, + "minimum": MetricTrigger_TimeAggregation_Minimum, + "total": MetricTrigger_TimeAggregation_Total, +} + // +kubebuilder:validation:Enum={"Average","Count","Last","Maximum","Minimum","Total"} type MetricTrigger_TimeAggregation_STATUS string @@ -5870,6 +5984,16 @@ const ( MetricTrigger_TimeAggregation_STATUS_Total = MetricTrigger_TimeAggregation_STATUS("Total") ) +// Mapping from string to MetricTrigger_TimeAggregation_STATUS +var metricTrigger_TimeAggregation_STATUS_Values = map[string]MetricTrigger_TimeAggregation_STATUS{ + "average": MetricTrigger_TimeAggregation_STATUS_Average, + "count": MetricTrigger_TimeAggregation_STATUS_Count, + "last": MetricTrigger_TimeAggregation_STATUS_Last, + "maximum": MetricTrigger_TimeAggregation_STATUS_Maximum, + "minimum": MetricTrigger_TimeAggregation_STATUS_Minimum, + "total": MetricTrigger_TimeAggregation_STATUS_Total, +} + // +kubebuilder:validation:Enum={"Decrease","Increase","None"} type ScaleAction_Direction string @@ -5879,6 +6003,13 @@ const ( ScaleAction_Direction_None = ScaleAction_Direction("None") ) +// Mapping from string to ScaleAction_Direction +var scaleAction_Direction_Values = map[string]ScaleAction_Direction{ + "decrease": ScaleAction_Direction_Decrease, + "increase": ScaleAction_Direction_Increase, + "none": ScaleAction_Direction_None, +} + // +kubebuilder:validation:Enum={"Decrease","Increase","None"} type ScaleAction_Direction_STATUS string @@ -5888,6 +6019,13 @@ const ( ScaleAction_Direction_STATUS_None = ScaleAction_Direction_STATUS("None") ) +// Mapping from string to ScaleAction_Direction_STATUS +var scaleAction_Direction_STATUS_Values = map[string]ScaleAction_Direction_STATUS{ + "decrease": ScaleAction_Direction_STATUS_Decrease, + "increase": ScaleAction_Direction_STATUS_Increase, + "none": ScaleAction_Direction_STATUS_None, +} + // +kubebuilder:validation:Enum={"ChangeCount","ExactCount","PercentChangeCount","ServiceAllowedNextValue"} type ScaleAction_Type string @@ -5898,6 +6036,14 @@ const ( ScaleAction_Type_ServiceAllowedNextValue = ScaleAction_Type("ServiceAllowedNextValue") ) +// Mapping from string to ScaleAction_Type +var scaleAction_Type_Values = map[string]ScaleAction_Type{ + "changecount": ScaleAction_Type_ChangeCount, + "exactcount": ScaleAction_Type_ExactCount, + "percentchangecount": ScaleAction_Type_PercentChangeCount, + "serviceallowednextvalue": ScaleAction_Type_ServiceAllowedNextValue, +} + // +kubebuilder:validation:Enum={"ChangeCount","ExactCount","PercentChangeCount","ServiceAllowedNextValue"} type ScaleAction_Type_STATUS string @@ -5908,6 +6054,14 @@ const ( ScaleAction_Type_STATUS_ServiceAllowedNextValue = ScaleAction_Type_STATUS("ServiceAllowedNextValue") ) +// Mapping from string to ScaleAction_Type_STATUS +var scaleAction_Type_STATUS_Values = map[string]ScaleAction_Type_STATUS{ + "changecount": ScaleAction_Type_STATUS_ChangeCount, + "exactcount": ScaleAction_Type_STATUS_ExactCount, + "percentchangecount": ScaleAction_Type_STATUS_PercentChangeCount, + "serviceallowednextvalue": ScaleAction_Type_STATUS_ServiceAllowedNextValue, +} + // Specifies an auto scale rule metric dimension. type ScaleRuleMetricDimension struct { // +kubebuilder:validation:Required @@ -5993,8 +6147,9 @@ func (dimension *ScaleRuleMetricDimension) AssignProperties_From_ScaleRuleMetric // Operator if source.Operator != nil { - operator := ScaleRuleMetricDimension_Operator(*source.Operator) - dimension.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, scaleRuleMetricDimension_Operator_Values) + dimension.Operator = &operatorTemp } else { dimension.Operator = nil } @@ -6116,8 +6271,9 @@ func (dimension *ScaleRuleMetricDimension_STATUS) AssignProperties_From_ScaleRul // Operator if source.Operator != nil { - operator := ScaleRuleMetricDimension_Operator_STATUS(*source.Operator) - dimension.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, scaleRuleMetricDimension_Operator_STATUS_Values) + dimension.Operator = &operatorTemp } else { dimension.Operator = nil } @@ -6167,6 +6323,12 @@ const ( ScaleRuleMetricDimension_Operator_NotEquals = ScaleRuleMetricDimension_Operator("NotEquals") ) +// Mapping from string to ScaleRuleMetricDimension_Operator +var scaleRuleMetricDimension_Operator_Values = map[string]ScaleRuleMetricDimension_Operator{ + "equals": ScaleRuleMetricDimension_Operator_Equals, + "notequals": ScaleRuleMetricDimension_Operator_NotEquals, +} + // +kubebuilder:validation:Enum={"Equals","NotEquals"} type ScaleRuleMetricDimension_Operator_STATUS string @@ -6175,6 +6337,12 @@ const ( ScaleRuleMetricDimension_Operator_STATUS_NotEquals = ScaleRuleMetricDimension_Operator_STATUS("NotEquals") ) +// Mapping from string to ScaleRuleMetricDimension_Operator_STATUS +var scaleRuleMetricDimension_Operator_STATUS_Values = map[string]ScaleRuleMetricDimension_Operator_STATUS{ + "equals": ScaleRuleMetricDimension_Operator_STATUS_Equals, + "notequals": ScaleRuleMetricDimension_Operator_STATUS_NotEquals, +} + func init() { SchemeBuilder.Register(&AutoscaleSetting{}, &AutoscaleSettingList{}) } diff --git a/v2/api/insights/v1api20221001/autoscalesetting_status_arm_types_gen.go b/v2/api/insights/v1api20221001/autoscalesetting_status_arm_types_gen.go index f4f9e096b3e..64bbd33e8f0 100644 --- a/v2/api/insights/v1api20221001/autoscalesetting_status_arm_types_gen.go +++ b/v2/api/insights/v1api20221001/autoscalesetting_status_arm_types_gen.go @@ -124,6 +124,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -133,6 +141,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Email notification of an autoscale event. type EmailNotification_STATUS_ARM struct { // CustomEmails: the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored. diff --git a/v2/api/insights/v1api20230101/action_group_types_gen.go b/v2/api/insights/v1api20230101/action_group_types_gen.go index 48ba218d900..2b6d719e0bd 100644 --- a/v2/api/insights/v1api20230101/action_group_types_gen.go +++ b/v2/api/insights/v1api20230101/action_group_types_gen.go @@ -3735,8 +3735,9 @@ func (receiver *EmailReceiver_STATUS) AssignProperties_From_EmailReceiver_STATUS // Status if source.Status != nil { - status := ReceiverStatus_STATUS(*source.Status) - receiver.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, receiverStatus_STATUS_Values) + receiver.Status = &statusTemp } else { receiver.Status = nil } @@ -4975,8 +4976,9 @@ func (receiver *SmsReceiver_STATUS) AssignProperties_From_SmsReceiver_STATUS(sou // Status if source.Status != nil { - status := ReceiverStatus_STATUS(*source.Status) - receiver.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, receiverStatus_STATUS_Values) + receiver.Status = &statusTemp } else { receiver.Status = nil } @@ -5680,6 +5682,13 @@ const ( ReceiverStatus_STATUS_NotSpecified = ReceiverStatus_STATUS("NotSpecified") ) +// Mapping from string to ReceiverStatus_STATUS +var receiverStatus_STATUS_Values = map[string]ReceiverStatus_STATUS{ + "disabled": ReceiverStatus_STATUS_Disabled, + "enabled": ReceiverStatus_STATUS_Enabled, + "notspecified": ReceiverStatus_STATUS_NotSpecified, +} + func init() { SchemeBuilder.Register(&ActionGroup{}, &ActionGroupList{}) } diff --git a/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen.go b/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen.go index 796e457cbbb..cbb732745e7 100644 --- a/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen.go +++ b/v2/api/keyvault/v1api20210401preview/vault_spec_arm_types_gen.go @@ -146,6 +146,14 @@ const ( VaultProperties_CreateMode_Recover = VaultProperties_CreateMode("recover") ) +// Mapping from string to VaultProperties_CreateMode +var vaultProperties_CreateMode_Values = map[string]VaultProperties_CreateMode{ + "createorrecover": VaultProperties_CreateMode_CreateOrRecover, + "default": VaultProperties_CreateMode_Default, + "purgethencreate": VaultProperties_CreateMode_PurgeThenCreate, + "recover": VaultProperties_CreateMode_Recover, +} + // +kubebuilder:validation:Enum={"RegisteringDns","Succeeded"} type VaultProperties_ProvisioningState string @@ -154,6 +162,12 @@ const ( VaultProperties_ProvisioningState_Succeeded = VaultProperties_ProvisioningState("Succeeded") ) +// Mapping from string to VaultProperties_ProvisioningState +var vaultProperties_ProvisioningState_Values = map[string]VaultProperties_ProvisioningState{ + "registeringdns": VaultProperties_ProvisioningState_RegisteringDns, + "succeeded": VaultProperties_ProvisioningState_Succeeded, +} + // A rule governing the accessibility of a vault from a specific ip address or ip range. type IPRule_ARM struct { // Value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all @@ -169,6 +183,12 @@ const ( NetworkRuleSet_Bypass_None = NetworkRuleSet_Bypass("None") ) +// Mapping from string to NetworkRuleSet_Bypass +var networkRuleSet_Bypass_Values = map[string]NetworkRuleSet_Bypass{ + "azureservices": NetworkRuleSet_Bypass_AzureServices, + "none": NetworkRuleSet_Bypass_None, +} + // +kubebuilder:validation:Enum={"Allow","Deny"} type NetworkRuleSet_DefaultAction string @@ -177,6 +197,12 @@ const ( NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction +var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{ + "allow": NetworkRuleSet_DefaultAction_Allow, + "deny": NetworkRuleSet_DefaultAction_Deny, +} + // Permissions the identity has for keys, secrets, certificates and storage. type Permissions_ARM struct { // Certificates: Permissions to certificates @@ -197,6 +223,11 @@ type Sku_Family string const Sku_Family_A = Sku_Family("A") +// Mapping from string to Sku_Family +var sku_Family_Values = map[string]Sku_Family{ + "a": Sku_Family_A, +} + // +kubebuilder:validation:Enum={"premium","standard"} type Sku_Name string @@ -205,6 +236,12 @@ const ( Sku_Name_Standard = Sku_Name("standard") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + // A rule governing the accessibility of a vault from a specific virtual network. type VirtualNetworkRule_ARM struct { Id *string `json:"id,omitempty"` @@ -236,6 +273,26 @@ const ( Permissions_Certificates_Update = Permissions_Certificates("update") ) +// Mapping from string to Permissions_Certificates +var permissions_Certificates_Values = map[string]Permissions_Certificates{ + "backup": Permissions_Certificates_Backup, + "create": Permissions_Certificates_Create, + "delete": Permissions_Certificates_Delete, + "deleteissuers": Permissions_Certificates_Deleteissuers, + "get": Permissions_Certificates_Get, + "getissuers": Permissions_Certificates_Getissuers, + "import": Permissions_Certificates_Import, + "list": Permissions_Certificates_List, + "listissuers": Permissions_Certificates_Listissuers, + "managecontacts": Permissions_Certificates_Managecontacts, + "manageissuers": Permissions_Certificates_Manageissuers, + "purge": Permissions_Certificates_Purge, + "recover": Permissions_Certificates_Recover, + "restore": Permissions_Certificates_Restore, + "setissuers": Permissions_Certificates_Setissuers, + "update": Permissions_Certificates_Update, +} + // +kubebuilder:validation:Enum={"backup","create","decrypt","delete","encrypt","get","import","list","purge","recover","release","restore","sign","unwrapKey","update","verify","wrapKey"} type Permissions_Keys string @@ -259,6 +316,27 @@ const ( Permissions_Keys_WrapKey = Permissions_Keys("wrapKey") ) +// Mapping from string to Permissions_Keys +var permissions_Keys_Values = map[string]Permissions_Keys{ + "backup": Permissions_Keys_Backup, + "create": Permissions_Keys_Create, + "decrypt": Permissions_Keys_Decrypt, + "delete": Permissions_Keys_Delete, + "encrypt": Permissions_Keys_Encrypt, + "get": Permissions_Keys_Get, + "import": Permissions_Keys_Import, + "list": Permissions_Keys_List, + "purge": Permissions_Keys_Purge, + "recover": Permissions_Keys_Recover, + "release": Permissions_Keys_Release, + "restore": Permissions_Keys_Restore, + "sign": Permissions_Keys_Sign, + "unwrapkey": Permissions_Keys_UnwrapKey, + "update": Permissions_Keys_Update, + "verify": Permissions_Keys_Verify, + "wrapkey": Permissions_Keys_WrapKey, +} + // +kubebuilder:validation:Enum={"backup","delete","get","list","purge","recover","restore","set"} type Permissions_Secrets string @@ -273,6 +351,18 @@ const ( Permissions_Secrets_Set = Permissions_Secrets("set") ) +// Mapping from string to Permissions_Secrets +var permissions_Secrets_Values = map[string]Permissions_Secrets{ + "backup": Permissions_Secrets_Backup, + "delete": Permissions_Secrets_Delete, + "get": Permissions_Secrets_Get, + "list": Permissions_Secrets_List, + "purge": Permissions_Secrets_Purge, + "recover": Permissions_Secrets_Recover, + "restore": Permissions_Secrets_Restore, + "set": Permissions_Secrets_Set, +} + // +kubebuilder:validation:Enum={"backup","delete","deletesas","get","getsas","list","listsas","purge","recover","regeneratekey","restore","set","setsas","update"} type Permissions_Storage string @@ -292,3 +382,21 @@ const ( Permissions_Storage_Setsas = Permissions_Storage("setsas") Permissions_Storage_Update = Permissions_Storage("update") ) + +// Mapping from string to Permissions_Storage +var permissions_Storage_Values = map[string]Permissions_Storage{ + "backup": Permissions_Storage_Backup, + "delete": Permissions_Storage_Delete, + "deletesas": Permissions_Storage_Deletesas, + "get": Permissions_Storage_Get, + "getsas": Permissions_Storage_Getsas, + "list": Permissions_Storage_List, + "listsas": Permissions_Storage_Listsas, + "purge": Permissions_Storage_Purge, + "recover": Permissions_Storage_Recover, + "regeneratekey": Permissions_Storage_Regeneratekey, + "restore": Permissions_Storage_Restore, + "set": Permissions_Storage_Set, + "setsas": Permissions_Storage_Setsas, + "update": Permissions_Storage_Update, +} diff --git a/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen.go b/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen.go index 1028b158f2a..044f17f0bb7 100644 --- a/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen.go +++ b/v2/api/keyvault/v1api20210401preview/vault_status_arm_types_gen.go @@ -140,6 +140,14 @@ const ( IdentityType_STATUS_User = IdentityType_STATUS("User") ) +// Mapping from string to IdentityType_STATUS +var identityType_STATUS_Values = map[string]IdentityType_STATUS{ + "application": IdentityType_STATUS_Application, + "key": IdentityType_STATUS_Key, + "managedidentity": IdentityType_STATUS_ManagedIdentity, + "user": IdentityType_STATUS_User, +} + // A set of rules governing the network accessibility of a vault. type NetworkRuleSet_STATUS_ARM struct { // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the @@ -187,6 +195,14 @@ const ( VaultProperties_CreateMode_STATUS_Recover = VaultProperties_CreateMode_STATUS("recover") ) +// Mapping from string to VaultProperties_CreateMode_STATUS +var vaultProperties_CreateMode_STATUS_Values = map[string]VaultProperties_CreateMode_STATUS{ + "createorrecover": VaultProperties_CreateMode_STATUS_CreateOrRecover, + "default": VaultProperties_CreateMode_STATUS_Default, + "purgethencreate": VaultProperties_CreateMode_STATUS_PurgeThenCreate, + "recover": VaultProperties_CreateMode_STATUS_Recover, +} + type VaultProperties_ProvisioningState_STATUS string const ( @@ -194,6 +210,12 @@ const ( VaultProperties_ProvisioningState_STATUS_Succeeded = VaultProperties_ProvisioningState_STATUS("Succeeded") ) +// Mapping from string to VaultProperties_ProvisioningState_STATUS +var vaultProperties_ProvisioningState_STATUS_Values = map[string]VaultProperties_ProvisioningState_STATUS{ + "registeringdns": VaultProperties_ProvisioningState_STATUS_RegisteringDns, + "succeeded": VaultProperties_ProvisioningState_STATUS_Succeeded, +} + // A rule governing the accessibility of a vault from a specific ip address or ip range. type IPRule_STATUS_ARM struct { // Value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all @@ -208,6 +230,12 @@ const ( NetworkRuleSet_Bypass_STATUS_None = NetworkRuleSet_Bypass_STATUS("None") ) +// Mapping from string to NetworkRuleSet_Bypass_STATUS +var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{ + "azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices, + "none": NetworkRuleSet_Bypass_STATUS_None, +} + type NetworkRuleSet_DefaultAction_STATUS string const ( @@ -215,6 +243,12 @@ const ( NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction_STATUS +var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{ + "allow": NetworkRuleSet_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSet_DefaultAction_STATUS_Deny, +} + // Permissions the identity has for keys, secrets, certificates and storage. type Permissions_STATUS_ARM struct { // Certificates: Permissions to certificates @@ -246,6 +280,11 @@ type Sku_Family_STATUS string const Sku_Family_STATUS_A = Sku_Family_STATUS("A") +// Mapping from string to Sku_Family_STATUS +var sku_Family_STATUS_Values = map[string]Sku_Family_STATUS{ + "a": Sku_Family_STATUS_A, +} + type Sku_Name_STATUS string const ( @@ -253,6 +292,12 @@ const ( Sku_Name_STATUS_Standard = Sku_Name_STATUS("standard") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + // A rule governing the accessibility of a vault from a specific virtual network. type VirtualNetworkRule_STATUS_ARM struct { // Id: Full resource id of a vnet subnet, such as @@ -285,6 +330,26 @@ const ( Permissions_Certificates_STATUS_Update = Permissions_Certificates_STATUS("update") ) +// Mapping from string to Permissions_Certificates_STATUS +var permissions_Certificates_STATUS_Values = map[string]Permissions_Certificates_STATUS{ + "backup": Permissions_Certificates_STATUS_Backup, + "create": Permissions_Certificates_STATUS_Create, + "delete": Permissions_Certificates_STATUS_Delete, + "deleteissuers": Permissions_Certificates_STATUS_Deleteissuers, + "get": Permissions_Certificates_STATUS_Get, + "getissuers": Permissions_Certificates_STATUS_Getissuers, + "import": Permissions_Certificates_STATUS_Import, + "list": Permissions_Certificates_STATUS_List, + "listissuers": Permissions_Certificates_STATUS_Listissuers, + "managecontacts": Permissions_Certificates_STATUS_Managecontacts, + "manageissuers": Permissions_Certificates_STATUS_Manageissuers, + "purge": Permissions_Certificates_STATUS_Purge, + "recover": Permissions_Certificates_STATUS_Recover, + "restore": Permissions_Certificates_STATUS_Restore, + "setissuers": Permissions_Certificates_STATUS_Setissuers, + "update": Permissions_Certificates_STATUS_Update, +} + type Permissions_Keys_STATUS string const ( @@ -307,6 +372,27 @@ const ( Permissions_Keys_STATUS_WrapKey = Permissions_Keys_STATUS("wrapKey") ) +// Mapping from string to Permissions_Keys_STATUS +var permissions_Keys_STATUS_Values = map[string]Permissions_Keys_STATUS{ + "backup": Permissions_Keys_STATUS_Backup, + "create": Permissions_Keys_STATUS_Create, + "decrypt": Permissions_Keys_STATUS_Decrypt, + "delete": Permissions_Keys_STATUS_Delete, + "encrypt": Permissions_Keys_STATUS_Encrypt, + "get": Permissions_Keys_STATUS_Get, + "import": Permissions_Keys_STATUS_Import, + "list": Permissions_Keys_STATUS_List, + "purge": Permissions_Keys_STATUS_Purge, + "recover": Permissions_Keys_STATUS_Recover, + "release": Permissions_Keys_STATUS_Release, + "restore": Permissions_Keys_STATUS_Restore, + "sign": Permissions_Keys_STATUS_Sign, + "unwrapkey": Permissions_Keys_STATUS_UnwrapKey, + "update": Permissions_Keys_STATUS_Update, + "verify": Permissions_Keys_STATUS_Verify, + "wrapkey": Permissions_Keys_STATUS_WrapKey, +} + type Permissions_Secrets_STATUS string const ( @@ -320,6 +406,18 @@ const ( Permissions_Secrets_STATUS_Set = Permissions_Secrets_STATUS("set") ) +// Mapping from string to Permissions_Secrets_STATUS +var permissions_Secrets_STATUS_Values = map[string]Permissions_Secrets_STATUS{ + "backup": Permissions_Secrets_STATUS_Backup, + "delete": Permissions_Secrets_STATUS_Delete, + "get": Permissions_Secrets_STATUS_Get, + "list": Permissions_Secrets_STATUS_List, + "purge": Permissions_Secrets_STATUS_Purge, + "recover": Permissions_Secrets_STATUS_Recover, + "restore": Permissions_Secrets_STATUS_Restore, + "set": Permissions_Secrets_STATUS_Set, +} + type Permissions_Storage_STATUS string const ( @@ -339,6 +437,24 @@ const ( Permissions_Storage_STATUS_Update = Permissions_Storage_STATUS("update") ) +// Mapping from string to Permissions_Storage_STATUS +var permissions_Storage_STATUS_Values = map[string]Permissions_Storage_STATUS{ + "backup": Permissions_Storage_STATUS_Backup, + "delete": Permissions_Storage_STATUS_Delete, + "deletesas": Permissions_Storage_STATUS_Deletesas, + "get": Permissions_Storage_STATUS_Get, + "getsas": Permissions_Storage_STATUS_Getsas, + "list": Permissions_Storage_STATUS_List, + "listsas": Permissions_Storage_STATUS_Listsas, + "purge": Permissions_Storage_STATUS_Purge, + "recover": Permissions_Storage_STATUS_Recover, + "regeneratekey": Permissions_Storage_STATUS_Regeneratekey, + "restore": Permissions_Storage_STATUS_Restore, + "set": Permissions_Storage_STATUS_Set, + "setsas": Permissions_Storage_STATUS_Setsas, + "update": Permissions_Storage_STATUS_Update, +} + // Private endpoint object properties. type PrivateEndpoint_STATUS_ARM struct { // Id: Full identifier of the private endpoint resource. diff --git a/v2/api/keyvault/v1api20210401preview/vault_types_gen.go b/v2/api/keyvault/v1api20210401preview/vault_types_gen.go index 28cd624dcdd..3983ce38a7b 100644 --- a/v2/api/keyvault/v1api20210401preview/vault_types_gen.go +++ b/v2/api/keyvault/v1api20210401preview/vault_types_gen.go @@ -942,8 +942,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := IdentityType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, identityType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -956,8 +957,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := IdentityType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, identityType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -1328,8 +1330,9 @@ func (properties *VaultProperties) AssignProperties_From_VaultProperties(source // CreateMode if source.CreateMode != nil { - createMode := VaultProperties_CreateMode(*source.CreateMode) - properties.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, vaultProperties_CreateMode_Values) + properties.CreateMode = &createModeTemp } else { properties.CreateMode = nil } @@ -1396,8 +1399,9 @@ func (properties *VaultProperties) AssignProperties_From_VaultProperties(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := VaultProperties_ProvisioningState(*source.ProvisioningState) - properties.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, vaultProperties_ProvisioningState_Values) + properties.ProvisioningState = &provisioningStateTemp } else { properties.ProvisioningState = nil } @@ -1804,8 +1808,9 @@ func (properties *VaultProperties_STATUS) AssignProperties_From_VaultProperties_ // CreateMode if source.CreateMode != nil { - createMode := VaultProperties_CreateMode_STATUS(*source.CreateMode) - properties.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, vaultProperties_CreateMode_STATUS_Values) + properties.CreateMode = &createModeTemp } else { properties.CreateMode = nil } @@ -1893,8 +1898,9 @@ func (properties *VaultProperties_STATUS) AssignProperties_From_VaultProperties_ // ProvisioningState if source.ProvisioningState != nil { - provisioningState := VaultProperties_ProvisioningState_STATUS(*source.ProvisioningState) - properties.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, vaultProperties_ProvisioningState_STATUS_Values) + properties.ProvisioningState = &provisioningStateTemp } else { properties.ProvisioningState = nil } @@ -2594,16 +2600,18 @@ func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *v202 // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -2788,16 +2796,18 @@ func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATU // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass_STATUS(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_STATUS_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction_STATUS(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_STATUS_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -3030,8 +3040,9 @@ func (item *PrivateEndpointConnectionItem_STATUS) AssignProperties_From_PrivateE // ProvisioningState if source.ProvisioningState != nil { - provisioningState := PrivateEndpointConnectionProvisioningState_STATUS(*source.ProvisioningState) - item.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, privateEndpointConnectionProvisioningState_STATUS_Values) + item.ProvisioningState = &provisioningStateTemp } else { item.ProvisioningState = nil } @@ -3161,16 +3172,18 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20210401ps.Sku) error { // Family if source.Family != nil { - family := Sku_Family(*source.Family) - sku.Family = &family + family := *source.Family + familyTemp := genruntime.ToEnum(family, sku_Family_Values) + sku.Family = &familyTemp } else { sku.Family = nil } // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3255,16 +3268,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20210401ps.Sku_ // Family if source.Family != nil { - family := Sku_Family_STATUS(*source.Family) - sku.Family = &family + family := *source.Family + familyTemp := genruntime.ToEnum(family, sku_Family_STATUS_Values) + sku.Family = &familyTemp } else { sku.Family = nil } // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3532,7 +3547,7 @@ func (permissions *Permissions) AssignProperties_From_Permissions(source *v20210 for certificateIndex, certificateItem := range source.Certificates { // Shadow the loop variable to avoid aliasing certificateItem := certificateItem - certificateList[certificateIndex] = Permissions_Certificates(certificateItem) + certificateList[certificateIndex] = genruntime.ToEnum(certificateItem, permissions_Certificates_Values) } permissions.Certificates = certificateList } else { @@ -3545,7 +3560,7 @@ func (permissions *Permissions) AssignProperties_From_Permissions(source *v20210 for keyIndex, keyItem := range source.Keys { // Shadow the loop variable to avoid aliasing keyItem := keyItem - keyList[keyIndex] = Permissions_Keys(keyItem) + keyList[keyIndex] = genruntime.ToEnum(keyItem, permissions_Keys_Values) } permissions.Keys = keyList } else { @@ -3558,7 +3573,7 @@ func (permissions *Permissions) AssignProperties_From_Permissions(source *v20210 for secretIndex, secretItem := range source.Secrets { // Shadow the loop variable to avoid aliasing secretItem := secretItem - secretList[secretIndex] = Permissions_Secrets(secretItem) + secretList[secretIndex] = genruntime.ToEnum(secretItem, permissions_Secrets_Values) } permissions.Secrets = secretList } else { @@ -3571,7 +3586,7 @@ func (permissions *Permissions) AssignProperties_From_Permissions(source *v20210 for storageIndex, storageItem := range source.Storage { // Shadow the loop variable to avoid aliasing storageItem := storageItem - storageList[storageIndex] = Permissions_Storage(storageItem) + storageList[storageIndex] = genruntime.ToEnum(storageItem, permissions_Storage_Values) } permissions.Storage = storageList } else { @@ -3712,7 +3727,7 @@ func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS( for certificateIndex, certificateItem := range source.Certificates { // Shadow the loop variable to avoid aliasing certificateItem := certificateItem - certificateList[certificateIndex] = Permissions_Certificates_STATUS(certificateItem) + certificateList[certificateIndex] = genruntime.ToEnum(certificateItem, permissions_Certificates_STATUS_Values) } permissions.Certificates = certificateList } else { @@ -3725,7 +3740,7 @@ func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS( for keyIndex, keyItem := range source.Keys { // Shadow the loop variable to avoid aliasing keyItem := keyItem - keyList[keyIndex] = Permissions_Keys_STATUS(keyItem) + keyList[keyIndex] = genruntime.ToEnum(keyItem, permissions_Keys_STATUS_Values) } permissions.Keys = keyList } else { @@ -3738,7 +3753,7 @@ func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS( for secretIndex, secretItem := range source.Secrets { // Shadow the loop variable to avoid aliasing secretItem := secretItem - secretList[secretIndex] = Permissions_Secrets_STATUS(secretItem) + secretList[secretIndex] = genruntime.ToEnum(secretItem, permissions_Secrets_STATUS_Values) } permissions.Secrets = secretList } else { @@ -3751,7 +3766,7 @@ func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS( for storageIndex, storageItem := range source.Storage { // Shadow the loop variable to avoid aliasing storageItem := storageItem - storageList[storageIndex] = Permissions_Storage_STATUS(storageItem) + storageList[storageIndex] = genruntime.ToEnum(storageItem, permissions_Storage_STATUS_Values) } permissions.Storage = storageList } else { @@ -3901,6 +3916,16 @@ const ( PrivateEndpointConnectionProvisioningState_STATUS_Updating = PrivateEndpointConnectionProvisioningState_STATUS("Updating") ) +// Mapping from string to PrivateEndpointConnectionProvisioningState_STATUS +var privateEndpointConnectionProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProvisioningState_STATUS{ + "creating": PrivateEndpointConnectionProvisioningState_STATUS_Creating, + "deleting": PrivateEndpointConnectionProvisioningState_STATUS_Deleting, + "disconnected": PrivateEndpointConnectionProvisioningState_STATUS_Disconnected, + "failed": PrivateEndpointConnectionProvisioningState_STATUS_Failed, + "succeeded": PrivateEndpointConnectionProvisioningState_STATUS_Succeeded, + "updating": PrivateEndpointConnectionProvisioningState_STATUS_Updating, +} + // An object that represents the approval state of the private link connection. type PrivateLinkServiceConnectionState_STATUS struct { // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. @@ -3954,8 +3979,9 @@ func (state *PrivateLinkServiceConnectionState_STATUS) AssignProperties_From_Pri // ActionsRequired if source.ActionsRequired != nil { - actionsRequired := PrivateLinkServiceConnectionState_ActionsRequired_STATUS(*source.ActionsRequired) - state.ActionsRequired = &actionsRequired + actionsRequired := *source.ActionsRequired + actionsRequiredTemp := genruntime.ToEnum(actionsRequired, privateLinkServiceConnectionState_ActionsRequired_STATUS_Values) + state.ActionsRequired = &actionsRequiredTemp } else { state.ActionsRequired = nil } @@ -3965,8 +3991,9 @@ func (state *PrivateLinkServiceConnectionState_STATUS) AssignProperties_From_Pri // Status if source.Status != nil { - status := PrivateEndpointServiceConnectionStatus_STATUS(*source.Status) - state.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, privateEndpointServiceConnectionStatus_STATUS_Values) + state.Status = &statusTemp } else { state.Status = nil } @@ -4224,10 +4251,23 @@ const ( PrivateEndpointServiceConnectionStatus_STATUS_Rejected = PrivateEndpointServiceConnectionStatus_STATUS("Rejected") ) +// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS +var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{ + "approved": PrivateEndpointServiceConnectionStatus_STATUS_Approved, + "disconnected": PrivateEndpointServiceConnectionStatus_STATUS_Disconnected, + "pending": PrivateEndpointServiceConnectionStatus_STATUS_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_STATUS_Rejected, +} + type PrivateLinkServiceConnectionState_ActionsRequired_STATUS string const PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None = PrivateLinkServiceConnectionState_ActionsRequired_STATUS("None") +// Mapping from string to PrivateLinkServiceConnectionState_ActionsRequired_STATUS +var privateLinkServiceConnectionState_ActionsRequired_STATUS_Values = map[string]PrivateLinkServiceConnectionState_ActionsRequired_STATUS{ + "none": PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None, +} + func init() { SchemeBuilder.Register(&Vault{}, &VaultList{}) } diff --git a/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen.go b/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen.go index f6889267ab9..c73964937a0 100644 --- a/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen.go +++ b/v2/api/keyvault/v1api20230701/vault_spec_arm_types_gen.go @@ -152,6 +152,14 @@ const ( VaultProperties_CreateMode_Recover = VaultProperties_CreateMode("recover") ) +// Mapping from string to VaultProperties_CreateMode +var vaultProperties_CreateMode_Values = map[string]VaultProperties_CreateMode{ + "createorrecover": VaultProperties_CreateMode_CreateOrRecover, + "default": VaultProperties_CreateMode_Default, + "purgethencreate": VaultProperties_CreateMode_PurgeThenCreate, + "recover": VaultProperties_CreateMode_Recover, +} + // +kubebuilder:validation:Enum={"RegisteringDns","Succeeded"} type VaultProperties_ProvisioningState string @@ -160,6 +168,12 @@ const ( VaultProperties_ProvisioningState_Succeeded = VaultProperties_ProvisioningState("Succeeded") ) +// Mapping from string to VaultProperties_ProvisioningState +var vaultProperties_ProvisioningState_Values = map[string]VaultProperties_ProvisioningState{ + "registeringdns": VaultProperties_ProvisioningState_RegisteringDns, + "succeeded": VaultProperties_ProvisioningState_Succeeded, +} + // A rule governing the accessibility of a vault from a specific ip address or ip range. type IPRule_ARM struct { // Value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all @@ -175,6 +189,12 @@ const ( NetworkRuleSet_Bypass_None = NetworkRuleSet_Bypass("None") ) +// Mapping from string to NetworkRuleSet_Bypass +var networkRuleSet_Bypass_Values = map[string]NetworkRuleSet_Bypass{ + "azureservices": NetworkRuleSet_Bypass_AzureServices, + "none": NetworkRuleSet_Bypass_None, +} + // +kubebuilder:validation:Enum={"Allow","Deny"} type NetworkRuleSet_DefaultAction string @@ -183,6 +203,12 @@ const ( NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction +var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{ + "allow": NetworkRuleSet_DefaultAction_Allow, + "deny": NetworkRuleSet_DefaultAction_Deny, +} + // Permissions the identity has for keys, secrets, certificates and storage. type Permissions_ARM struct { // Certificates: Permissions to certificates @@ -203,6 +229,11 @@ type Sku_Family string const Sku_Family_A = Sku_Family("A") +// Mapping from string to Sku_Family +var sku_Family_Values = map[string]Sku_Family{ + "a": Sku_Family_A, +} + // +kubebuilder:validation:Enum={"premium","standard"} type Sku_Name string @@ -211,6 +242,12 @@ const ( Sku_Name_Standard = Sku_Name("standard") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "premium": Sku_Name_Premium, + "standard": Sku_Name_Standard, +} + // A rule governing the accessibility of a vault from a specific virtual network. type VirtualNetworkRule_ARM struct { Id *string `json:"id,omitempty"` @@ -243,6 +280,27 @@ const ( Permissions_Certificates_Update = Permissions_Certificates("update") ) +// Mapping from string to Permissions_Certificates +var permissions_Certificates_Values = map[string]Permissions_Certificates{ + "all": Permissions_Certificates_All, + "backup": Permissions_Certificates_Backup, + "create": Permissions_Certificates_Create, + "delete": Permissions_Certificates_Delete, + "deleteissuers": Permissions_Certificates_Deleteissuers, + "get": Permissions_Certificates_Get, + "getissuers": Permissions_Certificates_Getissuers, + "import": Permissions_Certificates_Import, + "list": Permissions_Certificates_List, + "listissuers": Permissions_Certificates_Listissuers, + "managecontacts": Permissions_Certificates_Managecontacts, + "manageissuers": Permissions_Certificates_Manageissuers, + "purge": Permissions_Certificates_Purge, + "recover": Permissions_Certificates_Recover, + "restore": Permissions_Certificates_Restore, + "setissuers": Permissions_Certificates_Setissuers, + "update": Permissions_Certificates_Update, +} + // +kubebuilder:validation:Enum={"all","backup","create","decrypt","delete","encrypt","get","getrotationpolicy","import","list","purge","recover","release","restore","rotate","setrotationpolicy","sign","unwrapKey","update","verify","wrapKey"} type Permissions_Keys string @@ -270,6 +328,31 @@ const ( Permissions_Keys_WrapKey = Permissions_Keys("wrapKey") ) +// Mapping from string to Permissions_Keys +var permissions_Keys_Values = map[string]Permissions_Keys{ + "all": Permissions_Keys_All, + "backup": Permissions_Keys_Backup, + "create": Permissions_Keys_Create, + "decrypt": Permissions_Keys_Decrypt, + "delete": Permissions_Keys_Delete, + "encrypt": Permissions_Keys_Encrypt, + "get": Permissions_Keys_Get, + "getrotationpolicy": Permissions_Keys_Getrotationpolicy, + "import": Permissions_Keys_Import, + "list": Permissions_Keys_List, + "purge": Permissions_Keys_Purge, + "recover": Permissions_Keys_Recover, + "release": Permissions_Keys_Release, + "restore": Permissions_Keys_Restore, + "rotate": Permissions_Keys_Rotate, + "setrotationpolicy": Permissions_Keys_Setrotationpolicy, + "sign": Permissions_Keys_Sign, + "unwrapkey": Permissions_Keys_UnwrapKey, + "update": Permissions_Keys_Update, + "verify": Permissions_Keys_Verify, + "wrapkey": Permissions_Keys_WrapKey, +} + // +kubebuilder:validation:Enum={"all","backup","delete","get","list","purge","recover","restore","set"} type Permissions_Secrets string @@ -285,6 +368,19 @@ const ( Permissions_Secrets_Set = Permissions_Secrets("set") ) +// Mapping from string to Permissions_Secrets +var permissions_Secrets_Values = map[string]Permissions_Secrets{ + "all": Permissions_Secrets_All, + "backup": Permissions_Secrets_Backup, + "delete": Permissions_Secrets_Delete, + "get": Permissions_Secrets_Get, + "list": Permissions_Secrets_List, + "purge": Permissions_Secrets_Purge, + "recover": Permissions_Secrets_Recover, + "restore": Permissions_Secrets_Restore, + "set": Permissions_Secrets_Set, +} + // +kubebuilder:validation:Enum={"all","backup","delete","deletesas","get","getsas","list","listsas","purge","recover","regeneratekey","restore","set","setsas","update"} type Permissions_Storage string @@ -305,3 +401,22 @@ const ( Permissions_Storage_Setsas = Permissions_Storage("setsas") Permissions_Storage_Update = Permissions_Storage("update") ) + +// Mapping from string to Permissions_Storage +var permissions_Storage_Values = map[string]Permissions_Storage{ + "all": Permissions_Storage_All, + "backup": Permissions_Storage_Backup, + "delete": Permissions_Storage_Delete, + "deletesas": Permissions_Storage_Deletesas, + "get": Permissions_Storage_Get, + "getsas": Permissions_Storage_Getsas, + "list": Permissions_Storage_List, + "listsas": Permissions_Storage_Listsas, + "purge": Permissions_Storage_Purge, + "recover": Permissions_Storage_Recover, + "regeneratekey": Permissions_Storage_Regeneratekey, + "restore": Permissions_Storage_Restore, + "set": Permissions_Storage_Set, + "setsas": Permissions_Storage_Setsas, + "update": Permissions_Storage_Update, +} diff --git a/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen.go b/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen.go index 0b203848632..bd5cf378b2e 100644 --- a/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen.go +++ b/v2/api/keyvault/v1api20230701/vault_status_arm_types_gen.go @@ -146,6 +146,14 @@ const ( IdentityType_STATUS_User = IdentityType_STATUS("User") ) +// Mapping from string to IdentityType_STATUS +var identityType_STATUS_Values = map[string]IdentityType_STATUS{ + "application": IdentityType_STATUS_Application, + "key": IdentityType_STATUS_Key, + "managedidentity": IdentityType_STATUS_ManagedIdentity, + "user": IdentityType_STATUS_User, +} + // A set of rules governing the network accessibility of a vault. type NetworkRuleSet_STATUS_ARM struct { // Bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the @@ -193,6 +201,14 @@ const ( VaultProperties_CreateMode_STATUS_Recover = VaultProperties_CreateMode_STATUS("recover") ) +// Mapping from string to VaultProperties_CreateMode_STATUS +var vaultProperties_CreateMode_STATUS_Values = map[string]VaultProperties_CreateMode_STATUS{ + "createorrecover": VaultProperties_CreateMode_STATUS_CreateOrRecover, + "default": VaultProperties_CreateMode_STATUS_Default, + "purgethencreate": VaultProperties_CreateMode_STATUS_PurgeThenCreate, + "recover": VaultProperties_CreateMode_STATUS_Recover, +} + type VaultProperties_ProvisioningState_STATUS string const ( @@ -200,6 +216,12 @@ const ( VaultProperties_ProvisioningState_STATUS_Succeeded = VaultProperties_ProvisioningState_STATUS("Succeeded") ) +// Mapping from string to VaultProperties_ProvisioningState_STATUS +var vaultProperties_ProvisioningState_STATUS_Values = map[string]VaultProperties_ProvisioningState_STATUS{ + "registeringdns": VaultProperties_ProvisioningState_STATUS_RegisteringDns, + "succeeded": VaultProperties_ProvisioningState_STATUS_Succeeded, +} + // A rule governing the accessibility of a vault from a specific ip address or ip range. type IPRule_STATUS_ARM struct { // Value: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all @@ -214,6 +236,12 @@ const ( NetworkRuleSet_Bypass_STATUS_None = NetworkRuleSet_Bypass_STATUS("None") ) +// Mapping from string to NetworkRuleSet_Bypass_STATUS +var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{ + "azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices, + "none": NetworkRuleSet_Bypass_STATUS_None, +} + type NetworkRuleSet_DefaultAction_STATUS string const ( @@ -221,6 +249,12 @@ const ( NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction_STATUS +var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{ + "allow": NetworkRuleSet_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSet_DefaultAction_STATUS_Deny, +} + // Permissions the identity has for keys, secrets, certificates and storage. type Permissions_STATUS_ARM struct { // Certificates: Permissions to certificates @@ -252,6 +286,11 @@ type Sku_Family_STATUS string const Sku_Family_STATUS_A = Sku_Family_STATUS("A") +// Mapping from string to Sku_Family_STATUS +var sku_Family_STATUS_Values = map[string]Sku_Family_STATUS{ + "a": Sku_Family_STATUS_A, +} + type Sku_Name_STATUS string const ( @@ -259,6 +298,12 @@ const ( Sku_Name_STATUS_Standard = Sku_Name_STATUS("standard") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "premium": Sku_Name_STATUS_Premium, + "standard": Sku_Name_STATUS_Standard, +} + // A rule governing the accessibility of a vault from a specific virtual network. type VirtualNetworkRule_STATUS_ARM struct { // Id: Full resource id of a vnet subnet, such as @@ -292,6 +337,27 @@ const ( Permissions_Certificates_STATUS_Update = Permissions_Certificates_STATUS("update") ) +// Mapping from string to Permissions_Certificates_STATUS +var permissions_Certificates_STATUS_Values = map[string]Permissions_Certificates_STATUS{ + "all": Permissions_Certificates_STATUS_All, + "backup": Permissions_Certificates_STATUS_Backup, + "create": Permissions_Certificates_STATUS_Create, + "delete": Permissions_Certificates_STATUS_Delete, + "deleteissuers": Permissions_Certificates_STATUS_Deleteissuers, + "get": Permissions_Certificates_STATUS_Get, + "getissuers": Permissions_Certificates_STATUS_Getissuers, + "import": Permissions_Certificates_STATUS_Import, + "list": Permissions_Certificates_STATUS_List, + "listissuers": Permissions_Certificates_STATUS_Listissuers, + "managecontacts": Permissions_Certificates_STATUS_Managecontacts, + "manageissuers": Permissions_Certificates_STATUS_Manageissuers, + "purge": Permissions_Certificates_STATUS_Purge, + "recover": Permissions_Certificates_STATUS_Recover, + "restore": Permissions_Certificates_STATUS_Restore, + "setissuers": Permissions_Certificates_STATUS_Setissuers, + "update": Permissions_Certificates_STATUS_Update, +} + type Permissions_Keys_STATUS string const ( @@ -318,6 +384,31 @@ const ( Permissions_Keys_STATUS_WrapKey = Permissions_Keys_STATUS("wrapKey") ) +// Mapping from string to Permissions_Keys_STATUS +var permissions_Keys_STATUS_Values = map[string]Permissions_Keys_STATUS{ + "all": Permissions_Keys_STATUS_All, + "backup": Permissions_Keys_STATUS_Backup, + "create": Permissions_Keys_STATUS_Create, + "decrypt": Permissions_Keys_STATUS_Decrypt, + "delete": Permissions_Keys_STATUS_Delete, + "encrypt": Permissions_Keys_STATUS_Encrypt, + "get": Permissions_Keys_STATUS_Get, + "getrotationpolicy": Permissions_Keys_STATUS_Getrotationpolicy, + "import": Permissions_Keys_STATUS_Import, + "list": Permissions_Keys_STATUS_List, + "purge": Permissions_Keys_STATUS_Purge, + "recover": Permissions_Keys_STATUS_Recover, + "release": Permissions_Keys_STATUS_Release, + "restore": Permissions_Keys_STATUS_Restore, + "rotate": Permissions_Keys_STATUS_Rotate, + "setrotationpolicy": Permissions_Keys_STATUS_Setrotationpolicy, + "sign": Permissions_Keys_STATUS_Sign, + "unwrapkey": Permissions_Keys_STATUS_UnwrapKey, + "update": Permissions_Keys_STATUS_Update, + "verify": Permissions_Keys_STATUS_Verify, + "wrapkey": Permissions_Keys_STATUS_WrapKey, +} + type Permissions_Secrets_STATUS string const ( @@ -332,6 +423,19 @@ const ( Permissions_Secrets_STATUS_Set = Permissions_Secrets_STATUS("set") ) +// Mapping from string to Permissions_Secrets_STATUS +var permissions_Secrets_STATUS_Values = map[string]Permissions_Secrets_STATUS{ + "all": Permissions_Secrets_STATUS_All, + "backup": Permissions_Secrets_STATUS_Backup, + "delete": Permissions_Secrets_STATUS_Delete, + "get": Permissions_Secrets_STATUS_Get, + "list": Permissions_Secrets_STATUS_List, + "purge": Permissions_Secrets_STATUS_Purge, + "recover": Permissions_Secrets_STATUS_Recover, + "restore": Permissions_Secrets_STATUS_Restore, + "set": Permissions_Secrets_STATUS_Set, +} + type Permissions_Storage_STATUS string const ( @@ -352,6 +456,25 @@ const ( Permissions_Storage_STATUS_Update = Permissions_Storage_STATUS("update") ) +// Mapping from string to Permissions_Storage_STATUS +var permissions_Storage_STATUS_Values = map[string]Permissions_Storage_STATUS{ + "all": Permissions_Storage_STATUS_All, + "backup": Permissions_Storage_STATUS_Backup, + "delete": Permissions_Storage_STATUS_Delete, + "deletesas": Permissions_Storage_STATUS_Deletesas, + "get": Permissions_Storage_STATUS_Get, + "getsas": Permissions_Storage_STATUS_Getsas, + "list": Permissions_Storage_STATUS_List, + "listsas": Permissions_Storage_STATUS_Listsas, + "purge": Permissions_Storage_STATUS_Purge, + "recover": Permissions_Storage_STATUS_Recover, + "regeneratekey": Permissions_Storage_STATUS_Regeneratekey, + "restore": Permissions_Storage_STATUS_Restore, + "set": Permissions_Storage_STATUS_Set, + "setsas": Permissions_Storage_STATUS_Setsas, + "update": Permissions_Storage_STATUS_Update, +} + // Private endpoint object properties. type PrivateEndpoint_STATUS_ARM struct { // Id: Full identifier of the private endpoint resource. diff --git a/v2/api/keyvault/v1api20230701/vault_types_gen.go b/v2/api/keyvault/v1api20230701/vault_types_gen.go index d467a200e11..9a82b8ce1be 100644 --- a/v2/api/keyvault/v1api20230701/vault_types_gen.go +++ b/v2/api/keyvault/v1api20230701/vault_types_gen.go @@ -964,8 +964,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := IdentityType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, identityType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -978,8 +979,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := IdentityType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, identityType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -1368,8 +1370,9 @@ func (properties *VaultProperties) AssignProperties_From_VaultProperties(source // CreateMode if source.CreateMode != nil { - createMode := VaultProperties_CreateMode(*source.CreateMode) - properties.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, vaultProperties_CreateMode_Values) + properties.CreateMode = &createModeTemp } else { properties.CreateMode = nil } @@ -1436,8 +1439,9 @@ func (properties *VaultProperties) AssignProperties_From_VaultProperties(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := VaultProperties_ProvisioningState(*source.ProvisioningState) - properties.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, vaultProperties_ProvisioningState_Values) + properties.ProvisioningState = &provisioningStateTemp } else { properties.ProvisioningState = nil } @@ -1992,8 +1996,9 @@ func (properties *VaultProperties_STATUS) AssignProperties_From_VaultProperties_ // CreateMode if source.CreateMode != nil { - createMode := VaultProperties_CreateMode_STATUS(*source.CreateMode) - properties.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, vaultProperties_CreateMode_STATUS_Values) + properties.CreateMode = &createModeTemp } else { properties.CreateMode = nil } @@ -2081,8 +2086,9 @@ func (properties *VaultProperties_STATUS) AssignProperties_From_VaultProperties_ // ProvisioningState if source.ProvisioningState != nil { - provisioningState := VaultProperties_ProvisioningState_STATUS(*source.ProvisioningState) - properties.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, vaultProperties_ProvisioningState_STATUS_Values) + properties.ProvisioningState = &provisioningStateTemp } else { properties.ProvisioningState = nil } @@ -2826,16 +2832,18 @@ func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *v202 // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -3079,16 +3087,18 @@ func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATU // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass_STATUS(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_STATUS_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction_STATUS(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_STATUS_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -3321,8 +3331,9 @@ func (item *PrivateEndpointConnectionItem_STATUS) AssignProperties_From_PrivateE // ProvisioningState if source.ProvisioningState != nil { - provisioningState := PrivateEndpointConnectionProvisioningState_STATUS(*source.ProvisioningState) - item.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, privateEndpointConnectionProvisioningState_STATUS_Values) + item.ProvisioningState = &provisioningStateTemp } else { item.ProvisioningState = nil } @@ -3452,16 +3463,18 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20230701s.Sku) error { // Family if source.Family != nil { - family := Sku_Family(*source.Family) - sku.Family = &family + family := *source.Family + familyTemp := genruntime.ToEnum(family, sku_Family_Values) + sku.Family = &familyTemp } else { sku.Family = nil } // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3569,16 +3582,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20230701s.Sku_S // Family if source.Family != nil { - family := Sku_Family_STATUS(*source.Family) - sku.Family = &family + family := *source.Family + familyTemp := genruntime.ToEnum(family, sku_Family_STATUS_Values) + sku.Family = &familyTemp } else { sku.Family = nil } // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3856,7 +3871,7 @@ func (permissions *Permissions) AssignProperties_From_Permissions(source *v20230 for certificateIndex, certificateItem := range source.Certificates { // Shadow the loop variable to avoid aliasing certificateItem := certificateItem - certificateList[certificateIndex] = Permissions_Certificates(certificateItem) + certificateList[certificateIndex] = genruntime.ToEnum(certificateItem, permissions_Certificates_Values) } permissions.Certificates = certificateList } else { @@ -3869,7 +3884,7 @@ func (permissions *Permissions) AssignProperties_From_Permissions(source *v20230 for keyIndex, keyItem := range source.Keys { // Shadow the loop variable to avoid aliasing keyItem := keyItem - keyList[keyIndex] = Permissions_Keys(keyItem) + keyList[keyIndex] = genruntime.ToEnum(keyItem, permissions_Keys_Values) } permissions.Keys = keyList } else { @@ -3882,7 +3897,7 @@ func (permissions *Permissions) AssignProperties_From_Permissions(source *v20230 for secretIndex, secretItem := range source.Secrets { // Shadow the loop variable to avoid aliasing secretItem := secretItem - secretList[secretIndex] = Permissions_Secrets(secretItem) + secretList[secretIndex] = genruntime.ToEnum(secretItem, permissions_Secrets_Values) } permissions.Secrets = secretList } else { @@ -3895,7 +3910,7 @@ func (permissions *Permissions) AssignProperties_From_Permissions(source *v20230 for storageIndex, storageItem := range source.Storage { // Shadow the loop variable to avoid aliasing storageItem := storageItem - storageList[storageIndex] = Permissions_Storage(storageItem) + storageList[storageIndex] = genruntime.ToEnum(storageItem, permissions_Storage_Values) } permissions.Storage = storageList } else { @@ -4099,7 +4114,7 @@ func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS( for certificateIndex, certificateItem := range source.Certificates { // Shadow the loop variable to avoid aliasing certificateItem := certificateItem - certificateList[certificateIndex] = Permissions_Certificates_STATUS(certificateItem) + certificateList[certificateIndex] = genruntime.ToEnum(certificateItem, permissions_Certificates_STATUS_Values) } permissions.Certificates = certificateList } else { @@ -4112,7 +4127,7 @@ func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS( for keyIndex, keyItem := range source.Keys { // Shadow the loop variable to avoid aliasing keyItem := keyItem - keyList[keyIndex] = Permissions_Keys_STATUS(keyItem) + keyList[keyIndex] = genruntime.ToEnum(keyItem, permissions_Keys_STATUS_Values) } permissions.Keys = keyList } else { @@ -4125,7 +4140,7 @@ func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS( for secretIndex, secretItem := range source.Secrets { // Shadow the loop variable to avoid aliasing secretItem := secretItem - secretList[secretIndex] = Permissions_Secrets_STATUS(secretItem) + secretList[secretIndex] = genruntime.ToEnum(secretItem, permissions_Secrets_STATUS_Values) } permissions.Secrets = secretList } else { @@ -4138,7 +4153,7 @@ func (permissions *Permissions_STATUS) AssignProperties_From_Permissions_STATUS( for storageIndex, storageItem := range source.Storage { // Shadow the loop variable to avoid aliasing storageItem := storageItem - storageList[storageIndex] = Permissions_Storage_STATUS(storageItem) + storageList[storageIndex] = genruntime.ToEnum(storageItem, permissions_Storage_STATUS_Values) } permissions.Storage = storageList } else { @@ -4288,6 +4303,16 @@ const ( PrivateEndpointConnectionProvisioningState_STATUS_Updating = PrivateEndpointConnectionProvisioningState_STATUS("Updating") ) +// Mapping from string to PrivateEndpointConnectionProvisioningState_STATUS +var privateEndpointConnectionProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProvisioningState_STATUS{ + "creating": PrivateEndpointConnectionProvisioningState_STATUS_Creating, + "deleting": PrivateEndpointConnectionProvisioningState_STATUS_Deleting, + "disconnected": PrivateEndpointConnectionProvisioningState_STATUS_Disconnected, + "failed": PrivateEndpointConnectionProvisioningState_STATUS_Failed, + "succeeded": PrivateEndpointConnectionProvisioningState_STATUS_Succeeded, + "updating": PrivateEndpointConnectionProvisioningState_STATUS_Updating, +} + // An object that represents the approval state of the private link connection. type PrivateLinkServiceConnectionState_STATUS struct { // ActionsRequired: A message indicating if changes on the service provider require any updates on the consumer. @@ -4341,8 +4366,9 @@ func (state *PrivateLinkServiceConnectionState_STATUS) AssignProperties_From_Pri // ActionsRequired if source.ActionsRequired != nil { - actionsRequired := PrivateLinkServiceConnectionState_ActionsRequired_STATUS(*source.ActionsRequired) - state.ActionsRequired = &actionsRequired + actionsRequired := *source.ActionsRequired + actionsRequiredTemp := genruntime.ToEnum(actionsRequired, privateLinkServiceConnectionState_ActionsRequired_STATUS_Values) + state.ActionsRequired = &actionsRequiredTemp } else { state.ActionsRequired = nil } @@ -4352,8 +4378,9 @@ func (state *PrivateLinkServiceConnectionState_STATUS) AssignProperties_From_Pri // Status if source.Status != nil { - status := PrivateEndpointServiceConnectionStatus_STATUS(*source.Status) - state.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, privateEndpointServiceConnectionStatus_STATUS_Values) + state.Status = &statusTemp } else { state.Status = nil } @@ -4634,10 +4661,23 @@ const ( PrivateEndpointServiceConnectionStatus_STATUS_Rejected = PrivateEndpointServiceConnectionStatus_STATUS("Rejected") ) +// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS +var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{ + "approved": PrivateEndpointServiceConnectionStatus_STATUS_Approved, + "disconnected": PrivateEndpointServiceConnectionStatus_STATUS_Disconnected, + "pending": PrivateEndpointServiceConnectionStatus_STATUS_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_STATUS_Rejected, +} + type PrivateLinkServiceConnectionState_ActionsRequired_STATUS string const PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None = PrivateLinkServiceConnectionState_ActionsRequired_STATUS("None") +// Mapping from string to PrivateLinkServiceConnectionState_ActionsRequired_STATUS +var privateLinkServiceConnectionState_ActionsRequired_STATUS_Values = map[string]PrivateLinkServiceConnectionState_ActionsRequired_STATUS{ + "none": PrivateLinkServiceConnectionState_ActionsRequired_STATUS_None, +} + func init() { SchemeBuilder.Register(&Vault{}, &VaultList{}) } diff --git a/v2/api/kubernetesconfiguration/v1api20230501/extension_spec_arm_types_gen.go b/v2/api/kubernetesconfiguration/v1api20230501/extension_spec_arm_types_gen.go index 7368ab8ec92..69b606c8029 100644 --- a/v2/api/kubernetesconfiguration/v1api20230501/extension_spec_arm_types_gen.go +++ b/v2/api/kubernetesconfiguration/v1api20230501/extension_spec_arm_types_gen.go @@ -124,6 +124,11 @@ type Identity_Type string const Identity_Type_SystemAssigned = Identity_Type("SystemAssigned") +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "systemassigned": Identity_Type_SystemAssigned, +} + // Scope of the extension. It can be either Cluster or Namespace; but not both. type Scope_ARM struct { // Cluster: Specifies that the scope of the extension is Cluster @@ -143,6 +148,14 @@ const ( SystemData_CreatedByType_User = SystemData_CreatedByType("User") ) +// Mapping from string to SystemData_CreatedByType +var systemData_CreatedByType_Values = map[string]SystemData_CreatedByType{ + "application": SystemData_CreatedByType_Application, + "key": SystemData_CreatedByType_Key, + "managedidentity": SystemData_CreatedByType_ManagedIdentity, + "user": SystemData_CreatedByType_User, +} + // +kubebuilder:validation:Enum={"Application","Key","ManagedIdentity","User"} type SystemData_LastModifiedByType string @@ -153,6 +166,14 @@ const ( SystemData_LastModifiedByType_User = SystemData_LastModifiedByType("User") ) +// Mapping from string to SystemData_LastModifiedByType +var systemData_LastModifiedByType_Values = map[string]SystemData_LastModifiedByType{ + "application": SystemData_LastModifiedByType_Application, + "key": SystemData_LastModifiedByType_Key, + "managedidentity": SystemData_LastModifiedByType_ManagedIdentity, + "user": SystemData_LastModifiedByType_User, +} + // Specifies that the scope of the extension is Cluster type ScopeCluster_ARM struct { // ReleaseNamespace: Namespace where the extension Release must be placed, for a Cluster scoped extension. If this diff --git a/v2/api/kubernetesconfiguration/v1api20230501/extension_status_arm_types_gen.go b/v2/api/kubernetesconfiguration/v1api20230501/extension_status_arm_types_gen.go index e6fc77e556d..1ccca9eb22b 100644 --- a/v2/api/kubernetesconfiguration/v1api20230501/extension_status_arm_types_gen.go +++ b/v2/api/kubernetesconfiguration/v1api20230501/extension_status_arm_types_gen.go @@ -185,6 +185,11 @@ type Identity_Type_STATUS string const Identity_Type_STATUS_SystemAssigned = Identity_Type_STATUS("SystemAssigned") +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "systemassigned": Identity_Type_STATUS_SystemAssigned, +} + // Scope of the extension. It can be either Cluster or Namespace; but not both. type Scope_STATUS_ARM struct { // Cluster: Specifies that the scope of the extension is Cluster @@ -203,6 +208,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -212,6 +225,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // The resource management error additional info. type ErrorAdditionalInfo_STATUS_ARM struct { // Info: The additional info. diff --git a/v2/api/kubernetesconfiguration/v1api20230501/extension_types_gen.go b/v2/api/kubernetesconfiguration/v1api20230501/extension_types_gen.go index 64c12e7bfaa..1189f127873 100644 --- a/v2/api/kubernetesconfiguration/v1api20230501/extension_types_gen.go +++ b/v2/api/kubernetesconfiguration/v1api20230501/extension_types_gen.go @@ -1426,8 +1426,9 @@ func (extension *Extension_STATUS) AssignProperties_From_Extension_STATUS(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningStateDefinition_STATUS(*source.ProvisioningState) - extension.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningStateDefinition_STATUS_Values) + extension.ProvisioningState = &provisioningStateTemp } else { extension.ProvisioningState = nil } @@ -1889,8 +1890,9 @@ func (identity *Extension_Properties_AksAssignedIdentity_Spec) AssignProperties_ // Type if source.Type != nil { - typeVar := Extension_Properties_AksAssignedIdentity_Type_Spec(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extension_Properties_AksAssignedIdentity_Type_Spec_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1996,8 +1998,9 @@ func (identity *Extension_Properties_AksAssignedIdentity_STATUS) AssignPropertie // Type if source.Type != nil { - typeVar := Extension_Properties_AksAssignedIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extension_Properties_AksAssignedIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2113,8 +2116,9 @@ func (status *ExtensionStatus_STATUS) AssignProperties_From_ExtensionStatus_STAT // Level if source.Level != nil { - level := ExtensionStatus_Level_STATUS(*source.Level) - status.Level = &level + level := *source.Level + levelTemp := genruntime.ToEnum(level, extensionStatus_Level_STATUS_Values) + status.Level = &levelTemp } else { status.Level = nil } @@ -2215,8 +2219,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20230501s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2323,8 +2328,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2679,6 +2685,16 @@ const ( ProvisioningStateDefinition_STATUS_Updating = ProvisioningStateDefinition_STATUS("Updating") ) +// Mapping from string to ProvisioningStateDefinition_STATUS +var provisioningStateDefinition_STATUS_Values = map[string]ProvisioningStateDefinition_STATUS{ + "canceled": ProvisioningStateDefinition_STATUS_Canceled, + "creating": ProvisioningStateDefinition_STATUS_Creating, + "deleting": ProvisioningStateDefinition_STATUS_Deleting, + "failed": ProvisioningStateDefinition_STATUS_Failed, + "succeeded": ProvisioningStateDefinition_STATUS_Succeeded, + "updating": ProvisioningStateDefinition_STATUS_Updating, +} + // Scope of the extension. It can be either Cluster or Namespace; but not both. type Scope struct { // Cluster: Specifies that the scope of the extension is Cluster @@ -3110,8 +3126,9 @@ func (data *SystemData) AssignProperties_From_SystemData(source *v20230501s.Syst // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -3124,8 +3141,9 @@ func (data *SystemData) AssignProperties_From_SystemData(source *v20230501s.Syst // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -3299,8 +3317,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -3313,8 +3332,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -3608,6 +3628,12 @@ const ( Extension_Properties_AksAssignedIdentity_Type_Spec_UserAssigned = Extension_Properties_AksAssignedIdentity_Type_Spec("UserAssigned") ) +// Mapping from string to Extension_Properties_AksAssignedIdentity_Type_Spec +var extension_Properties_AksAssignedIdentity_Type_Spec_Values = map[string]Extension_Properties_AksAssignedIdentity_Type_Spec{ + "systemassigned": Extension_Properties_AksAssignedIdentity_Type_Spec_SystemAssigned, + "userassigned": Extension_Properties_AksAssignedIdentity_Type_Spec_UserAssigned, +} + type Extension_Properties_AksAssignedIdentity_Type_STATUS string const ( @@ -3615,6 +3641,12 @@ const ( Extension_Properties_AksAssignedIdentity_Type_STATUS_UserAssigned = Extension_Properties_AksAssignedIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to Extension_Properties_AksAssignedIdentity_Type_STATUS +var extension_Properties_AksAssignedIdentity_Type_STATUS_Values = map[string]Extension_Properties_AksAssignedIdentity_Type_STATUS{ + "systemassigned": Extension_Properties_AksAssignedIdentity_Type_STATUS_SystemAssigned, + "userassigned": Extension_Properties_AksAssignedIdentity_Type_STATUS_UserAssigned, +} + type ExtensionStatus_Level_STATUS string const ( @@ -3623,6 +3655,13 @@ const ( ExtensionStatus_Level_STATUS_Warning = ExtensionStatus_Level_STATUS("Warning") ) +// Mapping from string to ExtensionStatus_Level_STATUS +var extensionStatus_Level_STATUS_Values = map[string]ExtensionStatus_Level_STATUS{ + "error": ExtensionStatus_Level_STATUS_Error, + "information": ExtensionStatus_Level_STATUS_Information, + "warning": ExtensionStatus_Level_STATUS_Warning, +} + // Specifies that the scope of the extension is Cluster type ScopeCluster struct { // ReleaseNamespace: Namespace where the extension Release must be placed, for a Cluster scoped extension. If this diff --git a/v2/api/machinelearningservices/v1api20210701/workspace_spec_arm_types_gen.go b/v2/api/machinelearningservices/v1api20210701/workspace_spec_arm_types_gen.go index 38422f7cceb..5ffb5715228 100644 --- a/v2/api/machinelearningservices/v1api20210701/workspace_spec_arm_types_gen.go +++ b/v2/api/machinelearningservices/v1api20210701/workspace_spec_arm_types_gen.go @@ -139,6 +139,14 @@ const ( Identity_Type_UserAssigned = Identity_Type("UserAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "systemassigned,userassigned": Identity_Type_SystemAssignedUserAssigned, + "userassigned": Identity_Type_UserAssigned, +} + type ServiceManagedResourcesSettings_ARM struct { // CosmosDb: The settings for the service managed cosmosdb account. CosmosDb *CosmosDbSettings_ARM `json:"cosmosDb,omitempty"` @@ -162,6 +170,14 @@ const ( SystemData_CreatedByType_User = SystemData_CreatedByType("User") ) +// Mapping from string to SystemData_CreatedByType +var systemData_CreatedByType_Values = map[string]SystemData_CreatedByType{ + "application": SystemData_CreatedByType_Application, + "key": SystemData_CreatedByType_Key, + "managedidentity": SystemData_CreatedByType_ManagedIdentity, + "user": SystemData_CreatedByType_User, +} + // +kubebuilder:validation:Enum={"Application","Key","ManagedIdentity","User"} type SystemData_LastModifiedByType string @@ -172,6 +188,14 @@ const ( SystemData_LastModifiedByType_User = SystemData_LastModifiedByType("User") ) +// Mapping from string to SystemData_LastModifiedByType +var systemData_LastModifiedByType_Values = map[string]SystemData_LastModifiedByType{ + "application": SystemData_LastModifiedByType_Application, + "key": SystemData_LastModifiedByType_Key, + "managedidentity": SystemData_LastModifiedByType_ManagedIdentity, + "user": SystemData_LastModifiedByType_User, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/machinelearningservices/v1api20210701/workspace_status_arm_types_gen.go b/v2/api/machinelearningservices/v1api20210701/workspace_status_arm_types_gen.go index 42dff8a2818..ef232e6f922 100644 --- a/v2/api/machinelearningservices/v1api20210701/workspace_status_arm_types_gen.go +++ b/v2/api/machinelearningservices/v1api20210701/workspace_status_arm_types_gen.go @@ -180,6 +180,14 @@ const ( Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + type NotebookResourceInfo_STATUS_ARM struct { Fqdn *string `json:"fqdn,omitempty"` @@ -219,6 +227,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -228,6 +244,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // User Assigned Identity type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The clientId(aka appId) of the user assigned identity. diff --git a/v2/api/machinelearningservices/v1api20210701/workspace_types_gen.go b/v2/api/machinelearningservices/v1api20210701/workspace_types_gen.go index ee3d369ca34..d29425ff249 100644 --- a/v2/api/machinelearningservices/v1api20210701/workspace_types_gen.go +++ b/v2/api/machinelearningservices/v1api20210701/workspace_types_gen.go @@ -953,8 +953,9 @@ func (workspace *Workspace_Spec) AssignProperties_From_Workspace_Spec(source *v2 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := WorkspaceProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - workspace.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, workspaceProperties_PublicNetworkAccess_Values) + workspace.PublicNetworkAccess = &publicNetworkAccessTemp } else { workspace.PublicNetworkAccess = nil } @@ -1965,16 +1966,18 @@ func (workspace *Workspace_STATUS) AssignProperties_From_Workspace_STATUS(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := WorkspaceProperties_ProvisioningState_STATUS(*source.ProvisioningState) - workspace.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, workspaceProperties_ProvisioningState_STATUS_Values) + workspace.ProvisioningState = &provisioningStateTemp } else { workspace.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := WorkspaceProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - workspace.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, workspaceProperties_PublicNetworkAccess_STATUS_Values) + workspace.PublicNetworkAccess = &publicNetworkAccessTemp } else { workspace.PublicNetworkAccess = nil } @@ -2410,8 +2413,9 @@ func (property *EncryptionProperty) AssignProperties_From_EncryptionProperty(sou // Status if source.Status != nil { - status := EncryptionProperty_Status(*source.Status) - property.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, encryptionProperty_Status_Values) + property.Status = &statusTemp } else { property.Status = nil } @@ -2593,8 +2597,9 @@ func (property *EncryptionProperty_STATUS) AssignProperties_From_EncryptionPrope // Status if source.Status != nil { - status := EncryptionProperty_Status_STATUS(*source.Status) - property.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, encryptionProperty_Status_STATUS_Values) + property.Status = &statusTemp } else { property.Status = nil } @@ -2717,8 +2722,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20210701s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2889,8 +2895,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3470,8 +3477,9 @@ func (resource *SharedPrivateLinkResource) AssignProperties_From_SharedPrivateLi // Status if source.Status != nil { - status := PrivateEndpointServiceConnectionStatus(*source.Status) - resource.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, privateEndpointServiceConnectionStatus_Values) + resource.Status = &statusTemp } else { resource.Status = nil } @@ -3647,8 +3655,9 @@ func (resource *SharedPrivateLinkResource_STATUS) AssignProperties_From_SharedPr // Status if source.Status != nil { - status := PrivateEndpointServiceConnectionStatus_STATUS(*source.Status) - resource.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, privateEndpointServiceConnectionStatus_STATUS_Values) + resource.Status = &statusTemp } else { resource.Status = nil } @@ -4006,8 +4015,9 @@ func (data *SystemData) AssignProperties_From_SystemData(source *v20210701s.Syst // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -4020,8 +4030,9 @@ func (data *SystemData) AssignProperties_From_SystemData(source *v20210701s.Syst // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -4195,8 +4206,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -4209,8 +4221,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -4328,6 +4341,17 @@ const ( WorkspaceProperties_ProvisioningState_STATUS_Updating = WorkspaceProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to WorkspaceProperties_ProvisioningState_STATUS +var workspaceProperties_ProvisioningState_STATUS_Values = map[string]WorkspaceProperties_ProvisioningState_STATUS{ + "canceled": WorkspaceProperties_ProvisioningState_STATUS_Canceled, + "creating": WorkspaceProperties_ProvisioningState_STATUS_Creating, + "deleting": WorkspaceProperties_ProvisioningState_STATUS_Deleting, + "failed": WorkspaceProperties_ProvisioningState_STATUS_Failed, + "succeeded": WorkspaceProperties_ProvisioningState_STATUS_Succeeded, + "unknown": WorkspaceProperties_ProvisioningState_STATUS_Unknown, + "updating": WorkspaceProperties_ProvisioningState_STATUS_Updating, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type WorkspaceProperties_PublicNetworkAccess string @@ -4336,6 +4360,12 @@ const ( WorkspaceProperties_PublicNetworkAccess_Enabled = WorkspaceProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to WorkspaceProperties_PublicNetworkAccess +var workspaceProperties_PublicNetworkAccess_Values = map[string]WorkspaceProperties_PublicNetworkAccess{ + "disabled": WorkspaceProperties_PublicNetworkAccess_Disabled, + "enabled": WorkspaceProperties_PublicNetworkAccess_Enabled, +} + type WorkspaceProperties_PublicNetworkAccess_STATUS string const ( @@ -4343,6 +4373,12 @@ const ( WorkspaceProperties_PublicNetworkAccess_STATUS_Enabled = WorkspaceProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to WorkspaceProperties_PublicNetworkAccess_STATUS +var workspaceProperties_PublicNetworkAccess_STATUS_Values = map[string]WorkspaceProperties_PublicNetworkAccess_STATUS{ + "disabled": WorkspaceProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": WorkspaceProperties_PublicNetworkAccess_STATUS_Enabled, +} + type CosmosDbSettings struct { // CollectionsThroughput: The throughput of the collections in cosmosdb database CollectionsThroughput *int `json:"collectionsThroughput,omitempty"` @@ -4492,6 +4528,12 @@ const ( EncryptionProperty_Status_Enabled = EncryptionProperty_Status("Enabled") ) +// Mapping from string to EncryptionProperty_Status +var encryptionProperty_Status_Values = map[string]EncryptionProperty_Status{ + "disabled": EncryptionProperty_Status_Disabled, + "enabled": EncryptionProperty_Status_Enabled, +} + type EncryptionProperty_Status_STATUS string const ( @@ -4499,6 +4541,12 @@ const ( EncryptionProperty_Status_STATUS_Enabled = EncryptionProperty_Status_STATUS("Enabled") ) +// Mapping from string to EncryptionProperty_Status_STATUS +var encryptionProperty_Status_STATUS_Values = map[string]EncryptionProperty_Status_STATUS{ + "disabled": EncryptionProperty_Status_STATUS_Disabled, + "enabled": EncryptionProperty_Status_STATUS_Enabled, +} + // Identity that will be used to access key vault for encryption at rest type IdentityForCmk struct { // UserAssignedIdentity: The ArmId of the user assigned identity that will be used to access the customer managed key vault @@ -4945,6 +4993,15 @@ const ( PrivateEndpointServiceConnectionStatus_Timeout = PrivateEndpointServiceConnectionStatus("Timeout") ) +// Mapping from string to PrivateEndpointServiceConnectionStatus +var privateEndpointServiceConnectionStatus_Values = map[string]PrivateEndpointServiceConnectionStatus{ + "approved": PrivateEndpointServiceConnectionStatus_Approved, + "disconnected": PrivateEndpointServiceConnectionStatus_Disconnected, + "pending": PrivateEndpointServiceConnectionStatus_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_Rejected, + "timeout": PrivateEndpointServiceConnectionStatus_Timeout, +} + // The private endpoint connection status. type PrivateEndpointServiceConnectionStatus_STATUS string @@ -4956,6 +5013,15 @@ const ( PrivateEndpointServiceConnectionStatus_STATUS_Timeout = PrivateEndpointServiceConnectionStatus_STATUS("Timeout") ) +// Mapping from string to PrivateEndpointServiceConnectionStatus_STATUS +var privateEndpointServiceConnectionStatus_STATUS_Values = map[string]PrivateEndpointServiceConnectionStatus_STATUS{ + "approved": PrivateEndpointServiceConnectionStatus_STATUS_Approved, + "disconnected": PrivateEndpointServiceConnectionStatus_STATUS_Disconnected, + "pending": PrivateEndpointServiceConnectionStatus_STATUS_Pending, + "rejected": PrivateEndpointServiceConnectionStatus_STATUS_Rejected, + "timeout": PrivateEndpointServiceConnectionStatus_STATUS_Timeout, +} + // User Assigned Identity type UserAssignedIdentity_STATUS struct { // ClientId: The clientId(aka appId) of the user assigned identity. diff --git a/v2/api/machinelearningservices/v1api20210701/workspaces_compute_spec_arm_types_gen.go b/v2/api/machinelearningservices/v1api20210701/workspaces_compute_spec_arm_types_gen.go index 6d303a29287..1bc39d50622 100644 --- a/v2/api/machinelearningservices/v1api20210701/workspaces_compute_spec_arm_types_gen.go +++ b/v2/api/machinelearningservices/v1api20210701/workspaces_compute_spec_arm_types_gen.go @@ -352,6 +352,11 @@ type AKS_ComputeType string const AKS_ComputeType_AKS = AKS_ComputeType("AKS") +// Mapping from string to AKS_ComputeType +var aKS_ComputeType_Values = map[string]AKS_ComputeType{ + "aks": AKS_ComputeType_AKS, +} + type AKS_Properties_ARM struct { // AgentCount: Number of agents AgentCount *int `json:"agentCount,omitempty"` @@ -383,6 +388,11 @@ type AmlCompute_ComputeType string const AmlCompute_ComputeType_AmlCompute = AmlCompute_ComputeType("AmlCompute") +// Mapping from string to AmlCompute_ComputeType +var amlCompute_ComputeType_Values = map[string]AmlCompute_ComputeType{ + "amlcompute": AmlCompute_ComputeType_AmlCompute, +} + // AML Compute properties type AmlComputeProperties_ARM struct { // EnableNodePublicIp: Enable or disable node public IP address provisioning. Possible values are: Possible values are: @@ -427,6 +437,11 @@ type ComputeInstance_ComputeType string const ComputeInstance_ComputeType_ComputeInstance = ComputeInstance_ComputeType("ComputeInstance") +// Mapping from string to ComputeInstance_ComputeType +var computeInstance_ComputeType_Values = map[string]ComputeInstance_ComputeType{ + "computeinstance": ComputeInstance_ComputeType_ComputeInstance, +} + // Compute Instance properties type ComputeInstanceProperties_ARM struct { // ApplicationSharingPolicy: Policy for sharing applications on this compute instance among users of parent workspace. If @@ -458,6 +473,11 @@ type Databricks_ComputeType string const Databricks_ComputeType_Databricks = Databricks_ComputeType("Databricks") +// Mapping from string to Databricks_ComputeType +var databricks_ComputeType_Values = map[string]Databricks_ComputeType{ + "databricks": Databricks_ComputeType_Databricks, +} + // Properties of Databricks type DatabricksProperties_ARM struct { // DatabricksAccessToken: Databricks access token @@ -472,11 +492,21 @@ type DataFactory_ComputeType string const DataFactory_ComputeType_DataFactory = DataFactory_ComputeType("DataFactory") +// Mapping from string to DataFactory_ComputeType +var dataFactory_ComputeType_Values = map[string]DataFactory_ComputeType{ + "datafactory": DataFactory_ComputeType_DataFactory, +} + // +kubebuilder:validation:Enum={"DataLakeAnalytics"} type DataLakeAnalytics_ComputeType string const DataLakeAnalytics_ComputeType_DataLakeAnalytics = DataLakeAnalytics_ComputeType("DataLakeAnalytics") +// Mapping from string to DataLakeAnalytics_ComputeType +var dataLakeAnalytics_ComputeType_Values = map[string]DataLakeAnalytics_ComputeType{ + "datalakeanalytics": DataLakeAnalytics_ComputeType_DataLakeAnalytics, +} + type DataLakeAnalytics_Properties_ARM struct { // DataLakeStoreAccountName: DataLake Store Account Name DataLakeStoreAccountName *string `json:"dataLakeStoreAccountName,omitempty"` @@ -487,6 +517,11 @@ type HDInsight_ComputeType string const HDInsight_ComputeType_HDInsight = HDInsight_ComputeType("HDInsight") +// Mapping from string to HDInsight_ComputeType +var hDInsight_ComputeType_Values = map[string]HDInsight_ComputeType{ + "hdinsight": HDInsight_ComputeType_HDInsight, +} + // HDInsight compute properties type HDInsightProperties_ARM struct { // Address: Public IP address of the master node of the cluster. @@ -504,6 +539,11 @@ type Kubernetes_ComputeType string const Kubernetes_ComputeType_Kubernetes = Kubernetes_ComputeType("Kubernetes") +// Mapping from string to Kubernetes_ComputeType +var kubernetes_ComputeType_Values = map[string]Kubernetes_ComputeType{ + "kubernetes": Kubernetes_ComputeType_Kubernetes, +} + // Kubernetes properties type KubernetesProperties_ARM struct { // DefaultInstanceType: Default instance type @@ -536,6 +576,11 @@ type SynapseSpark_ComputeType string const SynapseSpark_ComputeType_SynapseSpark = SynapseSpark_ComputeType("SynapseSpark") +// Mapping from string to SynapseSpark_ComputeType +var synapseSpark_ComputeType_Values = map[string]SynapseSpark_ComputeType{ + "synapsespark": SynapseSpark_ComputeType_SynapseSpark, +} + type SynapseSpark_Properties_ARM struct { // AutoPauseProperties: Auto pause properties. AutoPauseProperties *AutoPauseProperties_ARM `json:"autoPauseProperties,omitempty"` @@ -573,6 +618,11 @@ type VirtualMachine_ComputeType string const VirtualMachine_ComputeType_VirtualMachine = VirtualMachine_ComputeType("VirtualMachine") +// Mapping from string to VirtualMachine_ComputeType +var virtualMachine_ComputeType_Values = map[string]VirtualMachine_ComputeType{ + "virtualmachine": VirtualMachine_ComputeType_VirtualMachine, +} + type VirtualMachine_Properties_ARM struct { // Address: Public IP address of the virtual machine. Address *string `json:"address,omitempty"` @@ -599,6 +649,13 @@ const ( AKS_Properties_ClusterPurpose_FastProd = AKS_Properties_ClusterPurpose("FastProd") ) +// Mapping from string to AKS_Properties_ClusterPurpose +var aKS_Properties_ClusterPurpose_Values = map[string]AKS_Properties_ClusterPurpose{ + "denseprod": AKS_Properties_ClusterPurpose_DenseProd, + "devtest": AKS_Properties_ClusterPurpose_DevTest, + "fastprod": AKS_Properties_ClusterPurpose_FastProd, +} + // +kubebuilder:validation:Enum={"InternalLoadBalancer","PublicIp"} type AKS_Properties_LoadBalancerType string @@ -607,6 +664,12 @@ const ( AKS_Properties_LoadBalancerType_PublicIp = AKS_Properties_LoadBalancerType("PublicIp") ) +// Mapping from string to AKS_Properties_LoadBalancerType +var aKS_Properties_LoadBalancerType_Values = map[string]AKS_Properties_LoadBalancerType{ + "internalloadbalancer": AKS_Properties_LoadBalancerType_InternalLoadBalancer, + "publicip": AKS_Properties_LoadBalancerType_PublicIp, +} + // Advance configuration for AKS networking type AksNetworkingConfiguration_ARM struct { // DnsServiceIP: An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address @@ -631,6 +694,12 @@ const ( AmlComputeProperties_OsType_Windows = AmlComputeProperties_OsType("Windows") ) +// Mapping from string to AmlComputeProperties_OsType +var amlComputeProperties_OsType_Values = map[string]AmlComputeProperties_OsType{ + "linux": AmlComputeProperties_OsType_Linux, + "windows": AmlComputeProperties_OsType_Windows, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled","NotSpecified"} type AmlComputeProperties_RemoteLoginPortPublicAccess string @@ -640,6 +709,13 @@ const ( AmlComputeProperties_RemoteLoginPortPublicAccess_NotSpecified = AmlComputeProperties_RemoteLoginPortPublicAccess("NotSpecified") ) +// Mapping from string to AmlComputeProperties_RemoteLoginPortPublicAccess +var amlComputeProperties_RemoteLoginPortPublicAccess_Values = map[string]AmlComputeProperties_RemoteLoginPortPublicAccess{ + "disabled": AmlComputeProperties_RemoteLoginPortPublicAccess_Disabled, + "enabled": AmlComputeProperties_RemoteLoginPortPublicAccess_Enabled, + "notspecified": AmlComputeProperties_RemoteLoginPortPublicAccess_NotSpecified, +} + // +kubebuilder:validation:Enum={"Dedicated","LowPriority"} type AmlComputeProperties_VmPriority string @@ -648,6 +724,12 @@ const ( AmlComputeProperties_VmPriority_LowPriority = AmlComputeProperties_VmPriority("LowPriority") ) +// Mapping from string to AmlComputeProperties_VmPriority +var amlComputeProperties_VmPriority_Values = map[string]AmlComputeProperties_VmPriority{ + "dedicated": AmlComputeProperties_VmPriority_Dedicated, + "lowpriority": AmlComputeProperties_VmPriority_LowPriority, +} + // Auto pause properties type AutoPauseProperties_ARM struct { DelayInMinutes *int `json:"delayInMinutes,omitempty"` @@ -669,11 +751,22 @@ const ( ComputeInstanceProperties_ApplicationSharingPolicy_Shared = ComputeInstanceProperties_ApplicationSharingPolicy("Shared") ) +// Mapping from string to ComputeInstanceProperties_ApplicationSharingPolicy +var computeInstanceProperties_ApplicationSharingPolicy_Values = map[string]ComputeInstanceProperties_ApplicationSharingPolicy{ + "personal": ComputeInstanceProperties_ApplicationSharingPolicy_Personal, + "shared": ComputeInstanceProperties_ApplicationSharingPolicy_Shared, +} + // +kubebuilder:validation:Enum={"personal"} type ComputeInstanceProperties_ComputeInstanceAuthorizationType string const ComputeInstanceProperties_ComputeInstanceAuthorizationType_Personal = ComputeInstanceProperties_ComputeInstanceAuthorizationType("personal") +// Mapping from string to ComputeInstanceProperties_ComputeInstanceAuthorizationType +var computeInstanceProperties_ComputeInstanceAuthorizationType_Values = map[string]ComputeInstanceProperties_ComputeInstanceAuthorizationType{ + "personal": ComputeInstanceProperties_ComputeInstanceAuthorizationType_Personal, +} + // Specifies policy and settings for SSH access. type ComputeInstanceSshSettings_ARM struct { // AdminPublicKey: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH @@ -794,6 +887,12 @@ const ( ComputeInstanceSshSettings_SshPublicAccess_Enabled = ComputeInstanceSshSettings_SshPublicAccess("Enabled") ) +// Mapping from string to ComputeInstanceSshSettings_SshPublicAccess +var computeInstanceSshSettings_SshPublicAccess_Values = map[string]ComputeInstanceSshSettings_SshPublicAccess{ + "disabled": ComputeInstanceSshSettings_SshPublicAccess_Disabled, + "enabled": ComputeInstanceSshSettings_SshPublicAccess_Enabled, +} + type InstanceTypeSchema_Resources_ARM struct { // Limits: Resource limits for this instance type Limits map[string]string `json:"limits,omitempty"` @@ -820,6 +919,13 @@ const ( SslConfiguration_Status_Enabled = SslConfiguration_Status("Enabled") ) +// Mapping from string to SslConfiguration_Status +var sslConfiguration_Status_Values = map[string]SslConfiguration_Status{ + "auto": SslConfiguration_Status_Auto, + "disabled": SslConfiguration_Status_Disabled, + "enabled": SslConfiguration_Status_Enabled, +} + // Script reference type ScriptReference_ARM struct { // ScriptArguments: Optional command line arguments passed to the script to run. diff --git a/v2/api/machinelearningservices/v1api20210701/workspaces_compute_status_arm_types_gen.go b/v2/api/machinelearningservices/v1api20210701/workspaces_compute_status_arm_types_gen.go index d520ebbf1da..a9fc9869957 100644 --- a/v2/api/machinelearningservices/v1api20210701/workspaces_compute_status_arm_types_gen.go +++ b/v2/api/machinelearningservices/v1api20210701/workspaces_compute_status_arm_types_gen.go @@ -533,6 +533,11 @@ type AKS_ComputeType_STATUS string const AKS_ComputeType_STATUS_AKS = AKS_ComputeType_STATUS("AKS") +// Mapping from string to AKS_ComputeType_STATUS +var aKS_ComputeType_STATUS_Values = map[string]AKS_ComputeType_STATUS{ + "aks": AKS_ComputeType_STATUS_AKS, +} + type AKS_Properties_STATUS_ARM struct { // AgentCount: Number of agents AgentCount *int `json:"agentCount,omitempty"` @@ -574,10 +579,26 @@ const ( AKS_ProvisioningState_STATUS_Updating = AKS_ProvisioningState_STATUS("Updating") ) +// Mapping from string to AKS_ProvisioningState_STATUS +var aKS_ProvisioningState_STATUS_Values = map[string]AKS_ProvisioningState_STATUS{ + "canceled": AKS_ProvisioningState_STATUS_Canceled, + "creating": AKS_ProvisioningState_STATUS_Creating, + "deleting": AKS_ProvisioningState_STATUS_Deleting, + "failed": AKS_ProvisioningState_STATUS_Failed, + "succeeded": AKS_ProvisioningState_STATUS_Succeeded, + "unknown": AKS_ProvisioningState_STATUS_Unknown, + "updating": AKS_ProvisioningState_STATUS_Updating, +} + type AmlCompute_ComputeType_STATUS string const AmlCompute_ComputeType_STATUS_AmlCompute = AmlCompute_ComputeType_STATUS("AmlCompute") +// Mapping from string to AmlCompute_ComputeType_STATUS +var amlCompute_ComputeType_STATUS_Values = map[string]AmlCompute_ComputeType_STATUS{ + "amlcompute": AmlCompute_ComputeType_STATUS_AmlCompute, +} + type AmlCompute_ProvisioningState_STATUS string const ( @@ -590,6 +611,17 @@ const ( AmlCompute_ProvisioningState_STATUS_Updating = AmlCompute_ProvisioningState_STATUS("Updating") ) +// Mapping from string to AmlCompute_ProvisioningState_STATUS +var amlCompute_ProvisioningState_STATUS_Values = map[string]AmlCompute_ProvisioningState_STATUS{ + "canceled": AmlCompute_ProvisioningState_STATUS_Canceled, + "creating": AmlCompute_ProvisioningState_STATUS_Creating, + "deleting": AmlCompute_ProvisioningState_STATUS_Deleting, + "failed": AmlCompute_ProvisioningState_STATUS_Failed, + "succeeded": AmlCompute_ProvisioningState_STATUS_Succeeded, + "unknown": AmlCompute_ProvisioningState_STATUS_Unknown, + "updating": AmlCompute_ProvisioningState_STATUS_Updating, +} + // AML Compute properties type AmlComputeProperties_STATUS_ARM struct { // AllocationState: Allocation state of the compute. Possible values are: steady - Indicates that the compute is not @@ -656,6 +688,11 @@ type ComputeInstance_ComputeType_STATUS string const ComputeInstance_ComputeType_STATUS_ComputeInstance = ComputeInstance_ComputeType_STATUS("ComputeInstance") +// Mapping from string to ComputeInstance_ComputeType_STATUS +var computeInstance_ComputeType_STATUS_Values = map[string]ComputeInstance_ComputeType_STATUS{ + "computeinstance": ComputeInstance_ComputeType_STATUS_ComputeInstance, +} + type ComputeInstance_ProvisioningState_STATUS string const ( @@ -668,6 +705,17 @@ const ( ComputeInstance_ProvisioningState_STATUS_Updating = ComputeInstance_ProvisioningState_STATUS("Updating") ) +// Mapping from string to ComputeInstance_ProvisioningState_STATUS +var computeInstance_ProvisioningState_STATUS_Values = map[string]ComputeInstance_ProvisioningState_STATUS{ + "canceled": ComputeInstance_ProvisioningState_STATUS_Canceled, + "creating": ComputeInstance_ProvisioningState_STATUS_Creating, + "deleting": ComputeInstance_ProvisioningState_STATUS_Deleting, + "failed": ComputeInstance_ProvisioningState_STATUS_Failed, + "succeeded": ComputeInstance_ProvisioningState_STATUS_Succeeded, + "unknown": ComputeInstance_ProvisioningState_STATUS_Unknown, + "updating": ComputeInstance_ProvisioningState_STATUS_Updating, +} + // Compute Instance properties type ComputeInstanceProperties_STATUS_ARM struct { // ApplicationSharingPolicy: Policy for sharing applications on this compute instance among users of parent workspace. If @@ -716,6 +764,11 @@ type Databricks_ComputeType_STATUS string const Databricks_ComputeType_STATUS_Databricks = Databricks_ComputeType_STATUS("Databricks") +// Mapping from string to Databricks_ComputeType_STATUS +var databricks_ComputeType_STATUS_Values = map[string]Databricks_ComputeType_STATUS{ + "databricks": Databricks_ComputeType_STATUS_Databricks, +} + type Databricks_ProvisioningState_STATUS string const ( @@ -728,6 +781,17 @@ const ( Databricks_ProvisioningState_STATUS_Updating = Databricks_ProvisioningState_STATUS("Updating") ) +// Mapping from string to Databricks_ProvisioningState_STATUS +var databricks_ProvisioningState_STATUS_Values = map[string]Databricks_ProvisioningState_STATUS{ + "canceled": Databricks_ProvisioningState_STATUS_Canceled, + "creating": Databricks_ProvisioningState_STATUS_Creating, + "deleting": Databricks_ProvisioningState_STATUS_Deleting, + "failed": Databricks_ProvisioningState_STATUS_Failed, + "succeeded": Databricks_ProvisioningState_STATUS_Succeeded, + "unknown": Databricks_ProvisioningState_STATUS_Unknown, + "updating": Databricks_ProvisioningState_STATUS_Updating, +} + // Properties of Databricks type DatabricksProperties_STATUS_ARM struct { // DatabricksAccessToken: Databricks access token @@ -741,6 +805,11 @@ type DataFactory_ComputeType_STATUS string const DataFactory_ComputeType_STATUS_DataFactory = DataFactory_ComputeType_STATUS("DataFactory") +// Mapping from string to DataFactory_ComputeType_STATUS +var dataFactory_ComputeType_STATUS_Values = map[string]DataFactory_ComputeType_STATUS{ + "datafactory": DataFactory_ComputeType_STATUS_DataFactory, +} + type DataFactory_ProvisioningState_STATUS string const ( @@ -753,10 +822,26 @@ const ( DataFactory_ProvisioningState_STATUS_Updating = DataFactory_ProvisioningState_STATUS("Updating") ) +// Mapping from string to DataFactory_ProvisioningState_STATUS +var dataFactory_ProvisioningState_STATUS_Values = map[string]DataFactory_ProvisioningState_STATUS{ + "canceled": DataFactory_ProvisioningState_STATUS_Canceled, + "creating": DataFactory_ProvisioningState_STATUS_Creating, + "deleting": DataFactory_ProvisioningState_STATUS_Deleting, + "failed": DataFactory_ProvisioningState_STATUS_Failed, + "succeeded": DataFactory_ProvisioningState_STATUS_Succeeded, + "unknown": DataFactory_ProvisioningState_STATUS_Unknown, + "updating": DataFactory_ProvisioningState_STATUS_Updating, +} + type DataLakeAnalytics_ComputeType_STATUS string const DataLakeAnalytics_ComputeType_STATUS_DataLakeAnalytics = DataLakeAnalytics_ComputeType_STATUS("DataLakeAnalytics") +// Mapping from string to DataLakeAnalytics_ComputeType_STATUS +var dataLakeAnalytics_ComputeType_STATUS_Values = map[string]DataLakeAnalytics_ComputeType_STATUS{ + "datalakeanalytics": DataLakeAnalytics_ComputeType_STATUS_DataLakeAnalytics, +} + type DataLakeAnalytics_Properties_STATUS_ARM struct { // DataLakeStoreAccountName: DataLake Store Account Name DataLakeStoreAccountName *string `json:"dataLakeStoreAccountName,omitempty"` @@ -774,6 +859,17 @@ const ( DataLakeAnalytics_ProvisioningState_STATUS_Updating = DataLakeAnalytics_ProvisioningState_STATUS("Updating") ) +// Mapping from string to DataLakeAnalytics_ProvisioningState_STATUS +var dataLakeAnalytics_ProvisioningState_STATUS_Values = map[string]DataLakeAnalytics_ProvisioningState_STATUS{ + "canceled": DataLakeAnalytics_ProvisioningState_STATUS_Canceled, + "creating": DataLakeAnalytics_ProvisioningState_STATUS_Creating, + "deleting": DataLakeAnalytics_ProvisioningState_STATUS_Deleting, + "failed": DataLakeAnalytics_ProvisioningState_STATUS_Failed, + "succeeded": DataLakeAnalytics_ProvisioningState_STATUS_Succeeded, + "unknown": DataLakeAnalytics_ProvisioningState_STATUS_Unknown, + "updating": DataLakeAnalytics_ProvisioningState_STATUS_Updating, +} + // Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also // follows the OData error response format.). type ErrorResponse_STATUS_ARM struct { @@ -785,6 +881,11 @@ type HDInsight_ComputeType_STATUS string const HDInsight_ComputeType_STATUS_HDInsight = HDInsight_ComputeType_STATUS("HDInsight") +// Mapping from string to HDInsight_ComputeType_STATUS +var hDInsight_ComputeType_STATUS_Values = map[string]HDInsight_ComputeType_STATUS{ + "hdinsight": HDInsight_ComputeType_STATUS_HDInsight, +} + type HDInsight_ProvisioningState_STATUS string const ( @@ -797,6 +898,17 @@ const ( HDInsight_ProvisioningState_STATUS_Updating = HDInsight_ProvisioningState_STATUS("Updating") ) +// Mapping from string to HDInsight_ProvisioningState_STATUS +var hDInsight_ProvisioningState_STATUS_Values = map[string]HDInsight_ProvisioningState_STATUS{ + "canceled": HDInsight_ProvisioningState_STATUS_Canceled, + "creating": HDInsight_ProvisioningState_STATUS_Creating, + "deleting": HDInsight_ProvisioningState_STATUS_Deleting, + "failed": HDInsight_ProvisioningState_STATUS_Failed, + "succeeded": HDInsight_ProvisioningState_STATUS_Succeeded, + "unknown": HDInsight_ProvisioningState_STATUS_Unknown, + "updating": HDInsight_ProvisioningState_STATUS_Updating, +} + // HDInsight compute properties type HDInsightProperties_STATUS_ARM struct { // Address: Public IP address of the master node of the cluster. @@ -813,6 +925,11 @@ type Kubernetes_ComputeType_STATUS string const Kubernetes_ComputeType_STATUS_Kubernetes = Kubernetes_ComputeType_STATUS("Kubernetes") +// Mapping from string to Kubernetes_ComputeType_STATUS +var kubernetes_ComputeType_STATUS_Values = map[string]Kubernetes_ComputeType_STATUS{ + "kubernetes": Kubernetes_ComputeType_STATUS_Kubernetes, +} + type Kubernetes_ProvisioningState_STATUS string const ( @@ -825,6 +942,17 @@ const ( Kubernetes_ProvisioningState_STATUS_Updating = Kubernetes_ProvisioningState_STATUS("Updating") ) +// Mapping from string to Kubernetes_ProvisioningState_STATUS +var kubernetes_ProvisioningState_STATUS_Values = map[string]Kubernetes_ProvisioningState_STATUS{ + "canceled": Kubernetes_ProvisioningState_STATUS_Canceled, + "creating": Kubernetes_ProvisioningState_STATUS_Creating, + "deleting": Kubernetes_ProvisioningState_STATUS_Deleting, + "failed": Kubernetes_ProvisioningState_STATUS_Failed, + "succeeded": Kubernetes_ProvisioningState_STATUS_Succeeded, + "unknown": Kubernetes_ProvisioningState_STATUS_Unknown, + "updating": Kubernetes_ProvisioningState_STATUS_Updating, +} + // Kubernetes properties type KubernetesProperties_STATUS_ARM struct { // DefaultInstanceType: Default instance type @@ -850,6 +978,11 @@ type SynapseSpark_ComputeType_STATUS string const SynapseSpark_ComputeType_STATUS_SynapseSpark = SynapseSpark_ComputeType_STATUS("SynapseSpark") +// Mapping from string to SynapseSpark_ComputeType_STATUS +var synapseSpark_ComputeType_STATUS_Values = map[string]SynapseSpark_ComputeType_STATUS{ + "synapsespark": SynapseSpark_ComputeType_STATUS_SynapseSpark, +} + type SynapseSpark_Properties_STATUS_ARM struct { // AutoPauseProperties: Auto pause properties. AutoPauseProperties *AutoPauseProperties_STATUS_ARM `json:"autoPauseProperties,omitempty"` @@ -894,10 +1027,26 @@ const ( SynapseSpark_ProvisioningState_STATUS_Updating = SynapseSpark_ProvisioningState_STATUS("Updating") ) +// Mapping from string to SynapseSpark_ProvisioningState_STATUS +var synapseSpark_ProvisioningState_STATUS_Values = map[string]SynapseSpark_ProvisioningState_STATUS{ + "canceled": SynapseSpark_ProvisioningState_STATUS_Canceled, + "creating": SynapseSpark_ProvisioningState_STATUS_Creating, + "deleting": SynapseSpark_ProvisioningState_STATUS_Deleting, + "failed": SynapseSpark_ProvisioningState_STATUS_Failed, + "succeeded": SynapseSpark_ProvisioningState_STATUS_Succeeded, + "unknown": SynapseSpark_ProvisioningState_STATUS_Unknown, + "updating": SynapseSpark_ProvisioningState_STATUS_Updating, +} + type VirtualMachine_ComputeType_STATUS string const VirtualMachine_ComputeType_STATUS_VirtualMachine = VirtualMachine_ComputeType_STATUS("VirtualMachine") +// Mapping from string to VirtualMachine_ComputeType_STATUS +var virtualMachine_ComputeType_STATUS_Values = map[string]VirtualMachine_ComputeType_STATUS{ + "virtualmachine": VirtualMachine_ComputeType_STATUS_VirtualMachine, +} + type VirtualMachine_Properties_STATUS_ARM struct { // Address: Public IP address of the virtual machine. Address *string `json:"address,omitempty"` @@ -927,6 +1076,17 @@ const ( VirtualMachine_ProvisioningState_STATUS_Updating = VirtualMachine_ProvisioningState_STATUS("Updating") ) +// Mapping from string to VirtualMachine_ProvisioningState_STATUS +var virtualMachine_ProvisioningState_STATUS_Values = map[string]VirtualMachine_ProvisioningState_STATUS{ + "canceled": VirtualMachine_ProvisioningState_STATUS_Canceled, + "creating": VirtualMachine_ProvisioningState_STATUS_Creating, + "deleting": VirtualMachine_ProvisioningState_STATUS_Deleting, + "failed": VirtualMachine_ProvisioningState_STATUS_Failed, + "succeeded": VirtualMachine_ProvisioningState_STATUS_Succeeded, + "unknown": VirtualMachine_ProvisioningState_STATUS_Unknown, + "updating": VirtualMachine_ProvisioningState_STATUS_Updating, +} + type AKS_Properties_ClusterPurpose_STATUS string const ( @@ -935,6 +1095,13 @@ const ( AKS_Properties_ClusterPurpose_STATUS_FastProd = AKS_Properties_ClusterPurpose_STATUS("FastProd") ) +// Mapping from string to AKS_Properties_ClusterPurpose_STATUS +var aKS_Properties_ClusterPurpose_STATUS_Values = map[string]AKS_Properties_ClusterPurpose_STATUS{ + "denseprod": AKS_Properties_ClusterPurpose_STATUS_DenseProd, + "devtest": AKS_Properties_ClusterPurpose_STATUS_DevTest, + "fastprod": AKS_Properties_ClusterPurpose_STATUS_FastProd, +} + type AKS_Properties_LoadBalancerType_STATUS string const ( @@ -942,6 +1109,12 @@ const ( AKS_Properties_LoadBalancerType_STATUS_PublicIp = AKS_Properties_LoadBalancerType_STATUS("PublicIp") ) +// Mapping from string to AKS_Properties_LoadBalancerType_STATUS +var aKS_Properties_LoadBalancerType_STATUS_Values = map[string]AKS_Properties_LoadBalancerType_STATUS{ + "internalloadbalancer": AKS_Properties_LoadBalancerType_STATUS_InternalLoadBalancer, + "publicip": AKS_Properties_LoadBalancerType_STATUS_PublicIp, +} + // Advance configuration for AKS networking type AksNetworkingConfiguration_STATUS_ARM struct { // DnsServiceIP: An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address @@ -967,6 +1140,12 @@ const ( AmlComputeProperties_AllocationState_STATUS_Steady = AmlComputeProperties_AllocationState_STATUS("Steady") ) +// Mapping from string to AmlComputeProperties_AllocationState_STATUS +var amlComputeProperties_AllocationState_STATUS_Values = map[string]AmlComputeProperties_AllocationState_STATUS{ + "resizing": AmlComputeProperties_AllocationState_STATUS_Resizing, + "steady": AmlComputeProperties_AllocationState_STATUS_Steady, +} + type AmlComputeProperties_OsType_STATUS string const ( @@ -974,6 +1153,12 @@ const ( AmlComputeProperties_OsType_STATUS_Windows = AmlComputeProperties_OsType_STATUS("Windows") ) +// Mapping from string to AmlComputeProperties_OsType_STATUS +var amlComputeProperties_OsType_STATUS_Values = map[string]AmlComputeProperties_OsType_STATUS{ + "linux": AmlComputeProperties_OsType_STATUS_Linux, + "windows": AmlComputeProperties_OsType_STATUS_Windows, +} + type AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS string const ( @@ -982,6 +1167,13 @@ const ( AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS_NotSpecified = AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS("NotSpecified") ) +// Mapping from string to AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS +var amlComputeProperties_RemoteLoginPortPublicAccess_STATUS_Values = map[string]AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS{ + "disabled": AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS_Disabled, + "enabled": AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS_Enabled, + "notspecified": AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS_NotSpecified, +} + type AmlComputeProperties_VmPriority_STATUS string const ( @@ -989,6 +1181,12 @@ const ( AmlComputeProperties_VmPriority_STATUS_LowPriority = AmlComputeProperties_VmPriority_STATUS("LowPriority") ) +// Mapping from string to AmlComputeProperties_VmPriority_STATUS +var amlComputeProperties_VmPriority_STATUS_Values = map[string]AmlComputeProperties_VmPriority_STATUS{ + "dedicated": AmlComputeProperties_VmPriority_STATUS_Dedicated, + "lowpriority": AmlComputeProperties_VmPriority_STATUS_LowPriority, +} + // Auto pause properties type AutoPauseProperties_STATUS_ARM struct { DelayInMinutes *int `json:"delayInMinutes,omitempty"` @@ -1052,10 +1250,21 @@ const ( ComputeInstanceProperties_ApplicationSharingPolicy_STATUS_Shared = ComputeInstanceProperties_ApplicationSharingPolicy_STATUS("Shared") ) +// Mapping from string to ComputeInstanceProperties_ApplicationSharingPolicy_STATUS +var computeInstanceProperties_ApplicationSharingPolicy_STATUS_Values = map[string]ComputeInstanceProperties_ApplicationSharingPolicy_STATUS{ + "personal": ComputeInstanceProperties_ApplicationSharingPolicy_STATUS_Personal, + "shared": ComputeInstanceProperties_ApplicationSharingPolicy_STATUS_Shared, +} + type ComputeInstanceProperties_ComputeInstanceAuthorizationType_STATUS string const ComputeInstanceProperties_ComputeInstanceAuthorizationType_STATUS_Personal = ComputeInstanceProperties_ComputeInstanceAuthorizationType_STATUS("personal") +// Mapping from string to ComputeInstanceProperties_ComputeInstanceAuthorizationType_STATUS +var computeInstanceProperties_ComputeInstanceAuthorizationType_STATUS_Values = map[string]ComputeInstanceProperties_ComputeInstanceAuthorizationType_STATUS{ + "personal": ComputeInstanceProperties_ComputeInstanceAuthorizationType_STATUS_Personal, +} + // Specifies policy and settings for SSH access. type ComputeInstanceSshSettings_STATUS_ARM struct { // AdminPublicKey: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH @@ -1095,6 +1304,25 @@ const ( ComputeInstanceState_STATUS_UserSetupFailed = ComputeInstanceState_STATUS("UserSetupFailed") ) +// Mapping from string to ComputeInstanceState_STATUS +var computeInstanceState_STATUS_Values = map[string]ComputeInstanceState_STATUS{ + "createfailed": ComputeInstanceState_STATUS_CreateFailed, + "creating": ComputeInstanceState_STATUS_Creating, + "deleting": ComputeInstanceState_STATUS_Deleting, + "jobrunning": ComputeInstanceState_STATUS_JobRunning, + "restarting": ComputeInstanceState_STATUS_Restarting, + "running": ComputeInstanceState_STATUS_Running, + "settingup": ComputeInstanceState_STATUS_SettingUp, + "setupfailed": ComputeInstanceState_STATUS_SetupFailed, + "starting": ComputeInstanceState_STATUS_Starting, + "stopped": ComputeInstanceState_STATUS_Stopped, + "stopping": ComputeInstanceState_STATUS_Stopping, + "unknown": ComputeInstanceState_STATUS_Unknown, + "unusable": ComputeInstanceState_STATUS_Unusable, + "usersettingup": ComputeInstanceState_STATUS_UserSettingUp, + "usersetupfailed": ComputeInstanceState_STATUS_UserSetupFailed, +} + // The error detail. type ErrorDetail_STATUS_ARM struct { // AdditionalInfo: The error additional info. @@ -1250,6 +1478,16 @@ const ( ComputeInstanceLastOperation_OperationName_STATUS_Stop = ComputeInstanceLastOperation_OperationName_STATUS("Stop") ) +// Mapping from string to ComputeInstanceLastOperation_OperationName_STATUS +var computeInstanceLastOperation_OperationName_STATUS_Values = map[string]ComputeInstanceLastOperation_OperationName_STATUS{ + "create": ComputeInstanceLastOperation_OperationName_STATUS_Create, + "delete": ComputeInstanceLastOperation_OperationName_STATUS_Delete, + "reimage": ComputeInstanceLastOperation_OperationName_STATUS_Reimage, + "restart": ComputeInstanceLastOperation_OperationName_STATUS_Restart, + "start": ComputeInstanceLastOperation_OperationName_STATUS_Start, + "stop": ComputeInstanceLastOperation_OperationName_STATUS_Stop, +} + type ComputeInstanceLastOperation_OperationStatus_STATUS string const ( @@ -1263,6 +1501,18 @@ const ( ComputeInstanceLastOperation_OperationStatus_STATUS_Succeeded = ComputeInstanceLastOperation_OperationStatus_STATUS("Succeeded") ) +// Mapping from string to ComputeInstanceLastOperation_OperationStatus_STATUS +var computeInstanceLastOperation_OperationStatus_STATUS_Values = map[string]ComputeInstanceLastOperation_OperationStatus_STATUS{ + "createfailed": ComputeInstanceLastOperation_OperationStatus_STATUS_CreateFailed, + "deletefailed": ComputeInstanceLastOperation_OperationStatus_STATUS_DeleteFailed, + "inprogress": ComputeInstanceLastOperation_OperationStatus_STATUS_InProgress, + "reimagefailed": ComputeInstanceLastOperation_OperationStatus_STATUS_ReimageFailed, + "restartfailed": ComputeInstanceLastOperation_OperationStatus_STATUS_RestartFailed, + "startfailed": ComputeInstanceLastOperation_OperationStatus_STATUS_StartFailed, + "stopfailed": ComputeInstanceLastOperation_OperationStatus_STATUS_StopFailed, + "succeeded": ComputeInstanceLastOperation_OperationStatus_STATUS_Succeeded, +} + type ComputeInstanceSshSettings_SshPublicAccess_STATUS string const ( @@ -1270,6 +1520,12 @@ const ( ComputeInstanceSshSettings_SshPublicAccess_STATUS_Enabled = ComputeInstanceSshSettings_SshPublicAccess_STATUS("Enabled") ) +// Mapping from string to ComputeInstanceSshSettings_SshPublicAccess_STATUS +var computeInstanceSshSettings_SshPublicAccess_STATUS_Values = map[string]ComputeInstanceSshSettings_SshPublicAccess_STATUS{ + "disabled": ComputeInstanceSshSettings_SshPublicAccess_STATUS_Disabled, + "enabled": ComputeInstanceSshSettings_SshPublicAccess_STATUS_Enabled, +} + // The resource management error additional info. type ErrorAdditionalInfo_STATUS_ARM struct { // Info: The additional info. @@ -1318,6 +1574,13 @@ const ( SslConfiguration_Status_STATUS_Enabled = SslConfiguration_Status_STATUS("Enabled") ) +// Mapping from string to SslConfiguration_Status_STATUS +var sslConfiguration_Status_STATUS_Values = map[string]SslConfiguration_Status_STATUS{ + "auto": SslConfiguration_Status_STATUS_Auto, + "disabled": SslConfiguration_Status_STATUS_Disabled, + "enabled": SslConfiguration_Status_STATUS_Enabled, +} + // Script reference type ScriptReference_STATUS_ARM struct { // ScriptArguments: Optional command line arguments passed to the script to run. diff --git a/v2/api/machinelearningservices/v1api20210701/workspaces_compute_types_gen.go b/v2/api/machinelearningservices/v1api20210701/workspaces_compute_types_gen.go index 4b91e1aeea9..960eb2fd4eb 100644 --- a/v2/api/machinelearningservices/v1api20210701/workspaces_compute_types_gen.go +++ b/v2/api/machinelearningservices/v1api20210701/workspaces_compute_types_gen.go @@ -2331,8 +2331,9 @@ func (aks *AKS) AssignProperties_From_AKS(source *v20210701s.AKS) error { // ComputeType if source.ComputeType != nil { - computeType := AKS_ComputeType(*source.ComputeType) - aks.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, aKS_ComputeType_Values) + aks.ComputeType = &computeTypeTemp } else { aks.ComputeType = nil } @@ -2615,8 +2616,9 @@ func (aks *AKS_STATUS) AssignProperties_From_AKS_STATUS(source *v20210701s.AKS_S // ComputeType if source.ComputeType != nil { - computeType := AKS_ComputeType_STATUS(*source.ComputeType) - aks.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, aKS_ComputeType_STATUS_Values) + aks.ComputeType = &computeTypeTemp } else { aks.ComputeType = nil } @@ -2678,8 +2680,9 @@ func (aks *AKS_STATUS) AssignProperties_From_AKS_STATUS(source *v20210701s.AKS_S // ProvisioningState if source.ProvisioningState != nil { - provisioningState := AKS_ProvisioningState_STATUS(*source.ProvisioningState) - aks.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, aKS_ProvisioningState_STATUS_Values) + aks.ProvisioningState = &provisioningStateTemp } else { aks.ProvisioningState = nil } @@ -2918,8 +2921,9 @@ func (compute *AmlCompute) AssignProperties_From_AmlCompute(source *v20210701s.A // ComputeType if source.ComputeType != nil { - computeType := AmlCompute_ComputeType(*source.ComputeType) - compute.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, amlCompute_ComputeType_Values) + compute.ComputeType = &computeTypeTemp } else { compute.ComputeType = nil } @@ -3202,8 +3206,9 @@ func (compute *AmlCompute_STATUS) AssignProperties_From_AmlCompute_STATUS(source // ComputeType if source.ComputeType != nil { - computeType := AmlCompute_ComputeType_STATUS(*source.ComputeType) - compute.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, amlCompute_ComputeType_STATUS_Values) + compute.ComputeType = &computeTypeTemp } else { compute.ComputeType = nil } @@ -3265,8 +3270,9 @@ func (compute *AmlCompute_STATUS) AssignProperties_From_AmlCompute_STATUS(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := AmlCompute_ProvisioningState_STATUS(*source.ProvisioningState) - compute.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, amlCompute_ProvisioningState_STATUS_Values) + compute.ProvisioningState = &provisioningStateTemp } else { compute.ProvisioningState = nil } @@ -3505,8 +3511,9 @@ func (instance *ComputeInstance) AssignProperties_From_ComputeInstance(source *v // ComputeType if source.ComputeType != nil { - computeType := ComputeInstance_ComputeType(*source.ComputeType) - instance.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, computeInstance_ComputeType_Values) + instance.ComputeType = &computeTypeTemp } else { instance.ComputeType = nil } @@ -3789,8 +3796,9 @@ func (instance *ComputeInstance_STATUS) AssignProperties_From_ComputeInstance_ST // ComputeType if source.ComputeType != nil { - computeType := ComputeInstance_ComputeType_STATUS(*source.ComputeType) - instance.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, computeInstance_ComputeType_STATUS_Values) + instance.ComputeType = &computeTypeTemp } else { instance.ComputeType = nil } @@ -3852,8 +3860,9 @@ func (instance *ComputeInstance_STATUS) AssignProperties_From_ComputeInstance_ST // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ComputeInstance_ProvisioningState_STATUS(*source.ProvisioningState) - instance.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, computeInstance_ProvisioningState_STATUS_Values) + instance.ProvisioningState = &provisioningStateTemp } else { instance.ProvisioningState = nil } @@ -4092,8 +4101,9 @@ func (databricks *Databricks) AssignProperties_From_Databricks(source *v20210701 // ComputeType if source.ComputeType != nil { - computeType := Databricks_ComputeType(*source.ComputeType) - databricks.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, databricks_ComputeType_Values) + databricks.ComputeType = &computeTypeTemp } else { databricks.ComputeType = nil } @@ -4376,8 +4386,9 @@ func (databricks *Databricks_STATUS) AssignProperties_From_Databricks_STATUS(sou // ComputeType if source.ComputeType != nil { - computeType := Databricks_ComputeType_STATUS(*source.ComputeType) - databricks.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, databricks_ComputeType_STATUS_Values) + databricks.ComputeType = &computeTypeTemp } else { databricks.ComputeType = nil } @@ -4439,8 +4450,9 @@ func (databricks *Databricks_STATUS) AssignProperties_From_Databricks_STATUS(sou // ProvisioningState if source.ProvisioningState != nil { - provisioningState := Databricks_ProvisioningState_STATUS(*source.ProvisioningState) - databricks.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, databricks_ProvisioningState_STATUS_Values) + databricks.ProvisioningState = &provisioningStateTemp } else { databricks.ProvisioningState = nil } @@ -4655,8 +4667,9 @@ func (factory *DataFactory) AssignProperties_From_DataFactory(source *v20210701s // ComputeType if source.ComputeType != nil { - computeType := DataFactory_ComputeType(*source.ComputeType) - factory.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, dataFactory_ComputeType_Values) + factory.ComputeType = &computeTypeTemp } else { factory.ComputeType = nil } @@ -4889,8 +4902,9 @@ func (factory *DataFactory_STATUS) AssignProperties_From_DataFactory_STATUS(sour // ComputeType if source.ComputeType != nil { - computeType := DataFactory_ComputeType_STATUS(*source.ComputeType) - factory.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, dataFactory_ComputeType_STATUS_Values) + factory.ComputeType = &computeTypeTemp } else { factory.ComputeType = nil } @@ -4940,8 +4954,9 @@ func (factory *DataFactory_STATUS) AssignProperties_From_DataFactory_STATUS(sour // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DataFactory_ProvisioningState_STATUS(*source.ProvisioningState) - factory.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, dataFactory_ProvisioningState_STATUS_Values) + factory.ProvisioningState = &provisioningStateTemp } else { factory.ProvisioningState = nil } @@ -5166,8 +5181,9 @@ func (analytics *DataLakeAnalytics) AssignProperties_From_DataLakeAnalytics(sour // ComputeType if source.ComputeType != nil { - computeType := DataLakeAnalytics_ComputeType(*source.ComputeType) - analytics.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, dataLakeAnalytics_ComputeType_Values) + analytics.ComputeType = &computeTypeTemp } else { analytics.ComputeType = nil } @@ -5448,8 +5464,9 @@ func (analytics *DataLakeAnalytics_STATUS) AssignProperties_From_DataLakeAnalyti // ComputeType if source.ComputeType != nil { - computeType := DataLakeAnalytics_ComputeType_STATUS(*source.ComputeType) - analytics.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, dataLakeAnalytics_ComputeType_STATUS_Values) + analytics.ComputeType = &computeTypeTemp } else { analytics.ComputeType = nil } @@ -5511,8 +5528,9 @@ func (analytics *DataLakeAnalytics_STATUS) AssignProperties_From_DataLakeAnalyti // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DataLakeAnalytics_ProvisioningState_STATUS(*source.ProvisioningState) - analytics.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, dataLakeAnalytics_ProvisioningState_STATUS_Values) + analytics.ProvisioningState = &provisioningStateTemp } else { analytics.ProvisioningState = nil } @@ -5751,8 +5769,9 @@ func (insight *HDInsight) AssignProperties_From_HDInsight(source *v20210701s.HDI // ComputeType if source.ComputeType != nil { - computeType := HDInsight_ComputeType(*source.ComputeType) - insight.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, hDInsight_ComputeType_Values) + insight.ComputeType = &computeTypeTemp } else { insight.ComputeType = nil } @@ -6035,8 +6054,9 @@ func (insight *HDInsight_STATUS) AssignProperties_From_HDInsight_STATUS(source * // ComputeType if source.ComputeType != nil { - computeType := HDInsight_ComputeType_STATUS(*source.ComputeType) - insight.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, hDInsight_ComputeType_STATUS_Values) + insight.ComputeType = &computeTypeTemp } else { insight.ComputeType = nil } @@ -6098,8 +6118,9 @@ func (insight *HDInsight_STATUS) AssignProperties_From_HDInsight_STATUS(source * // ProvisioningState if source.ProvisioningState != nil { - provisioningState := HDInsight_ProvisioningState_STATUS(*source.ProvisioningState) - insight.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, hDInsight_ProvisioningState_STATUS_Values) + insight.ProvisioningState = &provisioningStateTemp } else { insight.ProvisioningState = nil } @@ -6338,8 +6359,9 @@ func (kubernetes *Kubernetes) AssignProperties_From_Kubernetes(source *v20210701 // ComputeType if source.ComputeType != nil { - computeType := Kubernetes_ComputeType(*source.ComputeType) - kubernetes.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, kubernetes_ComputeType_Values) + kubernetes.ComputeType = &computeTypeTemp } else { kubernetes.ComputeType = nil } @@ -6622,8 +6644,9 @@ func (kubernetes *Kubernetes_STATUS) AssignProperties_From_Kubernetes_STATUS(sou // ComputeType if source.ComputeType != nil { - computeType := Kubernetes_ComputeType_STATUS(*source.ComputeType) - kubernetes.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, kubernetes_ComputeType_STATUS_Values) + kubernetes.ComputeType = &computeTypeTemp } else { kubernetes.ComputeType = nil } @@ -6685,8 +6708,9 @@ func (kubernetes *Kubernetes_STATUS) AssignProperties_From_Kubernetes_STATUS(sou // ProvisioningState if source.ProvisioningState != nil { - provisioningState := Kubernetes_ProvisioningState_STATUS(*source.ProvisioningState) - kubernetes.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, kubernetes_ProvisioningState_STATUS_Values) + kubernetes.ProvisioningState = &provisioningStateTemp } else { kubernetes.ProvisioningState = nil } @@ -6923,8 +6947,9 @@ func (spark *SynapseSpark) AssignProperties_From_SynapseSpark(source *v20210701s // ComputeType if source.ComputeType != nil { - computeType := SynapseSpark_ComputeType(*source.ComputeType) - spark.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, synapseSpark_ComputeType_Values) + spark.ComputeType = &computeTypeTemp } else { spark.ComputeType = nil } @@ -7205,8 +7230,9 @@ func (spark *SynapseSpark_STATUS) AssignProperties_From_SynapseSpark_STATUS(sour // ComputeType if source.ComputeType != nil { - computeType := SynapseSpark_ComputeType_STATUS(*source.ComputeType) - spark.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, synapseSpark_ComputeType_STATUS_Values) + spark.ComputeType = &computeTypeTemp } else { spark.ComputeType = nil } @@ -7268,8 +7294,9 @@ func (spark *SynapseSpark_STATUS) AssignProperties_From_SynapseSpark_STATUS(sour // ProvisioningState if source.ProvisioningState != nil { - provisioningState := SynapseSpark_ProvisioningState_STATUS(*source.ProvisioningState) - spark.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, synapseSpark_ProvisioningState_STATUS_Values) + spark.ProvisioningState = &provisioningStateTemp } else { spark.ProvisioningState = nil } @@ -7506,8 +7533,9 @@ func (machine *VirtualMachine) AssignProperties_From_VirtualMachine(source *v202 // ComputeType if source.ComputeType != nil { - computeType := VirtualMachine_ComputeType(*source.ComputeType) - machine.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, virtualMachine_ComputeType_Values) + machine.ComputeType = &computeTypeTemp } else { machine.ComputeType = nil } @@ -7788,8 +7816,9 @@ func (machine *VirtualMachine_STATUS) AssignProperties_From_VirtualMachine_STATU // ComputeType if source.ComputeType != nil { - computeType := VirtualMachine_ComputeType_STATUS(*source.ComputeType) - machine.ComputeType = &computeType + computeType := *source.ComputeType + computeTypeTemp := genruntime.ToEnum(computeType, virtualMachine_ComputeType_STATUS_Values) + machine.ComputeType = &computeTypeTemp } else { machine.ComputeType = nil } @@ -7851,8 +7880,9 @@ func (machine *VirtualMachine_STATUS) AssignProperties_From_VirtualMachine_STATU // ProvisioningState if source.ProvisioningState != nil { - provisioningState := VirtualMachine_ProvisioningState_STATUS(*source.ProvisioningState) - machine.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, virtualMachine_ProvisioningState_STATUS_Values) + machine.ProvisioningState = &provisioningStateTemp } else { machine.ProvisioningState = nil } @@ -8156,8 +8186,9 @@ func (properties *AKS_Properties) AssignProperties_From_AKS_Properties(source *v // ClusterPurpose if source.ClusterPurpose != nil { - clusterPurpose := AKS_Properties_ClusterPurpose(*source.ClusterPurpose) - properties.ClusterPurpose = &clusterPurpose + clusterPurpose := *source.ClusterPurpose + clusterPurposeTemp := genruntime.ToEnum(clusterPurpose, aKS_Properties_ClusterPurpose_Values) + properties.ClusterPurpose = &clusterPurposeTemp } else { properties.ClusterPurpose = nil } @@ -8167,8 +8198,9 @@ func (properties *AKS_Properties) AssignProperties_From_AKS_Properties(source *v // LoadBalancerType if source.LoadBalancerType != nil { - loadBalancerType := AKS_Properties_LoadBalancerType(*source.LoadBalancerType) - properties.LoadBalancerType = &loadBalancerType + loadBalancerType := *source.LoadBalancerType + loadBalancerTypeTemp := genruntime.ToEnum(loadBalancerType, aKS_Properties_LoadBalancerType_Values) + properties.LoadBalancerType = &loadBalancerTypeTemp } else { properties.LoadBalancerType = nil } @@ -8467,8 +8499,9 @@ func (properties *AKS_Properties_STATUS) AssignProperties_From_AKS_Properties_ST // ClusterPurpose if source.ClusterPurpose != nil { - clusterPurpose := AKS_Properties_ClusterPurpose_STATUS(*source.ClusterPurpose) - properties.ClusterPurpose = &clusterPurpose + clusterPurpose := *source.ClusterPurpose + clusterPurposeTemp := genruntime.ToEnum(clusterPurpose, aKS_Properties_ClusterPurpose_STATUS_Values) + properties.ClusterPurpose = &clusterPurposeTemp } else { properties.ClusterPurpose = nil } @@ -8478,8 +8511,9 @@ func (properties *AKS_Properties_STATUS) AssignProperties_From_AKS_Properties_ST // LoadBalancerType if source.LoadBalancerType != nil { - loadBalancerType := AKS_Properties_LoadBalancerType_STATUS(*source.LoadBalancerType) - properties.LoadBalancerType = &loadBalancerType + loadBalancerType := *source.LoadBalancerType + loadBalancerTypeTemp := genruntime.ToEnum(loadBalancerType, aKS_Properties_LoadBalancerType_STATUS_Values) + properties.LoadBalancerType = &loadBalancerTypeTemp } else { properties.LoadBalancerType = nil } @@ -8847,16 +8881,18 @@ func (properties *AmlComputeProperties) AssignProperties_From_AmlComputeProperti // OsType if source.OsType != nil { - osType := AmlComputeProperties_OsType(*source.OsType) - properties.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, amlComputeProperties_OsType_Values) + properties.OsType = &osTypeTemp } else { properties.OsType = nil } // RemoteLoginPortPublicAccess if source.RemoteLoginPortPublicAccess != nil { - remoteLoginPortPublicAccess := AmlComputeProperties_RemoteLoginPortPublicAccess(*source.RemoteLoginPortPublicAccess) - properties.RemoteLoginPortPublicAccess = &remoteLoginPortPublicAccess + remoteLoginPortPublicAccess := *source.RemoteLoginPortPublicAccess + remoteLoginPortPublicAccessTemp := genruntime.ToEnum(remoteLoginPortPublicAccess, amlComputeProperties_RemoteLoginPortPublicAccess_Values) + properties.RemoteLoginPortPublicAccess = &remoteLoginPortPublicAccessTemp } else { properties.RemoteLoginPortPublicAccess = nil } @@ -8911,8 +8947,9 @@ func (properties *AmlComputeProperties) AssignProperties_From_AmlComputeProperti // VmPriority if source.VmPriority != nil { - vmPriority := AmlComputeProperties_VmPriority(*source.VmPriority) - properties.VmPriority = &vmPriority + vmPriority := *source.VmPriority + vmPriorityTemp := genruntime.ToEnum(vmPriority, amlComputeProperties_VmPriority_Values) + properties.VmPriority = &vmPriorityTemp } else { properties.VmPriority = nil } @@ -9339,8 +9376,9 @@ func (properties *AmlComputeProperties_STATUS) AssignProperties_From_AmlComputeP // AllocationState if source.AllocationState != nil { - allocationState := AmlComputeProperties_AllocationState_STATUS(*source.AllocationState) - properties.AllocationState = &allocationState + allocationState := *source.AllocationState + allocationStateTemp := genruntime.ToEnum(allocationState, amlComputeProperties_AllocationState_STATUS_Values) + properties.AllocationState = &allocationStateTemp } else { properties.AllocationState = nil } @@ -9399,16 +9437,18 @@ func (properties *AmlComputeProperties_STATUS) AssignProperties_From_AmlComputeP // OsType if source.OsType != nil { - osType := AmlComputeProperties_OsType_STATUS(*source.OsType) - properties.OsType = &osType + osType := *source.OsType + osTypeTemp := genruntime.ToEnum(osType, amlComputeProperties_OsType_STATUS_Values) + properties.OsType = &osTypeTemp } else { properties.OsType = nil } // RemoteLoginPortPublicAccess if source.RemoteLoginPortPublicAccess != nil { - remoteLoginPortPublicAccess := AmlComputeProperties_RemoteLoginPortPublicAccess_STATUS(*source.RemoteLoginPortPublicAccess) - properties.RemoteLoginPortPublicAccess = &remoteLoginPortPublicAccess + remoteLoginPortPublicAccess := *source.RemoteLoginPortPublicAccess + remoteLoginPortPublicAccessTemp := genruntime.ToEnum(remoteLoginPortPublicAccess, amlComputeProperties_RemoteLoginPortPublicAccess_STATUS_Values) + properties.RemoteLoginPortPublicAccess = &remoteLoginPortPublicAccessTemp } else { properties.RemoteLoginPortPublicAccess = nil } @@ -9466,8 +9506,9 @@ func (properties *AmlComputeProperties_STATUS) AssignProperties_From_AmlComputeP // VmPriority if source.VmPriority != nil { - vmPriority := AmlComputeProperties_VmPriority_STATUS(*source.VmPriority) - properties.VmPriority = &vmPriority + vmPriority := *source.VmPriority + vmPriorityTemp := genruntime.ToEnum(vmPriority, amlComputeProperties_VmPriority_STATUS_Values) + properties.VmPriority = &vmPriorityTemp } else { properties.VmPriority = nil } @@ -9811,16 +9852,18 @@ func (properties *ComputeInstanceProperties) AssignProperties_From_ComputeInstan // ApplicationSharingPolicy if source.ApplicationSharingPolicy != nil { - applicationSharingPolicy := ComputeInstanceProperties_ApplicationSharingPolicy(*source.ApplicationSharingPolicy) - properties.ApplicationSharingPolicy = &applicationSharingPolicy + applicationSharingPolicy := *source.ApplicationSharingPolicy + applicationSharingPolicyTemp := genruntime.ToEnum(applicationSharingPolicy, computeInstanceProperties_ApplicationSharingPolicy_Values) + properties.ApplicationSharingPolicy = &applicationSharingPolicyTemp } else { properties.ApplicationSharingPolicy = nil } // ComputeInstanceAuthorizationType if source.ComputeInstanceAuthorizationType != nil { - computeInstanceAuthorizationType := ComputeInstanceProperties_ComputeInstanceAuthorizationType(*source.ComputeInstanceAuthorizationType) - properties.ComputeInstanceAuthorizationType = &computeInstanceAuthorizationType + computeInstanceAuthorizationType := *source.ComputeInstanceAuthorizationType + computeInstanceAuthorizationTypeTemp := genruntime.ToEnum(computeInstanceAuthorizationType, computeInstanceProperties_ComputeInstanceAuthorizationType_Values) + properties.ComputeInstanceAuthorizationType = &computeInstanceAuthorizationTypeTemp } else { properties.ComputeInstanceAuthorizationType = nil } @@ -10225,8 +10268,9 @@ func (properties *ComputeInstanceProperties_STATUS) AssignProperties_From_Comput // ApplicationSharingPolicy if source.ApplicationSharingPolicy != nil { - applicationSharingPolicy := ComputeInstanceProperties_ApplicationSharingPolicy_STATUS(*source.ApplicationSharingPolicy) - properties.ApplicationSharingPolicy = &applicationSharingPolicy + applicationSharingPolicy := *source.ApplicationSharingPolicy + applicationSharingPolicyTemp := genruntime.ToEnum(applicationSharingPolicy, computeInstanceProperties_ApplicationSharingPolicy_STATUS_Values) + properties.ApplicationSharingPolicy = &applicationSharingPolicyTemp } else { properties.ApplicationSharingPolicy = nil } @@ -10251,8 +10295,9 @@ func (properties *ComputeInstanceProperties_STATUS) AssignProperties_From_Comput // ComputeInstanceAuthorizationType if source.ComputeInstanceAuthorizationType != nil { - computeInstanceAuthorizationType := ComputeInstanceProperties_ComputeInstanceAuthorizationType_STATUS(*source.ComputeInstanceAuthorizationType) - properties.ComputeInstanceAuthorizationType = &computeInstanceAuthorizationType + computeInstanceAuthorizationType := *source.ComputeInstanceAuthorizationType + computeInstanceAuthorizationTypeTemp := genruntime.ToEnum(computeInstanceAuthorizationType, computeInstanceProperties_ComputeInstanceAuthorizationType_STATUS_Values) + properties.ComputeInstanceAuthorizationType = &computeInstanceAuthorizationTypeTemp } else { properties.ComputeInstanceAuthorizationType = nil } @@ -10349,8 +10394,9 @@ func (properties *ComputeInstanceProperties_STATUS) AssignProperties_From_Comput // State if source.State != nil { - state := ComputeInstanceState_STATUS(*source.State) - properties.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, computeInstanceState_STATUS_Values) + properties.State = &stateTemp } else { properties.State = nil } @@ -13766,16 +13812,18 @@ func (operation *ComputeInstanceLastOperation_STATUS) AssignProperties_From_Comp // OperationName if source.OperationName != nil { - operationName := ComputeInstanceLastOperation_OperationName_STATUS(*source.OperationName) - operation.OperationName = &operationName + operationName := *source.OperationName + operationNameTemp := genruntime.ToEnum(operationName, computeInstanceLastOperation_OperationName_STATUS_Values) + operation.OperationName = &operationNameTemp } else { operation.OperationName = nil } // OperationStatus if source.OperationStatus != nil { - operationStatus := ComputeInstanceLastOperation_OperationStatus_STATUS(*source.OperationStatus) - operation.OperationStatus = &operationStatus + operationStatus := *source.OperationStatus + operationStatusTemp := genruntime.ToEnum(operationStatus, computeInstanceLastOperation_OperationStatus_STATUS_Values) + operation.OperationStatus = &operationStatusTemp } else { operation.OperationStatus = nil } @@ -13893,8 +13941,9 @@ func (settings *ComputeInstanceSshSettings) AssignProperties_From_ComputeInstanc // SshPublicAccess if source.SshPublicAccess != nil { - sshPublicAccess := ComputeInstanceSshSettings_SshPublicAccess(*source.SshPublicAccess) - settings.SshPublicAccess = &sshPublicAccess + sshPublicAccess := *source.SshPublicAccess + sshPublicAccessTemp := genruntime.ToEnum(sshPublicAccess, computeInstanceSshSettings_SshPublicAccess_Values) + settings.SshPublicAccess = &sshPublicAccessTemp } else { settings.SshPublicAccess = nil } @@ -14022,8 +14071,9 @@ func (settings *ComputeInstanceSshSettings_STATUS) AssignProperties_From_Compute // SshPublicAccess if source.SshPublicAccess != nil { - sshPublicAccess := ComputeInstanceSshSettings_SshPublicAccess_STATUS(*source.SshPublicAccess) - settings.SshPublicAccess = &sshPublicAccess + sshPublicAccess := *source.SshPublicAccess + sshPublicAccessTemp := genruntime.ToEnum(sshPublicAccess, computeInstanceSshSettings_SshPublicAccess_STATUS_Values) + settings.SshPublicAccess = &sshPublicAccessTemp } else { settings.SshPublicAccess = nil } @@ -15563,8 +15613,9 @@ func (configuration *SslConfiguration) AssignProperties_From_SslConfiguration(so // Status if source.Status != nil { - status := SslConfiguration_Status(*source.Status) - configuration.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, sslConfiguration_Status_Values) + configuration.Status = &statusTemp } else { configuration.Status = nil } @@ -15752,8 +15803,9 @@ func (configuration *SslConfiguration_STATUS) AssignProperties_From_SslConfigura // Status if source.Status != nil { - status := SslConfiguration_Status_STATUS(*source.Status) - configuration.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, sslConfiguration_Status_STATUS_Values) + configuration.Status = &statusTemp } else { configuration.Status = nil } diff --git a/v2/api/machinelearningservices/v1api20210701/workspaces_connection_types_gen.go b/v2/api/machinelearningservices/v1api20210701/workspaces_connection_types_gen.go index 88aac681ff1..f45e7641dc3 100644 --- a/v2/api/machinelearningservices/v1api20210701/workspaces_connection_types_gen.go +++ b/v2/api/machinelearningservices/v1api20210701/workspaces_connection_types_gen.go @@ -542,8 +542,9 @@ func (connection *Workspaces_Connection_Spec) AssignProperties_From_Workspaces_C // ValueFormat if source.ValueFormat != nil { - valueFormat := WorkspaceConnectionProps_ValueFormat(*source.ValueFormat) - connection.ValueFormat = &valueFormat + valueFormat := *source.ValueFormat + valueFormatTemp := genruntime.ToEnum(valueFormat, workspaceConnectionProps_ValueFormat_Values) + connection.ValueFormat = &valueFormatTemp } else { connection.ValueFormat = nil } @@ -830,8 +831,9 @@ func (connection *Workspaces_Connection_STATUS) AssignProperties_From_Workspaces // ValueFormat if source.ValueFormat != nil { - valueFormat := WorkspaceConnectionProps_ValueFormat_STATUS(*source.ValueFormat) - connection.ValueFormat = &valueFormat + valueFormat := *source.ValueFormat + valueFormatTemp := genruntime.ToEnum(valueFormat, workspaceConnectionProps_ValueFormat_STATUS_Values) + connection.ValueFormat = &valueFormatTemp } else { connection.ValueFormat = nil } @@ -893,10 +895,20 @@ type WorkspaceConnectionProps_ValueFormat string const WorkspaceConnectionProps_ValueFormat_JSON = WorkspaceConnectionProps_ValueFormat("JSON") +// Mapping from string to WorkspaceConnectionProps_ValueFormat +var workspaceConnectionProps_ValueFormat_Values = map[string]WorkspaceConnectionProps_ValueFormat{ + "json": WorkspaceConnectionProps_ValueFormat_JSON, +} + type WorkspaceConnectionProps_ValueFormat_STATUS string const WorkspaceConnectionProps_ValueFormat_STATUS_JSON = WorkspaceConnectionProps_ValueFormat_STATUS("JSON") +// Mapping from string to WorkspaceConnectionProps_ValueFormat_STATUS +var workspaceConnectionProps_ValueFormat_STATUS_Values = map[string]WorkspaceConnectionProps_ValueFormat_STATUS{ + "json": WorkspaceConnectionProps_ValueFormat_STATUS_JSON, +} + func init() { SchemeBuilder.Register(&WorkspacesConnection{}, &WorkspacesConnectionList{}) } diff --git a/v2/api/managedidentity/v1api20230131/federated_identity_credential_types_gen.go b/v2/api/managedidentity/v1api20230131/federated_identity_credential_types_gen.go index 6057ed102b9..9755351f338 100644 --- a/v2/api/managedidentity/v1api20230131/federated_identity_credential_types_gen.go +++ b/v2/api/managedidentity/v1api20230131/federated_identity_credential_types_gen.go @@ -976,8 +976,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -990,8 +991,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } diff --git a/v2/api/managedidentity/v1api20230131/user_assigned_identities_federated_identity_credential_status_arm_types_gen.go b/v2/api/managedidentity/v1api20230131/user_assigned_identities_federated_identity_credential_status_arm_types_gen.go index 475e1962a4b..bbb0bd384a6 100644 --- a/v2/api/managedidentity/v1api20230131/user_assigned_identities_federated_identity_credential_status_arm_types_gen.go +++ b/v2/api/managedidentity/v1api20230131/user_assigned_identities_federated_identity_credential_status_arm_types_gen.go @@ -63,6 +63,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -71,3 +79,11 @@ const ( SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} diff --git a/v2/api/network.frontdoor/v1api20220501/front_door_web_application_firewall_policy_spec_arm_types_gen.go b/v2/api/network.frontdoor/v1api20220501/front_door_web_application_firewall_policy_spec_arm_types_gen.go index dccbff4718e..e2601d3f09e 100644 --- a/v2/api/network.frontdoor/v1api20220501/front_door_web_application_firewall_policy_spec_arm_types_gen.go +++ b/v2/api/network.frontdoor/v1api20220501/front_door_web_application_firewall_policy_spec_arm_types_gen.go @@ -101,6 +101,13 @@ const ( Sku_Name_Standard_AzureFrontDoor = Sku_Name("Standard_AzureFrontDoor") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "classic_azurefrontdoor": Sku_Name_Classic_AzureFrontDoor, + "premium_azurefrontdoor": Sku_Name_Premium_AzureFrontDoor, + "standard_azurefrontdoor": Sku_Name_Standard_AzureFrontDoor, +} + // Defines contents of a web application rule type CustomRule_ARM struct { // Action: Describes what action to be applied when rule matches. @@ -154,6 +161,12 @@ const ( PolicySettings_EnabledState_Enabled = PolicySettings_EnabledState("Enabled") ) +// Mapping from string to PolicySettings_EnabledState +var policySettings_EnabledState_Values = map[string]PolicySettings_EnabledState{ + "disabled": PolicySettings_EnabledState_Disabled, + "enabled": PolicySettings_EnabledState_Enabled, +} + // +kubebuilder:validation:Enum={"Detection","Prevention"} type PolicySettings_Mode string @@ -162,6 +175,12 @@ const ( PolicySettings_Mode_Prevention = PolicySettings_Mode("Prevention") ) +// Mapping from string to PolicySettings_Mode +var policySettings_Mode_Values = map[string]PolicySettings_Mode{ + "detection": PolicySettings_Mode_Detection, + "prevention": PolicySettings_Mode_Prevention, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type PolicySettings_RequestBodyCheck string @@ -170,6 +189,12 @@ const ( PolicySettings_RequestBodyCheck_Enabled = PolicySettings_RequestBodyCheck("Enabled") ) +// Mapping from string to PolicySettings_RequestBodyCheck +var policySettings_RequestBodyCheck_Values = map[string]PolicySettings_RequestBodyCheck{ + "disabled": PolicySettings_RequestBodyCheck_Disabled, + "enabled": PolicySettings_RequestBodyCheck_Enabled, +} + // Defines the action to take on rule match. // +kubebuilder:validation:Enum={"Allow","AnomalyScoring","Block","Log","Redirect"} type ActionType string @@ -182,6 +207,15 @@ const ( ActionType_Redirect = ActionType("Redirect") ) +// Mapping from string to ActionType +var actionType_Values = map[string]ActionType{ + "allow": ActionType_Allow, + "anomalyscoring": ActionType_AnomalyScoring, + "block": ActionType_Block, + "log": ActionType_Log, + "redirect": ActionType_Redirect, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type CustomRule_EnabledState string @@ -190,6 +224,12 @@ const ( CustomRule_EnabledState_Enabled = CustomRule_EnabledState("Enabled") ) +// Mapping from string to CustomRule_EnabledState +var customRule_EnabledState_Values = map[string]CustomRule_EnabledState{ + "disabled": CustomRule_EnabledState_Disabled, + "enabled": CustomRule_EnabledState_Enabled, +} + // +kubebuilder:validation:Enum={"MatchRule","RateLimitRule"} type CustomRule_RuleType string @@ -198,6 +238,12 @@ const ( CustomRule_RuleType_RateLimitRule = CustomRule_RuleType("RateLimitRule") ) +// Mapping from string to CustomRule_RuleType +var customRule_RuleType_Values = map[string]CustomRule_RuleType{ + "matchrule": CustomRule_RuleType_MatchRule, + "ratelimitrule": CustomRule_RuleType_RateLimitRule, +} + // Exclude variables from managed rule evaluation. type ManagedRuleExclusion_ARM struct { // MatchVariable: The variable type to be excluded. @@ -233,6 +279,13 @@ const ( ManagedRuleSetActionType_Redirect = ManagedRuleSetActionType("Redirect") ) +// Mapping from string to ManagedRuleSetActionType +var managedRuleSetActionType_Values = map[string]ManagedRuleSetActionType{ + "block": ManagedRuleSetActionType_Block, + "log": ManagedRuleSetActionType_Log, + "redirect": ManagedRuleSetActionType_Redirect, +} + // Define a match condition. type MatchCondition_ARM struct { // MatchValue: List of possible match values. @@ -266,6 +319,15 @@ const ( ManagedRuleExclusion_MatchVariable_RequestHeaderNames = ManagedRuleExclusion_MatchVariable("RequestHeaderNames") ) +// Mapping from string to ManagedRuleExclusion_MatchVariable +var managedRuleExclusion_MatchVariable_Values = map[string]ManagedRuleExclusion_MatchVariable{ + "querystringargnames": ManagedRuleExclusion_MatchVariable_QueryStringArgNames, + "requestbodyjsonargnames": ManagedRuleExclusion_MatchVariable_RequestBodyJsonArgNames, + "requestbodypostargnames": ManagedRuleExclusion_MatchVariable_RequestBodyPostArgNames, + "requestcookienames": ManagedRuleExclusion_MatchVariable_RequestCookieNames, + "requestheadernames": ManagedRuleExclusion_MatchVariable_RequestHeaderNames, +} + // +kubebuilder:validation:Enum={"Contains","EndsWith","Equals","EqualsAny","StartsWith"} type ManagedRuleExclusion_SelectorMatchOperator string @@ -277,6 +339,15 @@ const ( ManagedRuleExclusion_SelectorMatchOperator_StartsWith = ManagedRuleExclusion_SelectorMatchOperator("StartsWith") ) +// Mapping from string to ManagedRuleExclusion_SelectorMatchOperator +var managedRuleExclusion_SelectorMatchOperator_Values = map[string]ManagedRuleExclusion_SelectorMatchOperator{ + "contains": ManagedRuleExclusion_SelectorMatchOperator_Contains, + "endswith": ManagedRuleExclusion_SelectorMatchOperator_EndsWith, + "equals": ManagedRuleExclusion_SelectorMatchOperator_Equals, + "equalsany": ManagedRuleExclusion_SelectorMatchOperator_EqualsAny, + "startswith": ManagedRuleExclusion_SelectorMatchOperator_StartsWith, +} + // Defines a managed rule group override setting. type ManagedRuleOverride_ARM struct { // Action: Describes the override action to be applied when rule matches. @@ -307,6 +378,19 @@ const ( MatchCondition_MatchVariable_SocketAddr = MatchCondition_MatchVariable("SocketAddr") ) +// Mapping from string to MatchCondition_MatchVariable +var matchCondition_MatchVariable_Values = map[string]MatchCondition_MatchVariable{ + "cookies": MatchCondition_MatchVariable_Cookies, + "postargs": MatchCondition_MatchVariable_PostArgs, + "querystring": MatchCondition_MatchVariable_QueryString, + "remoteaddr": MatchCondition_MatchVariable_RemoteAddr, + "requestbody": MatchCondition_MatchVariable_RequestBody, + "requestheader": MatchCondition_MatchVariable_RequestHeader, + "requestmethod": MatchCondition_MatchVariable_RequestMethod, + "requesturi": MatchCondition_MatchVariable_RequestUri, + "socketaddr": MatchCondition_MatchVariable_SocketAddr, +} + // +kubebuilder:validation:Enum={"Any","BeginsWith","Contains","EndsWith","Equal","GeoMatch","GreaterThan","GreaterThanOrEqual","IPMatch","LessThan","LessThanOrEqual","RegEx"} type MatchCondition_Operator string @@ -325,6 +409,22 @@ const ( MatchCondition_Operator_RegEx = MatchCondition_Operator("RegEx") ) +// Mapping from string to MatchCondition_Operator +var matchCondition_Operator_Values = map[string]MatchCondition_Operator{ + "any": MatchCondition_Operator_Any, + "beginswith": MatchCondition_Operator_BeginsWith, + "contains": MatchCondition_Operator_Contains, + "endswith": MatchCondition_Operator_EndsWith, + "equal": MatchCondition_Operator_Equal, + "geomatch": MatchCondition_Operator_GeoMatch, + "greaterthan": MatchCondition_Operator_GreaterThan, + "greaterthanorequal": MatchCondition_Operator_GreaterThanOrEqual, + "ipmatch": MatchCondition_Operator_IPMatch, + "lessthan": MatchCondition_Operator_LessThan, + "lessthanorequal": MatchCondition_Operator_LessThanOrEqual, + "regex": MatchCondition_Operator_RegEx, +} + // Describes what transforms applied before matching. // +kubebuilder:validation:Enum={"Lowercase","RemoveNulls","Trim","Uppercase","UrlDecode","UrlEncode"} type TransformType string @@ -338,6 +438,16 @@ const ( TransformType_UrlEncode = TransformType("UrlEncode") ) +// Mapping from string to TransformType +var transformType_Values = map[string]TransformType{ + "lowercase": TransformType_Lowercase, + "removenulls": TransformType_RemoveNulls, + "trim": TransformType_Trim, + "uppercase": TransformType_Uppercase, + "urldecode": TransformType_UrlDecode, + "urlencode": TransformType_UrlEncode, +} + // Describes if the managed rule is in enabled or disabled state. // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ManagedRuleEnabledState string @@ -346,3 +456,9 @@ const ( ManagedRuleEnabledState_Disabled = ManagedRuleEnabledState("Disabled") ManagedRuleEnabledState_Enabled = ManagedRuleEnabledState("Enabled") ) + +// Mapping from string to ManagedRuleEnabledState +var managedRuleEnabledState_Values = map[string]ManagedRuleEnabledState{ + "disabled": ManagedRuleEnabledState_Disabled, + "enabled": ManagedRuleEnabledState_Enabled, +} diff --git a/v2/api/network.frontdoor/v1api20220501/front_door_web_application_firewall_policy_status_arm_types_gen.go b/v2/api/network.frontdoor/v1api20220501/front_door_web_application_firewall_policy_status_arm_types_gen.go index 1f8ea10b824..67b2b7f60f2 100644 --- a/v2/api/network.frontdoor/v1api20220501/front_door_web_application_firewall_policy_status_arm_types_gen.go +++ b/v2/api/network.frontdoor/v1api20220501/front_door_web_application_firewall_policy_status_arm_types_gen.go @@ -120,6 +120,13 @@ const ( Sku_Name_STATUS_Standard_AzureFrontDoor = Sku_Name_STATUS("Standard_AzureFrontDoor") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "classic_azurefrontdoor": Sku_Name_STATUS_Classic_AzureFrontDoor, + "premium_azurefrontdoor": Sku_Name_STATUS_Premium_AzureFrontDoor, + "standard_azurefrontdoor": Sku_Name_STATUS_Standard_AzureFrontDoor, +} + type WebApplicationFirewallPolicyProperties_ResourceState_STATUS string const ( @@ -131,6 +138,16 @@ const ( WebApplicationFirewallPolicyProperties_ResourceState_STATUS_Enabling = WebApplicationFirewallPolicyProperties_ResourceState_STATUS("Enabling") ) +// Mapping from string to WebApplicationFirewallPolicyProperties_ResourceState_STATUS +var webApplicationFirewallPolicyProperties_ResourceState_STATUS_Values = map[string]WebApplicationFirewallPolicyProperties_ResourceState_STATUS{ + "creating": WebApplicationFirewallPolicyProperties_ResourceState_STATUS_Creating, + "deleting": WebApplicationFirewallPolicyProperties_ResourceState_STATUS_Deleting, + "disabled": WebApplicationFirewallPolicyProperties_ResourceState_STATUS_Disabled, + "disabling": WebApplicationFirewallPolicyProperties_ResourceState_STATUS_Disabling, + "enabled": WebApplicationFirewallPolicyProperties_ResourceState_STATUS_Enabled, + "enabling": WebApplicationFirewallPolicyProperties_ResourceState_STATUS_Enabling, +} + // Defines contents of a web application rule type CustomRule_STATUS_ARM struct { // Action: Describes what action to be applied when rule matches. @@ -183,6 +200,12 @@ const ( PolicySettings_EnabledState_STATUS_Enabled = PolicySettings_EnabledState_STATUS("Enabled") ) +// Mapping from string to PolicySettings_EnabledState_STATUS +var policySettings_EnabledState_STATUS_Values = map[string]PolicySettings_EnabledState_STATUS{ + "disabled": PolicySettings_EnabledState_STATUS_Disabled, + "enabled": PolicySettings_EnabledState_STATUS_Enabled, +} + type PolicySettings_Mode_STATUS string const ( @@ -190,6 +213,12 @@ const ( PolicySettings_Mode_STATUS_Prevention = PolicySettings_Mode_STATUS("Prevention") ) +// Mapping from string to PolicySettings_Mode_STATUS +var policySettings_Mode_STATUS_Values = map[string]PolicySettings_Mode_STATUS{ + "detection": PolicySettings_Mode_STATUS_Detection, + "prevention": PolicySettings_Mode_STATUS_Prevention, +} + type PolicySettings_RequestBodyCheck_STATUS string const ( @@ -197,6 +226,12 @@ const ( PolicySettings_RequestBodyCheck_STATUS_Enabled = PolicySettings_RequestBodyCheck_STATUS("Enabled") ) +// Mapping from string to PolicySettings_RequestBodyCheck_STATUS +var policySettings_RequestBodyCheck_STATUS_Values = map[string]PolicySettings_RequestBodyCheck_STATUS{ + "disabled": PolicySettings_RequestBodyCheck_STATUS_Disabled, + "enabled": PolicySettings_RequestBodyCheck_STATUS_Enabled, +} + // Defines the action to take on rule match. type ActionType_STATUS string @@ -208,6 +243,15 @@ const ( ActionType_STATUS_Redirect = ActionType_STATUS("Redirect") ) +// Mapping from string to ActionType_STATUS +var actionType_STATUS_Values = map[string]ActionType_STATUS{ + "allow": ActionType_STATUS_Allow, + "anomalyscoring": ActionType_STATUS_AnomalyScoring, + "block": ActionType_STATUS_Block, + "log": ActionType_STATUS_Log, + "redirect": ActionType_STATUS_Redirect, +} + type CustomRule_EnabledState_STATUS string const ( @@ -215,6 +259,12 @@ const ( CustomRule_EnabledState_STATUS_Enabled = CustomRule_EnabledState_STATUS("Enabled") ) +// Mapping from string to CustomRule_EnabledState_STATUS +var customRule_EnabledState_STATUS_Values = map[string]CustomRule_EnabledState_STATUS{ + "disabled": CustomRule_EnabledState_STATUS_Disabled, + "enabled": CustomRule_EnabledState_STATUS_Enabled, +} + type CustomRule_RuleType_STATUS string const ( @@ -222,6 +272,12 @@ const ( CustomRule_RuleType_STATUS_RateLimitRule = CustomRule_RuleType_STATUS("RateLimitRule") ) +// Mapping from string to CustomRule_RuleType_STATUS +var customRule_RuleType_STATUS_Values = map[string]CustomRule_RuleType_STATUS{ + "matchrule": CustomRule_RuleType_STATUS_MatchRule, + "ratelimitrule": CustomRule_RuleType_STATUS_RateLimitRule, +} + // Exclude variables from managed rule evaluation. type ManagedRuleExclusion_STATUS_ARM struct { // MatchVariable: The variable type to be excluded. @@ -256,6 +312,13 @@ const ( ManagedRuleSetActionType_STATUS_Redirect = ManagedRuleSetActionType_STATUS("Redirect") ) +// Mapping from string to ManagedRuleSetActionType_STATUS +var managedRuleSetActionType_STATUS_Values = map[string]ManagedRuleSetActionType_STATUS{ + "block": ManagedRuleSetActionType_STATUS_Block, + "log": ManagedRuleSetActionType_STATUS_Log, + "redirect": ManagedRuleSetActionType_STATUS_Redirect, +} + // Define a match condition. type MatchCondition_STATUS_ARM struct { // MatchValue: List of possible match values. @@ -288,6 +351,15 @@ const ( ManagedRuleExclusion_MatchVariable_STATUS_RequestHeaderNames = ManagedRuleExclusion_MatchVariable_STATUS("RequestHeaderNames") ) +// Mapping from string to ManagedRuleExclusion_MatchVariable_STATUS +var managedRuleExclusion_MatchVariable_STATUS_Values = map[string]ManagedRuleExclusion_MatchVariable_STATUS{ + "querystringargnames": ManagedRuleExclusion_MatchVariable_STATUS_QueryStringArgNames, + "requestbodyjsonargnames": ManagedRuleExclusion_MatchVariable_STATUS_RequestBodyJsonArgNames, + "requestbodypostargnames": ManagedRuleExclusion_MatchVariable_STATUS_RequestBodyPostArgNames, + "requestcookienames": ManagedRuleExclusion_MatchVariable_STATUS_RequestCookieNames, + "requestheadernames": ManagedRuleExclusion_MatchVariable_STATUS_RequestHeaderNames, +} + type ManagedRuleExclusion_SelectorMatchOperator_STATUS string const ( @@ -298,6 +370,15 @@ const ( ManagedRuleExclusion_SelectorMatchOperator_STATUS_StartsWith = ManagedRuleExclusion_SelectorMatchOperator_STATUS("StartsWith") ) +// Mapping from string to ManagedRuleExclusion_SelectorMatchOperator_STATUS +var managedRuleExclusion_SelectorMatchOperator_STATUS_Values = map[string]ManagedRuleExclusion_SelectorMatchOperator_STATUS{ + "contains": ManagedRuleExclusion_SelectorMatchOperator_STATUS_Contains, + "endswith": ManagedRuleExclusion_SelectorMatchOperator_STATUS_EndsWith, + "equals": ManagedRuleExclusion_SelectorMatchOperator_STATUS_Equals, + "equalsany": ManagedRuleExclusion_SelectorMatchOperator_STATUS_EqualsAny, + "startswith": ManagedRuleExclusion_SelectorMatchOperator_STATUS_StartsWith, +} + // Defines a managed rule group override setting. type ManagedRuleOverride_STATUS_ARM struct { // Action: Describes the override action to be applied when rule matches. @@ -327,6 +408,19 @@ const ( MatchCondition_MatchVariable_STATUS_SocketAddr = MatchCondition_MatchVariable_STATUS("SocketAddr") ) +// Mapping from string to MatchCondition_MatchVariable_STATUS +var matchCondition_MatchVariable_STATUS_Values = map[string]MatchCondition_MatchVariable_STATUS{ + "cookies": MatchCondition_MatchVariable_STATUS_Cookies, + "postargs": MatchCondition_MatchVariable_STATUS_PostArgs, + "querystring": MatchCondition_MatchVariable_STATUS_QueryString, + "remoteaddr": MatchCondition_MatchVariable_STATUS_RemoteAddr, + "requestbody": MatchCondition_MatchVariable_STATUS_RequestBody, + "requestheader": MatchCondition_MatchVariable_STATUS_RequestHeader, + "requestmethod": MatchCondition_MatchVariable_STATUS_RequestMethod, + "requesturi": MatchCondition_MatchVariable_STATUS_RequestUri, + "socketaddr": MatchCondition_MatchVariable_STATUS_SocketAddr, +} + type MatchCondition_Operator_STATUS string const ( @@ -344,6 +438,22 @@ const ( MatchCondition_Operator_STATUS_RegEx = MatchCondition_Operator_STATUS("RegEx") ) +// Mapping from string to MatchCondition_Operator_STATUS +var matchCondition_Operator_STATUS_Values = map[string]MatchCondition_Operator_STATUS{ + "any": MatchCondition_Operator_STATUS_Any, + "beginswith": MatchCondition_Operator_STATUS_BeginsWith, + "contains": MatchCondition_Operator_STATUS_Contains, + "endswith": MatchCondition_Operator_STATUS_EndsWith, + "equal": MatchCondition_Operator_STATUS_Equal, + "geomatch": MatchCondition_Operator_STATUS_GeoMatch, + "greaterthan": MatchCondition_Operator_STATUS_GreaterThan, + "greaterthanorequal": MatchCondition_Operator_STATUS_GreaterThanOrEqual, + "ipmatch": MatchCondition_Operator_STATUS_IPMatch, + "lessthan": MatchCondition_Operator_STATUS_LessThan, + "lessthanorequal": MatchCondition_Operator_STATUS_LessThanOrEqual, + "regex": MatchCondition_Operator_STATUS_RegEx, +} + // Describes what transforms applied before matching. type TransformType_STATUS string @@ -356,6 +466,16 @@ const ( TransformType_STATUS_UrlEncode = TransformType_STATUS("UrlEncode") ) +// Mapping from string to TransformType_STATUS +var transformType_STATUS_Values = map[string]TransformType_STATUS{ + "lowercase": TransformType_STATUS_Lowercase, + "removenulls": TransformType_STATUS_RemoveNulls, + "trim": TransformType_STATUS_Trim, + "uppercase": TransformType_STATUS_Uppercase, + "urldecode": TransformType_STATUS_UrlDecode, + "urlencode": TransformType_STATUS_UrlEncode, +} + // Describes if the managed rule is in enabled or disabled state. type ManagedRuleEnabledState_STATUS string @@ -363,3 +483,9 @@ const ( ManagedRuleEnabledState_STATUS_Disabled = ManagedRuleEnabledState_STATUS("Disabled") ManagedRuleEnabledState_STATUS_Enabled = ManagedRuleEnabledState_STATUS("Enabled") ) + +// Mapping from string to ManagedRuleEnabledState_STATUS +var managedRuleEnabledState_STATUS_Values = map[string]ManagedRuleEnabledState_STATUS{ + "disabled": ManagedRuleEnabledState_STATUS_Disabled, + "enabled": ManagedRuleEnabledState_STATUS_Enabled, +} diff --git a/v2/api/network.frontdoor/v1api20220501/web_application_firewall_policy_types_gen.go b/v2/api/network.frontdoor/v1api20220501/web_application_firewall_policy_types_gen.go index c8a9b198863..32a0be3b3b7 100644 --- a/v2/api/network.frontdoor/v1api20220501/web_application_firewall_policy_types_gen.go +++ b/v2/api/network.frontdoor/v1api20220501/web_application_firewall_policy_types_gen.go @@ -1165,8 +1165,9 @@ func (policy *FrontDoorWebApplicationFirewallPolicy_STATUS) AssignProperties_Fro // ResourceState if source.ResourceState != nil { - resourceState := WebApplicationFirewallPolicyProperties_ResourceState_STATUS(*source.ResourceState) - policy.ResourceState = &resourceState + resourceState := *source.ResourceState + resourceStateTemp := genruntime.ToEnum(resourceState, webApplicationFirewallPolicyProperties_ResourceState_STATUS_Values) + policy.ResourceState = &resourceStateTemp } else { policy.ResourceState = nil } @@ -2034,16 +2035,18 @@ func (settings *PolicySettings) AssignProperties_From_PolicySettings(source *v20 // EnabledState if source.EnabledState != nil { - enabledState := PolicySettings_EnabledState(*source.EnabledState) - settings.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, policySettings_EnabledState_Values) + settings.EnabledState = &enabledStateTemp } else { settings.EnabledState = nil } // Mode if source.Mode != nil { - mode := PolicySettings_Mode(*source.Mode) - settings.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, policySettings_Mode_Values) + settings.Mode = &modeTemp } else { settings.Mode = nil } @@ -2053,8 +2056,9 @@ func (settings *PolicySettings) AssignProperties_From_PolicySettings(source *v20 // RequestBodyCheck if source.RequestBodyCheck != nil { - requestBodyCheck := PolicySettings_RequestBodyCheck(*source.RequestBodyCheck) - settings.RequestBodyCheck = &requestBodyCheck + requestBodyCheck := *source.RequestBodyCheck + requestBodyCheckTemp := genruntime.ToEnum(requestBodyCheck, policySettings_RequestBodyCheck_Values) + settings.RequestBodyCheck = &requestBodyCheckTemp } else { settings.RequestBodyCheck = nil } @@ -2249,16 +2253,18 @@ func (settings *PolicySettings_STATUS) AssignProperties_From_PolicySettings_STAT // EnabledState if source.EnabledState != nil { - enabledState := PolicySettings_EnabledState_STATUS(*source.EnabledState) - settings.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, policySettings_EnabledState_STATUS_Values) + settings.EnabledState = &enabledStateTemp } else { settings.EnabledState = nil } // Mode if source.Mode != nil { - mode := PolicySettings_Mode_STATUS(*source.Mode) - settings.Mode = &mode + mode := *source.Mode + modeTemp := genruntime.ToEnum(mode, policySettings_Mode_STATUS_Values) + settings.Mode = &modeTemp } else { settings.Mode = nil } @@ -2268,8 +2274,9 @@ func (settings *PolicySettings_STATUS) AssignProperties_From_PolicySettings_STAT // RequestBodyCheck if source.RequestBodyCheck != nil { - requestBodyCheck := PolicySettings_RequestBodyCheck_STATUS(*source.RequestBodyCheck) - settings.RequestBodyCheck = &requestBodyCheck + requestBodyCheck := *source.RequestBodyCheck + requestBodyCheckTemp := genruntime.ToEnum(requestBodyCheck, policySettings_RequestBodyCheck_STATUS_Values) + settings.RequestBodyCheck = &requestBodyCheckTemp } else { settings.RequestBodyCheck = nil } @@ -2495,8 +2502,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20220501s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -2579,8 +2587,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20220501s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -2783,16 +2792,18 @@ func (rule *CustomRule) AssignProperties_From_CustomRule(source *v20220501s.Cust // Action if source.Action != nil { - action := ActionType(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, actionType_Values) + rule.Action = &actionTemp } else { rule.Action = nil } // EnabledState if source.EnabledState != nil { - enabledState := CustomRule_EnabledState(*source.EnabledState) - rule.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, customRule_EnabledState_Values) + rule.EnabledState = &enabledStateTemp } else { rule.EnabledState = nil } @@ -2844,8 +2855,9 @@ func (rule *CustomRule) AssignProperties_From_CustomRule(source *v20220501s.Cust // RuleType if source.RuleType != nil { - ruleType := CustomRule_RuleType(*source.RuleType) - rule.RuleType = &ruleType + ruleType := *source.RuleType + ruleTypeTemp := genruntime.ToEnum(ruleType, customRule_RuleType_Values) + rule.RuleType = &ruleTypeTemp } else { rule.RuleType = nil } @@ -3117,16 +3129,18 @@ func (rule *CustomRule_STATUS) AssignProperties_From_CustomRule_STATUS(source *v // Action if source.Action != nil { - action := ActionType_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, actionType_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } // EnabledState if source.EnabledState != nil { - enabledState := CustomRule_EnabledState_STATUS(*source.EnabledState) - rule.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, customRule_EnabledState_STATUS_Values) + rule.EnabledState = &enabledStateTemp } else { rule.EnabledState = nil } @@ -3163,8 +3177,9 @@ func (rule *CustomRule_STATUS) AssignProperties_From_CustomRule_STATUS(source *v // RuleType if source.RuleType != nil { - ruleType := CustomRule_RuleType_STATUS(*source.RuleType) - rule.RuleType = &ruleType + ruleType := *source.RuleType + ruleTypeTemp := genruntime.ToEnum(ruleType, customRule_RuleType_STATUS_Values) + rule.RuleType = &ruleTypeTemp } else { rule.RuleType = nil } @@ -3405,8 +3420,9 @@ func (ruleSet *ManagedRuleSet) AssignProperties_From_ManagedRuleSet(source *v202 // RuleSetAction if source.RuleSetAction != nil { - ruleSetAction := ManagedRuleSetActionType(*source.RuleSetAction) - ruleSet.RuleSetAction = &ruleSetAction + ruleSetAction := *source.RuleSetAction + ruleSetActionTemp := genruntime.ToEnum(ruleSetAction, managedRuleSetActionType_Values) + ruleSet.RuleSetAction = &ruleSetActionTemp } else { ruleSet.RuleSetAction = nil } @@ -3659,8 +3675,9 @@ func (ruleSet *ManagedRuleSet_STATUS) AssignProperties_From_ManagedRuleSet_STATU // RuleSetAction if source.RuleSetAction != nil { - ruleSetAction := ManagedRuleSetActionType_STATUS(*source.RuleSetAction) - ruleSet.RuleSetAction = &ruleSetAction + ruleSetAction := *source.RuleSetAction + ruleSetActionTemp := genruntime.ToEnum(ruleSetAction, managedRuleSetActionType_STATUS_Values) + ruleSet.RuleSetAction = &ruleSetActionTemp } else { ruleSet.RuleSetAction = nil } @@ -3825,8 +3842,9 @@ func (exclusion *ManagedRuleExclusion) AssignProperties_From_ManagedRuleExclusio // MatchVariable if source.MatchVariable != nil { - matchVariable := ManagedRuleExclusion_MatchVariable(*source.MatchVariable) - exclusion.MatchVariable = &matchVariable + matchVariable := *source.MatchVariable + matchVariableTemp := genruntime.ToEnum(matchVariable, managedRuleExclusion_MatchVariable_Values) + exclusion.MatchVariable = &matchVariableTemp } else { exclusion.MatchVariable = nil } @@ -3836,8 +3854,9 @@ func (exclusion *ManagedRuleExclusion) AssignProperties_From_ManagedRuleExclusio // SelectorMatchOperator if source.SelectorMatchOperator != nil { - selectorMatchOperator := ManagedRuleExclusion_SelectorMatchOperator(*source.SelectorMatchOperator) - exclusion.SelectorMatchOperator = &selectorMatchOperator + selectorMatchOperator := *source.SelectorMatchOperator + selectorMatchOperatorTemp := genruntime.ToEnum(selectorMatchOperator, managedRuleExclusion_SelectorMatchOperator_Values) + exclusion.SelectorMatchOperator = &selectorMatchOperatorTemp } else { exclusion.SelectorMatchOperator = nil } @@ -3961,8 +3980,9 @@ func (exclusion *ManagedRuleExclusion_STATUS) AssignProperties_From_ManagedRuleE // MatchVariable if source.MatchVariable != nil { - matchVariable := ManagedRuleExclusion_MatchVariable_STATUS(*source.MatchVariable) - exclusion.MatchVariable = &matchVariable + matchVariable := *source.MatchVariable + matchVariableTemp := genruntime.ToEnum(matchVariable, managedRuleExclusion_MatchVariable_STATUS_Values) + exclusion.MatchVariable = &matchVariableTemp } else { exclusion.MatchVariable = nil } @@ -3972,8 +3992,9 @@ func (exclusion *ManagedRuleExclusion_STATUS) AssignProperties_From_ManagedRuleE // SelectorMatchOperator if source.SelectorMatchOperator != nil { - selectorMatchOperator := ManagedRuleExclusion_SelectorMatchOperator_STATUS(*source.SelectorMatchOperator) - exclusion.SelectorMatchOperator = &selectorMatchOperator + selectorMatchOperator := *source.SelectorMatchOperator + selectorMatchOperatorTemp := genruntime.ToEnum(selectorMatchOperator, managedRuleExclusion_SelectorMatchOperator_STATUS_Values) + exclusion.SelectorMatchOperator = &selectorMatchOperatorTemp } else { exclusion.SelectorMatchOperator = nil } @@ -4539,8 +4560,9 @@ func (condition *MatchCondition) AssignProperties_From_MatchCondition(source *v2 // MatchVariable if source.MatchVariable != nil { - matchVariable := MatchCondition_MatchVariable(*source.MatchVariable) - condition.MatchVariable = &matchVariable + matchVariable := *source.MatchVariable + matchVariableTemp := genruntime.ToEnum(matchVariable, matchCondition_MatchVariable_Values) + condition.MatchVariable = &matchVariableTemp } else { condition.MatchVariable = nil } @@ -4555,8 +4577,9 @@ func (condition *MatchCondition) AssignProperties_From_MatchCondition(source *v2 // Operator if source.Operator != nil { - operator := MatchCondition_Operator(*source.Operator) - condition.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, matchCondition_Operator_Values) + condition.Operator = &operatorTemp } else { condition.Operator = nil } @@ -4570,7 +4593,7 @@ func (condition *MatchCondition) AssignProperties_From_MatchCondition(source *v2 for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = TransformType(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transformType_Values) } condition.Transforms = transformList } else { @@ -4773,8 +4796,9 @@ func (condition *MatchCondition_STATUS) AssignProperties_From_MatchCondition_STA // MatchVariable if source.MatchVariable != nil { - matchVariable := MatchCondition_MatchVariable_STATUS(*source.MatchVariable) - condition.MatchVariable = &matchVariable + matchVariable := *source.MatchVariable + matchVariableTemp := genruntime.ToEnum(matchVariable, matchCondition_MatchVariable_STATUS_Values) + condition.MatchVariable = &matchVariableTemp } else { condition.MatchVariable = nil } @@ -4789,8 +4813,9 @@ func (condition *MatchCondition_STATUS) AssignProperties_From_MatchCondition_STA // Operator if source.Operator != nil { - operator := MatchCondition_Operator_STATUS(*source.Operator) - condition.Operator = &operator + operator := *source.Operator + operatorTemp := genruntime.ToEnum(operator, matchCondition_Operator_STATUS_Values) + condition.Operator = &operatorTemp } else { condition.Operator = nil } @@ -4804,7 +4829,7 @@ func (condition *MatchCondition_STATUS) AssignProperties_From_MatchCondition_STA for transformIndex, transformItem := range source.Transforms { // Shadow the loop variable to avoid aliasing transformItem := transformItem - transformList[transformIndex] = TransformType_STATUS(transformItem) + transformList[transformIndex] = genruntime.ToEnum(transformItem, transformType_STATUS_Values) } condition.Transforms = transformList } else { @@ -4977,16 +5002,18 @@ func (override *ManagedRuleOverride) AssignProperties_From_ManagedRuleOverride(s // Action if source.Action != nil { - action := ActionType(*source.Action) - override.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, actionType_Values) + override.Action = &actionTemp } else { override.Action = nil } // EnabledState if source.EnabledState != nil { - enabledState := ManagedRuleEnabledState(*source.EnabledState) - override.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, managedRuleEnabledState_Values) + override.EnabledState = &enabledStateTemp } else { override.EnabledState = nil } @@ -5179,16 +5206,18 @@ func (override *ManagedRuleOverride_STATUS) AssignProperties_From_ManagedRuleOve // Action if source.Action != nil { - action := ActionType_STATUS(*source.Action) - override.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, actionType_STATUS_Values) + override.Action = &actionTemp } else { override.Action = nil } // EnabledState if source.EnabledState != nil { - enabledState := ManagedRuleEnabledState_STATUS(*source.EnabledState) - override.EnabledState = &enabledState + enabledState := *source.EnabledState + enabledStateTemp := genruntime.ToEnum(enabledState, managedRuleEnabledState_STATUS_Values) + override.EnabledState = &enabledStateTemp } else { override.EnabledState = nil } diff --git a/v2/api/network/v1api20180501/dns_zone_types_gen.go b/v2/api/network/v1api20180501/dns_zone_types_gen.go index fae1f839b46..10175054f23 100644 --- a/v2/api/network/v1api20180501/dns_zone_types_gen.go +++ b/v2/api/network/v1api20180501/dns_zone_types_gen.go @@ -594,8 +594,9 @@ func (zone *DnsZone_Spec) AssignProperties_From_DnsZone_Spec(source *v20180501s. // ZoneType if source.ZoneType != nil { - zoneType := ZoneProperties_ZoneType(*source.ZoneType) - zone.ZoneType = &zoneType + zoneType := *source.ZoneType + zoneTypeTemp := genruntime.ToEnum(zoneType, zoneProperties_ZoneType_Values) + zone.ZoneType = &zoneTypeTemp } else { zone.ZoneType = nil } @@ -1051,8 +1052,9 @@ func (zone *DnsZone_STATUS) AssignProperties_From_DnsZone_STATUS(source *v201805 // ZoneType if source.ZoneType != nil { - zoneType := ZoneProperties_ZoneType_STATUS(*source.ZoneType) - zone.ZoneType = &zoneType + zoneType := *source.ZoneType + zoneTypeTemp := genruntime.ToEnum(zoneType, zoneProperties_ZoneType_STATUS_Values) + zone.ZoneType = &zoneTypeTemp } else { zone.ZoneType = nil } @@ -1320,6 +1322,12 @@ const ( ZoneProperties_ZoneType_Public = ZoneProperties_ZoneType("Public") ) +// Mapping from string to ZoneProperties_ZoneType +var zoneProperties_ZoneType_Values = map[string]ZoneProperties_ZoneType{ + "private": ZoneProperties_ZoneType_Private, + "public": ZoneProperties_ZoneType_Public, +} + type ZoneProperties_ZoneType_STATUS string const ( @@ -1327,6 +1335,12 @@ const ( ZoneProperties_ZoneType_STATUS_Public = ZoneProperties_ZoneType_STATUS("Public") ) +// Mapping from string to ZoneProperties_ZoneType_STATUS +var zoneProperties_ZoneType_STATUS_Values = map[string]ZoneProperties_ZoneType_STATUS{ + "private": ZoneProperties_ZoneType_STATUS_Private, + "public": ZoneProperties_ZoneType_STATUS_Public, +} + func init() { SchemeBuilder.Register(&DnsZone{}, &DnsZoneList{}) } diff --git a/v2/api/network/v1api20180901/private_dns_zone_types_gen.go b/v2/api/network/v1api20180901/private_dns_zone_types_gen.go index f49767371b1..02949c2cb7c 100644 --- a/v2/api/network/v1api20180901/private_dns_zone_types_gen.go +++ b/v2/api/network/v1api20180901/private_dns_zone_types_gen.go @@ -831,8 +831,9 @@ func (zone *PrivateDnsZone_STATUS) AssignProperties_From_PrivateDnsZone_STATUS(s // ProvisioningState if source.ProvisioningState != nil { - provisioningState := PrivateZoneProperties_ProvisioningState_STATUS(*source.ProvisioningState) - zone.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, privateZoneProperties_ProvisioningState_STATUS_Values) + zone.ProvisioningState = &provisioningStateTemp } else { zone.ProvisioningState = nil } @@ -921,6 +922,16 @@ const ( PrivateZoneProperties_ProvisioningState_STATUS_Updating = PrivateZoneProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to PrivateZoneProperties_ProvisioningState_STATUS +var privateZoneProperties_ProvisioningState_STATUS_Values = map[string]PrivateZoneProperties_ProvisioningState_STATUS{ + "canceled": PrivateZoneProperties_ProvisioningState_STATUS_Canceled, + "creating": PrivateZoneProperties_ProvisioningState_STATUS_Creating, + "deleting": PrivateZoneProperties_ProvisioningState_STATUS_Deleting, + "failed": PrivateZoneProperties_ProvisioningState_STATUS_Failed, + "succeeded": PrivateZoneProperties_ProvisioningState_STATUS_Succeeded, + "updating": PrivateZoneProperties_ProvisioningState_STATUS_Updating, +} + func init() { SchemeBuilder.Register(&PrivateDnsZone{}, &PrivateDnsZoneList{}) } diff --git a/v2/api/network/v1api20200601/private_dns_zones_virtual_network_link_types_gen.go b/v2/api/network/v1api20200601/private_dns_zones_virtual_network_link_types_gen.go index c4ee3f35f40..08304b76ae0 100644 --- a/v2/api/network/v1api20200601/private_dns_zones_virtual_network_link_types_gen.go +++ b/v2/api/network/v1api20200601/private_dns_zones_virtual_network_link_types_gen.go @@ -881,8 +881,9 @@ func (link *PrivateDnsZones_VirtualNetworkLink_STATUS) AssignProperties_From_Pri // ProvisioningState if source.ProvisioningState != nil { - provisioningState := VirtualNetworkLinkProperties_ProvisioningState_STATUS(*source.ProvisioningState) - link.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, virtualNetworkLinkProperties_ProvisioningState_STATUS_Values) + link.ProvisioningState = &provisioningStateTemp } else { link.ProvisioningState = nil } @@ -915,8 +916,9 @@ func (link *PrivateDnsZones_VirtualNetworkLink_STATUS) AssignProperties_From_Pri // VirtualNetworkLinkState if source.VirtualNetworkLinkState != nil { - virtualNetworkLinkState := VirtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS(*source.VirtualNetworkLinkState) - link.VirtualNetworkLinkState = &virtualNetworkLinkState + virtualNetworkLinkState := *source.VirtualNetworkLinkState + virtualNetworkLinkStateTemp := genruntime.ToEnum(virtualNetworkLinkState, virtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS_Values) + link.VirtualNetworkLinkState = &virtualNetworkLinkStateTemp } else { link.VirtualNetworkLinkState = nil } @@ -1167,6 +1169,16 @@ const ( VirtualNetworkLinkProperties_ProvisioningState_STATUS_Updating = VirtualNetworkLinkProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to VirtualNetworkLinkProperties_ProvisioningState_STATUS +var virtualNetworkLinkProperties_ProvisioningState_STATUS_Values = map[string]VirtualNetworkLinkProperties_ProvisioningState_STATUS{ + "canceled": VirtualNetworkLinkProperties_ProvisioningState_STATUS_Canceled, + "creating": VirtualNetworkLinkProperties_ProvisioningState_STATUS_Creating, + "deleting": VirtualNetworkLinkProperties_ProvisioningState_STATUS_Deleting, + "failed": VirtualNetworkLinkProperties_ProvisioningState_STATUS_Failed, + "succeeded": VirtualNetworkLinkProperties_ProvisioningState_STATUS_Succeeded, + "updating": VirtualNetworkLinkProperties_ProvisioningState_STATUS_Updating, +} + type VirtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS string const ( @@ -1174,6 +1186,12 @@ const ( VirtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS_InProgress = VirtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS("InProgress") ) +// Mapping from string to VirtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS +var virtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS_Values = map[string]VirtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS{ + "completed": VirtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS_Completed, + "inprogress": VirtualNetworkLinkProperties_VirtualNetworkLinkState_STATUS_InProgress, +} + func init() { SchemeBuilder.Register(&PrivateDnsZonesVirtualNetworkLink{}, &PrivateDnsZonesVirtualNetworkLinkList{}) } diff --git a/v2/api/network/v1api20201101/load_balancer_spec_arm_types_gen.go b/v2/api/network/v1api20201101/load_balancer_spec_arm_types_gen.go index c8a0ff8ff5a..8c2fa27b46f 100644 --- a/v2/api/network/v1api20201101/load_balancer_spec_arm_types_gen.go +++ b/v2/api/network/v1api20201101/load_balancer_spec_arm_types_gen.go @@ -105,6 +105,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // Frontend IP address of the load balancer. type FrontendIPConfiguration_LoadBalancer_SubResourceEmbedded_ARM struct { // Name: The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. @@ -146,6 +151,12 @@ const ( LoadBalancerSku_Name_Standard = LoadBalancerSku_Name("Standard") ) +// Mapping from string to LoadBalancerSku_Name +var loadBalancerSku_Name_Values = map[string]LoadBalancerSku_Name{ + "basic": LoadBalancerSku_Name_Basic, + "standard": LoadBalancerSku_Name_Standard, +} + // +kubebuilder:validation:Enum={"Global","Regional"} type LoadBalancerSku_Tier string @@ -154,6 +165,12 @@ const ( LoadBalancerSku_Tier_Regional = LoadBalancerSku_Tier("Regional") ) +// Mapping from string to LoadBalancerSku_Tier +var loadBalancerSku_Tier_Values = map[string]LoadBalancerSku_Tier{ + "global": LoadBalancerSku_Tier_Global, + "regional": LoadBalancerSku_Tier_Regional, +} + // A load balancing rule for a load balancer. type LoadBalancingRule_ARM struct { // Name: The name of the resource that is unique within the set of load balancing rules used by the load balancer. This diff --git a/v2/api/network/v1api20201101/load_balancer_status_arm_types_gen.go b/v2/api/network/v1api20201101/load_balancer_status_arm_types_gen.go index fed9889022b..7c4fa9b1809 100644 --- a/v2/api/network/v1api20201101/load_balancer_status_arm_types_gen.go +++ b/v2/api/network/v1api20201101/load_balancer_status_arm_types_gen.go @@ -112,6 +112,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // Frontend IP address of the load balancer. type FrontendIPConfiguration_STATUS_LoadBalancer_SubResourceEmbedded_ARM struct { // Etag: A unique read-only string that changes whenever the resource is updated. @@ -179,6 +184,12 @@ const ( LoadBalancerSku_Name_STATUS_Standard = LoadBalancerSku_Name_STATUS("Standard") ) +// Mapping from string to LoadBalancerSku_Name_STATUS +var loadBalancerSku_Name_STATUS_Values = map[string]LoadBalancerSku_Name_STATUS{ + "basic": LoadBalancerSku_Name_STATUS_Basic, + "standard": LoadBalancerSku_Name_STATUS_Standard, +} + type LoadBalancerSku_Tier_STATUS string const ( @@ -186,6 +197,12 @@ const ( LoadBalancerSku_Tier_STATUS_Regional = LoadBalancerSku_Tier_STATUS("Regional") ) +// Mapping from string to LoadBalancerSku_Tier_STATUS +var loadBalancerSku_Tier_STATUS_Values = map[string]LoadBalancerSku_Tier_STATUS{ + "global": LoadBalancerSku_Tier_STATUS_Global, + "regional": LoadBalancerSku_Tier_STATUS_Regional, +} + // A load balancing rule for a load balancer. type LoadBalancingRule_STATUS_ARM struct { // Etag: A unique read-only string that changes whenever the resource is updated. diff --git a/v2/api/network/v1api20201101/load_balancer_types_gen.go b/v2/api/network/v1api20201101/load_balancer_types_gen.go index 3bef899a4b6..3b386b51a54 100644 --- a/v2/api/network/v1api20201101/load_balancer_types_gen.go +++ b/v2/api/network/v1api20201101/load_balancer_types_gen.go @@ -1683,8 +1683,9 @@ func (balancer *LoadBalancer_STATUS) AssignProperties_From_LoadBalancer_STATUS(s // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - balancer.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + balancer.ProvisioningState = &provisioningStateTemp } else { balancer.ProvisioningState = nil } @@ -2328,8 +2329,9 @@ func (embedded *BackendAddressPool_STATUS_LoadBalancer_SubResourceEmbedded) Assi // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } @@ -2531,8 +2533,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -2633,8 +2636,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -2873,16 +2877,18 @@ func (embedded *FrontendIPConfiguration_LoadBalancer_SubResourceEmbedded) Assign // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := IPVersion(*source.PrivateIPAddressVersion) - embedded.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, iPVersion_Values) + embedded.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { embedded.PrivateIPAddressVersion = nil } // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod(*source.PrivateIPAllocationMethod) - embedded.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_Values) + embedded.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { embedded.PrivateIPAllocationMethod = nil } @@ -3393,24 +3399,27 @@ func (embedded *FrontendIPConfiguration_STATUS_LoadBalancer_SubResourceEmbedded) // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := IPVersion_STATUS(*source.PrivateIPAddressVersion) - embedded.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, iPVersion_STATUS_Values) + embedded.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { embedded.PrivateIPAddressVersion = nil } // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod_STATUS(*source.PrivateIPAllocationMethod) - embedded.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_STATUS_Values) + embedded.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { embedded.PrivateIPAllocationMethod = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } @@ -3880,8 +3889,9 @@ func (pool *InboundNatPool) AssignProperties_From_InboundNatPool(source *v202011 // Protocol if source.Protocol != nil { - protocol := TransportProtocol(*source.Protocol) - pool.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, transportProtocol_Values) + pool.Protocol = &protocolTemp } else { pool.Protocol = nil } @@ -4246,16 +4256,18 @@ func (pool *InboundNatPool_STATUS) AssignProperties_From_InboundNatPool_STATUS(s // Protocol if source.Protocol != nil { - protocol := TransportProtocol_STATUS(*source.Protocol) - pool.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, transportProtocol_STATUS_Values) + pool.Protocol = &protocolTemp } else { pool.Protocol = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - pool.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + pool.ProvisioningState = &provisioningStateTemp } else { pool.ProvisioningState = nil } @@ -4579,8 +4591,9 @@ func (embedded *InboundNatRule_LoadBalancer_SubResourceEmbedded) AssignPropertie // Protocol if source.Protocol != nil { - protocol := TransportProtocol(*source.Protocol) - embedded.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, transportProtocol_Values) + embedded.Protocol = &protocolTemp } else { embedded.Protocol = nil } @@ -4953,16 +4966,18 @@ func (embedded *InboundNatRule_STATUS_LoadBalancer_SubResourceEmbedded) AssignPr // Protocol if source.Protocol != nil { - protocol := TransportProtocol_STATUS(*source.Protocol) - embedded.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, transportProtocol_STATUS_Values) + embedded.Protocol = &protocolTemp } else { embedded.Protocol = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } @@ -5132,16 +5147,18 @@ func (balancerSku *LoadBalancerSku) AssignProperties_From_LoadBalancerSku(source // Name if source.Name != nil { - name := LoadBalancerSku_Name(*source.Name) - balancerSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, loadBalancerSku_Name_Values) + balancerSku.Name = &nameTemp } else { balancerSku.Name = nil } // Tier if source.Tier != nil { - tier := LoadBalancerSku_Tier(*source.Tier) - balancerSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, loadBalancerSku_Tier_Values) + balancerSku.Tier = &tierTemp } else { balancerSku.Tier = nil } @@ -5249,16 +5266,18 @@ func (balancerSku *LoadBalancerSku_STATUS) AssignProperties_From_LoadBalancerSku // Name if source.Name != nil { - name := LoadBalancerSku_Name_STATUS(*source.Name) - balancerSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, loadBalancerSku_Name_STATUS_Values) + balancerSku.Name = &nameTemp } else { balancerSku.Name = nil } // Tier if source.Tier != nil { - tier := LoadBalancerSku_Tier_STATUS(*source.Tier) - balancerSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, loadBalancerSku_Tier_STATUS_Values) + balancerSku.Tier = &tierTemp } else { balancerSku.Tier = nil } @@ -5635,8 +5654,9 @@ func (rule *LoadBalancingRule) AssignProperties_From_LoadBalancingRule(source *v // LoadDistribution if source.LoadDistribution != nil { - loadDistribution := LoadBalancingRulePropertiesFormat_LoadDistribution(*source.LoadDistribution) - rule.LoadDistribution = &loadDistribution + loadDistribution := *source.LoadDistribution + loadDistributionTemp := genruntime.ToEnum(loadDistribution, loadBalancingRulePropertiesFormat_LoadDistribution_Values) + rule.LoadDistribution = &loadDistributionTemp } else { rule.LoadDistribution = nil } @@ -5658,8 +5678,9 @@ func (rule *LoadBalancingRule) AssignProperties_From_LoadBalancingRule(source *v // Protocol if source.Protocol != nil { - protocol := TransportProtocol(*source.Protocol) - rule.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, transportProtocol_Values) + rule.Protocol = &protocolTemp } else { rule.Protocol = nil } @@ -6160,8 +6181,9 @@ func (rule *LoadBalancingRule_STATUS) AssignProperties_From_LoadBalancingRule_ST // LoadDistribution if source.LoadDistribution != nil { - loadDistribution := LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS(*source.LoadDistribution) - rule.LoadDistribution = &loadDistribution + loadDistribution := *source.LoadDistribution + loadDistributionTemp := genruntime.ToEnum(loadDistribution, loadBalancingRulePropertiesFormat_LoadDistribution_STATUS_Values) + rule.LoadDistribution = &loadDistributionTemp } else { rule.LoadDistribution = nil } @@ -6183,16 +6205,18 @@ func (rule *LoadBalancingRule_STATUS) AssignProperties_From_LoadBalancingRule_ST // Protocol if source.Protocol != nil { - protocol := TransportProtocol_STATUS(*source.Protocol) - rule.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, transportProtocol_STATUS_Values) + rule.Protocol = &protocolTemp } else { rule.Protocol = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - rule.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + rule.ProvisioningState = &provisioningStateTemp } else { rule.ProvisioningState = nil } @@ -6550,8 +6574,9 @@ func (rule *OutboundRule) AssignProperties_From_OutboundRule(source *v20201101s. // Protocol if source.Protocol != nil { - protocol := OutboundRulePropertiesFormat_Protocol(*source.Protocol) - rule.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, outboundRulePropertiesFormat_Protocol_Values) + rule.Protocol = &protocolTemp } else { rule.Protocol = nil } @@ -6904,16 +6929,18 @@ func (rule *OutboundRule_STATUS) AssignProperties_From_OutboundRule_STATUS(sourc // Protocol if source.Protocol != nil { - protocol := OutboundRulePropertiesFormat_Protocol_STATUS(*source.Protocol) - rule.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, outboundRulePropertiesFormat_Protocol_STATUS_Values) + rule.Protocol = &protocolTemp } else { rule.Protocol = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - rule.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + rule.ProvisioningState = &provisioningStateTemp } else { rule.ProvisioningState = nil } @@ -7174,8 +7201,9 @@ func (probe *Probe) AssignProperties_From_Probe(source *v20201101s.Probe) error // Protocol if source.Protocol != nil { - protocol := ProbePropertiesFormat_Protocol(*source.Protocol) - probe.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, probePropertiesFormat_Protocol_Values) + probe.Protocol = &protocolTemp } else { probe.Protocol = nil } @@ -7450,16 +7478,18 @@ func (probe *Probe_STATUS) AssignProperties_From_Probe_STATUS(source *v20201101s // Protocol if source.Protocol != nil { - protocol := ProbePropertiesFormat_Protocol_STATUS(*source.Protocol) - probe.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, probePropertiesFormat_Protocol_STATUS_Values) + probe.Protocol = &protocolTemp } else { probe.Protocol = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - probe.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + probe.ProvisioningState = &provisioningStateTemp } else { probe.ProvisioningState = nil } @@ -7558,6 +7588,14 @@ const ( ProvisioningState_STATUS_Updating = ProvisioningState_STATUS("Updating") ) +// Mapping from string to ProvisioningState_STATUS +var provisioningState_STATUS_Values = map[string]ProvisioningState_STATUS{ + "deleting": ProvisioningState_STATUS_Deleting, + "failed": ProvisioningState_STATUS_Failed, + "succeeded": ProvisioningState_STATUS_Succeeded, + "updating": ProvisioningState_STATUS_Updating, +} + // Load balancer backend addresses. type LoadBalancerBackendAddress struct { // IpAddress: IP Address belonging to the referenced virtual network. @@ -8108,6 +8146,13 @@ const ( LoadBalancingRulePropertiesFormat_LoadDistribution_SourceIPProtocol = LoadBalancingRulePropertiesFormat_LoadDistribution("SourceIPProtocol") ) +// Mapping from string to LoadBalancingRulePropertiesFormat_LoadDistribution +var loadBalancingRulePropertiesFormat_LoadDistribution_Values = map[string]LoadBalancingRulePropertiesFormat_LoadDistribution{ + "default": LoadBalancingRulePropertiesFormat_LoadDistribution_Default, + "sourceip": LoadBalancingRulePropertiesFormat_LoadDistribution_SourceIP, + "sourceipprotocol": LoadBalancingRulePropertiesFormat_LoadDistribution_SourceIPProtocol, +} + type LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS string const ( @@ -8116,6 +8161,13 @@ const ( LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS_SourceIPProtocol = LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS("SourceIPProtocol") ) +// Mapping from string to LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS +var loadBalancingRulePropertiesFormat_LoadDistribution_STATUS_Values = map[string]LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS{ + "default": LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS_Default, + "sourceip": LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS_SourceIP, + "sourceipprotocol": LoadBalancingRulePropertiesFormat_LoadDistribution_STATUS_SourceIPProtocol, +} + // IPConfiguration in a network interface. type NetworkInterfaceIPConfiguration_STATUS_LoadBalancer_SubResourceEmbedded struct { // Id: Resource ID. @@ -8184,6 +8236,13 @@ const ( OutboundRulePropertiesFormat_Protocol_Udp = OutboundRulePropertiesFormat_Protocol("Udp") ) +// Mapping from string to OutboundRulePropertiesFormat_Protocol +var outboundRulePropertiesFormat_Protocol_Values = map[string]OutboundRulePropertiesFormat_Protocol{ + "all": OutboundRulePropertiesFormat_Protocol_All, + "tcp": OutboundRulePropertiesFormat_Protocol_Tcp, + "udp": OutboundRulePropertiesFormat_Protocol_Udp, +} + type OutboundRulePropertiesFormat_Protocol_STATUS string const ( @@ -8192,6 +8251,13 @@ const ( OutboundRulePropertiesFormat_Protocol_STATUS_Udp = OutboundRulePropertiesFormat_Protocol_STATUS("Udp") ) +// Mapping from string to OutboundRulePropertiesFormat_Protocol_STATUS +var outboundRulePropertiesFormat_Protocol_STATUS_Values = map[string]OutboundRulePropertiesFormat_Protocol_STATUS{ + "all": OutboundRulePropertiesFormat_Protocol_STATUS_All, + "tcp": OutboundRulePropertiesFormat_Protocol_STATUS_Tcp, + "udp": OutboundRulePropertiesFormat_Protocol_STATUS_Udp, +} + // +kubebuilder:validation:Enum={"Http","Https","Tcp"} type ProbePropertiesFormat_Protocol string @@ -8201,6 +8267,13 @@ const ( ProbePropertiesFormat_Protocol_Tcp = ProbePropertiesFormat_Protocol("Tcp") ) +// Mapping from string to ProbePropertiesFormat_Protocol +var probePropertiesFormat_Protocol_Values = map[string]ProbePropertiesFormat_Protocol{ + "http": ProbePropertiesFormat_Protocol_Http, + "https": ProbePropertiesFormat_Protocol_Https, + "tcp": ProbePropertiesFormat_Protocol_Tcp, +} + type ProbePropertiesFormat_Protocol_STATUS string const ( @@ -8209,6 +8282,13 @@ const ( ProbePropertiesFormat_Protocol_STATUS_Tcp = ProbePropertiesFormat_Protocol_STATUS("Tcp") ) +// Mapping from string to ProbePropertiesFormat_Protocol_STATUS +var probePropertiesFormat_Protocol_STATUS_Values = map[string]ProbePropertiesFormat_Protocol_STATUS{ + "http": ProbePropertiesFormat_Protocol_STATUS_Http, + "https": ProbePropertiesFormat_Protocol_STATUS_Https, + "tcp": ProbePropertiesFormat_Protocol_STATUS_Tcp, +} + // Public IP address resource. type PublicIPAddress_STATUS_LoadBalancer_SubResourceEmbedded struct { // Id: Resource ID. diff --git a/v2/api/network/v1api20201101/load_balancers_inbound_nat_rule_types_gen.go b/v2/api/network/v1api20201101/load_balancers_inbound_nat_rule_types_gen.go index d022d147f64..5d5fbce5cfe 100644 --- a/v2/api/network/v1api20201101/load_balancers_inbound_nat_rule_types_gen.go +++ b/v2/api/network/v1api20201101/load_balancers_inbound_nat_rule_types_gen.go @@ -615,8 +615,9 @@ func (rule *LoadBalancers_InboundNatRule_Spec) AssignProperties_From_LoadBalance // Protocol if source.Protocol != nil { - protocol := TransportProtocol(*source.Protocol) - rule.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, transportProtocol_Values) + rule.Protocol = &protocolTemp } else { rule.Protocol = nil } @@ -1064,16 +1065,18 @@ func (rule *LoadBalancers_InboundNatRule_STATUS) AssignProperties_From_LoadBalan // Protocol if source.Protocol != nil { - protocol := TransportProtocol_STATUS(*source.Protocol) - rule.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, transportProtocol_STATUS_Values) + rule.Protocol = &protocolTemp } else { rule.Protocol = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - rule.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + rule.ProvisioningState = &provisioningStateTemp } else { rule.ProvisioningState = nil } @@ -1408,6 +1411,13 @@ const ( TransportProtocol_Udp = TransportProtocol("Udp") ) +// Mapping from string to TransportProtocol +var transportProtocol_Values = map[string]TransportProtocol{ + "all": TransportProtocol_All, + "tcp": TransportProtocol_Tcp, + "udp": TransportProtocol_Udp, +} + // The transport protocol for the endpoint. type TransportProtocol_STATUS string @@ -1417,6 +1427,13 @@ const ( TransportProtocol_STATUS_Udp = TransportProtocol_STATUS("Udp") ) +// Mapping from string to TransportProtocol_STATUS +var transportProtocol_STATUS_Values = map[string]TransportProtocol_STATUS{ + "all": TransportProtocol_STATUS_All, + "tcp": TransportProtocol_STATUS_Tcp, + "udp": TransportProtocol_STATUS_Udp, +} + func init() { SchemeBuilder.Register(&LoadBalancersInboundNatRule{}, &LoadBalancersInboundNatRuleList{}) } diff --git a/v2/api/network/v1api20201101/network_interface_types_gen.go b/v2/api/network/v1api20201101/network_interface_types_gen.go index 6de890b9352..45da2253985 100644 --- a/v2/api/network/v1api20201101/network_interface_types_gen.go +++ b/v2/api/network/v1api20201101/network_interface_types_gen.go @@ -721,8 +721,9 @@ func (networkInterface *NetworkInterface_Spec) AssignProperties_From_NetworkInte // NicType if source.NicType != nil { - nicType := NetworkInterfacePropertiesFormat_NicType(*source.NicType) - networkInterface.NicType = &nicType + nicType := *source.NicType + nicTypeTemp := genruntime.ToEnum(nicType, networkInterfacePropertiesFormat_NicType_Values) + networkInterface.NicType = &nicTypeTemp } else { networkInterface.NicType = nil } @@ -1473,8 +1474,9 @@ func (embedded *NetworkInterface_STATUS_NetworkInterface_SubResourceEmbedded) As // MigrationPhase if source.MigrationPhase != nil { - migrationPhase := NetworkInterfacePropertiesFormat_MigrationPhase_STATUS(*source.MigrationPhase) - embedded.MigrationPhase = &migrationPhase + migrationPhase := *source.MigrationPhase + migrationPhaseTemp := genruntime.ToEnum(migrationPhase, networkInterfacePropertiesFormat_MigrationPhase_STATUS_Values) + embedded.MigrationPhase = &migrationPhaseTemp } else { embedded.MigrationPhase = nil } @@ -1496,8 +1498,9 @@ func (embedded *NetworkInterface_STATUS_NetworkInterface_SubResourceEmbedded) As // NicType if source.NicType != nil { - nicType := NetworkInterfacePropertiesFormat_NicType_STATUS(*source.NicType) - embedded.NicType = &nicType + nicType := *source.NicType + nicTypeTemp := genruntime.ToEnum(nicType, networkInterfacePropertiesFormat_NicType_STATUS_Values) + embedded.NicType = &nicTypeTemp } else { embedded.NicType = nil } @@ -1536,8 +1539,9 @@ func (embedded *NetworkInterface_STATUS_NetworkInterface_SubResourceEmbedded) As // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } @@ -2409,16 +2413,18 @@ func (embedded *NetworkInterfaceIPConfiguration_NetworkInterface_SubResourceEmbe // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := IPVersion(*source.PrivateIPAddressVersion) - embedded.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, iPVersion_Values) + embedded.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { embedded.PrivateIPAddressVersion = nil } // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod(*source.PrivateIPAllocationMethod) - embedded.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_Values) + embedded.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { embedded.PrivateIPAllocationMethod = nil } @@ -3125,16 +3131,18 @@ func (embedded *NetworkInterfaceIPConfiguration_STATUS_NetworkInterface_SubResou // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := IPVersion_STATUS(*source.PrivateIPAddressVersion) - embedded.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, iPVersion_STATUS_Values) + embedded.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { embedded.PrivateIPAddressVersion = nil } // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod_STATUS(*source.PrivateIPAllocationMethod) - embedded.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_STATUS_Values) + embedded.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { embedded.PrivateIPAllocationMethod = nil } @@ -3153,8 +3161,9 @@ func (embedded *NetworkInterfaceIPConfiguration_STATUS_NetworkInterface_SubResou // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } @@ -3407,6 +3416,15 @@ const ( NetworkInterfacePropertiesFormat_MigrationPhase_STATUS_Prepare = NetworkInterfacePropertiesFormat_MigrationPhase_STATUS("Prepare") ) +// Mapping from string to NetworkInterfacePropertiesFormat_MigrationPhase_STATUS +var networkInterfacePropertiesFormat_MigrationPhase_STATUS_Values = map[string]NetworkInterfacePropertiesFormat_MigrationPhase_STATUS{ + "abort": NetworkInterfacePropertiesFormat_MigrationPhase_STATUS_Abort, + "commit": NetworkInterfacePropertiesFormat_MigrationPhase_STATUS_Commit, + "committed": NetworkInterfacePropertiesFormat_MigrationPhase_STATUS_Committed, + "none": NetworkInterfacePropertiesFormat_MigrationPhase_STATUS_None, + "prepare": NetworkInterfacePropertiesFormat_MigrationPhase_STATUS_Prepare, +} + // +kubebuilder:validation:Enum={"Elastic","Standard"} type NetworkInterfacePropertiesFormat_NicType string @@ -3415,6 +3433,12 @@ const ( NetworkInterfacePropertiesFormat_NicType_Standard = NetworkInterfacePropertiesFormat_NicType("Standard") ) +// Mapping from string to NetworkInterfacePropertiesFormat_NicType +var networkInterfacePropertiesFormat_NicType_Values = map[string]NetworkInterfacePropertiesFormat_NicType{ + "elastic": NetworkInterfacePropertiesFormat_NicType_Elastic, + "standard": NetworkInterfacePropertiesFormat_NicType_Standard, +} + type NetworkInterfacePropertiesFormat_NicType_STATUS string const ( @@ -3422,6 +3446,12 @@ const ( NetworkInterfacePropertiesFormat_NicType_STATUS_Standard = NetworkInterfacePropertiesFormat_NicType_STATUS("Standard") ) +// Mapping from string to NetworkInterfacePropertiesFormat_NicType_STATUS +var networkInterfacePropertiesFormat_NicType_STATUS_Values = map[string]NetworkInterfacePropertiesFormat_NicType_STATUS{ + "elastic": NetworkInterfacePropertiesFormat_NicType_STATUS_Elastic, + "standard": NetworkInterfacePropertiesFormat_NicType_STATUS_Standard, +} + // Tap configuration in a Network Interface. type NetworkInterfaceTapConfiguration_STATUS_NetworkInterface_SubResourceEmbedded struct { // Id: Resource ID. diff --git a/v2/api/network/v1api20201101/network_security_group_types_gen.go b/v2/api/network/v1api20201101/network_security_group_types_gen.go index 3288d63e979..ff07566f206 100644 --- a/v2/api/network/v1api20201101/network_security_group_types_gen.go +++ b/v2/api/network/v1api20201101/network_security_group_types_gen.go @@ -836,8 +836,9 @@ func (embedded *NetworkSecurityGroup_STATUS_NetworkSecurityGroup_SubResourceEmbe // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } diff --git a/v2/api/network/v1api20201101/network_security_groups_security_rule_types_gen.go b/v2/api/network/v1api20201101/network_security_groups_security_rule_types_gen.go index cade313510a..ccfbe8ffd47 100644 --- a/v2/api/network/v1api20201101/network_security_groups_security_rule_types_gen.go +++ b/v2/api/network/v1api20201101/network_security_groups_security_rule_types_gen.go @@ -704,8 +704,9 @@ func (rule *NetworkSecurityGroups_SecurityRule_Spec) AssignProperties_From_Netwo // Access if source.Access != nil { - access := SecurityRuleAccess(*source.Access) - rule.Access = &access + access := *source.Access + accessTemp := genruntime.ToEnum(access, securityRuleAccess_Values) + rule.Access = &accessTemp } else { rule.Access = nil } @@ -748,8 +749,9 @@ func (rule *NetworkSecurityGroups_SecurityRule_Spec) AssignProperties_From_Netwo // Direction if source.Direction != nil { - direction := SecurityRuleDirection(*source.Direction) - rule.Direction = &direction + direction := *source.Direction + directionTemp := genruntime.ToEnum(direction, securityRuleDirection_Values) + rule.Direction = &directionTemp } else { rule.Direction = nil } @@ -767,8 +769,9 @@ func (rule *NetworkSecurityGroups_SecurityRule_Spec) AssignProperties_From_Netwo // Protocol if source.Protocol != nil { - protocol := SecurityRulePropertiesFormat_Protocol(*source.Protocol) - rule.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, securityRulePropertiesFormat_Protocol_Values) + rule.Protocol = &protocolTemp } else { rule.Protocol = nil } @@ -1352,8 +1355,9 @@ func (rule *NetworkSecurityGroups_SecurityRule_STATUS) AssignProperties_From_Net // Access if source.Access != nil { - access := SecurityRuleAccess_STATUS(*source.Access) - rule.Access = &access + access := *source.Access + accessTemp := genruntime.ToEnum(access, securityRuleAccess_STATUS_Values) + rule.Access = &accessTemp } else { rule.Access = nil } @@ -1396,8 +1400,9 @@ func (rule *NetworkSecurityGroups_SecurityRule_STATUS) AssignProperties_From_Net // Direction if source.Direction != nil { - direction := SecurityRuleDirection_STATUS(*source.Direction) - rule.Direction = &direction + direction := *source.Direction + directionTemp := genruntime.ToEnum(direction, securityRuleDirection_STATUS_Values) + rule.Direction = &directionTemp } else { rule.Direction = nil } @@ -1416,16 +1421,18 @@ func (rule *NetworkSecurityGroups_SecurityRule_STATUS) AssignProperties_From_Net // Protocol if source.Protocol != nil { - protocol := SecurityRulePropertiesFormat_Protocol_STATUS(*source.Protocol) - rule.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, securityRulePropertiesFormat_Protocol_STATUS_Values) + rule.Protocol = &protocolTemp } else { rule.Protocol = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - rule.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + rule.ProvisioningState = &provisioningStateTemp } else { rule.ProvisioningState = nil } @@ -1763,6 +1770,12 @@ const ( SecurityRuleAccess_Deny = SecurityRuleAccess("Deny") ) +// Mapping from string to SecurityRuleAccess +var securityRuleAccess_Values = map[string]SecurityRuleAccess{ + "allow": SecurityRuleAccess_Allow, + "deny": SecurityRuleAccess_Deny, +} + // Whether network traffic is allowed or denied. type SecurityRuleAccess_STATUS string @@ -1771,6 +1784,12 @@ const ( SecurityRuleAccess_STATUS_Deny = SecurityRuleAccess_STATUS("Deny") ) +// Mapping from string to SecurityRuleAccess_STATUS +var securityRuleAccess_STATUS_Values = map[string]SecurityRuleAccess_STATUS{ + "allow": SecurityRuleAccess_STATUS_Allow, + "deny": SecurityRuleAccess_STATUS_Deny, +} + // The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. // +kubebuilder:validation:Enum={"Inbound","Outbound"} type SecurityRuleDirection string @@ -1780,6 +1799,12 @@ const ( SecurityRuleDirection_Outbound = SecurityRuleDirection("Outbound") ) +// Mapping from string to SecurityRuleDirection +var securityRuleDirection_Values = map[string]SecurityRuleDirection{ + "inbound": SecurityRuleDirection_Inbound, + "outbound": SecurityRuleDirection_Outbound, +} + // The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic. type SecurityRuleDirection_STATUS string @@ -1788,6 +1813,12 @@ const ( SecurityRuleDirection_STATUS_Outbound = SecurityRuleDirection_STATUS("Outbound") ) +// Mapping from string to SecurityRuleDirection_STATUS +var securityRuleDirection_STATUS_Values = map[string]SecurityRuleDirection_STATUS{ + "inbound": SecurityRuleDirection_STATUS_Inbound, + "outbound": SecurityRuleDirection_STATUS_Outbound, +} + // +kubebuilder:validation:Enum={"Ah","Esp","Icmp","*","Tcp","Udp"} type SecurityRulePropertiesFormat_Protocol string @@ -1800,6 +1831,16 @@ const ( SecurityRulePropertiesFormat_Protocol_Udp = SecurityRulePropertiesFormat_Protocol("Udp") ) +// Mapping from string to SecurityRulePropertiesFormat_Protocol +var securityRulePropertiesFormat_Protocol_Values = map[string]SecurityRulePropertiesFormat_Protocol{ + "ah": SecurityRulePropertiesFormat_Protocol_Ah, + "esp": SecurityRulePropertiesFormat_Protocol_Esp, + "icmp": SecurityRulePropertiesFormat_Protocol_Icmp, + "*": SecurityRulePropertiesFormat_Protocol_Star, + "tcp": SecurityRulePropertiesFormat_Protocol_Tcp, + "udp": SecurityRulePropertiesFormat_Protocol_Udp, +} + type SecurityRulePropertiesFormat_Protocol_STATUS string const ( @@ -1811,6 +1852,16 @@ const ( SecurityRulePropertiesFormat_Protocol_STATUS_Udp = SecurityRulePropertiesFormat_Protocol_STATUS("Udp") ) +// Mapping from string to SecurityRulePropertiesFormat_Protocol_STATUS +var securityRulePropertiesFormat_Protocol_STATUS_Values = map[string]SecurityRulePropertiesFormat_Protocol_STATUS{ + "ah": SecurityRulePropertiesFormat_Protocol_STATUS_Ah, + "esp": SecurityRulePropertiesFormat_Protocol_STATUS_Esp, + "icmp": SecurityRulePropertiesFormat_Protocol_STATUS_Icmp, + "*": SecurityRulePropertiesFormat_Protocol_STATUS_Star, + "tcp": SecurityRulePropertiesFormat_Protocol_STATUS_Tcp, + "udp": SecurityRulePropertiesFormat_Protocol_STATUS_Udp, +} + func init() { SchemeBuilder.Register(&NetworkSecurityGroupsSecurityRule{}, &NetworkSecurityGroupsSecurityRuleList{}) } diff --git a/v2/api/network/v1api20201101/public_ip_address_spec_arm_types_gen.go b/v2/api/network/v1api20201101/public_ip_address_spec_arm_types_gen.go index 326343dc382..6ae60759bee 100644 --- a/v2/api/network/v1api20201101/public_ip_address_spec_arm_types_gen.go +++ b/v2/api/network/v1api20201101/public_ip_address_spec_arm_types_gen.go @@ -140,6 +140,12 @@ const ( PublicIPAddressSku_Name_Standard = PublicIPAddressSku_Name("Standard") ) +// Mapping from string to PublicIPAddressSku_Name +var publicIPAddressSku_Name_Values = map[string]PublicIPAddressSku_Name{ + "basic": PublicIPAddressSku_Name_Basic, + "standard": PublicIPAddressSku_Name_Standard, +} + // +kubebuilder:validation:Enum={"Global","Regional"} type PublicIPAddressSku_Tier string @@ -148,6 +154,12 @@ const ( PublicIPAddressSku_Tier_Regional = PublicIPAddressSku_Tier("Regional") ) +// Mapping from string to PublicIPAddressSku_Tier +var publicIPAddressSku_Tier_Values = map[string]PublicIPAddressSku_Tier{ + "global": PublicIPAddressSku_Tier_Global, + "regional": PublicIPAddressSku_Tier_Regional, +} + // Public IP address resource. type PublicIPAddressSpec_PublicIPAddress_SubResourceEmbedded_ARM struct { Id *string `json:"id,omitempty"` diff --git a/v2/api/network/v1api20201101/public_ip_address_status_public_ip_address_sub_resource_embedded_arm_types_gen.go b/v2/api/network/v1api20201101/public_ip_address_status_public_ip_address_sub_resource_embedded_arm_types_gen.go index 18cc937f3b1..b7660700b2c 100644 --- a/v2/api/network/v1api20201101/public_ip_address_status_public_ip_address_sub_resource_embedded_arm_types_gen.go +++ b/v2/api/network/v1api20201101/public_ip_address_status_public_ip_address_sub_resource_embedded_arm_types_gen.go @@ -145,9 +145,21 @@ const ( PublicIPAddressSku_Name_STATUS_Standard = PublicIPAddressSku_Name_STATUS("Standard") ) +// Mapping from string to PublicIPAddressSku_Name_STATUS +var publicIPAddressSku_Name_STATUS_Values = map[string]PublicIPAddressSku_Name_STATUS{ + "basic": PublicIPAddressSku_Name_STATUS_Basic, + "standard": PublicIPAddressSku_Name_STATUS_Standard, +} + type PublicIPAddressSku_Tier_STATUS string const ( PublicIPAddressSku_Tier_STATUS_Global = PublicIPAddressSku_Tier_STATUS("Global") PublicIPAddressSku_Tier_STATUS_Regional = PublicIPAddressSku_Tier_STATUS("Regional") ) + +// Mapping from string to PublicIPAddressSku_Tier_STATUS +var publicIPAddressSku_Tier_STATUS_Values = map[string]PublicIPAddressSku_Tier_STATUS{ + "global": PublicIPAddressSku_Tier_STATUS_Global, + "regional": PublicIPAddressSku_Tier_STATUS_Regional, +} diff --git a/v2/api/network/v1api20201101/public_ip_address_types_gen.go b/v2/api/network/v1api20201101/public_ip_address_types_gen.go index 647fc83b5be..c3dd761f34d 100644 --- a/v2/api/network/v1api20201101/public_ip_address_types_gen.go +++ b/v2/api/network/v1api20201101/public_ip_address_types_gen.go @@ -875,16 +875,18 @@ func (address *PublicIPAddress_Spec) AssignProperties_From_PublicIPAddress_Spec( // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := IPVersion(*source.PublicIPAddressVersion) - address.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, iPVersion_Values) + address.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { address.PublicIPAddressVersion = nil } // PublicIPAllocationMethod if source.PublicIPAllocationMethod != nil { - publicIPAllocationMethod := IPAllocationMethod(*source.PublicIPAllocationMethod) - address.PublicIPAllocationMethod = &publicIPAllocationMethod + publicIPAllocationMethod := *source.PublicIPAllocationMethod + publicIPAllocationMethodTemp := genruntime.ToEnum(publicIPAllocationMethod, iPAllocationMethod_Values) + address.PublicIPAllocationMethod = &publicIPAllocationMethodTemp } else { address.PublicIPAllocationMethod = nil } @@ -1688,8 +1690,9 @@ func (embedded *PublicIPAddress_STATUS_PublicIPAddress_SubResourceEmbedded) Assi // MigrationPhase if source.MigrationPhase != nil { - migrationPhase := PublicIPAddressPropertiesFormat_MigrationPhase_STATUS(*source.MigrationPhase) - embedded.MigrationPhase = &migrationPhase + migrationPhase := *source.MigrationPhase + migrationPhaseTemp := genruntime.ToEnum(migrationPhase, publicIPAddressPropertiesFormat_MigrationPhase_STATUS_Values) + embedded.MigrationPhase = &migrationPhaseTemp } else { embedded.MigrationPhase = nil } @@ -1711,24 +1714,27 @@ func (embedded *PublicIPAddress_STATUS_PublicIPAddress_SubResourceEmbedded) Assi // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := IPVersion_STATUS(*source.PublicIPAddressVersion) - embedded.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, iPVersion_STATUS_Values) + embedded.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { embedded.PublicIPAddressVersion = nil } // PublicIPAllocationMethod if source.PublicIPAllocationMethod != nil { - publicIPAllocationMethod := IPAllocationMethod_STATUS(*source.PublicIPAllocationMethod) - embedded.PublicIPAllocationMethod = &publicIPAllocationMethod + publicIPAllocationMethod := *source.PublicIPAllocationMethod + publicIPAllocationMethodTemp := genruntime.ToEnum(publicIPAllocationMethod, iPAllocationMethod_STATUS_Values) + embedded.PublicIPAllocationMethod = &publicIPAllocationMethodTemp } else { embedded.PublicIPAllocationMethod = nil } @@ -2066,8 +2072,9 @@ func (settings *DdosSettings) AssignProperties_From_DdosSettings(source *v202011 // ProtectionCoverage if source.ProtectionCoverage != nil { - protectionCoverage := DdosSettings_ProtectionCoverage(*source.ProtectionCoverage) - settings.ProtectionCoverage = &protectionCoverage + protectionCoverage := *source.ProtectionCoverage + protectionCoverageTemp := genruntime.ToEnum(protectionCoverage, ddosSettings_ProtectionCoverage_Values) + settings.ProtectionCoverage = &protectionCoverageTemp } else { settings.ProtectionCoverage = nil } @@ -2234,8 +2241,9 @@ func (settings *DdosSettings_STATUS) AssignProperties_From_DdosSettings_STATUS(s // ProtectionCoverage if source.ProtectionCoverage != nil { - protectionCoverage := DdosSettings_ProtectionCoverage_STATUS(*source.ProtectionCoverage) - settings.ProtectionCoverage = &protectionCoverage + protectionCoverage := *source.ProtectionCoverage + protectionCoverageTemp := genruntime.ToEnum(protectionCoverage, ddosSettings_ProtectionCoverage_STATUS_Values) + settings.ProtectionCoverage = &protectionCoverageTemp } else { settings.ProtectionCoverage = nil } @@ -2297,6 +2305,12 @@ const ( IPAllocationMethod_Static = IPAllocationMethod("Static") ) +// Mapping from string to IPAllocationMethod +var iPAllocationMethod_Values = map[string]IPAllocationMethod{ + "dynamic": IPAllocationMethod_Dynamic, + "static": IPAllocationMethod_Static, +} + // IP address allocation method. type IPAllocationMethod_STATUS string @@ -2305,6 +2319,12 @@ const ( IPAllocationMethod_STATUS_Static = IPAllocationMethod_STATUS("Static") ) +// Mapping from string to IPAllocationMethod_STATUS +var iPAllocationMethod_STATUS_Values = map[string]IPAllocationMethod_STATUS{ + "dynamic": IPAllocationMethod_STATUS_Dynamic, + "static": IPAllocationMethod_STATUS_Static, +} + // IP configuration. type IPConfiguration_STATUS_PublicIPAddress_SubResourceEmbedded struct { // Id: Resource ID. @@ -2555,6 +2575,12 @@ const ( IPVersion_IPv6 = IPVersion("IPv6") ) +// Mapping from string to IPVersion +var iPVersion_Values = map[string]IPVersion{ + "ipv4": IPVersion_IPv4, + "ipv6": IPVersion_IPv6, +} + // IP address version. type IPVersion_STATUS string @@ -2563,6 +2589,12 @@ const ( IPVersion_STATUS_IPv6 = IPVersion_STATUS("IPv6") ) +// Mapping from string to IPVersion_STATUS +var iPVersion_STATUS_Values = map[string]IPVersion_STATUS{ + "ipv4": IPVersion_STATUS_IPv4, + "ipv6": IPVersion_STATUS_IPv6, +} + // Nat Gateway resource. type NatGateway_STATUS_PublicIPAddress_SubResourceEmbedded struct { // Id: Resource ID. @@ -2962,6 +2994,15 @@ const ( PublicIPAddressPropertiesFormat_MigrationPhase_STATUS_Prepare = PublicIPAddressPropertiesFormat_MigrationPhase_STATUS("Prepare") ) +// Mapping from string to PublicIPAddressPropertiesFormat_MigrationPhase_STATUS +var publicIPAddressPropertiesFormat_MigrationPhase_STATUS_Values = map[string]PublicIPAddressPropertiesFormat_MigrationPhase_STATUS{ + "abort": PublicIPAddressPropertiesFormat_MigrationPhase_STATUS_Abort, + "commit": PublicIPAddressPropertiesFormat_MigrationPhase_STATUS_Commit, + "committed": PublicIPAddressPropertiesFormat_MigrationPhase_STATUS_Committed, + "none": PublicIPAddressPropertiesFormat_MigrationPhase_STATUS_None, + "prepare": PublicIPAddressPropertiesFormat_MigrationPhase_STATUS_Prepare, +} + // SKU of a public IP address. type PublicIPAddressSku struct { // Name: Name of a public IP address SKU. @@ -3027,16 +3068,18 @@ func (addressSku *PublicIPAddressSku) AssignProperties_From_PublicIPAddressSku(s // Name if source.Name != nil { - name := PublicIPAddressSku_Name(*source.Name) - addressSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, publicIPAddressSku_Name_Values) + addressSku.Name = &nameTemp } else { addressSku.Name = nil } // Tier if source.Tier != nil { - tier := PublicIPAddressSku_Tier(*source.Tier) - addressSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, publicIPAddressSku_Tier_Values) + addressSku.Tier = &tierTemp } else { addressSku.Tier = nil } @@ -3144,16 +3187,18 @@ func (addressSku *PublicIPAddressSku_STATUS) AssignProperties_From_PublicIPAddre // Name if source.Name != nil { - name := PublicIPAddressSku_Name_STATUS(*source.Name) - addressSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, publicIPAddressSku_Name_STATUS_Values) + addressSku.Name = &nameTemp } else { addressSku.Name = nil } // Tier if source.Tier != nil { - tier := PublicIPAddressSku_Tier_STATUS(*source.Tier) - addressSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, publicIPAddressSku_Tier_STATUS_Values) + addressSku.Tier = &tierTemp } else { addressSku.Tier = nil } @@ -3286,6 +3331,12 @@ const ( DdosSettings_ProtectionCoverage_Standard = DdosSettings_ProtectionCoverage("Standard") ) +// Mapping from string to DdosSettings_ProtectionCoverage +var ddosSettings_ProtectionCoverage_Values = map[string]DdosSettings_ProtectionCoverage{ + "basic": DdosSettings_ProtectionCoverage_Basic, + "standard": DdosSettings_ProtectionCoverage_Standard, +} + type DdosSettings_ProtectionCoverage_STATUS string const ( @@ -3293,6 +3344,12 @@ const ( DdosSettings_ProtectionCoverage_STATUS_Standard = DdosSettings_ProtectionCoverage_STATUS("Standard") ) +// Mapping from string to DdosSettings_ProtectionCoverage_STATUS +var ddosSettings_ProtectionCoverage_STATUS_Values = map[string]DdosSettings_ProtectionCoverage_STATUS{ + "basic": DdosSettings_ProtectionCoverage_STATUS_Basic, + "standard": DdosSettings_ProtectionCoverage_STATUS_Standard, +} + func init() { SchemeBuilder.Register(&PublicIPAddress{}, &PublicIPAddressList{}) } diff --git a/v2/api/network/v1api20201101/route_table_types_gen.go b/v2/api/network/v1api20201101/route_table_types_gen.go index e4a6d1465ca..2559269773d 100644 --- a/v2/api/network/v1api20201101/route_table_types_gen.go +++ b/v2/api/network/v1api20201101/route_table_types_gen.go @@ -781,8 +781,9 @@ func (table *RouteTable_STATUS) AssignProperties_From_RouteTable_STATUS(source * // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - table.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + table.ProvisioningState = &provisioningStateTemp } else { table.ProvisioningState = nil } diff --git a/v2/api/network/v1api20201101/route_tables_route_types_gen.go b/v2/api/network/v1api20201101/route_tables_route_types_gen.go index ca92fee6b25..8702c80c2ca 100644 --- a/v2/api/network/v1api20201101/route_tables_route_types_gen.go +++ b/v2/api/network/v1api20201101/route_tables_route_types_gen.go @@ -521,8 +521,9 @@ func (route *RouteTables_Route_Spec) AssignProperties_From_RouteTables_Route_Spe // NextHopType if source.NextHopType != nil { - nextHopType := RouteNextHopType(*source.NextHopType) - route.NextHopType = &nextHopType + nextHopType := *source.NextHopType + nextHopTypeTemp := genruntime.ToEnum(nextHopType, routeNextHopType_Values) + route.NextHopType = &nextHopTypeTemp } else { route.NextHopType = nil } @@ -831,16 +832,18 @@ func (route *RouteTables_Route_STATUS) AssignProperties_From_RouteTables_Route_S // NextHopType if source.NextHopType != nil { - nextHopType := RouteNextHopType_STATUS(*source.NextHopType) - route.NextHopType = &nextHopType + nextHopType := *source.NextHopType + nextHopTypeTemp := genruntime.ToEnum(nextHopType, routeNextHopType_STATUS_Values) + route.NextHopType = &nextHopTypeTemp } else { route.NextHopType = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - route.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + route.ProvisioningState = &provisioningStateTemp } else { route.ProvisioningState = nil } @@ -925,6 +928,15 @@ const ( RouteNextHopType_VnetLocal = RouteNextHopType("VnetLocal") ) +// Mapping from string to RouteNextHopType +var routeNextHopType_Values = map[string]RouteNextHopType{ + "internet": RouteNextHopType_Internet, + "none": RouteNextHopType_None, + "virtualappliance": RouteNextHopType_VirtualAppliance, + "virtualnetworkgateway": RouteNextHopType_VirtualNetworkGateway, + "vnetlocal": RouteNextHopType_VnetLocal, +} + // The type of Azure hop the packet should be sent to. type RouteNextHopType_STATUS string @@ -936,6 +948,15 @@ const ( RouteNextHopType_STATUS_VnetLocal = RouteNextHopType_STATUS("VnetLocal") ) +// Mapping from string to RouteNextHopType_STATUS +var routeNextHopType_STATUS_Values = map[string]RouteNextHopType_STATUS{ + "internet": RouteNextHopType_STATUS_Internet, + "none": RouteNextHopType_STATUS_None, + "virtualappliance": RouteNextHopType_STATUS_VirtualAppliance, + "virtualnetworkgateway": RouteNextHopType_STATUS_VirtualNetworkGateway, + "vnetlocal": RouteNextHopType_STATUS_VnetLocal, +} + func init() { SchemeBuilder.Register(&RouteTablesRoute{}, &RouteTablesRouteList{}) } diff --git a/v2/api/network/v1api20201101/virtual_network_gateway_types_gen.go b/v2/api/network/v1api20201101/virtual_network_gateway_types_gen.go index bf537969977..39e4d78044e 100644 --- a/v2/api/network/v1api20201101/virtual_network_gateway_types_gen.go +++ b/v2/api/network/v1api20201101/virtual_network_gateway_types_gen.go @@ -867,8 +867,9 @@ func (gateway *VirtualNetworkGateway_Spec) AssignProperties_From_VirtualNetworkG // GatewayType if source.GatewayType != nil { - gatewayType := VirtualNetworkGatewayPropertiesFormat_GatewayType(*source.GatewayType) - gateway.GatewayType = &gatewayType + gatewayType := *source.GatewayType + gatewayTypeTemp := genruntime.ToEnum(gatewayType, virtualNetworkGatewayPropertiesFormat_GatewayType_Values) + gateway.GatewayType = &gatewayTypeTemp } else { gateway.GatewayType = nil } @@ -939,16 +940,18 @@ func (gateway *VirtualNetworkGateway_Spec) AssignProperties_From_VirtualNetworkG // VpnGatewayGeneration if source.VpnGatewayGeneration != nil { - vpnGatewayGeneration := VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration(*source.VpnGatewayGeneration) - gateway.VpnGatewayGeneration = &vpnGatewayGeneration + vpnGatewayGeneration := *source.VpnGatewayGeneration + vpnGatewayGenerationTemp := genruntime.ToEnum(vpnGatewayGeneration, virtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_Values) + gateway.VpnGatewayGeneration = &vpnGatewayGenerationTemp } else { gateway.VpnGatewayGeneration = nil } // VpnType if source.VpnType != nil { - vpnType := VirtualNetworkGatewayPropertiesFormat_VpnType(*source.VpnType) - gateway.VpnType = &vpnType + vpnType := *source.VpnType + vpnTypeTemp := genruntime.ToEnum(vpnType, virtualNetworkGatewayPropertiesFormat_VpnType_Values) + gateway.VpnType = &vpnTypeTemp } else { gateway.VpnType = nil } @@ -1799,8 +1802,9 @@ func (gateway *VirtualNetworkGateway_STATUS) AssignProperties_From_VirtualNetwor // GatewayType if source.GatewayType != nil { - gatewayType := VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS(*source.GatewayType) - gateway.GatewayType = &gatewayType + gatewayType := *source.GatewayType + gatewayTypeTemp := genruntime.ToEnum(gatewayType, virtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_Values) + gateway.GatewayType = &gatewayTypeTemp } else { gateway.GatewayType = nil } @@ -1837,8 +1841,9 @@ func (gateway *VirtualNetworkGateway_STATUS) AssignProperties_From_VirtualNetwor // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - gateway.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + gateway.ProvisioningState = &provisioningStateTemp } else { gateway.ProvisioningState = nil } @@ -1881,16 +1886,18 @@ func (gateway *VirtualNetworkGateway_STATUS) AssignProperties_From_VirtualNetwor // VpnGatewayGeneration if source.VpnGatewayGeneration != nil { - vpnGatewayGeneration := VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS(*source.VpnGatewayGeneration) - gateway.VpnGatewayGeneration = &vpnGatewayGeneration + vpnGatewayGeneration := *source.VpnGatewayGeneration + vpnGatewayGenerationTemp := genruntime.ToEnum(vpnGatewayGeneration, virtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_Values) + gateway.VpnGatewayGeneration = &vpnGatewayGenerationTemp } else { gateway.VpnGatewayGeneration = nil } // VpnType if source.VpnType != nil { - vpnType := VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS(*source.VpnType) - gateway.VpnType = &vpnType + vpnType := *source.VpnType + vpnTypeTemp := genruntime.ToEnum(vpnType, virtualNetworkGatewayPropertiesFormat_VpnType_STATUS_Values) + gateway.VpnType = &vpnTypeTemp } else { gateway.VpnType = nil } @@ -2596,8 +2603,9 @@ func (configuration *VirtualNetworkGatewayIPConfiguration) AssignProperties_From // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod(*source.PrivateIPAllocationMethod) - configuration.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_Values) + configuration.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { configuration.PrivateIPAllocationMethod = nil } @@ -2858,16 +2866,18 @@ func (configuration *VirtualNetworkGatewayIPConfiguration_STATUS) AssignProperti // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod_STATUS(*source.PrivateIPAllocationMethod) - configuration.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_STATUS_Values) + configuration.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { configuration.PrivateIPAllocationMethod = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - configuration.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + configuration.ProvisioningState = &provisioningStateTemp } else { configuration.ProvisioningState = nil } @@ -2977,6 +2987,13 @@ const ( VirtualNetworkGatewayPropertiesFormat_GatewayType_Vpn = VirtualNetworkGatewayPropertiesFormat_GatewayType("Vpn") ) +// Mapping from string to VirtualNetworkGatewayPropertiesFormat_GatewayType +var virtualNetworkGatewayPropertiesFormat_GatewayType_Values = map[string]VirtualNetworkGatewayPropertiesFormat_GatewayType{ + "expressroute": VirtualNetworkGatewayPropertiesFormat_GatewayType_ExpressRoute, + "localgateway": VirtualNetworkGatewayPropertiesFormat_GatewayType_LocalGateway, + "vpn": VirtualNetworkGatewayPropertiesFormat_GatewayType_Vpn, +} + type VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS string const ( @@ -2985,6 +3002,13 @@ const ( VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_Vpn = VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS("Vpn") ) +// Mapping from string to VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS +var virtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_Values = map[string]VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS{ + "expressroute": VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_ExpressRoute, + "localgateway": VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_LocalGateway, + "vpn": VirtualNetworkGatewayPropertiesFormat_GatewayType_STATUS_Vpn, +} + // +kubebuilder:validation:Enum={"Generation1","Generation2","None"} type VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration string @@ -2994,6 +3018,13 @@ const ( VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_None = VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration("None") ) +// Mapping from string to VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration +var virtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_Values = map[string]VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration{ + "generation1": VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_Generation1, + "generation2": VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_Generation2, + "none": VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_None, +} + type VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS string const ( @@ -3002,6 +3033,13 @@ const ( VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_None = VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS("None") ) +// Mapping from string to VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS +var virtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_Values = map[string]VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS{ + "generation1": VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_Generation1, + "generation2": VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_Generation2, + "none": VirtualNetworkGatewayPropertiesFormat_VpnGatewayGeneration_STATUS_None, +} + // +kubebuilder:validation:Enum={"PolicyBased","RouteBased"} type VirtualNetworkGatewayPropertiesFormat_VpnType string @@ -3010,6 +3048,12 @@ const ( VirtualNetworkGatewayPropertiesFormat_VpnType_RouteBased = VirtualNetworkGatewayPropertiesFormat_VpnType("RouteBased") ) +// Mapping from string to VirtualNetworkGatewayPropertiesFormat_VpnType +var virtualNetworkGatewayPropertiesFormat_VpnType_Values = map[string]VirtualNetworkGatewayPropertiesFormat_VpnType{ + "policybased": VirtualNetworkGatewayPropertiesFormat_VpnType_PolicyBased, + "routebased": VirtualNetworkGatewayPropertiesFormat_VpnType_RouteBased, +} + type VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS string const ( @@ -3017,6 +3061,12 @@ const ( VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS_RouteBased = VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS("RouteBased") ) +// Mapping from string to VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS +var virtualNetworkGatewayPropertiesFormat_VpnType_STATUS_Values = map[string]VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS{ + "policybased": VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS_PolicyBased, + "routebased": VirtualNetworkGatewayPropertiesFormat_VpnType_STATUS_RouteBased, +} + // VirtualNetworkGatewaySku details. type VirtualNetworkGatewaySku struct { // Name: Gateway SKU name. @@ -3082,16 +3132,18 @@ func (gatewaySku *VirtualNetworkGatewaySku) AssignProperties_From_VirtualNetwork // Name if source.Name != nil { - name := VirtualNetworkGatewaySku_Name(*source.Name) - gatewaySku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, virtualNetworkGatewaySku_Name_Values) + gatewaySku.Name = &nameTemp } else { gatewaySku.Name = nil } // Tier if source.Tier != nil { - tier := VirtualNetworkGatewaySku_Tier(*source.Tier) - gatewaySku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, virtualNetworkGatewaySku_Tier_Values) + gatewaySku.Tier = &tierTemp } else { gatewaySku.Tier = nil } @@ -3211,16 +3263,18 @@ func (gatewaySku *VirtualNetworkGatewaySku_STATUS) AssignProperties_From_Virtual // Name if source.Name != nil { - name := VirtualNetworkGatewaySku_Name_STATUS(*source.Name) - gatewaySku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, virtualNetworkGatewaySku_Name_STATUS_Values) + gatewaySku.Name = &nameTemp } else { gatewaySku.Name = nil } // Tier if source.Tier != nil { - tier := VirtualNetworkGatewaySku_Tier_STATUS(*source.Tier) - gatewaySku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, virtualNetworkGatewaySku_Tier_STATUS_Values) + gatewaySku.Tier = &tierTemp } else { gatewaySku.Tier = nil } @@ -3552,7 +3606,7 @@ func (configuration *VpnClientConfiguration) AssignProperties_From_VpnClientConf for vpnAuthenticationTypeIndex, vpnAuthenticationTypeItem := range source.VpnAuthenticationTypes { // Shadow the loop variable to avoid aliasing vpnAuthenticationTypeItem := vpnAuthenticationTypeItem - vpnAuthenticationTypeList[vpnAuthenticationTypeIndex] = VpnClientConfiguration_VpnAuthenticationTypes(vpnAuthenticationTypeItem) + vpnAuthenticationTypeList[vpnAuthenticationTypeIndex] = genruntime.ToEnum(vpnAuthenticationTypeItem, vpnClientConfiguration_VpnAuthenticationTypes_Values) } configuration.VpnAuthenticationTypes = vpnAuthenticationTypeList } else { @@ -3595,7 +3649,7 @@ func (configuration *VpnClientConfiguration) AssignProperties_From_VpnClientConf for vpnClientProtocolIndex, vpnClientProtocolItem := range source.VpnClientProtocols { // Shadow the loop variable to avoid aliasing vpnClientProtocolItem := vpnClientProtocolItem - vpnClientProtocolList[vpnClientProtocolIndex] = VpnClientConfiguration_VpnClientProtocols(vpnClientProtocolItem) + vpnClientProtocolList[vpnClientProtocolIndex] = genruntime.ToEnum(vpnClientProtocolItem, vpnClientConfiguration_VpnClientProtocols_Values) } configuration.VpnClientProtocols = vpnClientProtocolList } else { @@ -4110,7 +4164,7 @@ func (configuration *VpnClientConfiguration_STATUS) AssignProperties_From_VpnCli for vpnAuthenticationTypeIndex, vpnAuthenticationTypeItem := range source.VpnAuthenticationTypes { // Shadow the loop variable to avoid aliasing vpnAuthenticationTypeItem := vpnAuthenticationTypeItem - vpnAuthenticationTypeList[vpnAuthenticationTypeIndex] = VpnClientConfiguration_VpnAuthenticationTypes_STATUS(vpnAuthenticationTypeItem) + vpnAuthenticationTypeList[vpnAuthenticationTypeIndex] = genruntime.ToEnum(vpnAuthenticationTypeItem, vpnClientConfiguration_VpnAuthenticationTypes_STATUS_Values) } configuration.VpnAuthenticationTypes = vpnAuthenticationTypeList } else { @@ -4153,7 +4207,7 @@ func (configuration *VpnClientConfiguration_STATUS) AssignProperties_From_VpnCli for vpnClientProtocolIndex, vpnClientProtocolItem := range source.VpnClientProtocols { // Shadow the loop variable to avoid aliasing vpnClientProtocolItem := vpnClientProtocolItem - vpnClientProtocolList[vpnClientProtocolIndex] = VpnClientConfiguration_VpnClientProtocols_STATUS(vpnClientProtocolItem) + vpnClientProtocolList[vpnClientProtocolIndex] = genruntime.ToEnum(vpnClientProtocolItem, vpnClientConfiguration_VpnClientProtocols_STATUS_Values) } configuration.VpnClientProtocols = vpnClientProtocolList } else { @@ -4713,48 +4767,54 @@ func (policy *IpsecPolicy) AssignProperties_From_IpsecPolicy(source *v20201101s. // DhGroup if source.DhGroup != nil { - dhGroup := DhGroup(*source.DhGroup) - policy.DhGroup = &dhGroup + dhGroup := *source.DhGroup + dhGroupTemp := genruntime.ToEnum(dhGroup, dhGroup_Values) + policy.DhGroup = &dhGroupTemp } else { policy.DhGroup = nil } // IkeEncryption if source.IkeEncryption != nil { - ikeEncryption := IkeEncryption(*source.IkeEncryption) - policy.IkeEncryption = &ikeEncryption + ikeEncryption := *source.IkeEncryption + ikeEncryptionTemp := genruntime.ToEnum(ikeEncryption, ikeEncryption_Values) + policy.IkeEncryption = &ikeEncryptionTemp } else { policy.IkeEncryption = nil } // IkeIntegrity if source.IkeIntegrity != nil { - ikeIntegrity := IkeIntegrity(*source.IkeIntegrity) - policy.IkeIntegrity = &ikeIntegrity + ikeIntegrity := *source.IkeIntegrity + ikeIntegrityTemp := genruntime.ToEnum(ikeIntegrity, ikeIntegrity_Values) + policy.IkeIntegrity = &ikeIntegrityTemp } else { policy.IkeIntegrity = nil } // IpsecEncryption if source.IpsecEncryption != nil { - ipsecEncryption := IpsecEncryption(*source.IpsecEncryption) - policy.IpsecEncryption = &ipsecEncryption + ipsecEncryption := *source.IpsecEncryption + ipsecEncryptionTemp := genruntime.ToEnum(ipsecEncryption, ipsecEncryption_Values) + policy.IpsecEncryption = &ipsecEncryptionTemp } else { policy.IpsecEncryption = nil } // IpsecIntegrity if source.IpsecIntegrity != nil { - ipsecIntegrity := IpsecIntegrity(*source.IpsecIntegrity) - policy.IpsecIntegrity = &ipsecIntegrity + ipsecIntegrity := *source.IpsecIntegrity + ipsecIntegrityTemp := genruntime.ToEnum(ipsecIntegrity, ipsecIntegrity_Values) + policy.IpsecIntegrity = &ipsecIntegrityTemp } else { policy.IpsecIntegrity = nil } // PfsGroup if source.PfsGroup != nil { - pfsGroup := PfsGroup(*source.PfsGroup) - policy.PfsGroup = &pfsGroup + pfsGroup := *source.PfsGroup + pfsGroupTemp := genruntime.ToEnum(pfsGroup, pfsGroup_Values) + policy.PfsGroup = &pfsGroupTemp } else { policy.PfsGroup = nil } @@ -5000,48 +5060,54 @@ func (policy *IpsecPolicy_STATUS) AssignProperties_From_IpsecPolicy_STATUS(sourc // DhGroup if source.DhGroup != nil { - dhGroup := DhGroup_STATUS(*source.DhGroup) - policy.DhGroup = &dhGroup + dhGroup := *source.DhGroup + dhGroupTemp := genruntime.ToEnum(dhGroup, dhGroup_STATUS_Values) + policy.DhGroup = &dhGroupTemp } else { policy.DhGroup = nil } // IkeEncryption if source.IkeEncryption != nil { - ikeEncryption := IkeEncryption_STATUS(*source.IkeEncryption) - policy.IkeEncryption = &ikeEncryption + ikeEncryption := *source.IkeEncryption + ikeEncryptionTemp := genruntime.ToEnum(ikeEncryption, ikeEncryption_STATUS_Values) + policy.IkeEncryption = &ikeEncryptionTemp } else { policy.IkeEncryption = nil } // IkeIntegrity if source.IkeIntegrity != nil { - ikeIntegrity := IkeIntegrity_STATUS(*source.IkeIntegrity) - policy.IkeIntegrity = &ikeIntegrity + ikeIntegrity := *source.IkeIntegrity + ikeIntegrityTemp := genruntime.ToEnum(ikeIntegrity, ikeIntegrity_STATUS_Values) + policy.IkeIntegrity = &ikeIntegrityTemp } else { policy.IkeIntegrity = nil } // IpsecEncryption if source.IpsecEncryption != nil { - ipsecEncryption := IpsecEncryption_STATUS(*source.IpsecEncryption) - policy.IpsecEncryption = &ipsecEncryption + ipsecEncryption := *source.IpsecEncryption + ipsecEncryptionTemp := genruntime.ToEnum(ipsecEncryption, ipsecEncryption_STATUS_Values) + policy.IpsecEncryption = &ipsecEncryptionTemp } else { policy.IpsecEncryption = nil } // IpsecIntegrity if source.IpsecIntegrity != nil { - ipsecIntegrity := IpsecIntegrity_STATUS(*source.IpsecIntegrity) - policy.IpsecIntegrity = &ipsecIntegrity + ipsecIntegrity := *source.IpsecIntegrity + ipsecIntegrityTemp := genruntime.ToEnum(ipsecIntegrity, ipsecIntegrity_STATUS_Values) + policy.IpsecIntegrity = &ipsecIntegrityTemp } else { policy.IpsecIntegrity = nil } // PfsGroup if source.PfsGroup != nil { - pfsGroup := PfsGroup_STATUS(*source.PfsGroup) - policy.PfsGroup = &pfsGroup + pfsGroup := *source.PfsGroup + pfsGroupTemp := genruntime.ToEnum(pfsGroup, pfsGroup_STATUS_Values) + policy.PfsGroup = &pfsGroupTemp } else { policy.PfsGroup = nil } @@ -5371,6 +5437,27 @@ const ( VirtualNetworkGatewaySku_Name_VpnGw5AZ = VirtualNetworkGatewaySku_Name("VpnGw5AZ") ) +// Mapping from string to VirtualNetworkGatewaySku_Name +var virtualNetworkGatewaySku_Name_Values = map[string]VirtualNetworkGatewaySku_Name{ + "basic": VirtualNetworkGatewaySku_Name_Basic, + "ergw1az": VirtualNetworkGatewaySku_Name_ErGw1AZ, + "ergw2az": VirtualNetworkGatewaySku_Name_ErGw2AZ, + "ergw3az": VirtualNetworkGatewaySku_Name_ErGw3AZ, + "highperformance": VirtualNetworkGatewaySku_Name_HighPerformance, + "standard": VirtualNetworkGatewaySku_Name_Standard, + "ultraperformance": VirtualNetworkGatewaySku_Name_UltraPerformance, + "vpngw1": VirtualNetworkGatewaySku_Name_VpnGw1, + "vpngw1az": VirtualNetworkGatewaySku_Name_VpnGw1AZ, + "vpngw2": VirtualNetworkGatewaySku_Name_VpnGw2, + "vpngw2az": VirtualNetworkGatewaySku_Name_VpnGw2AZ, + "vpngw3": VirtualNetworkGatewaySku_Name_VpnGw3, + "vpngw3az": VirtualNetworkGatewaySku_Name_VpnGw3AZ, + "vpngw4": VirtualNetworkGatewaySku_Name_VpnGw4, + "vpngw4az": VirtualNetworkGatewaySku_Name_VpnGw4AZ, + "vpngw5": VirtualNetworkGatewaySku_Name_VpnGw5, + "vpngw5az": VirtualNetworkGatewaySku_Name_VpnGw5AZ, +} + type VirtualNetworkGatewaySku_Name_STATUS string const ( @@ -5393,6 +5480,27 @@ const ( VirtualNetworkGatewaySku_Name_STATUS_VpnGw5AZ = VirtualNetworkGatewaySku_Name_STATUS("VpnGw5AZ") ) +// Mapping from string to VirtualNetworkGatewaySku_Name_STATUS +var virtualNetworkGatewaySku_Name_STATUS_Values = map[string]VirtualNetworkGatewaySku_Name_STATUS{ + "basic": VirtualNetworkGatewaySku_Name_STATUS_Basic, + "ergw1az": VirtualNetworkGatewaySku_Name_STATUS_ErGw1AZ, + "ergw2az": VirtualNetworkGatewaySku_Name_STATUS_ErGw2AZ, + "ergw3az": VirtualNetworkGatewaySku_Name_STATUS_ErGw3AZ, + "highperformance": VirtualNetworkGatewaySku_Name_STATUS_HighPerformance, + "standard": VirtualNetworkGatewaySku_Name_STATUS_Standard, + "ultraperformance": VirtualNetworkGatewaySku_Name_STATUS_UltraPerformance, + "vpngw1": VirtualNetworkGatewaySku_Name_STATUS_VpnGw1, + "vpngw1az": VirtualNetworkGatewaySku_Name_STATUS_VpnGw1AZ, + "vpngw2": VirtualNetworkGatewaySku_Name_STATUS_VpnGw2, + "vpngw2az": VirtualNetworkGatewaySku_Name_STATUS_VpnGw2AZ, + "vpngw3": VirtualNetworkGatewaySku_Name_STATUS_VpnGw3, + "vpngw3az": VirtualNetworkGatewaySku_Name_STATUS_VpnGw3AZ, + "vpngw4": VirtualNetworkGatewaySku_Name_STATUS_VpnGw4, + "vpngw4az": VirtualNetworkGatewaySku_Name_STATUS_VpnGw4AZ, + "vpngw5": VirtualNetworkGatewaySku_Name_STATUS_VpnGw5, + "vpngw5az": VirtualNetworkGatewaySku_Name_STATUS_VpnGw5AZ, +} + // +kubebuilder:validation:Enum={"Basic","ErGw1AZ","ErGw2AZ","ErGw3AZ","HighPerformance","Standard","UltraPerformance","VpnGw1","VpnGw1AZ","VpnGw2","VpnGw2AZ","VpnGw3","VpnGw3AZ","VpnGw4","VpnGw4AZ","VpnGw5","VpnGw5AZ"} type VirtualNetworkGatewaySku_Tier string @@ -5416,6 +5524,27 @@ const ( VirtualNetworkGatewaySku_Tier_VpnGw5AZ = VirtualNetworkGatewaySku_Tier("VpnGw5AZ") ) +// Mapping from string to VirtualNetworkGatewaySku_Tier +var virtualNetworkGatewaySku_Tier_Values = map[string]VirtualNetworkGatewaySku_Tier{ + "basic": VirtualNetworkGatewaySku_Tier_Basic, + "ergw1az": VirtualNetworkGatewaySku_Tier_ErGw1AZ, + "ergw2az": VirtualNetworkGatewaySku_Tier_ErGw2AZ, + "ergw3az": VirtualNetworkGatewaySku_Tier_ErGw3AZ, + "highperformance": VirtualNetworkGatewaySku_Tier_HighPerformance, + "standard": VirtualNetworkGatewaySku_Tier_Standard, + "ultraperformance": VirtualNetworkGatewaySku_Tier_UltraPerformance, + "vpngw1": VirtualNetworkGatewaySku_Tier_VpnGw1, + "vpngw1az": VirtualNetworkGatewaySku_Tier_VpnGw1AZ, + "vpngw2": VirtualNetworkGatewaySku_Tier_VpnGw2, + "vpngw2az": VirtualNetworkGatewaySku_Tier_VpnGw2AZ, + "vpngw3": VirtualNetworkGatewaySku_Tier_VpnGw3, + "vpngw3az": VirtualNetworkGatewaySku_Tier_VpnGw3AZ, + "vpngw4": VirtualNetworkGatewaySku_Tier_VpnGw4, + "vpngw4az": VirtualNetworkGatewaySku_Tier_VpnGw4AZ, + "vpngw5": VirtualNetworkGatewaySku_Tier_VpnGw5, + "vpngw5az": VirtualNetworkGatewaySku_Tier_VpnGw5AZ, +} + type VirtualNetworkGatewaySku_Tier_STATUS string const ( @@ -5438,6 +5567,27 @@ const ( VirtualNetworkGatewaySku_Tier_STATUS_VpnGw5AZ = VirtualNetworkGatewaySku_Tier_STATUS("VpnGw5AZ") ) +// Mapping from string to VirtualNetworkGatewaySku_Tier_STATUS +var virtualNetworkGatewaySku_Tier_STATUS_Values = map[string]VirtualNetworkGatewaySku_Tier_STATUS{ + "basic": VirtualNetworkGatewaySku_Tier_STATUS_Basic, + "ergw1az": VirtualNetworkGatewaySku_Tier_STATUS_ErGw1AZ, + "ergw2az": VirtualNetworkGatewaySku_Tier_STATUS_ErGw2AZ, + "ergw3az": VirtualNetworkGatewaySku_Tier_STATUS_ErGw3AZ, + "highperformance": VirtualNetworkGatewaySku_Tier_STATUS_HighPerformance, + "standard": VirtualNetworkGatewaySku_Tier_STATUS_Standard, + "ultraperformance": VirtualNetworkGatewaySku_Tier_STATUS_UltraPerformance, + "vpngw1": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw1, + "vpngw1az": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw1AZ, + "vpngw2": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw2, + "vpngw2az": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw2AZ, + "vpngw3": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw3, + "vpngw3az": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw3AZ, + "vpngw4": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw4, + "vpngw4az": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw4AZ, + "vpngw5": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw5, + "vpngw5az": VirtualNetworkGatewaySku_Tier_STATUS_VpnGw5AZ, +} + // +kubebuilder:validation:Enum={"AAD","Certificate","Radius"} type VpnClientConfiguration_VpnAuthenticationTypes string @@ -5447,6 +5597,13 @@ const ( VpnClientConfiguration_VpnAuthenticationTypes_Radius = VpnClientConfiguration_VpnAuthenticationTypes("Radius") ) +// Mapping from string to VpnClientConfiguration_VpnAuthenticationTypes +var vpnClientConfiguration_VpnAuthenticationTypes_Values = map[string]VpnClientConfiguration_VpnAuthenticationTypes{ + "aad": VpnClientConfiguration_VpnAuthenticationTypes_AAD, + "certificate": VpnClientConfiguration_VpnAuthenticationTypes_Certificate, + "radius": VpnClientConfiguration_VpnAuthenticationTypes_Radius, +} + type VpnClientConfiguration_VpnAuthenticationTypes_STATUS string const ( @@ -5455,6 +5612,13 @@ const ( VpnClientConfiguration_VpnAuthenticationTypes_STATUS_Radius = VpnClientConfiguration_VpnAuthenticationTypes_STATUS("Radius") ) +// Mapping from string to VpnClientConfiguration_VpnAuthenticationTypes_STATUS +var vpnClientConfiguration_VpnAuthenticationTypes_STATUS_Values = map[string]VpnClientConfiguration_VpnAuthenticationTypes_STATUS{ + "aad": VpnClientConfiguration_VpnAuthenticationTypes_STATUS_AAD, + "certificate": VpnClientConfiguration_VpnAuthenticationTypes_STATUS_Certificate, + "radius": VpnClientConfiguration_VpnAuthenticationTypes_STATUS_Radius, +} + // +kubebuilder:validation:Enum={"IkeV2","OpenVPN","SSTP"} type VpnClientConfiguration_VpnClientProtocols string @@ -5464,6 +5628,13 @@ const ( VpnClientConfiguration_VpnClientProtocols_SSTP = VpnClientConfiguration_VpnClientProtocols("SSTP") ) +// Mapping from string to VpnClientConfiguration_VpnClientProtocols +var vpnClientConfiguration_VpnClientProtocols_Values = map[string]VpnClientConfiguration_VpnClientProtocols{ + "ikev2": VpnClientConfiguration_VpnClientProtocols_IkeV2, + "openvpn": VpnClientConfiguration_VpnClientProtocols_OpenVPN, + "sstp": VpnClientConfiguration_VpnClientProtocols_SSTP, +} + type VpnClientConfiguration_VpnClientProtocols_STATUS string const ( @@ -5472,6 +5643,13 @@ const ( VpnClientConfiguration_VpnClientProtocols_STATUS_SSTP = VpnClientConfiguration_VpnClientProtocols_STATUS("SSTP") ) +// Mapping from string to VpnClientConfiguration_VpnClientProtocols_STATUS +var vpnClientConfiguration_VpnClientProtocols_STATUS_Values = map[string]VpnClientConfiguration_VpnClientProtocols_STATUS{ + "ikev2": VpnClientConfiguration_VpnClientProtocols_STATUS_IkeV2, + "openvpn": VpnClientConfiguration_VpnClientProtocols_STATUS_OpenVPN, + "sstp": VpnClientConfiguration_VpnClientProtocols_STATUS_SSTP, +} + // VPN client revoked certificate of virtual network gateway. type VpnClientRevokedCertificate struct { // Name: The name of the resource that is unique within a resource group. This name can be used to access the resource. @@ -5672,8 +5850,9 @@ func (certificate *VpnClientRevokedCertificate_STATUS) AssignProperties_From_Vpn // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - certificate.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + certificate.ProvisioningState = &provisioningStateTemp } else { certificate.ProvisioningState = nil } @@ -5922,8 +6101,9 @@ func (certificate *VpnClientRootCertificate_STATUS) AssignProperties_From_VpnCli // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - certificate.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + certificate.ProvisioningState = &provisioningStateTemp } else { certificate.ProvisioningState = nil } @@ -5986,6 +6166,18 @@ const ( DhGroup_None = DhGroup("None") ) +// Mapping from string to DhGroup +var dhGroup_Values = map[string]DhGroup{ + "dhgroup1": DhGroup_DHGroup1, + "dhgroup14": DhGroup_DHGroup14, + "dhgroup2": DhGroup_DHGroup2, + "dhgroup2048": DhGroup_DHGroup2048, + "dhgroup24": DhGroup_DHGroup24, + "ecp256": DhGroup_ECP256, + "ecp384": DhGroup_ECP384, + "none": DhGroup_None, +} + // The DH Groups used in IKE Phase 1 for initial SA. type DhGroup_STATUS string @@ -6000,6 +6192,18 @@ const ( DhGroup_STATUS_None = DhGroup_STATUS("None") ) +// Mapping from string to DhGroup_STATUS +var dhGroup_STATUS_Values = map[string]DhGroup_STATUS{ + "dhgroup1": DhGroup_STATUS_DHGroup1, + "dhgroup14": DhGroup_STATUS_DHGroup14, + "dhgroup2": DhGroup_STATUS_DHGroup2, + "dhgroup2048": DhGroup_STATUS_DHGroup2048, + "dhgroup24": DhGroup_STATUS_DHGroup24, + "ecp256": DhGroup_STATUS_ECP256, + "ecp384": DhGroup_STATUS_ECP384, + "none": DhGroup_STATUS_None, +} + // The IKE encryption algorithm (IKE phase 2). // +kubebuilder:validation:Enum={"AES128","AES192","AES256","DES","DES3","GCMAES128","GCMAES256"} type IkeEncryption string @@ -6014,6 +6218,17 @@ const ( IkeEncryption_GCMAES256 = IkeEncryption("GCMAES256") ) +// Mapping from string to IkeEncryption +var ikeEncryption_Values = map[string]IkeEncryption{ + "aes128": IkeEncryption_AES128, + "aes192": IkeEncryption_AES192, + "aes256": IkeEncryption_AES256, + "des": IkeEncryption_DES, + "des3": IkeEncryption_DES3, + "gcmaes128": IkeEncryption_GCMAES128, + "gcmaes256": IkeEncryption_GCMAES256, +} + // The IKE encryption algorithm (IKE phase 2). type IkeEncryption_STATUS string @@ -6027,6 +6242,17 @@ const ( IkeEncryption_STATUS_GCMAES256 = IkeEncryption_STATUS("GCMAES256") ) +// Mapping from string to IkeEncryption_STATUS +var ikeEncryption_STATUS_Values = map[string]IkeEncryption_STATUS{ + "aes128": IkeEncryption_STATUS_AES128, + "aes192": IkeEncryption_STATUS_AES192, + "aes256": IkeEncryption_STATUS_AES256, + "des": IkeEncryption_STATUS_DES, + "des3": IkeEncryption_STATUS_DES3, + "gcmaes128": IkeEncryption_STATUS_GCMAES128, + "gcmaes256": IkeEncryption_STATUS_GCMAES256, +} + // The IKE integrity algorithm (IKE phase 2). // +kubebuilder:validation:Enum={"GCMAES128","GCMAES256","MD5","SHA1","SHA256","SHA384"} type IkeIntegrity string @@ -6040,6 +6266,16 @@ const ( IkeIntegrity_SHA384 = IkeIntegrity("SHA384") ) +// Mapping from string to IkeIntegrity +var ikeIntegrity_Values = map[string]IkeIntegrity{ + "gcmaes128": IkeIntegrity_GCMAES128, + "gcmaes256": IkeIntegrity_GCMAES256, + "md5": IkeIntegrity_MD5, + "sha1": IkeIntegrity_SHA1, + "sha256": IkeIntegrity_SHA256, + "sha384": IkeIntegrity_SHA384, +} + // The IKE integrity algorithm (IKE phase 2). type IkeIntegrity_STATUS string @@ -6052,6 +6288,16 @@ const ( IkeIntegrity_STATUS_SHA384 = IkeIntegrity_STATUS("SHA384") ) +// Mapping from string to IkeIntegrity_STATUS +var ikeIntegrity_STATUS_Values = map[string]IkeIntegrity_STATUS{ + "gcmaes128": IkeIntegrity_STATUS_GCMAES128, + "gcmaes256": IkeIntegrity_STATUS_GCMAES256, + "md5": IkeIntegrity_STATUS_MD5, + "sha1": IkeIntegrity_STATUS_SHA1, + "sha256": IkeIntegrity_STATUS_SHA256, + "sha384": IkeIntegrity_STATUS_SHA384, +} + // The IPSec encryption algorithm (IKE phase 1). // +kubebuilder:validation:Enum={"AES128","AES192","AES256","DES","DES3","GCMAES128","GCMAES192","GCMAES256","None"} type IpsecEncryption string @@ -6068,6 +6314,19 @@ const ( IpsecEncryption_None = IpsecEncryption("None") ) +// Mapping from string to IpsecEncryption +var ipsecEncryption_Values = map[string]IpsecEncryption{ + "aes128": IpsecEncryption_AES128, + "aes192": IpsecEncryption_AES192, + "aes256": IpsecEncryption_AES256, + "des": IpsecEncryption_DES, + "des3": IpsecEncryption_DES3, + "gcmaes128": IpsecEncryption_GCMAES128, + "gcmaes192": IpsecEncryption_GCMAES192, + "gcmaes256": IpsecEncryption_GCMAES256, + "none": IpsecEncryption_None, +} + // The IPSec encryption algorithm (IKE phase 1). type IpsecEncryption_STATUS string @@ -6083,6 +6342,19 @@ const ( IpsecEncryption_STATUS_None = IpsecEncryption_STATUS("None") ) +// Mapping from string to IpsecEncryption_STATUS +var ipsecEncryption_STATUS_Values = map[string]IpsecEncryption_STATUS{ + "aes128": IpsecEncryption_STATUS_AES128, + "aes192": IpsecEncryption_STATUS_AES192, + "aes256": IpsecEncryption_STATUS_AES256, + "des": IpsecEncryption_STATUS_DES, + "des3": IpsecEncryption_STATUS_DES3, + "gcmaes128": IpsecEncryption_STATUS_GCMAES128, + "gcmaes192": IpsecEncryption_STATUS_GCMAES192, + "gcmaes256": IpsecEncryption_STATUS_GCMAES256, + "none": IpsecEncryption_STATUS_None, +} + // The IPSec integrity algorithm (IKE phase 1). // +kubebuilder:validation:Enum={"GCMAES128","GCMAES192","GCMAES256","MD5","SHA1","SHA256"} type IpsecIntegrity string @@ -6096,6 +6368,16 @@ const ( IpsecIntegrity_SHA256 = IpsecIntegrity("SHA256") ) +// Mapping from string to IpsecIntegrity +var ipsecIntegrity_Values = map[string]IpsecIntegrity{ + "gcmaes128": IpsecIntegrity_GCMAES128, + "gcmaes192": IpsecIntegrity_GCMAES192, + "gcmaes256": IpsecIntegrity_GCMAES256, + "md5": IpsecIntegrity_MD5, + "sha1": IpsecIntegrity_SHA1, + "sha256": IpsecIntegrity_SHA256, +} + // The IPSec integrity algorithm (IKE phase 1). type IpsecIntegrity_STATUS string @@ -6108,6 +6390,16 @@ const ( IpsecIntegrity_STATUS_SHA256 = IpsecIntegrity_STATUS("SHA256") ) +// Mapping from string to IpsecIntegrity_STATUS +var ipsecIntegrity_STATUS_Values = map[string]IpsecIntegrity_STATUS{ + "gcmaes128": IpsecIntegrity_STATUS_GCMAES128, + "gcmaes192": IpsecIntegrity_STATUS_GCMAES192, + "gcmaes256": IpsecIntegrity_STATUS_GCMAES256, + "md5": IpsecIntegrity_STATUS_MD5, + "sha1": IpsecIntegrity_STATUS_SHA1, + "sha256": IpsecIntegrity_STATUS_SHA256, +} + // The Pfs Groups used in IKE Phase 2 for new child SA. // +kubebuilder:validation:Enum={"ECP256","ECP384","None","PFS1","PFS14","PFS2","PFS2048","PFS24","PFSMM"} type PfsGroup string @@ -6124,6 +6416,19 @@ const ( PfsGroup_PFSMM = PfsGroup("PFSMM") ) +// Mapping from string to PfsGroup +var pfsGroup_Values = map[string]PfsGroup{ + "ecp256": PfsGroup_ECP256, + "ecp384": PfsGroup_ECP384, + "none": PfsGroup_None, + "pfs1": PfsGroup_PFS1, + "pfs14": PfsGroup_PFS14, + "pfs2": PfsGroup_PFS2, + "pfs2048": PfsGroup_PFS2048, + "pfs24": PfsGroup_PFS24, + "pfsmm": PfsGroup_PFSMM, +} + // The Pfs Groups used in IKE Phase 2 for new child SA. type PfsGroup_STATUS string @@ -6139,6 +6444,19 @@ const ( PfsGroup_STATUS_PFSMM = PfsGroup_STATUS("PFSMM") ) +// Mapping from string to PfsGroup_STATUS +var pfsGroup_STATUS_Values = map[string]PfsGroup_STATUS{ + "ecp256": PfsGroup_STATUS_ECP256, + "ecp384": PfsGroup_STATUS_ECP384, + "none": PfsGroup_STATUS_None, + "pfs1": PfsGroup_STATUS_PFS1, + "pfs14": PfsGroup_STATUS_PFS14, + "pfs2": PfsGroup_STATUS_PFS2, + "pfs2048": PfsGroup_STATUS_PFS2048, + "pfs24": PfsGroup_STATUS_PFS24, + "pfsmm": PfsGroup_STATUS_PFSMM, +} + func init() { SchemeBuilder.Register(&VirtualNetworkGateway{}, &VirtualNetworkGatewayList{}) } diff --git a/v2/api/network/v1api20201101/virtual_network_types_gen.go b/v2/api/network/v1api20201101/virtual_network_types_gen.go index 832196514c9..ba3f6392215 100644 --- a/v2/api/network/v1api20201101/virtual_network_types_gen.go +++ b/v2/api/network/v1api20201101/virtual_network_types_gen.go @@ -1406,8 +1406,9 @@ func (network *VirtualNetwork_STATUS) AssignProperties_From_VirtualNetwork_STATU // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - network.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + network.ProvisioningState = &provisioningStateTemp } else { network.ProvisioningState = nil } diff --git a/v2/api/network/v1api20201101/virtual_networks_subnet_types_gen.go b/v2/api/network/v1api20201101/virtual_networks_subnet_types_gen.go index 782f7f603f7..c3f287e7ac9 100644 --- a/v2/api/network/v1api20201101/virtual_networks_subnet_types_gen.go +++ b/v2/api/network/v1api20201101/virtual_networks_subnet_types_gen.go @@ -793,16 +793,18 @@ func (subnet *VirtualNetworks_Subnet_Spec) AssignProperties_From_VirtualNetworks // PrivateEndpointNetworkPolicies if source.PrivateEndpointNetworkPolicies != nil { - privateEndpointNetworkPolicy := SubnetPropertiesFormat_PrivateEndpointNetworkPolicies(*source.PrivateEndpointNetworkPolicies) - subnet.PrivateEndpointNetworkPolicies = &privateEndpointNetworkPolicy + privateEndpointNetworkPolicy := *source.PrivateEndpointNetworkPolicies + privateEndpointNetworkPolicyTemp := genruntime.ToEnum(privateEndpointNetworkPolicy, subnetPropertiesFormat_PrivateEndpointNetworkPolicies_Values) + subnet.PrivateEndpointNetworkPolicies = &privateEndpointNetworkPolicyTemp } else { subnet.PrivateEndpointNetworkPolicies = nil } // PrivateLinkServiceNetworkPolicies if source.PrivateLinkServiceNetworkPolicies != nil { - privateLinkServiceNetworkPolicy := SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies(*source.PrivateLinkServiceNetworkPolicies) - subnet.PrivateLinkServiceNetworkPolicies = &privateLinkServiceNetworkPolicy + privateLinkServiceNetworkPolicy := *source.PrivateLinkServiceNetworkPolicies + privateLinkServiceNetworkPolicyTemp := genruntime.ToEnum(privateLinkServiceNetworkPolicy, subnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Values) + subnet.PrivateLinkServiceNetworkPolicies = &privateLinkServiceNetworkPolicyTemp } else { subnet.PrivateLinkServiceNetworkPolicies = nil } @@ -1733,8 +1735,9 @@ func (subnet *VirtualNetworks_Subnet_STATUS) AssignProperties_From_VirtualNetwor // PrivateEndpointNetworkPolicies if source.PrivateEndpointNetworkPolicies != nil { - privateEndpointNetworkPolicy := SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS(*source.PrivateEndpointNetworkPolicies) - subnet.PrivateEndpointNetworkPolicies = &privateEndpointNetworkPolicy + privateEndpointNetworkPolicy := *source.PrivateEndpointNetworkPolicies + privateEndpointNetworkPolicyTemp := genruntime.ToEnum(privateEndpointNetworkPolicy, subnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS_Values) + subnet.PrivateEndpointNetworkPolicies = &privateEndpointNetworkPolicyTemp } else { subnet.PrivateEndpointNetworkPolicies = nil } @@ -1759,16 +1762,18 @@ func (subnet *VirtualNetworks_Subnet_STATUS) AssignProperties_From_VirtualNetwor // PrivateLinkServiceNetworkPolicies if source.PrivateLinkServiceNetworkPolicies != nil { - privateLinkServiceNetworkPolicy := SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS(*source.PrivateLinkServiceNetworkPolicies) - subnet.PrivateLinkServiceNetworkPolicies = &privateLinkServiceNetworkPolicy + privateLinkServiceNetworkPolicy := *source.PrivateLinkServiceNetworkPolicies + privateLinkServiceNetworkPolicyTemp := genruntime.ToEnum(privateLinkServiceNetworkPolicy, subnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS_Values) + subnet.PrivateLinkServiceNetworkPolicies = &privateLinkServiceNetworkPolicyTemp } else { subnet.PrivateLinkServiceNetworkPolicies = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - subnet.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + subnet.ProvisioningState = &provisioningStateTemp } else { subnet.ProvisioningState = nil } @@ -2528,8 +2533,9 @@ func (delegation *Delegation_STATUS) AssignProperties_From_Delegation_STATUS(sou // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - delegation.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + delegation.ProvisioningState = &provisioningStateTemp } else { delegation.ProvisioningState = nil } @@ -3516,8 +3522,9 @@ func (format *ServiceEndpointPropertiesFormat_STATUS) AssignProperties_From_Serv // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - format.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + format.ProvisioningState = &provisioningStateTemp } else { format.ProvisioningState = nil } @@ -3567,6 +3574,12 @@ const ( SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_Enabled = SubnetPropertiesFormat_PrivateEndpointNetworkPolicies("Enabled") ) +// Mapping from string to SubnetPropertiesFormat_PrivateEndpointNetworkPolicies +var subnetPropertiesFormat_PrivateEndpointNetworkPolicies_Values = map[string]SubnetPropertiesFormat_PrivateEndpointNetworkPolicies{ + "disabled": SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_Disabled, + "enabled": SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_Enabled, +} + type SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS string const ( @@ -3574,6 +3587,12 @@ const ( SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS_Enabled = SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS("Enabled") ) +// Mapping from string to SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS +var subnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS_Values = map[string]SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS{ + "disabled": SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS_Disabled, + "enabled": SubnetPropertiesFormat_PrivateEndpointNetworkPolicies_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies string @@ -3582,6 +3601,12 @@ const ( SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Enabled = SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies("Enabled") ) +// Mapping from string to SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies +var subnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Values = map[string]SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies{ + "disabled": SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Disabled, + "enabled": SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_Enabled, +} + type SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS string const ( @@ -3589,6 +3614,12 @@ const ( SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS_Enabled = SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS("Enabled") ) +// Mapping from string to SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS +var subnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS_Values = map[string]SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS{ + "disabled": SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS_Disabled, + "enabled": SubnetPropertiesFormat_PrivateLinkServiceNetworkPolicies_STATUS_Enabled, +} + func init() { SchemeBuilder.Register(&VirtualNetworksSubnet{}, &VirtualNetworksSubnetList{}) } diff --git a/v2/api/network/v1api20201101/virtual_networks_virtual_network_peering_types_gen.go b/v2/api/network/v1api20201101/virtual_networks_virtual_network_peering_types_gen.go index 73fd33b8e7f..153d17dab11 100644 --- a/v2/api/network/v1api20201101/virtual_networks_virtual_network_peering_types_gen.go +++ b/v2/api/network/v1api20201101/virtual_networks_virtual_network_peering_types_gen.go @@ -664,8 +664,9 @@ func (peering *VirtualNetworks_VirtualNetworkPeering_Spec) AssignProperties_From // PeeringState if source.PeeringState != nil { - peeringState := VirtualNetworkPeeringPropertiesFormat_PeeringState(*source.PeeringState) - peering.PeeringState = &peeringState + peeringState := *source.PeeringState + peeringStateTemp := genruntime.ToEnum(peeringState, virtualNetworkPeeringPropertiesFormat_PeeringState_Values) + peering.PeeringState = &peeringStateTemp } else { peering.PeeringState = nil } @@ -1247,16 +1248,18 @@ func (peering *VirtualNetworks_VirtualNetworkPeering_STATUS) AssignProperties_Fr // PeeringState if source.PeeringState != nil { - peeringState := VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS(*source.PeeringState) - peering.PeeringState = &peeringState + peeringState := *source.PeeringState + peeringStateTemp := genruntime.ToEnum(peeringState, virtualNetworkPeeringPropertiesFormat_PeeringState_STATUS_Values) + peering.PeeringState = &peeringStateTemp } else { peering.PeeringState = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - peering.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + peering.ProvisioningState = &provisioningStateTemp } else { peering.ProvisioningState = nil } @@ -1450,6 +1453,13 @@ const ( VirtualNetworkPeeringPropertiesFormat_PeeringState_Initiated = VirtualNetworkPeeringPropertiesFormat_PeeringState("Initiated") ) +// Mapping from string to VirtualNetworkPeeringPropertiesFormat_PeeringState +var virtualNetworkPeeringPropertiesFormat_PeeringState_Values = map[string]VirtualNetworkPeeringPropertiesFormat_PeeringState{ + "connected": VirtualNetworkPeeringPropertiesFormat_PeeringState_Connected, + "disconnected": VirtualNetworkPeeringPropertiesFormat_PeeringState_Disconnected, + "initiated": VirtualNetworkPeeringPropertiesFormat_PeeringState_Initiated, +} + type VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS string const ( @@ -1458,6 +1468,13 @@ const ( VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS_Initiated = VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS("Initiated") ) +// Mapping from string to VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS +var virtualNetworkPeeringPropertiesFormat_PeeringState_STATUS_Values = map[string]VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS{ + "connected": VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS_Connected, + "disconnected": VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS_Disconnected, + "initiated": VirtualNetworkPeeringPropertiesFormat_PeeringState_STATUS_Initiated, +} + func init() { SchemeBuilder.Register(&VirtualNetworksVirtualNetworkPeering{}, &VirtualNetworksVirtualNetworkPeeringList{}) } diff --git a/v2/api/network/v1api20220401/traffic_manager_profile_types_gen.go b/v2/api/network/v1api20220401/traffic_manager_profile_types_gen.go index 0b6955f96b7..86ee30093da 100644 --- a/v2/api/network/v1api20220401/traffic_manager_profile_types_gen.go +++ b/v2/api/network/v1api20220401/traffic_manager_profile_types_gen.go @@ -675,7 +675,7 @@ func (trafficmanagerprofile *Trafficmanagerprofile_Spec) AssignProperties_From_T for allowedEndpointRecordTypeIndex, allowedEndpointRecordTypeItem := range source.AllowedEndpointRecordTypes { // Shadow the loop variable to avoid aliasing allowedEndpointRecordTypeItem := allowedEndpointRecordTypeItem - allowedEndpointRecordTypeList[allowedEndpointRecordTypeIndex] = AllowedEndpointRecordType(allowedEndpointRecordTypeItem) + allowedEndpointRecordTypeList[allowedEndpointRecordTypeIndex] = genruntime.ToEnum(allowedEndpointRecordTypeItem, allowedEndpointRecordType_Values) } trafficmanagerprofile.AllowedEndpointRecordTypes = allowedEndpointRecordTypeList } else { @@ -737,8 +737,9 @@ func (trafficmanagerprofile *Trafficmanagerprofile_Spec) AssignProperties_From_T // ProfileStatus if source.ProfileStatus != nil { - profileStatus := ProfileProperties_ProfileStatus(*source.ProfileStatus) - trafficmanagerprofile.ProfileStatus = &profileStatus + profileStatus := *source.ProfileStatus + profileStatusTemp := genruntime.ToEnum(profileStatus, profileProperties_ProfileStatus_Values) + trafficmanagerprofile.ProfileStatus = &profileStatusTemp } else { trafficmanagerprofile.ProfileStatus = nil } @@ -748,16 +749,18 @@ func (trafficmanagerprofile *Trafficmanagerprofile_Spec) AssignProperties_From_T // TrafficRoutingMethod if source.TrafficRoutingMethod != nil { - trafficRoutingMethod := ProfileProperties_TrafficRoutingMethod(*source.TrafficRoutingMethod) - trafficmanagerprofile.TrafficRoutingMethod = &trafficRoutingMethod + trafficRoutingMethod := *source.TrafficRoutingMethod + trafficRoutingMethodTemp := genruntime.ToEnum(trafficRoutingMethod, profileProperties_TrafficRoutingMethod_Values) + trafficmanagerprofile.TrafficRoutingMethod = &trafficRoutingMethodTemp } else { trafficmanagerprofile.TrafficRoutingMethod = nil } // TrafficViewEnrollmentStatus if source.TrafficViewEnrollmentStatus != nil { - trafficViewEnrollmentStatus := ProfileProperties_TrafficViewEnrollmentStatus(*source.TrafficViewEnrollmentStatus) - trafficmanagerprofile.TrafficViewEnrollmentStatus = &trafficViewEnrollmentStatus + trafficViewEnrollmentStatus := *source.TrafficViewEnrollmentStatus + trafficViewEnrollmentStatusTemp := genruntime.ToEnum(trafficViewEnrollmentStatus, profileProperties_TrafficViewEnrollmentStatus_Values) + trafficmanagerprofile.TrafficViewEnrollmentStatus = &trafficViewEnrollmentStatusTemp } else { trafficmanagerprofile.TrafficViewEnrollmentStatus = nil } @@ -1217,7 +1220,7 @@ func (trafficmanagerprofile *Trafficmanagerprofile_STATUS) AssignProperties_From for allowedEndpointRecordTypeIndex, allowedEndpointRecordTypeItem := range source.AllowedEndpointRecordTypes { // Shadow the loop variable to avoid aliasing allowedEndpointRecordTypeItem := allowedEndpointRecordTypeItem - allowedEndpointRecordTypeList[allowedEndpointRecordTypeIndex] = AllowedEndpointRecordType_STATUS(allowedEndpointRecordTypeItem) + allowedEndpointRecordTypeList[allowedEndpointRecordTypeIndex] = genruntime.ToEnum(allowedEndpointRecordTypeItem, allowedEndpointRecordType_STATUS_Values) } trafficmanagerprofile.AllowedEndpointRecordTypes = allowedEndpointRecordTypeList } else { @@ -1283,8 +1286,9 @@ func (trafficmanagerprofile *Trafficmanagerprofile_STATUS) AssignProperties_From // ProfileStatus if source.ProfileStatus != nil { - profileStatus := ProfileProperties_ProfileStatus_STATUS(*source.ProfileStatus) - trafficmanagerprofile.ProfileStatus = &profileStatus + profileStatus := *source.ProfileStatus + profileStatusTemp := genruntime.ToEnum(profileStatus, profileProperties_ProfileStatus_STATUS_Values) + trafficmanagerprofile.ProfileStatus = &profileStatusTemp } else { trafficmanagerprofile.ProfileStatus = nil } @@ -1294,16 +1298,18 @@ func (trafficmanagerprofile *Trafficmanagerprofile_STATUS) AssignProperties_From // TrafficRoutingMethod if source.TrafficRoutingMethod != nil { - trafficRoutingMethod := ProfileProperties_TrafficRoutingMethod_STATUS(*source.TrafficRoutingMethod) - trafficmanagerprofile.TrafficRoutingMethod = &trafficRoutingMethod + trafficRoutingMethod := *source.TrafficRoutingMethod + trafficRoutingMethodTemp := genruntime.ToEnum(trafficRoutingMethod, profileProperties_TrafficRoutingMethod_STATUS_Values) + trafficmanagerprofile.TrafficRoutingMethod = &trafficRoutingMethodTemp } else { trafficmanagerprofile.TrafficRoutingMethod = nil } // TrafficViewEnrollmentStatus if source.TrafficViewEnrollmentStatus != nil { - trafficViewEnrollmentStatus := ProfileProperties_TrafficViewEnrollmentStatus_STATUS(*source.TrafficViewEnrollmentStatus) - trafficmanagerprofile.TrafficViewEnrollmentStatus = &trafficViewEnrollmentStatus + trafficViewEnrollmentStatus := *source.TrafficViewEnrollmentStatus + trafficViewEnrollmentStatusTemp := genruntime.ToEnum(trafficViewEnrollmentStatus, profileProperties_TrafficViewEnrollmentStatus_STATUS_Values) + trafficmanagerprofile.TrafficViewEnrollmentStatus = &trafficViewEnrollmentStatusTemp } else { trafficmanagerprofile.TrafficViewEnrollmentStatus = nil } @@ -1442,6 +1448,14 @@ const ( AllowedEndpointRecordType_IPv6Address = AllowedEndpointRecordType("IPv6Address") ) +// Mapping from string to AllowedEndpointRecordType +var allowedEndpointRecordType_Values = map[string]AllowedEndpointRecordType{ + "any": AllowedEndpointRecordType_Any, + "domainname": AllowedEndpointRecordType_DomainName, + "ipv4address": AllowedEndpointRecordType_IPv4Address, + "ipv6address": AllowedEndpointRecordType_IPv6Address, +} + // The allowed type DNS record types for this profile. type AllowedEndpointRecordType_STATUS string @@ -1452,6 +1466,14 @@ const ( AllowedEndpointRecordType_STATUS_IPv6Address = AllowedEndpointRecordType_STATUS("IPv6Address") ) +// Mapping from string to AllowedEndpointRecordType_STATUS +var allowedEndpointRecordType_STATUS_Values = map[string]AllowedEndpointRecordType_STATUS{ + "any": AllowedEndpointRecordType_STATUS_Any, + "domainname": AllowedEndpointRecordType_STATUS_DomainName, + "ipv4address": AllowedEndpointRecordType_STATUS_IPv4Address, + "ipv6address": AllowedEndpointRecordType_STATUS_IPv6Address, +} + // Class containing DNS settings in a Traffic Manager profile. type DnsConfig struct { // RelativeName: The relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS domain @@ -1946,16 +1968,18 @@ func (config *MonitorConfig) AssignProperties_From_MonitorConfig(source *v202204 // ProfileMonitorStatus if source.ProfileMonitorStatus != nil { - profileMonitorStatus := MonitorConfig_ProfileMonitorStatus(*source.ProfileMonitorStatus) - config.ProfileMonitorStatus = &profileMonitorStatus + profileMonitorStatus := *source.ProfileMonitorStatus + profileMonitorStatusTemp := genruntime.ToEnum(profileMonitorStatus, monitorConfig_ProfileMonitorStatus_Values) + config.ProfileMonitorStatus = &profileMonitorStatusTemp } else { config.ProfileMonitorStatus = nil } // Protocol if source.Protocol != nil { - protocol := MonitorConfig_Protocol(*source.Protocol) - config.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, monitorConfig_Protocol_Values) + config.Protocol = &protocolTemp } else { config.Protocol = nil } @@ -2290,16 +2314,18 @@ func (config *MonitorConfig_STATUS) AssignProperties_From_MonitorConfig_STATUS(s // ProfileMonitorStatus if source.ProfileMonitorStatus != nil { - profileMonitorStatus := MonitorConfig_ProfileMonitorStatus_STATUS(*source.ProfileMonitorStatus) - config.ProfileMonitorStatus = &profileMonitorStatus + profileMonitorStatus := *source.ProfileMonitorStatus + profileMonitorStatusTemp := genruntime.ToEnum(profileMonitorStatus, monitorConfig_ProfileMonitorStatus_STATUS_Values) + config.ProfileMonitorStatus = &profileMonitorStatusTemp } else { config.ProfileMonitorStatus = nil } // Protocol if source.Protocol != nil { - protocol := MonitorConfig_Protocol_STATUS(*source.Protocol) - config.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, monitorConfig_Protocol_STATUS_Values) + config.Protocol = &protocolTemp } else { config.Protocol = nil } @@ -2405,6 +2431,12 @@ const ( ProfileProperties_ProfileStatus_Enabled = ProfileProperties_ProfileStatus("Enabled") ) +// Mapping from string to ProfileProperties_ProfileStatus +var profileProperties_ProfileStatus_Values = map[string]ProfileProperties_ProfileStatus{ + "disabled": ProfileProperties_ProfileStatus_Disabled, + "enabled": ProfileProperties_ProfileStatus_Enabled, +} + type ProfileProperties_ProfileStatus_STATUS string const ( @@ -2412,6 +2444,12 @@ const ( ProfileProperties_ProfileStatus_STATUS_Enabled = ProfileProperties_ProfileStatus_STATUS("Enabled") ) +// Mapping from string to ProfileProperties_ProfileStatus_STATUS +var profileProperties_ProfileStatus_STATUS_Values = map[string]ProfileProperties_ProfileStatus_STATUS{ + "disabled": ProfileProperties_ProfileStatus_STATUS_Disabled, + "enabled": ProfileProperties_ProfileStatus_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Geographic","MultiValue","Performance","Priority","Subnet","Weighted"} type ProfileProperties_TrafficRoutingMethod string @@ -2424,6 +2462,16 @@ const ( ProfileProperties_TrafficRoutingMethod_Weighted = ProfileProperties_TrafficRoutingMethod("Weighted") ) +// Mapping from string to ProfileProperties_TrafficRoutingMethod +var profileProperties_TrafficRoutingMethod_Values = map[string]ProfileProperties_TrafficRoutingMethod{ + "geographic": ProfileProperties_TrafficRoutingMethod_Geographic, + "multivalue": ProfileProperties_TrafficRoutingMethod_MultiValue, + "performance": ProfileProperties_TrafficRoutingMethod_Performance, + "priority": ProfileProperties_TrafficRoutingMethod_Priority, + "subnet": ProfileProperties_TrafficRoutingMethod_Subnet, + "weighted": ProfileProperties_TrafficRoutingMethod_Weighted, +} + type ProfileProperties_TrafficRoutingMethod_STATUS string const ( @@ -2435,6 +2483,16 @@ const ( ProfileProperties_TrafficRoutingMethod_STATUS_Weighted = ProfileProperties_TrafficRoutingMethod_STATUS("Weighted") ) +// Mapping from string to ProfileProperties_TrafficRoutingMethod_STATUS +var profileProperties_TrafficRoutingMethod_STATUS_Values = map[string]ProfileProperties_TrafficRoutingMethod_STATUS{ + "geographic": ProfileProperties_TrafficRoutingMethod_STATUS_Geographic, + "multivalue": ProfileProperties_TrafficRoutingMethod_STATUS_MultiValue, + "performance": ProfileProperties_TrafficRoutingMethod_STATUS_Performance, + "priority": ProfileProperties_TrafficRoutingMethod_STATUS_Priority, + "subnet": ProfileProperties_TrafficRoutingMethod_STATUS_Subnet, + "weighted": ProfileProperties_TrafficRoutingMethod_STATUS_Weighted, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ProfileProperties_TrafficViewEnrollmentStatus string @@ -2443,6 +2501,12 @@ const ( ProfileProperties_TrafficViewEnrollmentStatus_Enabled = ProfileProperties_TrafficViewEnrollmentStatus("Enabled") ) +// Mapping from string to ProfileProperties_TrafficViewEnrollmentStatus +var profileProperties_TrafficViewEnrollmentStatus_Values = map[string]ProfileProperties_TrafficViewEnrollmentStatus{ + "disabled": ProfileProperties_TrafficViewEnrollmentStatus_Disabled, + "enabled": ProfileProperties_TrafficViewEnrollmentStatus_Enabled, +} + type ProfileProperties_TrafficViewEnrollmentStatus_STATUS string const ( @@ -2450,6 +2514,12 @@ const ( ProfileProperties_TrafficViewEnrollmentStatus_STATUS_Enabled = ProfileProperties_TrafficViewEnrollmentStatus_STATUS("Enabled") ) +// Mapping from string to ProfileProperties_TrafficViewEnrollmentStatus_STATUS +var profileProperties_TrafficViewEnrollmentStatus_STATUS_Values = map[string]ProfileProperties_TrafficViewEnrollmentStatus_STATUS{ + "disabled": ProfileProperties_TrafficViewEnrollmentStatus_STATUS_Disabled, + "enabled": ProfileProperties_TrafficViewEnrollmentStatus_STATUS_Enabled, +} + // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type TrafficManagerProfileOperatorSpec struct { // ConfigMaps: configures where to place operator written ConfigMaps. @@ -2874,6 +2944,15 @@ const ( MonitorConfig_ProfileMonitorStatus_Online = MonitorConfig_ProfileMonitorStatus("Online") ) +// Mapping from string to MonitorConfig_ProfileMonitorStatus +var monitorConfig_ProfileMonitorStatus_Values = map[string]MonitorConfig_ProfileMonitorStatus{ + "checkingendpoints": MonitorConfig_ProfileMonitorStatus_CheckingEndpoints, + "degraded": MonitorConfig_ProfileMonitorStatus_Degraded, + "disabled": MonitorConfig_ProfileMonitorStatus_Disabled, + "inactive": MonitorConfig_ProfileMonitorStatus_Inactive, + "online": MonitorConfig_ProfileMonitorStatus_Online, +} + type MonitorConfig_ProfileMonitorStatus_STATUS string const ( @@ -2884,6 +2963,15 @@ const ( MonitorConfig_ProfileMonitorStatus_STATUS_Online = MonitorConfig_ProfileMonitorStatus_STATUS("Online") ) +// Mapping from string to MonitorConfig_ProfileMonitorStatus_STATUS +var monitorConfig_ProfileMonitorStatus_STATUS_Values = map[string]MonitorConfig_ProfileMonitorStatus_STATUS{ + "checkingendpoints": MonitorConfig_ProfileMonitorStatus_STATUS_CheckingEndpoints, + "degraded": MonitorConfig_ProfileMonitorStatus_STATUS_Degraded, + "disabled": MonitorConfig_ProfileMonitorStatus_STATUS_Disabled, + "inactive": MonitorConfig_ProfileMonitorStatus_STATUS_Inactive, + "online": MonitorConfig_ProfileMonitorStatus_STATUS_Online, +} + // +kubebuilder:validation:Enum={"HTTP","HTTPS","TCP"} type MonitorConfig_Protocol string @@ -2893,6 +2981,13 @@ const ( MonitorConfig_Protocol_TCP = MonitorConfig_Protocol("TCP") ) +// Mapping from string to MonitorConfig_Protocol +var monitorConfig_Protocol_Values = map[string]MonitorConfig_Protocol{ + "http": MonitorConfig_Protocol_HTTP, + "https": MonitorConfig_Protocol_HTTPS, + "tcp": MonitorConfig_Protocol_TCP, +} + type MonitorConfig_Protocol_STATUS string const ( @@ -2901,6 +2996,13 @@ const ( MonitorConfig_Protocol_STATUS_TCP = MonitorConfig_Protocol_STATUS("TCP") ) +// Mapping from string to MonitorConfig_Protocol_STATUS +var monitorConfig_Protocol_STATUS_Values = map[string]MonitorConfig_Protocol_STATUS{ + "http": MonitorConfig_Protocol_STATUS_HTTP, + "https": MonitorConfig_Protocol_STATUS_HTTPS, + "tcp": MonitorConfig_Protocol_STATUS_TCP, +} + type TrafficManagerProfileOperatorConfigMaps struct { // DnsConfigFqdn: indicates where the DnsConfigFqdn config map should be placed. If omitted, no config map will be created. DnsConfigFqdn *genruntime.ConfigMapDestination `json:"dnsConfigFqdn,omitempty"` diff --git a/v2/api/network/v1api20220401/traffic_manager_profiles_azure_endpoint_types_gen.go b/v2/api/network/v1api20220401/traffic_manager_profiles_azure_endpoint_types_gen.go index 0111df4b389..0f134827d7d 100644 --- a/v2/api/network/v1api20220401/traffic_manager_profiles_azure_endpoint_types_gen.go +++ b/v2/api/network/v1api20220401/traffic_manager_profiles_azure_endpoint_types_gen.go @@ -710,8 +710,9 @@ func (endpoint *Trafficmanagerprofiles_AzureEndpoint_Spec) AssignProperties_From // AlwaysServe if source.AlwaysServe != nil { - alwaysServe := EndpointProperties_AlwaysServe(*source.AlwaysServe) - endpoint.AlwaysServe = &alwaysServe + alwaysServe := *source.AlwaysServe + alwaysServeTemp := genruntime.ToEnum(alwaysServe, endpointProperties_AlwaysServe_Values) + endpoint.AlwaysServe = &alwaysServeTemp } else { endpoint.AlwaysServe = nil } @@ -742,16 +743,18 @@ func (endpoint *Trafficmanagerprofiles_AzureEndpoint_Spec) AssignProperties_From // EndpointMonitorStatus if source.EndpointMonitorStatus != nil { - endpointMonitorStatus := EndpointProperties_EndpointMonitorStatus(*source.EndpointMonitorStatus) - endpoint.EndpointMonitorStatus = &endpointMonitorStatus + endpointMonitorStatus := *source.EndpointMonitorStatus + endpointMonitorStatusTemp := genruntime.ToEnum(endpointMonitorStatus, endpointProperties_EndpointMonitorStatus_Values) + endpoint.EndpointMonitorStatus = &endpointMonitorStatusTemp } else { endpoint.EndpointMonitorStatus = nil } // EndpointStatus if source.EndpointStatus != nil { - endpointStatus := EndpointProperties_EndpointStatus(*source.EndpointStatus) - endpoint.EndpointStatus = &endpointStatus + endpointStatus := *source.EndpointStatus + endpointStatusTemp := genruntime.ToEnum(endpointStatus, endpointProperties_EndpointStatus_Values) + endpoint.EndpointStatus = &endpointStatusTemp } else { endpoint.EndpointStatus = nil } @@ -1351,8 +1354,9 @@ func (endpoint *Trafficmanagerprofiles_AzureEndpoint_STATUS) AssignProperties_Fr // AlwaysServe if source.AlwaysServe != nil { - alwaysServe := EndpointProperties_AlwaysServe_STATUS(*source.AlwaysServe) - endpoint.AlwaysServe = &alwaysServe + alwaysServe := *source.AlwaysServe + alwaysServeTemp := genruntime.ToEnum(alwaysServe, endpointProperties_AlwaysServe_STATUS_Values) + endpoint.AlwaysServe = &alwaysServeTemp } else { endpoint.AlwaysServe = nil } @@ -1383,16 +1387,18 @@ func (endpoint *Trafficmanagerprofiles_AzureEndpoint_STATUS) AssignProperties_Fr // EndpointMonitorStatus if source.EndpointMonitorStatus != nil { - endpointMonitorStatus := EndpointProperties_EndpointMonitorStatus_STATUS(*source.EndpointMonitorStatus) - endpoint.EndpointMonitorStatus = &endpointMonitorStatus + endpointMonitorStatus := *source.EndpointMonitorStatus + endpointMonitorStatusTemp := genruntime.ToEnum(endpointMonitorStatus, endpointProperties_EndpointMonitorStatus_STATUS_Values) + endpoint.EndpointMonitorStatus = &endpointMonitorStatusTemp } else { endpoint.EndpointMonitorStatus = nil } // EndpointStatus if source.EndpointStatus != nil { - endpointStatus := EndpointProperties_EndpointStatus_STATUS(*source.EndpointStatus) - endpoint.EndpointStatus = &endpointStatus + endpointStatus := *source.EndpointStatus + endpointStatusTemp := genruntime.ToEnum(endpointStatus, endpointProperties_EndpointStatus_STATUS_Values) + endpoint.EndpointStatus = &endpointStatusTemp } else { endpoint.EndpointStatus = nil } @@ -1575,6 +1581,12 @@ const ( EndpointProperties_AlwaysServe_Enabled = EndpointProperties_AlwaysServe("Enabled") ) +// Mapping from string to EndpointProperties_AlwaysServe +var endpointProperties_AlwaysServe_Values = map[string]EndpointProperties_AlwaysServe{ + "disabled": EndpointProperties_AlwaysServe_Disabled, + "enabled": EndpointProperties_AlwaysServe_Enabled, +} + type EndpointProperties_AlwaysServe_STATUS string const ( @@ -1582,6 +1594,12 @@ const ( EndpointProperties_AlwaysServe_STATUS_Enabled = EndpointProperties_AlwaysServe_STATUS("Enabled") ) +// Mapping from string to EndpointProperties_AlwaysServe_STATUS +var endpointProperties_AlwaysServe_STATUS_Values = map[string]EndpointProperties_AlwaysServe_STATUS{ + "disabled": EndpointProperties_AlwaysServe_STATUS_Disabled, + "enabled": EndpointProperties_AlwaysServe_STATUS_Enabled, +} + type EndpointProperties_CustomHeaders struct { // Name: Header name. Name *string `json:"name,omitempty"` @@ -1775,6 +1793,17 @@ const ( EndpointProperties_EndpointMonitorStatus_Unmonitored = EndpointProperties_EndpointMonitorStatus("Unmonitored") ) +// Mapping from string to EndpointProperties_EndpointMonitorStatus +var endpointProperties_EndpointMonitorStatus_Values = map[string]EndpointProperties_EndpointMonitorStatus{ + "checkingendpoint": EndpointProperties_EndpointMonitorStatus_CheckingEndpoint, + "degraded": EndpointProperties_EndpointMonitorStatus_Degraded, + "disabled": EndpointProperties_EndpointMonitorStatus_Disabled, + "inactive": EndpointProperties_EndpointMonitorStatus_Inactive, + "online": EndpointProperties_EndpointMonitorStatus_Online, + "stopped": EndpointProperties_EndpointMonitorStatus_Stopped, + "unmonitored": EndpointProperties_EndpointMonitorStatus_Unmonitored, +} + type EndpointProperties_EndpointMonitorStatus_STATUS string const ( @@ -1787,6 +1816,17 @@ const ( EndpointProperties_EndpointMonitorStatus_STATUS_Unmonitored = EndpointProperties_EndpointMonitorStatus_STATUS("Unmonitored") ) +// Mapping from string to EndpointProperties_EndpointMonitorStatus_STATUS +var endpointProperties_EndpointMonitorStatus_STATUS_Values = map[string]EndpointProperties_EndpointMonitorStatus_STATUS{ + "checkingendpoint": EndpointProperties_EndpointMonitorStatus_STATUS_CheckingEndpoint, + "degraded": EndpointProperties_EndpointMonitorStatus_STATUS_Degraded, + "disabled": EndpointProperties_EndpointMonitorStatus_STATUS_Disabled, + "inactive": EndpointProperties_EndpointMonitorStatus_STATUS_Inactive, + "online": EndpointProperties_EndpointMonitorStatus_STATUS_Online, + "stopped": EndpointProperties_EndpointMonitorStatus_STATUS_Stopped, + "unmonitored": EndpointProperties_EndpointMonitorStatus_STATUS_Unmonitored, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type EndpointProperties_EndpointStatus string @@ -1795,6 +1835,12 @@ const ( EndpointProperties_EndpointStatus_Enabled = EndpointProperties_EndpointStatus("Enabled") ) +// Mapping from string to EndpointProperties_EndpointStatus +var endpointProperties_EndpointStatus_Values = map[string]EndpointProperties_EndpointStatus{ + "disabled": EndpointProperties_EndpointStatus_Disabled, + "enabled": EndpointProperties_EndpointStatus_Enabled, +} + type EndpointProperties_EndpointStatus_STATUS string const ( @@ -1802,6 +1848,12 @@ const ( EndpointProperties_EndpointStatus_STATUS_Enabled = EndpointProperties_EndpointStatus_STATUS("Enabled") ) +// Mapping from string to EndpointProperties_EndpointStatus_STATUS +var endpointProperties_EndpointStatus_STATUS_Values = map[string]EndpointProperties_EndpointStatus_STATUS{ + "disabled": EndpointProperties_EndpointStatus_STATUS_Disabled, + "enabled": EndpointProperties_EndpointStatus_STATUS_Enabled, +} + type EndpointProperties_Subnets struct { // First: First address in the subnet. First *string `json:"first,omitempty"` diff --git a/v2/api/network/v1api20220401/traffic_manager_profiles_external_endpoint_types_gen.go b/v2/api/network/v1api20220401/traffic_manager_profiles_external_endpoint_types_gen.go index 80f615e955f..bf7c712c7a0 100644 --- a/v2/api/network/v1api20220401/traffic_manager_profiles_external_endpoint_types_gen.go +++ b/v2/api/network/v1api20220401/traffic_manager_profiles_external_endpoint_types_gen.go @@ -710,8 +710,9 @@ func (endpoint *Trafficmanagerprofiles_ExternalEndpoint_Spec) AssignProperties_F // AlwaysServe if source.AlwaysServe != nil { - alwaysServe := EndpointProperties_AlwaysServe(*source.AlwaysServe) - endpoint.AlwaysServe = &alwaysServe + alwaysServe := *source.AlwaysServe + alwaysServeTemp := genruntime.ToEnum(alwaysServe, endpointProperties_AlwaysServe_Values) + endpoint.AlwaysServe = &alwaysServeTemp } else { endpoint.AlwaysServe = nil } @@ -742,16 +743,18 @@ func (endpoint *Trafficmanagerprofiles_ExternalEndpoint_Spec) AssignProperties_F // EndpointMonitorStatus if source.EndpointMonitorStatus != nil { - endpointMonitorStatus := EndpointProperties_EndpointMonitorStatus(*source.EndpointMonitorStatus) - endpoint.EndpointMonitorStatus = &endpointMonitorStatus + endpointMonitorStatus := *source.EndpointMonitorStatus + endpointMonitorStatusTemp := genruntime.ToEnum(endpointMonitorStatus, endpointProperties_EndpointMonitorStatus_Values) + endpoint.EndpointMonitorStatus = &endpointMonitorStatusTemp } else { endpoint.EndpointMonitorStatus = nil } // EndpointStatus if source.EndpointStatus != nil { - endpointStatus := EndpointProperties_EndpointStatus(*source.EndpointStatus) - endpoint.EndpointStatus = &endpointStatus + endpointStatus := *source.EndpointStatus + endpointStatusTemp := genruntime.ToEnum(endpointStatus, endpointProperties_EndpointStatus_Values) + endpoint.EndpointStatus = &endpointStatusTemp } else { endpoint.EndpointStatus = nil } @@ -1351,8 +1354,9 @@ func (endpoint *Trafficmanagerprofiles_ExternalEndpoint_STATUS) AssignProperties // AlwaysServe if source.AlwaysServe != nil { - alwaysServe := EndpointProperties_AlwaysServe_STATUS(*source.AlwaysServe) - endpoint.AlwaysServe = &alwaysServe + alwaysServe := *source.AlwaysServe + alwaysServeTemp := genruntime.ToEnum(alwaysServe, endpointProperties_AlwaysServe_STATUS_Values) + endpoint.AlwaysServe = &alwaysServeTemp } else { endpoint.AlwaysServe = nil } @@ -1383,16 +1387,18 @@ func (endpoint *Trafficmanagerprofiles_ExternalEndpoint_STATUS) AssignProperties // EndpointMonitorStatus if source.EndpointMonitorStatus != nil { - endpointMonitorStatus := EndpointProperties_EndpointMonitorStatus_STATUS(*source.EndpointMonitorStatus) - endpoint.EndpointMonitorStatus = &endpointMonitorStatus + endpointMonitorStatus := *source.EndpointMonitorStatus + endpointMonitorStatusTemp := genruntime.ToEnum(endpointMonitorStatus, endpointProperties_EndpointMonitorStatus_STATUS_Values) + endpoint.EndpointMonitorStatus = &endpointMonitorStatusTemp } else { endpoint.EndpointMonitorStatus = nil } // EndpointStatus if source.EndpointStatus != nil { - endpointStatus := EndpointProperties_EndpointStatus_STATUS(*source.EndpointStatus) - endpoint.EndpointStatus = &endpointStatus + endpointStatus := *source.EndpointStatus + endpointStatusTemp := genruntime.ToEnum(endpointStatus, endpointProperties_EndpointStatus_STATUS_Values) + endpoint.EndpointStatus = &endpointStatusTemp } else { endpoint.EndpointStatus = nil } diff --git a/v2/api/network/v1api20220401/traffic_manager_profiles_nested_endpoint_types_gen.go b/v2/api/network/v1api20220401/traffic_manager_profiles_nested_endpoint_types_gen.go index 1fa6ea7f856..1b6515cb26b 100644 --- a/v2/api/network/v1api20220401/traffic_manager_profiles_nested_endpoint_types_gen.go +++ b/v2/api/network/v1api20220401/traffic_manager_profiles_nested_endpoint_types_gen.go @@ -710,8 +710,9 @@ func (endpoint *Trafficmanagerprofiles_NestedEndpoint_Spec) AssignProperties_Fro // AlwaysServe if source.AlwaysServe != nil { - alwaysServe := EndpointProperties_AlwaysServe(*source.AlwaysServe) - endpoint.AlwaysServe = &alwaysServe + alwaysServe := *source.AlwaysServe + alwaysServeTemp := genruntime.ToEnum(alwaysServe, endpointProperties_AlwaysServe_Values) + endpoint.AlwaysServe = &alwaysServeTemp } else { endpoint.AlwaysServe = nil } @@ -742,16 +743,18 @@ func (endpoint *Trafficmanagerprofiles_NestedEndpoint_Spec) AssignProperties_Fro // EndpointMonitorStatus if source.EndpointMonitorStatus != nil { - endpointMonitorStatus := EndpointProperties_EndpointMonitorStatus(*source.EndpointMonitorStatus) - endpoint.EndpointMonitorStatus = &endpointMonitorStatus + endpointMonitorStatus := *source.EndpointMonitorStatus + endpointMonitorStatusTemp := genruntime.ToEnum(endpointMonitorStatus, endpointProperties_EndpointMonitorStatus_Values) + endpoint.EndpointMonitorStatus = &endpointMonitorStatusTemp } else { endpoint.EndpointMonitorStatus = nil } // EndpointStatus if source.EndpointStatus != nil { - endpointStatus := EndpointProperties_EndpointStatus(*source.EndpointStatus) - endpoint.EndpointStatus = &endpointStatus + endpointStatus := *source.EndpointStatus + endpointStatusTemp := genruntime.ToEnum(endpointStatus, endpointProperties_EndpointStatus_Values) + endpoint.EndpointStatus = &endpointStatusTemp } else { endpoint.EndpointStatus = nil } @@ -1351,8 +1354,9 @@ func (endpoint *Trafficmanagerprofiles_NestedEndpoint_STATUS) AssignProperties_F // AlwaysServe if source.AlwaysServe != nil { - alwaysServe := EndpointProperties_AlwaysServe_STATUS(*source.AlwaysServe) - endpoint.AlwaysServe = &alwaysServe + alwaysServe := *source.AlwaysServe + alwaysServeTemp := genruntime.ToEnum(alwaysServe, endpointProperties_AlwaysServe_STATUS_Values) + endpoint.AlwaysServe = &alwaysServeTemp } else { endpoint.AlwaysServe = nil } @@ -1383,16 +1387,18 @@ func (endpoint *Trafficmanagerprofiles_NestedEndpoint_STATUS) AssignProperties_F // EndpointMonitorStatus if source.EndpointMonitorStatus != nil { - endpointMonitorStatus := EndpointProperties_EndpointMonitorStatus_STATUS(*source.EndpointMonitorStatus) - endpoint.EndpointMonitorStatus = &endpointMonitorStatus + endpointMonitorStatus := *source.EndpointMonitorStatus + endpointMonitorStatusTemp := genruntime.ToEnum(endpointMonitorStatus, endpointProperties_EndpointMonitorStatus_STATUS_Values) + endpoint.EndpointMonitorStatus = &endpointMonitorStatusTemp } else { endpoint.EndpointMonitorStatus = nil } // EndpointStatus if source.EndpointStatus != nil { - endpointStatus := EndpointProperties_EndpointStatus_STATUS(*source.EndpointStatus) - endpoint.EndpointStatus = &endpointStatus + endpointStatus := *source.EndpointStatus + endpointStatusTemp := genruntime.ToEnum(endpointStatus, endpointProperties_EndpointStatus_STATUS_Values) + endpoint.EndpointStatus = &endpointStatusTemp } else { endpoint.EndpointStatus = nil } diff --git a/v2/api/network/v1api20220701/application_gateway_spec_arm_types_gen.go b/v2/api/network/v1api20220701/application_gateway_spec_arm_types_gen.go index 48e9745ab85..4682aac3933 100644 --- a/v2/api/network/v1api20220701/application_gateway_spec_arm_types_gen.go +++ b/v2/api/network/v1api20220701/application_gateway_spec_arm_types_gen.go @@ -461,6 +461,14 @@ const ( ManagedServiceIdentity_Type_UserAssigned = ManagedServiceIdentity_Type("UserAssigned") ) +// Mapping from string to ManagedServiceIdentity_Type +var managedServiceIdentity_Type_Values = map[string]ManagedServiceIdentity_Type{ + "none": ManagedServiceIdentity_Type_None, + "systemassigned": ManagedServiceIdentity_Type_SystemAssigned, + "systemassigned, userassigned": ManagedServiceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentity_Type_UserAssigned, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/network/v1api20220701/application_gateway_status_application_gateway_sub_resource_embedded_arm_types_gen.go b/v2/api/network/v1api20220701/application_gateway_status_application_gateway_sub_resource_embedded_arm_types_gen.go index c038aac9f40..240b531a0ab 100644 --- a/v2/api/network/v1api20220701/application_gateway_status_application_gateway_sub_resource_embedded_arm_types_gen.go +++ b/v2/api/network/v1api20220701/application_gateway_status_application_gateway_sub_resource_embedded_arm_types_gen.go @@ -421,6 +421,14 @@ const ( ManagedServiceIdentity_Type_STATUS_UserAssigned = ManagedServiceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ManagedServiceIdentity_Type_STATUS +var managedServiceIdentity_Type_STATUS_Values = map[string]ManagedServiceIdentity_Type_STATUS{ + "none": ManagedServiceIdentity_Type_STATUS_None, + "systemassigned": ManagedServiceIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": ManagedServiceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentity_Type_STATUS_UserAssigned, +} + type ManagedServiceIdentity_UserAssignedIdentities_STATUS_ARM struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` diff --git a/v2/api/network/v1api20220701/application_gateway_types_gen.go b/v2/api/network/v1api20220701/application_gateway_types_gen.go index 3aae7ba26c4..0c6668827ce 100644 --- a/v2/api/network/v1api20220701/application_gateway_types_gen.go +++ b/v2/api/network/v1api20220701/application_gateway_types_gen.go @@ -3872,8 +3872,9 @@ func (embedded *ApplicationGateway_STATUS_ApplicationGateway_SubResourceEmbedded // OperationalState if source.OperationalState != nil { - operationalState := ApplicationGatewayPropertiesFormat_OperationalState_STATUS(*source.OperationalState) - embedded.OperationalState = &operationalState + operationalState := *source.OperationalState + operationalStateTemp := genruntime.ToEnum(operationalState, applicationGatewayPropertiesFormat_OperationalState_STATUS_Values) + embedded.OperationalState = &operationalStateTemp } else { embedded.OperationalState = nil } @@ -3934,8 +3935,9 @@ func (embedded *ApplicationGateway_STATUS_ApplicationGateway_SubResourceEmbedded // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ApplicationGatewayProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, applicationGatewayProvisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } @@ -5671,8 +5673,9 @@ func (settings *ApplicationGatewayBackendHttpSettings) AssignProperties_From_App // CookieBasedAffinity if source.CookieBasedAffinity != nil { - cookieBasedAffinity := ApplicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity(*source.CookieBasedAffinity) - settings.CookieBasedAffinity = &cookieBasedAffinity + cookieBasedAffinity := *source.CookieBasedAffinity + cookieBasedAffinityTemp := genruntime.ToEnum(cookieBasedAffinity, applicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity_Values) + settings.CookieBasedAffinity = &cookieBasedAffinityTemp } else { settings.CookieBasedAffinity = nil } @@ -5719,8 +5722,9 @@ func (settings *ApplicationGatewayBackendHttpSettings) AssignProperties_From_App // Protocol if source.Protocol != nil { - protocol := ApplicationGatewayProtocol(*source.Protocol) - settings.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, applicationGatewayProtocol_Values) + settings.Protocol = &protocolTemp } else { settings.Protocol = nil } @@ -6162,8 +6166,9 @@ func (settings *ApplicationGatewayBackendSettings) AssignProperties_From_Applica // Protocol if source.Protocol != nil { - protocol := ApplicationGatewayProtocol(*source.Protocol) - settings.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, applicationGatewayProtocol_Values) + settings.Protocol = &protocolTemp } else { settings.Protocol = nil } @@ -6401,8 +6406,9 @@ func (error *ApplicationGatewayCustomError) AssignProperties_From_ApplicationGat // StatusCode if source.StatusCode != nil { - statusCode := ApplicationGatewayCustomError_StatusCode(*source.StatusCode) - error.StatusCode = &statusCode + statusCode := *source.StatusCode + statusCodeTemp := genruntime.ToEnum(statusCode, applicationGatewayCustomError_StatusCode_Values) + error.StatusCode = &statusCodeTemp } else { error.StatusCode = nil } @@ -6503,8 +6509,9 @@ func (error *ApplicationGatewayCustomError_STATUS) AssignProperties_From_Applica // StatusCode if source.StatusCode != nil { - statusCode := ApplicationGatewayCustomError_StatusCode_STATUS(*source.StatusCode) - error.StatusCode = &statusCode + statusCode := *source.StatusCode + statusCodeTemp := genruntime.ToEnum(statusCode, applicationGatewayCustomError_StatusCode_STATUS_Values) + error.StatusCode = &statusCodeTemp } else { error.StatusCode = nil } @@ -6712,8 +6719,9 @@ func (configuration *ApplicationGatewayFrontendIPConfiguration) AssignProperties // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod(*source.PrivateIPAllocationMethod) - configuration.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_Values) + configuration.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { configuration.PrivateIPAllocationMethod = nil } @@ -7626,8 +7634,9 @@ func (listener *ApplicationGatewayHttpListener) AssignProperties_From_Applicatio // Protocol if source.Protocol != nil { - protocol := ApplicationGatewayProtocol(*source.Protocol) - listener.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, applicationGatewayProtocol_Values) + listener.Protocol = &protocolTemp } else { listener.Protocol = nil } @@ -8249,8 +8258,9 @@ func (listener *ApplicationGatewayListener) AssignProperties_From_ApplicationGat // Protocol if source.Protocol != nil { - protocol := ApplicationGatewayProtocol(*source.Protocol) - listener.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, applicationGatewayProtocol_Values) + listener.Protocol = &protocolTemp } else { listener.Protocol = nil } @@ -8518,8 +8528,9 @@ func (policy *ApplicationGatewayLoadDistributionPolicy) AssignProperties_From_Ap // LoadDistributionAlgorithm if source.LoadDistributionAlgorithm != nil { - loadDistributionAlgorithm := ApplicationGatewayLoadDistributionAlgorithmEnum(*source.LoadDistributionAlgorithm) - policy.LoadDistributionAlgorithm = &loadDistributionAlgorithm + loadDistributionAlgorithm := *source.LoadDistributionAlgorithm + loadDistributionAlgorithmTemp := genruntime.ToEnum(loadDistributionAlgorithm, applicationGatewayLoadDistributionAlgorithmEnum_Values) + policy.LoadDistributionAlgorithm = &loadDistributionAlgorithmTemp } else { policy.LoadDistributionAlgorithm = nil } @@ -9232,8 +9243,9 @@ func (probe *ApplicationGatewayProbe) AssignProperties_From_ApplicationGatewayPr // Protocol if source.Protocol != nil { - protocol := ApplicationGatewayProtocol(*source.Protocol) - probe.Protocol = &protocol + protocol := *source.Protocol + protocolTemp := genruntime.ToEnum(protocol, applicationGatewayProtocol_Values) + probe.Protocol = &protocolTemp } else { probe.Protocol = nil } @@ -9404,6 +9416,14 @@ const ( ApplicationGatewayPropertiesFormat_OperationalState_STATUS_Stopping = ApplicationGatewayPropertiesFormat_OperationalState_STATUS("Stopping") ) +// Mapping from string to ApplicationGatewayPropertiesFormat_OperationalState_STATUS +var applicationGatewayPropertiesFormat_OperationalState_STATUS_Values = map[string]ApplicationGatewayPropertiesFormat_OperationalState_STATUS{ + "running": ApplicationGatewayPropertiesFormat_OperationalState_STATUS_Running, + "starting": ApplicationGatewayPropertiesFormat_OperationalState_STATUS_Starting, + "stopped": ApplicationGatewayPropertiesFormat_OperationalState_STATUS_Stopped, + "stopping": ApplicationGatewayPropertiesFormat_OperationalState_STATUS_Stopping, +} + // The current provisioning state. type ApplicationGatewayProvisioningState_STATUS string @@ -9414,6 +9434,14 @@ const ( ApplicationGatewayProvisioningState_STATUS_Updating = ApplicationGatewayProvisioningState_STATUS("Updating") ) +// Mapping from string to ApplicationGatewayProvisioningState_STATUS +var applicationGatewayProvisioningState_STATUS_Values = map[string]ApplicationGatewayProvisioningState_STATUS{ + "deleting": ApplicationGatewayProvisioningState_STATUS_Deleting, + "failed": ApplicationGatewayProvisioningState_STATUS_Failed, + "succeeded": ApplicationGatewayProvisioningState_STATUS_Succeeded, + "updating": ApplicationGatewayProvisioningState_STATUS_Updating, +} + // Redirect configuration of an application gateway. type ApplicationGatewayRedirectConfiguration struct { // IncludePath: Include path in the redirected url. @@ -9671,8 +9699,9 @@ func (configuration *ApplicationGatewayRedirectConfiguration) AssignProperties_F // RedirectType if source.RedirectType != nil { - redirectType := RedirectTypeEnum(*source.RedirectType) - configuration.RedirectType = &redirectType + redirectType := *source.RedirectType + redirectTypeTemp := genruntime.ToEnum(redirectType, redirectTypeEnum_Values) + configuration.RedirectType = &redirectTypeTemp } else { configuration.RedirectType = nil } @@ -10265,8 +10294,9 @@ func (rule *ApplicationGatewayRequestRoutingRule) AssignProperties_From_Applicat // RuleType if source.RuleType != nil { - ruleType := ApplicationGatewayRequestRoutingRulePropertiesFormat_RuleType(*source.RuleType) - rule.RuleType = &ruleType + ruleType := *source.RuleType + ruleTypeTemp := genruntime.ToEnum(ruleType, applicationGatewayRequestRoutingRulePropertiesFormat_RuleType_Values) + rule.RuleType = &ruleTypeTemp } else { rule.RuleType = nil } @@ -10892,8 +10922,9 @@ func (rule *ApplicationGatewayRoutingRule) AssignProperties_From_ApplicationGate // RuleType if source.RuleType != nil { - ruleType := ApplicationGatewayRoutingRulePropertiesFormat_RuleType(*source.RuleType) - rule.RuleType = &ruleType + ruleType := *source.RuleType + ruleTypeTemp := genruntime.ToEnum(ruleType, applicationGatewayRoutingRulePropertiesFormat_RuleType_Values) + rule.RuleType = &ruleTypeTemp } else { rule.RuleType = nil } @@ -11122,16 +11153,18 @@ func (gatewaySku *ApplicationGatewaySku) AssignProperties_From_ApplicationGatewa // Name if source.Name != nil { - name := ApplicationGatewaySku_Name(*source.Name) - gatewaySku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, applicationGatewaySku_Name_Values) + gatewaySku.Name = &nameTemp } else { gatewaySku.Name = nil } // Tier if source.Tier != nil { - tier := ApplicationGatewaySku_Tier(*source.Tier) - gatewaySku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, applicationGatewaySku_Tier_Values) + gatewaySku.Tier = &tierTemp } else { gatewaySku.Tier = nil } @@ -11257,16 +11290,18 @@ func (gatewaySku *ApplicationGatewaySku_STATUS) AssignProperties_From_Applicatio // Name if source.Name != nil { - name := ApplicationGatewaySku_Name_STATUS(*source.Name) - gatewaySku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, applicationGatewaySku_Name_STATUS_Values) + gatewaySku.Name = &nameTemp } else { gatewaySku.Name = nil } // Tier if source.Tier != nil { - tier := ApplicationGatewaySku_Tier_STATUS(*source.Tier) - gatewaySku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, applicationGatewaySku_Tier_STATUS_Values) + gatewaySku.Tier = &tierTemp } else { gatewaySku.Tier = nil } @@ -11647,7 +11682,7 @@ func (policy *ApplicationGatewaySslPolicy) AssignProperties_From_ApplicationGate for cipherSuiteIndex, cipherSuiteItem := range source.CipherSuites { // Shadow the loop variable to avoid aliasing cipherSuiteItem := cipherSuiteItem - cipherSuiteList[cipherSuiteIndex] = CipherSuitesEnum(cipherSuiteItem) + cipherSuiteList[cipherSuiteIndex] = genruntime.ToEnum(cipherSuiteItem, cipherSuitesEnum_Values) } policy.CipherSuites = cipherSuiteList } else { @@ -11660,7 +11695,7 @@ func (policy *ApplicationGatewaySslPolicy) AssignProperties_From_ApplicationGate for disabledSslProtocolIndex, disabledSslProtocolItem := range source.DisabledSslProtocols { // Shadow the loop variable to avoid aliasing disabledSslProtocolItem := disabledSslProtocolItem - disabledSslProtocolList[disabledSslProtocolIndex] = ProtocolsEnum(disabledSslProtocolItem) + disabledSslProtocolList[disabledSslProtocolIndex] = genruntime.ToEnum(disabledSslProtocolItem, protocolsEnum_Values) } policy.DisabledSslProtocols = disabledSslProtocolList } else { @@ -11669,24 +11704,27 @@ func (policy *ApplicationGatewaySslPolicy) AssignProperties_From_ApplicationGate // MinProtocolVersion if source.MinProtocolVersion != nil { - minProtocolVersion := ProtocolsEnum(*source.MinProtocolVersion) - policy.MinProtocolVersion = &minProtocolVersion + minProtocolVersion := *source.MinProtocolVersion + minProtocolVersionTemp := genruntime.ToEnum(minProtocolVersion, protocolsEnum_Values) + policy.MinProtocolVersion = &minProtocolVersionTemp } else { policy.MinProtocolVersion = nil } // PolicyName if source.PolicyName != nil { - policyName := PolicyNameEnum(*source.PolicyName) - policy.PolicyName = &policyName + policyName := *source.PolicyName + policyNameTemp := genruntime.ToEnum(policyName, policyNameEnum_Values) + policy.PolicyName = &policyNameTemp } else { policy.PolicyName = nil } // PolicyType if source.PolicyType != nil { - policyType := ApplicationGatewaySslPolicy_PolicyType(*source.PolicyType) - policy.PolicyType = &policyType + policyType := *source.PolicyType + policyTypeTemp := genruntime.ToEnum(policyType, applicationGatewaySslPolicy_PolicyType_Values) + policy.PolicyType = &policyTypeTemp } else { policy.PolicyType = nil } @@ -11893,7 +11931,7 @@ func (policy *ApplicationGatewaySslPolicy_STATUS) AssignProperties_From_Applicat for cipherSuiteIndex, cipherSuiteItem := range source.CipherSuites { // Shadow the loop variable to avoid aliasing cipherSuiteItem := cipherSuiteItem - cipherSuiteList[cipherSuiteIndex] = CipherSuitesEnum_STATUS(cipherSuiteItem) + cipherSuiteList[cipherSuiteIndex] = genruntime.ToEnum(cipherSuiteItem, cipherSuitesEnum_STATUS_Values) } policy.CipherSuites = cipherSuiteList } else { @@ -11906,7 +11944,7 @@ func (policy *ApplicationGatewaySslPolicy_STATUS) AssignProperties_From_Applicat for disabledSslProtocolIndex, disabledSslProtocolItem := range source.DisabledSslProtocols { // Shadow the loop variable to avoid aliasing disabledSslProtocolItem := disabledSslProtocolItem - disabledSslProtocolList[disabledSslProtocolIndex] = ProtocolsEnum_STATUS(disabledSslProtocolItem) + disabledSslProtocolList[disabledSslProtocolIndex] = genruntime.ToEnum(disabledSslProtocolItem, protocolsEnum_STATUS_Values) } policy.DisabledSslProtocols = disabledSslProtocolList } else { @@ -11915,24 +11953,27 @@ func (policy *ApplicationGatewaySslPolicy_STATUS) AssignProperties_From_Applicat // MinProtocolVersion if source.MinProtocolVersion != nil { - minProtocolVersion := ProtocolsEnum_STATUS(*source.MinProtocolVersion) - policy.MinProtocolVersion = &minProtocolVersion + minProtocolVersion := *source.MinProtocolVersion + minProtocolVersionTemp := genruntime.ToEnum(minProtocolVersion, protocolsEnum_STATUS_Values) + policy.MinProtocolVersion = &minProtocolVersionTemp } else { policy.MinProtocolVersion = nil } // PolicyName if source.PolicyName != nil { - policyName := PolicyNameEnum_STATUS(*source.PolicyName) - policy.PolicyName = &policyName + policyName := *source.PolicyName + policyNameTemp := genruntime.ToEnum(policyName, policyNameEnum_STATUS_Values) + policy.PolicyName = &policyNameTemp } else { policy.PolicyName = nil } // PolicyType if source.PolicyType != nil { - policyType := ApplicationGatewaySslPolicy_PolicyType_STATUS(*source.PolicyType) - policy.PolicyType = &policyType + policyType := *source.PolicyType + policyTypeTemp := genruntime.ToEnum(policyType, applicationGatewaySslPolicy_PolicyType_STATUS_Values) + policy.PolicyType = &policyTypeTemp } else { policy.PolicyType = nil } @@ -13553,8 +13594,9 @@ func (configuration *ApplicationGatewayWebApplicationFirewallConfiguration) Assi // FirewallMode if source.FirewallMode != nil { - firewallMode := ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode(*source.FirewallMode) - configuration.FirewallMode = &firewallMode + firewallMode := *source.FirewallMode + firewallModeTemp := genruntime.ToEnum(firewallMode, applicationGatewayWebApplicationFirewallConfiguration_FirewallMode_Values) + configuration.FirewallMode = &firewallModeTemp } else { configuration.FirewallMode = nil } @@ -13967,8 +14009,9 @@ func (configuration *ApplicationGatewayWebApplicationFirewallConfiguration_STATU // FirewallMode if source.FirewallMode != nil { - firewallMode := ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS(*source.FirewallMode) - configuration.FirewallMode = &firewallMode + firewallMode := *source.FirewallMode + firewallModeTemp := genruntime.ToEnum(firewallMode, applicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS_Values) + configuration.FirewallMode = &firewallModeTemp } else { configuration.FirewallMode = nil } @@ -14158,8 +14201,9 @@ func (identity *ManagedServiceIdentity) AssignProperties_From_ManagedServiceIden // Type if source.Type != nil { - typeVar := ManagedServiceIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -14336,8 +14380,9 @@ func (identity *ManagedServiceIdentity_STATUS) AssignProperties_From_ManagedServ // Type if source.Type != nil { - typeVar := ManagedServiceIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -14515,6 +14560,12 @@ const ( ApplicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity_Enabled = ApplicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity("Enabled") ) +// Mapping from string to ApplicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity +var applicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity_Values = map[string]ApplicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity{ + "disabled": ApplicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity_Disabled, + "enabled": ApplicationGatewayBackendHttpSettingsPropertiesFormat_CookieBasedAffinity_Enabled, +} + // Application gateway client authentication configuration. type ApplicationGatewayClientAuthConfiguration struct { // VerifyClientCertIssuerDN: Verify client certificate issuer name on the application gateway. @@ -14588,8 +14639,9 @@ func (configuration *ApplicationGatewayClientAuthConfiguration) AssignProperties // VerifyClientRevocation if source.VerifyClientRevocation != nil { - verifyClientRevocation := ApplicationGatewayClientAuthConfiguration_VerifyClientRevocation(*source.VerifyClientRevocation) - configuration.VerifyClientRevocation = &verifyClientRevocation + verifyClientRevocation := *source.VerifyClientRevocation + verifyClientRevocationTemp := genruntime.ToEnum(verifyClientRevocation, applicationGatewayClientAuthConfiguration_VerifyClientRevocation_Values) + configuration.VerifyClientRevocation = &verifyClientRevocationTemp } else { configuration.VerifyClientRevocation = nil } @@ -14759,6 +14811,12 @@ const ( ApplicationGatewayCustomError_StatusCode_HttpStatus502 = ApplicationGatewayCustomError_StatusCode("HttpStatus502") ) +// Mapping from string to ApplicationGatewayCustomError_StatusCode +var applicationGatewayCustomError_StatusCode_Values = map[string]ApplicationGatewayCustomError_StatusCode{ + "httpstatus403": ApplicationGatewayCustomError_StatusCode_HttpStatus403, + "httpstatus502": ApplicationGatewayCustomError_StatusCode_HttpStatus502, +} + type ApplicationGatewayCustomError_StatusCode_STATUS string const ( @@ -14766,6 +14824,12 @@ const ( ApplicationGatewayCustomError_StatusCode_STATUS_HttpStatus502 = ApplicationGatewayCustomError_StatusCode_STATUS("HttpStatus502") ) +// Mapping from string to ApplicationGatewayCustomError_StatusCode_STATUS +var applicationGatewayCustomError_StatusCode_STATUS_Values = map[string]ApplicationGatewayCustomError_StatusCode_STATUS{ + "httpstatus403": ApplicationGatewayCustomError_StatusCode_STATUS_HttpStatus403, + "httpstatus502": ApplicationGatewayCustomError_StatusCode_STATUS_HttpStatus502, +} + // Allows to disable rules within a rule group or an entire rule group. type ApplicationGatewayFirewallDisabledRuleGroup struct { // +kubebuilder:validation:Required @@ -15234,6 +15298,13 @@ const ( ApplicationGatewayLoadDistributionAlgorithmEnum_RoundRobin = ApplicationGatewayLoadDistributionAlgorithmEnum("RoundRobin") ) +// Mapping from string to ApplicationGatewayLoadDistributionAlgorithmEnum +var applicationGatewayLoadDistributionAlgorithmEnum_Values = map[string]ApplicationGatewayLoadDistributionAlgorithmEnum{ + "iphash": ApplicationGatewayLoadDistributionAlgorithmEnum_IpHash, + "leastconnections": ApplicationGatewayLoadDistributionAlgorithmEnum_LeastConnections, + "roundrobin": ApplicationGatewayLoadDistributionAlgorithmEnum_RoundRobin, +} + // Load Distribution Target of an application gateway. type ApplicationGatewayLoadDistributionTarget struct { // Reference: Resource ID. @@ -15590,6 +15661,14 @@ const ( ApplicationGatewayProtocol_Tls = ApplicationGatewayProtocol("Tls") ) +// Mapping from string to ApplicationGatewayProtocol +var applicationGatewayProtocol_Values = map[string]ApplicationGatewayProtocol{ + "http": ApplicationGatewayProtocol_Http, + "https": ApplicationGatewayProtocol_Https, + "tcp": ApplicationGatewayProtocol_Tcp, + "tls": ApplicationGatewayProtocol_Tls, +} + // +kubebuilder:validation:Enum={"Basic","PathBasedRouting"} type ApplicationGatewayRequestRoutingRulePropertiesFormat_RuleType string @@ -15598,6 +15677,12 @@ const ( ApplicationGatewayRequestRoutingRulePropertiesFormat_RuleType_PathBasedRouting = ApplicationGatewayRequestRoutingRulePropertiesFormat_RuleType("PathBasedRouting") ) +// Mapping from string to ApplicationGatewayRequestRoutingRulePropertiesFormat_RuleType +var applicationGatewayRequestRoutingRulePropertiesFormat_RuleType_Values = map[string]ApplicationGatewayRequestRoutingRulePropertiesFormat_RuleType{ + "basic": ApplicationGatewayRequestRoutingRulePropertiesFormat_RuleType_Basic, + "pathbasedrouting": ApplicationGatewayRequestRoutingRulePropertiesFormat_RuleType_PathBasedRouting, +} + // Rewrite rule of an application gateway. type ApplicationGatewayRewriteRule struct { // ActionSet: Set of actions to be done as part of the rewrite Rule. @@ -15808,6 +15893,12 @@ const ( ApplicationGatewayRoutingRulePropertiesFormat_RuleType_PathBasedRouting = ApplicationGatewayRoutingRulePropertiesFormat_RuleType("PathBasedRouting") ) +// Mapping from string to ApplicationGatewayRoutingRulePropertiesFormat_RuleType +var applicationGatewayRoutingRulePropertiesFormat_RuleType_Values = map[string]ApplicationGatewayRoutingRulePropertiesFormat_RuleType{ + "basic": ApplicationGatewayRoutingRulePropertiesFormat_RuleType_Basic, + "pathbasedrouting": ApplicationGatewayRoutingRulePropertiesFormat_RuleType_PathBasedRouting, +} + // +kubebuilder:validation:Enum={"Standard_Large","Standard_Medium","Standard_Small","Standard_v2","WAF_Large","WAF_Medium","WAF_v2"} type ApplicationGatewaySku_Name string @@ -15821,6 +15912,17 @@ const ( ApplicationGatewaySku_Name_WAF_V2 = ApplicationGatewaySku_Name("WAF_v2") ) +// Mapping from string to ApplicationGatewaySku_Name +var applicationGatewaySku_Name_Values = map[string]ApplicationGatewaySku_Name{ + "standard_large": ApplicationGatewaySku_Name_Standard_Large, + "standard_medium": ApplicationGatewaySku_Name_Standard_Medium, + "standard_small": ApplicationGatewaySku_Name_Standard_Small, + "standard_v2": ApplicationGatewaySku_Name_Standard_V2, + "waf_large": ApplicationGatewaySku_Name_WAF_Large, + "waf_medium": ApplicationGatewaySku_Name_WAF_Medium, + "waf_v2": ApplicationGatewaySku_Name_WAF_V2, +} + type ApplicationGatewaySku_Name_STATUS string const ( @@ -15833,6 +15935,17 @@ const ( ApplicationGatewaySku_Name_STATUS_WAF_V2 = ApplicationGatewaySku_Name_STATUS("WAF_v2") ) +// Mapping from string to ApplicationGatewaySku_Name_STATUS +var applicationGatewaySku_Name_STATUS_Values = map[string]ApplicationGatewaySku_Name_STATUS{ + "standard_large": ApplicationGatewaySku_Name_STATUS_Standard_Large, + "standard_medium": ApplicationGatewaySku_Name_STATUS_Standard_Medium, + "standard_small": ApplicationGatewaySku_Name_STATUS_Standard_Small, + "standard_v2": ApplicationGatewaySku_Name_STATUS_Standard_V2, + "waf_large": ApplicationGatewaySku_Name_STATUS_WAF_Large, + "waf_medium": ApplicationGatewaySku_Name_STATUS_WAF_Medium, + "waf_v2": ApplicationGatewaySku_Name_STATUS_WAF_V2, +} + // +kubebuilder:validation:Enum={"Standard","Standard_v2","WAF","WAF_v2"} type ApplicationGatewaySku_Tier string @@ -15843,6 +15956,14 @@ const ( ApplicationGatewaySku_Tier_WAF_V2 = ApplicationGatewaySku_Tier("WAF_v2") ) +// Mapping from string to ApplicationGatewaySku_Tier +var applicationGatewaySku_Tier_Values = map[string]ApplicationGatewaySku_Tier{ + "standard": ApplicationGatewaySku_Tier_Standard, + "standard_v2": ApplicationGatewaySku_Tier_Standard_V2, + "waf": ApplicationGatewaySku_Tier_WAF, + "waf_v2": ApplicationGatewaySku_Tier_WAF_V2, +} + type ApplicationGatewaySku_Tier_STATUS string const ( @@ -15852,6 +15973,14 @@ const ( ApplicationGatewaySku_Tier_STATUS_WAF_V2 = ApplicationGatewaySku_Tier_STATUS("WAF_v2") ) +// Mapping from string to ApplicationGatewaySku_Tier_STATUS +var applicationGatewaySku_Tier_STATUS_Values = map[string]ApplicationGatewaySku_Tier_STATUS{ + "standard": ApplicationGatewaySku_Tier_STATUS_Standard, + "standard_v2": ApplicationGatewaySku_Tier_STATUS_Standard_V2, + "waf": ApplicationGatewaySku_Tier_STATUS_WAF, + "waf_v2": ApplicationGatewaySku_Tier_STATUS_WAF_V2, +} + // +kubebuilder:validation:Enum={"Custom","CustomV2","Predefined"} type ApplicationGatewaySslPolicy_PolicyType string @@ -15861,6 +15990,13 @@ const ( ApplicationGatewaySslPolicy_PolicyType_Predefined = ApplicationGatewaySslPolicy_PolicyType("Predefined") ) +// Mapping from string to ApplicationGatewaySslPolicy_PolicyType +var applicationGatewaySslPolicy_PolicyType_Values = map[string]ApplicationGatewaySslPolicy_PolicyType{ + "custom": ApplicationGatewaySslPolicy_PolicyType_Custom, + "customv2": ApplicationGatewaySslPolicy_PolicyType_CustomV2, + "predefined": ApplicationGatewaySslPolicy_PolicyType_Predefined, +} + type ApplicationGatewaySslPolicy_PolicyType_STATUS string const ( @@ -15869,6 +16005,13 @@ const ( ApplicationGatewaySslPolicy_PolicyType_STATUS_Predefined = ApplicationGatewaySslPolicy_PolicyType_STATUS("Predefined") ) +// Mapping from string to ApplicationGatewaySslPolicy_PolicyType_STATUS +var applicationGatewaySslPolicy_PolicyType_STATUS_Values = map[string]ApplicationGatewaySslPolicy_PolicyType_STATUS{ + "custom": ApplicationGatewaySslPolicy_PolicyType_STATUS_Custom, + "customv2": ApplicationGatewaySslPolicy_PolicyType_STATUS_CustomV2, + "predefined": ApplicationGatewaySslPolicy_PolicyType_STATUS_Predefined, +} + // +kubebuilder:validation:Enum={"Detection","Prevention"} type ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode string @@ -15877,6 +16020,12 @@ const ( ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_Prevention = ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode("Prevention") ) +// Mapping from string to ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode +var applicationGatewayWebApplicationFirewallConfiguration_FirewallMode_Values = map[string]ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode{ + "detection": ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_Detection, + "prevention": ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_Prevention, +} + type ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS string const ( @@ -15884,6 +16033,12 @@ const ( ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS_Prevention = ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS("Prevention") ) +// Mapping from string to ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS +var applicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS_Values = map[string]ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS{ + "detection": ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS_Detection, + "prevention": ApplicationGatewayWebApplicationFirewallConfiguration_FirewallMode_STATUS_Prevention, +} + // Ssl cipher suites enums. // +kubebuilder:validation:Enum={"TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA","TLS_DHE_DSS_WITH_AES_128_CBC_SHA","TLS_DHE_DSS_WITH_AES_128_CBC_SHA256","TLS_DHE_DSS_WITH_AES_256_CBC_SHA","TLS_DHE_DSS_WITH_AES_256_CBC_SHA256","TLS_DHE_RSA_WITH_AES_128_CBC_SHA","TLS_DHE_RSA_WITH_AES_128_GCM_SHA256","TLS_DHE_RSA_WITH_AES_256_CBC_SHA","TLS_DHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_3DES_EDE_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA256","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_256_CBC_SHA256","TLS_RSA_WITH_AES_256_GCM_SHA384"} type CipherSuitesEnum string @@ -15919,6 +16074,38 @@ const ( CipherSuitesEnum_TLS_RSA_WITH_AES_256_GCM_SHA384 = CipherSuitesEnum("TLS_RSA_WITH_AES_256_GCM_SHA384") ) +// Mapping from string to CipherSuitesEnum +var cipherSuitesEnum_Values = map[string]CipherSuitesEnum{ + "tls_dhe_dss_with_3des_ede_cbc_sha": CipherSuitesEnum_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA, + "tls_dhe_dss_with_aes_128_cbc_sha": CipherSuitesEnum_TLS_DHE_DSS_WITH_AES_128_CBC_SHA, + "tls_dhe_dss_with_aes_128_cbc_sha256": CipherSuitesEnum_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, + "tls_dhe_dss_with_aes_256_cbc_sha": CipherSuitesEnum_TLS_DHE_DSS_WITH_AES_256_CBC_SHA, + "tls_dhe_dss_with_aes_256_cbc_sha256": CipherSuitesEnum_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, + "tls_dhe_rsa_with_aes_128_cbc_sha": CipherSuitesEnum_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, + "tls_dhe_rsa_with_aes_128_gcm_sha256": CipherSuitesEnum_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, + "tls_dhe_rsa_with_aes_256_cbc_sha": CipherSuitesEnum_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, + "tls_dhe_rsa_with_aes_256_gcm_sha384": CipherSuitesEnum_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, + "tls_ecdhe_ecdsa_with_aes_128_cbc_sha": CipherSuitesEnum_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": CipherSuitesEnum_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": CipherSuitesEnum_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + "tls_ecdhe_ecdsa_with_aes_256_cbc_sha": CipherSuitesEnum_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + "tls_ecdhe_ecdsa_with_aes_256_cbc_sha384": CipherSuitesEnum_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, + "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": CipherSuitesEnum_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, + "tls_ecdhe_rsa_with_aes_128_cbc_sha": CipherSuitesEnum_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + "tls_ecdhe_rsa_with_aes_128_cbc_sha256": CipherSuitesEnum_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, + "tls_ecdhe_rsa_with_aes_128_gcm_sha256": CipherSuitesEnum_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + "tls_ecdhe_rsa_with_aes_256_cbc_sha": CipherSuitesEnum_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + "tls_ecdhe_rsa_with_aes_256_cbc_sha384": CipherSuitesEnum_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, + "tls_ecdhe_rsa_with_aes_256_gcm_sha384": CipherSuitesEnum_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, + "tls_rsa_with_3des_ede_cbc_sha": CipherSuitesEnum_TLS_RSA_WITH_3DES_EDE_CBC_SHA, + "tls_rsa_with_aes_128_cbc_sha": CipherSuitesEnum_TLS_RSA_WITH_AES_128_CBC_SHA, + "tls_rsa_with_aes_128_cbc_sha256": CipherSuitesEnum_TLS_RSA_WITH_AES_128_CBC_SHA256, + "tls_rsa_with_aes_128_gcm_sha256": CipherSuitesEnum_TLS_RSA_WITH_AES_128_GCM_SHA256, + "tls_rsa_with_aes_256_cbc_sha": CipherSuitesEnum_TLS_RSA_WITH_AES_256_CBC_SHA, + "tls_rsa_with_aes_256_cbc_sha256": CipherSuitesEnum_TLS_RSA_WITH_AES_256_CBC_SHA256, + "tls_rsa_with_aes_256_gcm_sha384": CipherSuitesEnum_TLS_RSA_WITH_AES_256_GCM_SHA384, +} + // Ssl cipher suites enums. type CipherSuitesEnum_STATUS string @@ -15953,6 +16140,38 @@ const ( CipherSuitesEnum_STATUS_TLS_RSA_WITH_AES_256_GCM_SHA384 = CipherSuitesEnum_STATUS("TLS_RSA_WITH_AES_256_GCM_SHA384") ) +// Mapping from string to CipherSuitesEnum_STATUS +var cipherSuitesEnum_STATUS_Values = map[string]CipherSuitesEnum_STATUS{ + "tls_dhe_dss_with_3des_ede_cbc_sha": CipherSuitesEnum_STATUS_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA, + "tls_dhe_dss_with_aes_128_cbc_sha": CipherSuitesEnum_STATUS_TLS_DHE_DSS_WITH_AES_128_CBC_SHA, + "tls_dhe_dss_with_aes_128_cbc_sha256": CipherSuitesEnum_STATUS_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, + "tls_dhe_dss_with_aes_256_cbc_sha": CipherSuitesEnum_STATUS_TLS_DHE_DSS_WITH_AES_256_CBC_SHA, + "tls_dhe_dss_with_aes_256_cbc_sha256": CipherSuitesEnum_STATUS_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, + "tls_dhe_rsa_with_aes_128_cbc_sha": CipherSuitesEnum_STATUS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, + "tls_dhe_rsa_with_aes_128_gcm_sha256": CipherSuitesEnum_STATUS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, + "tls_dhe_rsa_with_aes_256_cbc_sha": CipherSuitesEnum_STATUS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, + "tls_dhe_rsa_with_aes_256_gcm_sha384": CipherSuitesEnum_STATUS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, + "tls_ecdhe_ecdsa_with_aes_128_cbc_sha": CipherSuitesEnum_STATUS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": CipherSuitesEnum_STATUS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": CipherSuitesEnum_STATUS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + "tls_ecdhe_ecdsa_with_aes_256_cbc_sha": CipherSuitesEnum_STATUS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + "tls_ecdhe_ecdsa_with_aes_256_cbc_sha384": CipherSuitesEnum_STATUS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, + "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": CipherSuitesEnum_STATUS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, + "tls_ecdhe_rsa_with_aes_128_cbc_sha": CipherSuitesEnum_STATUS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + "tls_ecdhe_rsa_with_aes_128_cbc_sha256": CipherSuitesEnum_STATUS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, + "tls_ecdhe_rsa_with_aes_128_gcm_sha256": CipherSuitesEnum_STATUS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + "tls_ecdhe_rsa_with_aes_256_cbc_sha": CipherSuitesEnum_STATUS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + "tls_ecdhe_rsa_with_aes_256_cbc_sha384": CipherSuitesEnum_STATUS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, + "tls_ecdhe_rsa_with_aes_256_gcm_sha384": CipherSuitesEnum_STATUS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, + "tls_rsa_with_3des_ede_cbc_sha": CipherSuitesEnum_STATUS_TLS_RSA_WITH_3DES_EDE_CBC_SHA, + "tls_rsa_with_aes_128_cbc_sha": CipherSuitesEnum_STATUS_TLS_RSA_WITH_AES_128_CBC_SHA, + "tls_rsa_with_aes_128_cbc_sha256": CipherSuitesEnum_STATUS_TLS_RSA_WITH_AES_128_CBC_SHA256, + "tls_rsa_with_aes_128_gcm_sha256": CipherSuitesEnum_STATUS_TLS_RSA_WITH_AES_128_GCM_SHA256, + "tls_rsa_with_aes_256_cbc_sha": CipherSuitesEnum_STATUS_TLS_RSA_WITH_AES_256_CBC_SHA, + "tls_rsa_with_aes_256_cbc_sha256": CipherSuitesEnum_STATUS_TLS_RSA_WITH_AES_256_CBC_SHA256, + "tls_rsa_with_aes_256_gcm_sha384": CipherSuitesEnum_STATUS_TLS_RSA_WITH_AES_256_GCM_SHA384, +} + // IP address allocation method. // +kubebuilder:validation:Enum={"Dynamic","Static"} type IPAllocationMethod string @@ -15962,6 +16181,12 @@ const ( IPAllocationMethod_Static = IPAllocationMethod("Static") ) +// Mapping from string to IPAllocationMethod +var iPAllocationMethod_Values = map[string]IPAllocationMethod{ + "dynamic": IPAllocationMethod_Dynamic, + "static": IPAllocationMethod_Static, +} + type ManagedServiceIdentity_UserAssignedIdentities_STATUS struct { // ClientId: The client id of user assigned identity. ClientId *string `json:"clientId,omitempty"` @@ -16047,6 +16272,15 @@ const ( PolicyNameEnum_AppGwSslPolicy20220101S = PolicyNameEnum("AppGwSslPolicy20220101S") ) +// Mapping from string to PolicyNameEnum +var policyNameEnum_Values = map[string]PolicyNameEnum{ + "appgwsslpolicy20150501": PolicyNameEnum_AppGwSslPolicy20150501, + "appgwsslpolicy20170401": PolicyNameEnum_AppGwSslPolicy20170401, + "appgwsslpolicy20170401s": PolicyNameEnum_AppGwSslPolicy20170401S, + "appgwsslpolicy20220101": PolicyNameEnum_AppGwSslPolicy20220101, + "appgwsslpolicy20220101s": PolicyNameEnum_AppGwSslPolicy20220101S, +} + // Ssl predefined policy name enums. type PolicyNameEnum_STATUS string @@ -16058,6 +16292,15 @@ const ( PolicyNameEnum_STATUS_AppGwSslPolicy20220101S = PolicyNameEnum_STATUS("AppGwSslPolicy20220101S") ) +// Mapping from string to PolicyNameEnum_STATUS +var policyNameEnum_STATUS_Values = map[string]PolicyNameEnum_STATUS{ + "appgwsslpolicy20150501": PolicyNameEnum_STATUS_AppGwSslPolicy20150501, + "appgwsslpolicy20170401": PolicyNameEnum_STATUS_AppGwSslPolicy20170401, + "appgwsslpolicy20170401s": PolicyNameEnum_STATUS_AppGwSslPolicy20170401S, + "appgwsslpolicy20220101": PolicyNameEnum_STATUS_AppGwSslPolicy20220101, + "appgwsslpolicy20220101s": PolicyNameEnum_STATUS_AppGwSslPolicy20220101S, +} + // Ssl protocol enums. // +kubebuilder:validation:Enum={"TLSv1_0","TLSv1_1","TLSv1_2","TLSv1_3"} type ProtocolsEnum string @@ -16069,6 +16312,14 @@ const ( ProtocolsEnum_TLSv1_3 = ProtocolsEnum("TLSv1_3") ) +// Mapping from string to ProtocolsEnum +var protocolsEnum_Values = map[string]ProtocolsEnum{ + "tlsv1_0": ProtocolsEnum_TLSv1_0, + "tlsv1_1": ProtocolsEnum_TLSv1_1, + "tlsv1_2": ProtocolsEnum_TLSv1_2, + "tlsv1_3": ProtocolsEnum_TLSv1_3, +} + // Ssl protocol enums. type ProtocolsEnum_STATUS string @@ -16079,6 +16330,14 @@ const ( ProtocolsEnum_STATUS_TLSv1_3 = ProtocolsEnum_STATUS("TLSv1_3") ) +// Mapping from string to ProtocolsEnum_STATUS +var protocolsEnum_STATUS_Values = map[string]ProtocolsEnum_STATUS{ + "tlsv1_0": ProtocolsEnum_STATUS_TLSv1_0, + "tlsv1_1": ProtocolsEnum_STATUS_TLSv1_1, + "tlsv1_2": ProtocolsEnum_STATUS_TLSv1_2, + "tlsv1_3": ProtocolsEnum_STATUS_TLSv1_3, +} + // Redirect type enum. // +kubebuilder:validation:Enum={"Found","Permanent","SeeOther","Temporary"} type RedirectTypeEnum string @@ -16090,6 +16349,14 @@ const ( RedirectTypeEnum_Temporary = RedirectTypeEnum("Temporary") ) +// Mapping from string to RedirectTypeEnum +var redirectTypeEnum_Values = map[string]RedirectTypeEnum{ + "found": RedirectTypeEnum_Found, + "permanent": RedirectTypeEnum_Permanent, + "seeother": RedirectTypeEnum_SeeOther, + "temporary": RedirectTypeEnum_Temporary, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails struct { Reference genruntime.ResourceReference `armReference:"Reference" json:"reference,omitempty"` @@ -16132,6 +16399,12 @@ const ( ApplicationGatewayClientAuthConfiguration_VerifyClientRevocation_OCSP = ApplicationGatewayClientAuthConfiguration_VerifyClientRevocation("OCSP") ) +// Mapping from string to ApplicationGatewayClientAuthConfiguration_VerifyClientRevocation +var applicationGatewayClientAuthConfiguration_VerifyClientRevocation_Values = map[string]ApplicationGatewayClientAuthConfiguration_VerifyClientRevocation{ + "none": ApplicationGatewayClientAuthConfiguration_VerifyClientRevocation_None, + "ocsp": ApplicationGatewayClientAuthConfiguration_VerifyClientRevocation_OCSP, +} + // Set of actions in the Rewrite Rule in Application Gateway. type ApplicationGatewayRewriteRuleActionSet struct { // RequestHeaderConfigurations: Request Header Actions in the Action Set. diff --git a/v2/api/network/v1api20220701/bastion_host_spec_arm_types_gen.go b/v2/api/network/v1api20220701/bastion_host_spec_arm_types_gen.go index 1e8a4072853..2f5f1c79459 100644 --- a/v2/api/network/v1api20220701/bastion_host_spec_arm_types_gen.go +++ b/v2/api/network/v1api20220701/bastion_host_spec_arm_types_gen.go @@ -87,6 +87,12 @@ const ( Sku_Name_Standard = Sku_Name("Standard") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "basic": Sku_Name_Basic, + "standard": Sku_Name_Standard, +} + // Properties of IP configuration of an Bastion Host. type BastionHostIPConfigurationPropertiesFormat_ARM struct { // PrivateIPAllocationMethod: Private IP allocation method. diff --git a/v2/api/network/v1api20220701/bastion_host_status_arm_types_gen.go b/v2/api/network/v1api20220701/bastion_host_status_arm_types_gen.go index 5ed04e83f11..ca5eb4a6c16 100644 --- a/v2/api/network/v1api20220701/bastion_host_status_arm_types_gen.go +++ b/v2/api/network/v1api20220701/bastion_host_status_arm_types_gen.go @@ -78,3 +78,9 @@ const ( Sku_Name_STATUS_Basic = Sku_Name_STATUS("Basic") Sku_Name_STATUS_Standard = Sku_Name_STATUS("Standard") ) + +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "basic": Sku_Name_STATUS_Basic, + "standard": Sku_Name_STATUS_Standard, +} diff --git a/v2/api/network/v1api20220701/bastion_host_types_gen.go b/v2/api/network/v1api20220701/bastion_host_types_gen.go index d5ff06fc85d..e20653a8d3c 100644 --- a/v2/api/network/v1api20220701/bastion_host_types_gen.go +++ b/v2/api/network/v1api20220701/bastion_host_types_gen.go @@ -1295,8 +1295,9 @@ func (host *BastionHost_STATUS) AssignProperties_From_BastionHost_STATUS(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := BastionHostProvisioningState_STATUS(*source.ProvisioningState) - host.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, bastionHostProvisioningState_STATUS_Values) + host.ProvisioningState = &provisioningStateTemp } else { host.ProvisioningState = nil } @@ -1575,8 +1576,9 @@ func (configuration *BastionHostIPConfiguration) AssignProperties_From_BastionHo // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod(*source.PrivateIPAllocationMethod) - configuration.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_Values) + configuration.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { configuration.PrivateIPAllocationMethod = nil } @@ -1736,6 +1738,14 @@ const ( BastionHostProvisioningState_STATUS_Updating = BastionHostProvisioningState_STATUS("Updating") ) +// Mapping from string to BastionHostProvisioningState_STATUS +var bastionHostProvisioningState_STATUS_Values = map[string]BastionHostProvisioningState_STATUS{ + "deleting": BastionHostProvisioningState_STATUS_Deleting, + "failed": BastionHostProvisioningState_STATUS_Failed, + "succeeded": BastionHostProvisioningState_STATUS_Succeeded, + "updating": BastionHostProvisioningState_STATUS_Updating, +} + // The sku of this Bastion Host. type Sku struct { // Name: The name of this Bastion Host. @@ -1786,8 +1796,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20220701s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -1870,8 +1881,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20220701s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } diff --git a/v2/api/network/v1api20220701/dns_forwarding_rule_sets_forwarding_rule_types_gen.go b/v2/api/network/v1api20220701/dns_forwarding_rule_sets_forwarding_rule_types_gen.go index 836428edd98..b6ebebc2770 100644 --- a/v2/api/network/v1api20220701/dns_forwarding_rule_sets_forwarding_rule_types_gen.go +++ b/v2/api/network/v1api20220701/dns_forwarding_rule_sets_forwarding_rule_types_gen.go @@ -533,8 +533,9 @@ func (rule *DnsForwardingRulesets_ForwardingRule_Spec) AssignProperties_From_Dns // ForwardingRuleState if source.ForwardingRuleState != nil { - forwardingRuleState := ForwardingRuleProperties_ForwardingRuleState(*source.ForwardingRuleState) - rule.ForwardingRuleState = &forwardingRuleState + forwardingRuleState := *source.ForwardingRuleState + forwardingRuleStateTemp := genruntime.ToEnum(forwardingRuleState, forwardingRuleProperties_ForwardingRuleState_Values) + rule.ForwardingRuleState = &forwardingRuleStateTemp } else { rule.ForwardingRuleState = nil } @@ -890,8 +891,9 @@ func (rule *DnsForwardingRulesets_ForwardingRule_STATUS) AssignProperties_From_D // ForwardingRuleState if source.ForwardingRuleState != nil { - forwardingRuleState := ForwardingRuleProperties_ForwardingRuleState_STATUS(*source.ForwardingRuleState) - rule.ForwardingRuleState = &forwardingRuleState + forwardingRuleState := *source.ForwardingRuleState + forwardingRuleStateTemp := genruntime.ToEnum(forwardingRuleState, forwardingRuleProperties_ForwardingRuleState_STATUS_Values) + rule.ForwardingRuleState = &forwardingRuleStateTemp } else { rule.ForwardingRuleState = nil } @@ -907,8 +909,9 @@ func (rule *DnsForwardingRulesets_ForwardingRule_STATUS) AssignProperties_From_D // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DnsresolverProvisioningState_STATUS(*source.ProvisioningState) - rule.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, dnsresolverProvisioningState_STATUS_Values) + rule.ProvisioningState = &provisioningStateTemp } else { rule.ProvisioningState = nil } @@ -1045,6 +1048,16 @@ const ( DnsresolverProvisioningState_STATUS_Updating = DnsresolverProvisioningState_STATUS("Updating") ) +// Mapping from string to DnsresolverProvisioningState_STATUS +var dnsresolverProvisioningState_STATUS_Values = map[string]DnsresolverProvisioningState_STATUS{ + "canceled": DnsresolverProvisioningState_STATUS_Canceled, + "creating": DnsresolverProvisioningState_STATUS_Creating, + "deleting": DnsresolverProvisioningState_STATUS_Deleting, + "failed": DnsresolverProvisioningState_STATUS_Failed, + "succeeded": DnsresolverProvisioningState_STATUS_Succeeded, + "updating": DnsresolverProvisioningState_STATUS_Updating, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ForwardingRuleProperties_ForwardingRuleState string @@ -1053,6 +1066,12 @@ const ( ForwardingRuleProperties_ForwardingRuleState_Enabled = ForwardingRuleProperties_ForwardingRuleState("Enabled") ) +// Mapping from string to ForwardingRuleProperties_ForwardingRuleState +var forwardingRuleProperties_ForwardingRuleState_Values = map[string]ForwardingRuleProperties_ForwardingRuleState{ + "disabled": ForwardingRuleProperties_ForwardingRuleState_Disabled, + "enabled": ForwardingRuleProperties_ForwardingRuleState_Enabled, +} + type ForwardingRuleProperties_ForwardingRuleState_STATUS string const ( @@ -1060,6 +1079,12 @@ const ( ForwardingRuleProperties_ForwardingRuleState_STATUS_Enabled = ForwardingRuleProperties_ForwardingRuleState_STATUS("Enabled") ) +// Mapping from string to ForwardingRuleProperties_ForwardingRuleState_STATUS +var forwardingRuleProperties_ForwardingRuleState_STATUS_Values = map[string]ForwardingRuleProperties_ForwardingRuleState_STATUS{ + "disabled": ForwardingRuleProperties_ForwardingRuleState_STATUS_Disabled, + "enabled": ForwardingRuleProperties_ForwardingRuleState_STATUS_Enabled, +} + // Metadata pertaining to creation and last modification of the resource. type SystemData_STATUS struct { // CreatedAt: The timestamp of resource creation (UTC). @@ -1146,8 +1171,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -1160,8 +1186,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } diff --git a/v2/api/network/v1api20220701/dns_forwarding_ruleset_status_arm_types_gen.go b/v2/api/network/v1api20220701/dns_forwarding_ruleset_status_arm_types_gen.go index b683d643d95..7c2848d8edc 100644 --- a/v2/api/network/v1api20220701/dns_forwarding_ruleset_status_arm_types_gen.go +++ b/v2/api/network/v1api20220701/dns_forwarding_ruleset_status_arm_types_gen.go @@ -81,6 +81,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -89,3 +97,11 @@ const ( SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} diff --git a/v2/api/network/v1api20220701/dns_forwarding_ruleset_types_gen.go b/v2/api/network/v1api20220701/dns_forwarding_ruleset_types_gen.go index 46d23270da7..22383dcf7f3 100644 --- a/v2/api/network/v1api20220701/dns_forwarding_ruleset_types_gen.go +++ b/v2/api/network/v1api20220701/dns_forwarding_ruleset_types_gen.go @@ -854,8 +854,9 @@ func (ruleset *DnsForwardingRuleset_STATUS) AssignProperties_From_DnsForwardingR // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DnsresolverProvisioningState_STATUS(*source.ProvisioningState) - ruleset.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, dnsresolverProvisioningState_STATUS_Values) + ruleset.ProvisioningState = &provisioningStateTemp } else { ruleset.ProvisioningState = nil } diff --git a/v2/api/network/v1api20220701/dns_resolver_types_gen.go b/v2/api/network/v1api20220701/dns_resolver_types_gen.go index cf0a797d0f4..eb858c5f29a 100644 --- a/v2/api/network/v1api20220701/dns_resolver_types_gen.go +++ b/v2/api/network/v1api20220701/dns_resolver_types_gen.go @@ -818,8 +818,9 @@ func (resolver *DnsResolver_STATUS) AssignProperties_From_DnsResolver_STATUS(sou // DnsResolverState if source.DnsResolverState != nil { - dnsResolverState := DnsResolverProperties_DnsResolverState_STATUS(*source.DnsResolverState) - resolver.DnsResolverState = &dnsResolverState + dnsResolverState := *source.DnsResolverState + dnsResolverStateTemp := genruntime.ToEnum(dnsResolverState, dnsResolverProperties_DnsResolverState_STATUS_Values) + resolver.DnsResolverState = &dnsResolverStateTemp } else { resolver.DnsResolverState = nil } @@ -838,8 +839,9 @@ func (resolver *DnsResolver_STATUS) AssignProperties_From_DnsResolver_STATUS(sou // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DnsresolverProvisioningState_STATUS(*source.ProvisioningState) - resolver.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, dnsresolverProvisioningState_STATUS_Values) + resolver.ProvisioningState = &provisioningStateTemp } else { resolver.ProvisioningState = nil } @@ -968,6 +970,12 @@ const ( DnsResolverProperties_DnsResolverState_STATUS_Disconnected = DnsResolverProperties_DnsResolverState_STATUS("Disconnected") ) +// Mapping from string to DnsResolverProperties_DnsResolverState_STATUS +var dnsResolverProperties_DnsResolverState_STATUS_Values = map[string]DnsResolverProperties_DnsResolverState_STATUS{ + "connected": DnsResolverProperties_DnsResolverState_STATUS_Connected, + "disconnected": DnsResolverProperties_DnsResolverState_STATUS_Disconnected, +} + func init() { SchemeBuilder.Register(&DnsResolver{}, &DnsResolverList{}) } diff --git a/v2/api/network/v1api20220701/dns_resolvers_inbound_endpoint_types_gen.go b/v2/api/network/v1api20220701/dns_resolvers_inbound_endpoint_types_gen.go index d36ce17ab65..e5337734e4d 100644 --- a/v2/api/network/v1api20220701/dns_resolvers_inbound_endpoint_types_gen.go +++ b/v2/api/network/v1api20220701/dns_resolvers_inbound_endpoint_types_gen.go @@ -851,8 +851,9 @@ func (endpoint *DnsResolvers_InboundEndpoint_STATUS) AssignProperties_From_DnsRe // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DnsresolverProvisioningState_STATUS(*source.ProvisioningState) - endpoint.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, dnsresolverProvisioningState_STATUS_Values) + endpoint.ProvisioningState = &provisioningStateTemp } else { endpoint.ProvisioningState = nil } @@ -1053,8 +1054,9 @@ func (configuration *IpConfiguration) AssignProperties_From_IpConfiguration(sour // PrivateIpAllocationMethod if source.PrivateIpAllocationMethod != nil { - privateIpAllocationMethod := IpConfiguration_PrivateIpAllocationMethod(*source.PrivateIpAllocationMethod) - configuration.PrivateIpAllocationMethod = &privateIpAllocationMethod + privateIpAllocationMethod := *source.PrivateIpAllocationMethod + privateIpAllocationMethodTemp := genruntime.ToEnum(privateIpAllocationMethod, ipConfiguration_PrivateIpAllocationMethod_Values) + configuration.PrivateIpAllocationMethod = &privateIpAllocationMethodTemp } else { configuration.PrivateIpAllocationMethod = nil } @@ -1205,8 +1207,9 @@ func (configuration *IpConfiguration_STATUS) AssignProperties_From_IpConfigurati // PrivateIpAllocationMethod if source.PrivateIpAllocationMethod != nil { - privateIpAllocationMethod := IpConfiguration_PrivateIpAllocationMethod_STATUS(*source.PrivateIpAllocationMethod) - configuration.PrivateIpAllocationMethod = &privateIpAllocationMethod + privateIpAllocationMethod := *source.PrivateIpAllocationMethod + privateIpAllocationMethodTemp := genruntime.ToEnum(privateIpAllocationMethod, ipConfiguration_PrivateIpAllocationMethod_STATUS_Values) + configuration.PrivateIpAllocationMethod = &privateIpAllocationMethodTemp } else { configuration.PrivateIpAllocationMethod = nil } @@ -1274,6 +1277,12 @@ const ( IpConfiguration_PrivateIpAllocationMethod_Static = IpConfiguration_PrivateIpAllocationMethod("Static") ) +// Mapping from string to IpConfiguration_PrivateIpAllocationMethod +var ipConfiguration_PrivateIpAllocationMethod_Values = map[string]IpConfiguration_PrivateIpAllocationMethod{ + "dynamic": IpConfiguration_PrivateIpAllocationMethod_Dynamic, + "static": IpConfiguration_PrivateIpAllocationMethod_Static, +} + type IpConfiguration_PrivateIpAllocationMethod_STATUS string const ( @@ -1281,6 +1290,12 @@ const ( IpConfiguration_PrivateIpAllocationMethod_STATUS_Static = IpConfiguration_PrivateIpAllocationMethod_STATUS("Static") ) +// Mapping from string to IpConfiguration_PrivateIpAllocationMethod_STATUS +var ipConfiguration_PrivateIpAllocationMethod_STATUS_Values = map[string]IpConfiguration_PrivateIpAllocationMethod_STATUS{ + "dynamic": IpConfiguration_PrivateIpAllocationMethod_STATUS_Dynamic, + "static": IpConfiguration_PrivateIpAllocationMethod_STATUS_Static, +} + func init() { SchemeBuilder.Register(&DnsResolversInboundEndpoint{}, &DnsResolversInboundEndpointList{}) } diff --git a/v2/api/network/v1api20220701/dns_resolvers_outbound_endpoint_types_gen.go b/v2/api/network/v1api20220701/dns_resolvers_outbound_endpoint_types_gen.go index f294b7dd2b6..51d09610a80 100644 --- a/v2/api/network/v1api20220701/dns_resolvers_outbound_endpoint_types_gen.go +++ b/v2/api/network/v1api20220701/dns_resolvers_outbound_endpoint_types_gen.go @@ -818,8 +818,9 @@ func (endpoint *DnsResolvers_OutboundEndpoint_STATUS) AssignProperties_From_DnsR // ProvisioningState if source.ProvisioningState != nil { - provisioningState := DnsresolverProvisioningState_STATUS(*source.ProvisioningState) - endpoint.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, dnsresolverProvisioningState_STATUS_Values) + endpoint.ProvisioningState = &provisioningStateTemp } else { endpoint.ProvisioningState = nil } diff --git a/v2/api/network/v1api20220701/nat_gateway_spec_arm_types_gen.go b/v2/api/network/v1api20220701/nat_gateway_spec_arm_types_gen.go index f97c5f21e4e..28e44667e03 100644 --- a/v2/api/network/v1api20220701/nat_gateway_spec_arm_types_gen.go +++ b/v2/api/network/v1api20220701/nat_gateway_spec_arm_types_gen.go @@ -62,3 +62,8 @@ type NatGatewaySku_ARM struct { type NatGatewaySku_Name string const NatGatewaySku_Name_Standard = NatGatewaySku_Name("Standard") + +// Mapping from string to NatGatewaySku_Name +var natGatewaySku_Name_Values = map[string]NatGatewaySku_Name{ + "standard": NatGatewaySku_Name_Standard, +} diff --git a/v2/api/network/v1api20220701/nat_gateway_status_arm_types_gen.go b/v2/api/network/v1api20220701/nat_gateway_status_arm_types_gen.go index ef689941f2e..40f881e558e 100644 --- a/v2/api/network/v1api20220701/nat_gateway_status_arm_types_gen.go +++ b/v2/api/network/v1api20220701/nat_gateway_status_arm_types_gen.go @@ -63,3 +63,8 @@ type NatGatewaySku_STATUS_ARM struct { type NatGatewaySku_Name_STATUS string const NatGatewaySku_Name_STATUS_Standard = NatGatewaySku_Name_STATUS("Standard") + +// Mapping from string to NatGatewaySku_Name_STATUS +var natGatewaySku_Name_STATUS_Values = map[string]NatGatewaySku_Name_STATUS{ + "standard": NatGatewaySku_Name_STATUS_Standard, +} diff --git a/v2/api/network/v1api20220701/nat_gateway_types_gen.go b/v2/api/network/v1api20220701/nat_gateway_types_gen.go index b31b96e1555..f2543164d6c 100644 --- a/v2/api/network/v1api20220701/nat_gateway_types_gen.go +++ b/v2/api/network/v1api20220701/nat_gateway_types_gen.go @@ -1069,8 +1069,9 @@ func (gateway *NatGateway_STATUS) AssignProperties_From_NatGateway_STATUS(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ApplicationGatewayProvisioningState_STATUS(*source.ProvisioningState) - gateway.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, applicationGatewayProvisioningState_STATUS_Values) + gateway.ProvisioningState = &provisioningStateTemp } else { gateway.ProvisioningState = nil } @@ -1327,8 +1328,9 @@ func (gatewaySku *NatGatewaySku) AssignProperties_From_NatGatewaySku(source *v20 // Name if source.Name != nil { - name := NatGatewaySku_Name(*source.Name) - gatewaySku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, natGatewaySku_Name_Values) + gatewaySku.Name = &nameTemp } else { gatewaySku.Name = nil } @@ -1411,8 +1413,9 @@ func (gatewaySku *NatGatewaySku_STATUS) AssignProperties_From_NatGatewaySku_STAT // Name if source.Name != nil { - name := NatGatewaySku_Name_STATUS(*source.Name) - gatewaySku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, natGatewaySku_Name_STATUS_Values) + gatewaySku.Name = &nameTemp } else { gatewaySku.Name = nil } diff --git a/v2/api/network/v1api20220701/private_endpoint_spec_arm_types_gen.go b/v2/api/network/v1api20220701/private_endpoint_spec_arm_types_gen.go index 0a0978931da..af2811a1bb7 100644 --- a/v2/api/network/v1api20220701/private_endpoint_spec_arm_types_gen.go +++ b/v2/api/network/v1api20220701/private_endpoint_spec_arm_types_gen.go @@ -80,6 +80,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // An IP Configuration of the private endpoint. type PrivateEndpointIPConfiguration_ARM struct { // Name: The name of the resource that is unique within a resource group. diff --git a/v2/api/network/v1api20220701/private_endpoint_status_private_endpoint_sub_resource_embedded_arm_types_gen.go b/v2/api/network/v1api20220701/private_endpoint_status_private_endpoint_sub_resource_embedded_arm_types_gen.go index 0ef7e6c0d44..d10f2a98020 100644 --- a/v2/api/network/v1api20220701/private_endpoint_status_private_endpoint_sub_resource_embedded_arm_types_gen.go +++ b/v2/api/network/v1api20220701/private_endpoint_status_private_endpoint_sub_resource_embedded_arm_types_gen.go @@ -91,6 +91,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // A network interface in a resource group. type NetworkInterface_STATUS_PrivateEndpoint_SubResourceEmbedded_ARM struct { // Id: Resource ID. diff --git a/v2/api/network/v1api20220701/private_endpoint_types_gen.go b/v2/api/network/v1api20220701/private_endpoint_types_gen.go index 2061a83269a..829c7a74819 100644 --- a/v2/api/network/v1api20220701/private_endpoint_types_gen.go +++ b/v2/api/network/v1api20220701/private_endpoint_types_gen.go @@ -1434,8 +1434,9 @@ func (embedded *PrivateEndpoint_STATUS_PrivateEndpoint_SubResourceEmbedded) Assi // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ApplicationGatewayProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, applicationGatewayProvisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } @@ -1941,8 +1942,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -2043,8 +2045,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -2843,8 +2846,9 @@ func (connection *PrivateLinkServiceConnection_STATUS) AssignProperties_From_Pri // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ApplicationGatewayProvisioningState_STATUS(*source.ProvisioningState) - connection.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, applicationGatewayProvisioningState_STATUS_Values) + connection.ProvisioningState = &provisioningStateTemp } else { connection.ProvisioningState = nil } diff --git a/v2/api/network/v1api20220701/private_endpoints_private_dns_zone_group_types_gen.go b/v2/api/network/v1api20220701/private_endpoints_private_dns_zone_group_types_gen.go index 18436394583..6a4cd19e5a4 100644 --- a/v2/api/network/v1api20220701/private_endpoints_private_dns_zone_group_types_gen.go +++ b/v2/api/network/v1api20220701/private_endpoints_private_dns_zone_group_types_gen.go @@ -737,8 +737,9 @@ func (group *PrivateEndpoints_PrivateDnsZoneGroup_STATUS) AssignProperties_From_ // ProvisioningState if source.ProvisioningState != nil { - provisioningState := PrivateEndpointProvisioningState_STATUS(*source.ProvisioningState) - group.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, privateEndpointProvisioningState_STATUS_Values) + group.ProvisioningState = &provisioningStateTemp } else { group.ProvisioningState = nil } @@ -1066,6 +1067,14 @@ const ( PrivateEndpointProvisioningState_STATUS_Updating = PrivateEndpointProvisioningState_STATUS("Updating") ) +// Mapping from string to PrivateEndpointProvisioningState_STATUS +var privateEndpointProvisioningState_STATUS_Values = map[string]PrivateEndpointProvisioningState_STATUS{ + "deleting": PrivateEndpointProvisioningState_STATUS_Deleting, + "failed": PrivateEndpointProvisioningState_STATUS_Failed, + "succeeded": PrivateEndpointProvisioningState_STATUS_Succeeded, + "updating": PrivateEndpointProvisioningState_STATUS_Updating, +} + // A collective group of information about the record set information. type RecordSet_STATUS struct { // Fqdn: Fqdn that resolves to private endpoint ip address. @@ -1151,8 +1160,9 @@ func (recordSet *RecordSet_STATUS) AssignProperties_From_RecordSet_STATUS(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := PrivateEndpointProvisioningState_STATUS(*source.ProvisioningState) - recordSet.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, privateEndpointProvisioningState_STATUS_Values) + recordSet.ProvisioningState = &provisioningStateTemp } else { recordSet.ProvisioningState = nil } diff --git a/v2/api/network/v1api20220701/private_link_service_types_gen.go b/v2/api/network/v1api20220701/private_link_service_types_gen.go index a4dbe4fd61c..40d3b37b31f 100644 --- a/v2/api/network/v1api20220701/private_link_service_types_gen.go +++ b/v2/api/network/v1api20220701/private_link_service_types_gen.go @@ -1439,8 +1439,9 @@ func (embedded *PrivateLinkService_STATUS_PrivateLinkService_SubResourceEmbedded // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ApplicationGatewayProvisioningState_STATUS(*source.ProvisioningState) - embedded.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, applicationGatewayProvisioningState_STATUS_Values) + embedded.ProvisioningState = &provisioningStateTemp } else { embedded.ProvisioningState = nil } @@ -2072,16 +2073,18 @@ func (configuration *PrivateLinkServiceIpConfiguration) AssignProperties_From_Pr // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := IPVersion(*source.PrivateIPAddressVersion) - configuration.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, iPVersion_Values) + configuration.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { configuration.PrivateIPAddressVersion = nil } // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod(*source.PrivateIPAllocationMethod) - configuration.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_Values) + configuration.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { configuration.PrivateIPAllocationMethod = nil } @@ -2368,24 +2371,27 @@ func (configuration *PrivateLinkServiceIpConfiguration_STATUS) AssignProperties_ // PrivateIPAddressVersion if source.PrivateIPAddressVersion != nil { - privateIPAddressVersion := IPVersion_STATUS(*source.PrivateIPAddressVersion) - configuration.PrivateIPAddressVersion = &privateIPAddressVersion + privateIPAddressVersion := *source.PrivateIPAddressVersion + privateIPAddressVersionTemp := genruntime.ToEnum(privateIPAddressVersion, iPVersion_STATUS_Values) + configuration.PrivateIPAddressVersion = &privateIPAddressVersionTemp } else { configuration.PrivateIPAddressVersion = nil } // PrivateIPAllocationMethod if source.PrivateIPAllocationMethod != nil { - privateIPAllocationMethod := IPAllocationMethod_STATUS(*source.PrivateIPAllocationMethod) - configuration.PrivateIPAllocationMethod = &privateIPAllocationMethod + privateIPAllocationMethod := *source.PrivateIPAllocationMethod + privateIPAllocationMethodTemp := genruntime.ToEnum(privateIPAllocationMethod, iPAllocationMethod_STATUS_Values) + configuration.PrivateIPAllocationMethod = &privateIPAllocationMethodTemp } else { configuration.PrivateIPAllocationMethod = nil } // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ApplicationGatewayProvisioningState_STATUS(*source.ProvisioningState) - configuration.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, applicationGatewayProvisioningState_STATUS_Values) + configuration.ProvisioningState = &provisioningStateTemp } else { configuration.ProvisioningState = nil } @@ -2685,6 +2691,12 @@ const ( IPAllocationMethod_STATUS_Static = IPAllocationMethod_STATUS("Static") ) +// Mapping from string to IPAllocationMethod_STATUS +var iPAllocationMethod_STATUS_Values = map[string]IPAllocationMethod_STATUS{ + "dynamic": IPAllocationMethod_STATUS_Dynamic, + "static": IPAllocationMethod_STATUS_Static, +} + type PrivateLinkServiceOperatorConfigMaps struct { // Alias: indicates where the Alias config map should be placed. If omitted, no config map will be created. Alias *genruntime.ConfigMapDestination `json:"alias,omitempty"` diff --git a/v2/api/network/v1api20220701/public_ip_prefix_spec_arm_types_gen.go b/v2/api/network/v1api20220701/public_ip_prefix_spec_arm_types_gen.go index 9509753ec02..45d14677fdb 100644 --- a/v2/api/network/v1api20220701/public_ip_prefix_spec_arm_types_gen.go +++ b/v2/api/network/v1api20220701/public_ip_prefix_spec_arm_types_gen.go @@ -89,6 +89,11 @@ type PublicIPPrefixSku_Name string const PublicIPPrefixSku_Name_Standard = PublicIPPrefixSku_Name("Standard") +// Mapping from string to PublicIPPrefixSku_Name +var publicIPPrefixSku_Name_Values = map[string]PublicIPPrefixSku_Name{ + "standard": PublicIPPrefixSku_Name_Standard, +} + // +kubebuilder:validation:Enum={"Global","Regional"} type PublicIPPrefixSku_Tier string @@ -97,6 +102,12 @@ const ( PublicIPPrefixSku_Tier_Regional = PublicIPPrefixSku_Tier("Regional") ) +// Mapping from string to PublicIPPrefixSku_Tier +var publicIPPrefixSku_Tier_Values = map[string]PublicIPPrefixSku_Tier{ + "global": PublicIPPrefixSku_Tier_Global, + "regional": PublicIPPrefixSku_Tier_Regional, +} + // Reference to another subresource. type PublicIpPrefixSubResource_ARM struct { Id *string `json:"id,omitempty"` diff --git a/v2/api/network/v1api20220701/public_ip_prefix_status_arm_types_gen.go b/v2/api/network/v1api20220701/public_ip_prefix_status_arm_types_gen.go index 2b5fda683ca..bbc619d015e 100644 --- a/v2/api/network/v1api20220701/public_ip_prefix_status_arm_types_gen.go +++ b/v2/api/network/v1api20220701/public_ip_prefix_status_arm_types_gen.go @@ -98,6 +98,11 @@ type PublicIPPrefixSku_Name_STATUS string const PublicIPPrefixSku_Name_STATUS_Standard = PublicIPPrefixSku_Name_STATUS("Standard") +// Mapping from string to PublicIPPrefixSku_Name_STATUS +var publicIPPrefixSku_Name_STATUS_Values = map[string]PublicIPPrefixSku_Name_STATUS{ + "standard": PublicIPPrefixSku_Name_STATUS_Standard, +} + type PublicIPPrefixSku_Tier_STATUS string const ( @@ -105,6 +110,12 @@ const ( PublicIPPrefixSku_Tier_STATUS_Regional = PublicIPPrefixSku_Tier_STATUS("Regional") ) +// Mapping from string to PublicIPPrefixSku_Tier_STATUS +var publicIPPrefixSku_Tier_STATUS_Values = map[string]PublicIPPrefixSku_Tier_STATUS{ + "global": PublicIPPrefixSku_Tier_STATUS_Global, + "regional": PublicIPPrefixSku_Tier_STATUS_Regional, +} + // Reference to another subresource. type PublicIpPrefixSubResource_STATUS_ARM struct { // Id: Resource ID. diff --git a/v2/api/network/v1api20220701/public_ip_prefix_types_gen.go b/v2/api/network/v1api20220701/public_ip_prefix_types_gen.go index 6b150ae3bcf..b773bd10c56 100644 --- a/v2/api/network/v1api20220701/public_ip_prefix_types_gen.go +++ b/v2/api/network/v1api20220701/public_ip_prefix_types_gen.go @@ -710,8 +710,9 @@ func (prefix *PublicIPPrefix_Spec) AssignProperties_From_PublicIPPrefix_Spec(sou // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := IPVersion(*source.PublicIPAddressVersion) - prefix.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, iPVersion_Values) + prefix.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { prefix.PublicIPAddressVersion = nil } @@ -1359,16 +1360,18 @@ func (prefix *PublicIPPrefix_STATUS) AssignProperties_From_PublicIPPrefix_STATUS // ProvisioningState if source.ProvisioningState != nil { - provisioningState := PublicIpPrefixProvisioningState_STATUS(*source.ProvisioningState) - prefix.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, publicIpPrefixProvisioningState_STATUS_Values) + prefix.ProvisioningState = &provisioningStateTemp } else { prefix.ProvisioningState = nil } // PublicIPAddressVersion if source.PublicIPAddressVersion != nil { - publicIPAddressVersion := IPVersion_STATUS(*source.PublicIPAddressVersion) - prefix.PublicIPAddressVersion = &publicIPAddressVersion + publicIPAddressVersion := *source.PublicIPAddressVersion + publicIPAddressVersionTemp := genruntime.ToEnum(publicIPAddressVersion, iPVersion_STATUS_Values) + prefix.PublicIPAddressVersion = &publicIPAddressVersionTemp } else { prefix.PublicIPAddressVersion = nil } @@ -1771,6 +1774,12 @@ const ( IPVersion_IPv6 = IPVersion("IPv6") ) +// Mapping from string to IPVersion +var iPVersion_Values = map[string]IPVersion{ + "ipv4": IPVersion_IPv4, + "ipv6": IPVersion_IPv6, +} + // IP address version. type IPVersion_STATUS string @@ -1779,6 +1788,12 @@ const ( IPVersion_STATUS_IPv6 = IPVersion_STATUS("IPv6") ) +// Mapping from string to IPVersion_STATUS +var iPVersion_STATUS_Values = map[string]IPVersion_STATUS{ + "ipv4": IPVersion_STATUS_IPv4, + "ipv6": IPVersion_STATUS_IPv6, +} + // Nat Gateway resource. type NatGateway_STATUS_PublicIPPrefix_SubResourceEmbedded struct { // Id: Resource ID. @@ -1947,6 +1962,14 @@ const ( PublicIpPrefixProvisioningState_STATUS_Updating = PublicIpPrefixProvisioningState_STATUS("Updating") ) +// Mapping from string to PublicIpPrefixProvisioningState_STATUS +var publicIpPrefixProvisioningState_STATUS_Values = map[string]PublicIpPrefixProvisioningState_STATUS{ + "deleting": PublicIpPrefixProvisioningState_STATUS_Deleting, + "failed": PublicIpPrefixProvisioningState_STATUS_Failed, + "succeeded": PublicIpPrefixProvisioningState_STATUS_Succeeded, + "updating": PublicIpPrefixProvisioningState_STATUS_Updating, +} + // SKU of a public IP prefix. type PublicIPPrefixSku struct { // Name: Name of a public IP prefix SKU. @@ -2012,16 +2035,18 @@ func (prefixSku *PublicIPPrefixSku) AssignProperties_From_PublicIPPrefixSku(sour // Name if source.Name != nil { - name := PublicIPPrefixSku_Name(*source.Name) - prefixSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, publicIPPrefixSku_Name_Values) + prefixSku.Name = &nameTemp } else { prefixSku.Name = nil } // Tier if source.Tier != nil { - tier := PublicIPPrefixSku_Tier(*source.Tier) - prefixSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, publicIPPrefixSku_Tier_Values) + prefixSku.Tier = &tierTemp } else { prefixSku.Tier = nil } @@ -2129,16 +2154,18 @@ func (prefixSku *PublicIPPrefixSku_STATUS) AssignProperties_From_PublicIPPrefixS // Name if source.Name != nil { - name := PublicIPPrefixSku_Name_STATUS(*source.Name) - prefixSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, publicIPPrefixSku_Name_STATUS_Values) + prefixSku.Name = &nameTemp } else { prefixSku.Name = nil } // Tier if source.Tier != nil { - tier := PublicIPPrefixSku_Tier_STATUS(*source.Tier) - prefixSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, publicIPPrefixSku_Tier_STATUS_Values) + prefixSku.Tier = &tierTemp } else { prefixSku.Tier = nil } diff --git a/v2/api/operationalinsights/v1api20210601/workspace_types_gen.go b/v2/api/operationalinsights/v1api20210601/workspace_types_gen.go index ea2febf5a01..58c0a6eea37 100644 --- a/v2/api/operationalinsights/v1api20210601/workspace_types_gen.go +++ b/v2/api/operationalinsights/v1api20210601/workspace_types_gen.go @@ -693,24 +693,27 @@ func (workspace *Workspace_Spec) AssignProperties_From_Workspace_Spec(source *v2 // ProvisioningState if source.ProvisioningState != nil { - provisioningState := WorkspaceProperties_ProvisioningState(*source.ProvisioningState) - workspace.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, workspaceProperties_ProvisioningState_Values) + workspace.ProvisioningState = &provisioningStateTemp } else { workspace.ProvisioningState = nil } // PublicNetworkAccessForIngestion if source.PublicNetworkAccessForIngestion != nil { - publicNetworkAccessForIngestion := PublicNetworkAccessType(*source.PublicNetworkAccessForIngestion) - workspace.PublicNetworkAccessForIngestion = &publicNetworkAccessForIngestion + publicNetworkAccessForIngestion := *source.PublicNetworkAccessForIngestion + publicNetworkAccessForIngestionTemp := genruntime.ToEnum(publicNetworkAccessForIngestion, publicNetworkAccessType_Values) + workspace.PublicNetworkAccessForIngestion = &publicNetworkAccessForIngestionTemp } else { workspace.PublicNetworkAccessForIngestion = nil } // PublicNetworkAccessForQuery if source.PublicNetworkAccessForQuery != nil { - publicNetworkAccessForQuery := PublicNetworkAccessType(*source.PublicNetworkAccessForQuery) - workspace.PublicNetworkAccessForQuery = &publicNetworkAccessForQuery + publicNetworkAccessForQuery := *source.PublicNetworkAccessForQuery + publicNetworkAccessForQueryTemp := genruntime.ToEnum(publicNetworkAccessForQuery, publicNetworkAccessType_Values) + workspace.PublicNetworkAccessForQuery = &publicNetworkAccessForQueryTemp } else { workspace.PublicNetworkAccessForQuery = nil } @@ -1318,24 +1321,27 @@ func (workspace *Workspace_STATUS) AssignProperties_From_Workspace_STATUS(source // ProvisioningState if source.ProvisioningState != nil { - provisioningState := WorkspaceProperties_ProvisioningState_STATUS(*source.ProvisioningState) - workspace.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, workspaceProperties_ProvisioningState_STATUS_Values) + workspace.ProvisioningState = &provisioningStateTemp } else { workspace.ProvisioningState = nil } // PublicNetworkAccessForIngestion if source.PublicNetworkAccessForIngestion != nil { - publicNetworkAccessForIngestion := PublicNetworkAccessType_STATUS(*source.PublicNetworkAccessForIngestion) - workspace.PublicNetworkAccessForIngestion = &publicNetworkAccessForIngestion + publicNetworkAccessForIngestion := *source.PublicNetworkAccessForIngestion + publicNetworkAccessForIngestionTemp := genruntime.ToEnum(publicNetworkAccessForIngestion, publicNetworkAccessType_STATUS_Values) + workspace.PublicNetworkAccessForIngestion = &publicNetworkAccessForIngestionTemp } else { workspace.PublicNetworkAccessForIngestion = nil } // PublicNetworkAccessForQuery if source.PublicNetworkAccessForQuery != nil { - publicNetworkAccessForQuery := PublicNetworkAccessType_STATUS(*source.PublicNetworkAccessForQuery) - workspace.PublicNetworkAccessForQuery = &publicNetworkAccessForQuery + publicNetworkAccessForQuery := *source.PublicNetworkAccessForQuery + publicNetworkAccessForQueryTemp := genruntime.ToEnum(publicNetworkAccessForQuery, publicNetworkAccessType_STATUS_Values) + workspace.PublicNetworkAccessForQuery = &publicNetworkAccessForQueryTemp } else { workspace.PublicNetworkAccessForQuery = nil } @@ -1595,6 +1601,12 @@ const ( PublicNetworkAccessType_Enabled = PublicNetworkAccessType("Enabled") ) +// Mapping from string to PublicNetworkAccessType +var publicNetworkAccessType_Values = map[string]PublicNetworkAccessType{ + "disabled": PublicNetworkAccessType_Disabled, + "enabled": PublicNetworkAccessType_Enabled, +} + // The network access type for operating on the Log Analytics Workspace. By default it is Enabled type PublicNetworkAccessType_STATUS string @@ -1603,6 +1615,12 @@ const ( PublicNetworkAccessType_STATUS_Enabled = PublicNetworkAccessType_STATUS("Enabled") ) +// Mapping from string to PublicNetworkAccessType_STATUS +var publicNetworkAccessType_STATUS_Values = map[string]PublicNetworkAccessType_STATUS{ + "disabled": PublicNetworkAccessType_STATUS_Disabled, + "enabled": PublicNetworkAccessType_STATUS_Enabled, +} + // The daily volume cap for ingestion. type WorkspaceCapping struct { // DailyQuotaGb: The workspace daily quota for ingestion. @@ -1763,8 +1781,9 @@ func (capping *WorkspaceCapping_STATUS) AssignProperties_From_WorkspaceCapping_S // DataIngestionStatus if source.DataIngestionStatus != nil { - dataIngestionStatus := WorkspaceCapping_DataIngestionStatus_STATUS(*source.DataIngestionStatus) - capping.DataIngestionStatus = &dataIngestionStatus + dataIngestionStatus := *source.DataIngestionStatus + dataIngestionStatusTemp := genruntime.ToEnum(dataIngestionStatus, workspaceCapping_DataIngestionStatus_STATUS_Values) + capping.DataIngestionStatus = &dataIngestionStatusTemp } else { capping.DataIngestionStatus = nil } @@ -2238,6 +2257,17 @@ const ( WorkspaceProperties_ProvisioningState_Updating = WorkspaceProperties_ProvisioningState("Updating") ) +// Mapping from string to WorkspaceProperties_ProvisioningState +var workspaceProperties_ProvisioningState_Values = map[string]WorkspaceProperties_ProvisioningState{ + "canceled": WorkspaceProperties_ProvisioningState_Canceled, + "creating": WorkspaceProperties_ProvisioningState_Creating, + "deleting": WorkspaceProperties_ProvisioningState_Deleting, + "failed": WorkspaceProperties_ProvisioningState_Failed, + "provisioningaccount": WorkspaceProperties_ProvisioningState_ProvisioningAccount, + "succeeded": WorkspaceProperties_ProvisioningState_Succeeded, + "updating": WorkspaceProperties_ProvisioningState_Updating, +} + type WorkspaceProperties_ProvisioningState_STATUS string const ( @@ -2250,6 +2280,17 @@ const ( WorkspaceProperties_ProvisioningState_STATUS_Updating = WorkspaceProperties_ProvisioningState_STATUS("Updating") ) +// Mapping from string to WorkspaceProperties_ProvisioningState_STATUS +var workspaceProperties_ProvisioningState_STATUS_Values = map[string]WorkspaceProperties_ProvisioningState_STATUS{ + "canceled": WorkspaceProperties_ProvisioningState_STATUS_Canceled, + "creating": WorkspaceProperties_ProvisioningState_STATUS_Creating, + "deleting": WorkspaceProperties_ProvisioningState_STATUS_Deleting, + "failed": WorkspaceProperties_ProvisioningState_STATUS_Failed, + "provisioningaccount": WorkspaceProperties_ProvisioningState_STATUS_ProvisioningAccount, + "succeeded": WorkspaceProperties_ProvisioningState_STATUS_Succeeded, + "updating": WorkspaceProperties_ProvisioningState_STATUS_Updating, +} + // The SKU (tier) of a workspace. type WorkspaceSku struct { // CapacityReservationLevel: The capacity reservation level in GB for this workspace, when CapacityReservation sku is @@ -2325,8 +2366,9 @@ func (workspaceSku *WorkspaceSku) AssignProperties_From_WorkspaceSku(source *v20 // Name if source.Name != nil { - name := WorkspaceSku_Name(*source.Name) - workspaceSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, workspaceSku_Name_Values) + workspaceSku.Name = &nameTemp } else { workspaceSku.Name = nil } @@ -2455,8 +2497,9 @@ func (workspaceSku *WorkspaceSku_STATUS) AssignProperties_From_WorkspaceSku_STAT // Name if source.Name != nil { - name := WorkspaceSku_Name_STATUS(*source.Name) - workspaceSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, workspaceSku_Name_STATUS_Values) + workspaceSku.Name = &nameTemp } else { workspaceSku.Name = nil } @@ -2511,6 +2554,16 @@ const ( WorkspaceCapping_DataIngestionStatus_STATUS_SubscriptionSuspended = WorkspaceCapping_DataIngestionStatus_STATUS("SubscriptionSuspended") ) +// Mapping from string to WorkspaceCapping_DataIngestionStatus_STATUS +var workspaceCapping_DataIngestionStatus_STATUS_Values = map[string]WorkspaceCapping_DataIngestionStatus_STATUS{ + "approachingquota": WorkspaceCapping_DataIngestionStatus_STATUS_ApproachingQuota, + "forceoff": WorkspaceCapping_DataIngestionStatus_STATUS_ForceOff, + "forceon": WorkspaceCapping_DataIngestionStatus_STATUS_ForceOn, + "overquota": WorkspaceCapping_DataIngestionStatus_STATUS_OverQuota, + "respectquota": WorkspaceCapping_DataIngestionStatus_STATUS_RespectQuota, + "subscriptionsuspended": WorkspaceCapping_DataIngestionStatus_STATUS_SubscriptionSuspended, +} + // +kubebuilder:validation:Enum={100,200,300,400,500,1000,2000,5000} type WorkspaceSku_CapacityReservationLevel int @@ -2552,6 +2605,18 @@ const ( WorkspaceSku_Name_Standard = WorkspaceSku_Name("Standard") ) +// Mapping from string to WorkspaceSku_Name +var workspaceSku_Name_Values = map[string]WorkspaceSku_Name{ + "capacityreservation": WorkspaceSku_Name_CapacityReservation, + "free": WorkspaceSku_Name_Free, + "lacluster": WorkspaceSku_Name_LACluster, + "pergb2018": WorkspaceSku_Name_PerGB2018, + "pernode": WorkspaceSku_Name_PerNode, + "premium": WorkspaceSku_Name_Premium, + "standalone": WorkspaceSku_Name_Standalone, + "standard": WorkspaceSku_Name_Standard, +} + type WorkspaceSku_Name_STATUS string const ( @@ -2565,6 +2630,18 @@ const ( WorkspaceSku_Name_STATUS_Standard = WorkspaceSku_Name_STATUS("Standard") ) +// Mapping from string to WorkspaceSku_Name_STATUS +var workspaceSku_Name_STATUS_Values = map[string]WorkspaceSku_Name_STATUS{ + "capacityreservation": WorkspaceSku_Name_STATUS_CapacityReservation, + "free": WorkspaceSku_Name_STATUS_Free, + "lacluster": WorkspaceSku_Name_STATUS_LACluster, + "pergb2018": WorkspaceSku_Name_STATUS_PerGB2018, + "pernode": WorkspaceSku_Name_STATUS_PerNode, + "premium": WorkspaceSku_Name_STATUS_Premium, + "standalone": WorkspaceSku_Name_STATUS_Standalone, + "standard": WorkspaceSku_Name_STATUS_Standard, +} + func init() { SchemeBuilder.Register(&Workspace{}, &WorkspaceList{}) } diff --git a/v2/api/search/v1api20220901/search_service_spec_arm_types_gen.go b/v2/api/search/v1api20220901/search_service_spec_arm_types_gen.go index aa5be344f39..8eac1e9a5a7 100644 --- a/v2/api/search/v1api20220901/search_service_spec_arm_types_gen.go +++ b/v2/api/search/v1api20220901/search_service_spec_arm_types_gen.go @@ -118,6 +118,12 @@ const ( Identity_Type_SystemAssigned = Identity_Type("SystemAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, +} + // Network specific rules that determine how the Azure Cognitive Search service may be reached. type NetworkRuleSet_ARM struct { // IpRules: A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service @@ -140,6 +146,17 @@ const ( Sku_Name_Storage_Optimized_L2 = Sku_Name("storage_optimized_l2") ) +// Mapping from string to Sku_Name +var sku_Name_Values = map[string]Sku_Name{ + "basic": Sku_Name_Basic, + "free": Sku_Name_Free, + "standard": Sku_Name_Standard, + "standard2": Sku_Name_Standard2, + "standard3": Sku_Name_Standard3, + "storage_optimized_l1": Sku_Name_Storage_Optimized_L1, + "storage_optimized_l2": Sku_Name_Storage_Optimized_L2, +} + // Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. type DataPlaneAadOrApiKeyAuthOption_ARM struct { // AadAuthFailureMode: Describes what response the data plane API of a Search service would send for requests that failed diff --git a/v2/api/search/v1api20220901/search_service_status_arm_types_gen.go b/v2/api/search/v1api20220901/search_service_status_arm_types_gen.go index cc99b4c7e2f..8139e8aeba0 100644 --- a/v2/api/search/v1api20220901/search_service_status_arm_types_gen.go +++ b/v2/api/search/v1api20220901/search_service_status_arm_types_gen.go @@ -151,6 +151,12 @@ const ( Identity_Type_STATUS_SystemAssigned = Identity_Type_STATUS("SystemAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, +} + // Network specific rules that determine how the Azure Cognitive Search service may be reached. type NetworkRuleSet_STATUS_ARM struct { // IpRules: A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service @@ -186,6 +192,17 @@ const ( Sku_Name_STATUS_Storage_Optimized_L2 = Sku_Name_STATUS("storage_optimized_l2") ) +// Mapping from string to Sku_Name_STATUS +var sku_Name_STATUS_Values = map[string]Sku_Name_STATUS{ + "basic": Sku_Name_STATUS_Basic, + "free": Sku_Name_STATUS_Free, + "standard": Sku_Name_STATUS_Standard, + "standard2": Sku_Name_STATUS_Standard2, + "standard3": Sku_Name_STATUS_Standard3, + "storage_optimized_l1": Sku_Name_STATUS_Storage_Optimized_L1, + "storage_optimized_l2": Sku_Name_STATUS_Storage_Optimized_L2, +} + // Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. type DataPlaneAadOrApiKeyAuthOption_STATUS_ARM struct { // AadAuthFailureMode: Describes what response the data plane API of a Search service would send for requests that failed diff --git a/v2/api/search/v1api20220901/search_service_types_gen.go b/v2/api/search/v1api20220901/search_service_types_gen.go index c7463c70fae..59ccd3888c2 100644 --- a/v2/api/search/v1api20220901/search_service_types_gen.go +++ b/v2/api/search/v1api20220901/search_service_types_gen.go @@ -761,8 +761,9 @@ func (service *SearchService_Spec) AssignProperties_From_SearchService_Spec(sour // HostingMode if source.HostingMode != nil { - hostingMode := SearchServiceProperties_HostingMode(*source.HostingMode) - service.HostingMode = &hostingMode + hostingMode := *source.HostingMode + hostingModeTemp := genruntime.ToEnum(hostingMode, searchServiceProperties_HostingMode_Values) + service.HostingMode = &hostingModeTemp } else { service.HostingMode = nil } @@ -824,8 +825,9 @@ func (service *SearchService_Spec) AssignProperties_From_SearchService_Spec(sour // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := SearchServiceProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - service.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, searchServiceProperties_PublicNetworkAccess_Values) + service.PublicNetworkAccess = &publicNetworkAccessTemp } else { service.PublicNetworkAccess = nil } @@ -1520,8 +1522,9 @@ func (service *SearchService_STATUS) AssignProperties_From_SearchService_STATUS( // HostingMode if source.HostingMode != nil { - hostingMode := SearchServiceProperties_HostingMode_STATUS(*source.HostingMode) - service.HostingMode = &hostingMode + hostingMode := *source.HostingMode + hostingModeTemp := genruntime.ToEnum(hostingMode, searchServiceProperties_HostingMode_STATUS_Values) + service.HostingMode = &hostingModeTemp } else { service.HostingMode = nil } @@ -1582,16 +1585,18 @@ func (service *SearchService_STATUS) AssignProperties_From_SearchService_STATUS( // ProvisioningState if source.ProvisioningState != nil { - provisioningState := SearchServiceProperties_ProvisioningState_STATUS(*source.ProvisioningState) - service.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, searchServiceProperties_ProvisioningState_STATUS_Values) + service.ProvisioningState = &provisioningStateTemp } else { service.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := SearchServiceProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - service.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, searchServiceProperties_PublicNetworkAccess_STATUS_Values) + service.PublicNetworkAccess = &publicNetworkAccessTemp } else { service.PublicNetworkAccess = nil } @@ -1631,8 +1636,9 @@ func (service *SearchService_STATUS) AssignProperties_From_SearchService_STATUS( // Status if source.Status != nil { - status := SearchServiceProperties_Status_STATUS(*source.Status) - service.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, searchServiceProperties_Status_STATUS_Values) + service.Status = &statusTemp } else { service.Status = nil } @@ -2123,8 +2129,9 @@ func (withCmk *EncryptionWithCmk) AssignProperties_From_EncryptionWithCmk(source // Enforcement if source.Enforcement != nil { - enforcement := EncryptionWithCmk_Enforcement(*source.Enforcement) - withCmk.Enforcement = &enforcement + enforcement := *source.Enforcement + enforcementTemp := genruntime.ToEnum(enforcement, encryptionWithCmk_Enforcement_Values) + withCmk.Enforcement = &enforcementTemp } else { withCmk.Enforcement = nil } @@ -2219,16 +2226,18 @@ func (withCmk *EncryptionWithCmk_STATUS) AssignProperties_From_EncryptionWithCmk // EncryptionComplianceStatus if source.EncryptionComplianceStatus != nil { - encryptionComplianceStatus := EncryptionWithCmk_EncryptionComplianceStatus_STATUS(*source.EncryptionComplianceStatus) - withCmk.EncryptionComplianceStatus = &encryptionComplianceStatus + encryptionComplianceStatus := *source.EncryptionComplianceStatus + encryptionComplianceStatusTemp := genruntime.ToEnum(encryptionComplianceStatus, encryptionWithCmk_EncryptionComplianceStatus_STATUS_Values) + withCmk.EncryptionComplianceStatus = &encryptionComplianceStatusTemp } else { withCmk.EncryptionComplianceStatus = nil } // Enforcement if source.Enforcement != nil { - enforcement := EncryptionWithCmk_Enforcement_STATUS(*source.Enforcement) - withCmk.Enforcement = &enforcement + enforcement := *source.Enforcement + enforcementTemp := genruntime.ToEnum(enforcement, encryptionWithCmk_Enforcement_STATUS_Values) + withCmk.Enforcement = &enforcementTemp } else { withCmk.Enforcement = nil } @@ -2320,8 +2329,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20220901s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2428,8 +2438,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2824,6 +2835,12 @@ const ( SearchServiceProperties_HostingMode_HighDensity = SearchServiceProperties_HostingMode("highDensity") ) +// Mapping from string to SearchServiceProperties_HostingMode +var searchServiceProperties_HostingMode_Values = map[string]SearchServiceProperties_HostingMode{ + "default": SearchServiceProperties_HostingMode_Default, + "highdensity": SearchServiceProperties_HostingMode_HighDensity, +} + type SearchServiceProperties_HostingMode_STATUS string const ( @@ -2831,6 +2848,12 @@ const ( SearchServiceProperties_HostingMode_STATUS_HighDensity = SearchServiceProperties_HostingMode_STATUS("highDensity") ) +// Mapping from string to SearchServiceProperties_HostingMode_STATUS +var searchServiceProperties_HostingMode_STATUS_Values = map[string]SearchServiceProperties_HostingMode_STATUS{ + "default": SearchServiceProperties_HostingMode_STATUS_Default, + "highdensity": SearchServiceProperties_HostingMode_STATUS_HighDensity, +} + type SearchServiceProperties_ProvisioningState_STATUS string const ( @@ -2839,6 +2862,13 @@ const ( SearchServiceProperties_ProvisioningState_STATUS_Succeeded = SearchServiceProperties_ProvisioningState_STATUS("succeeded") ) +// Mapping from string to SearchServiceProperties_ProvisioningState_STATUS +var searchServiceProperties_ProvisioningState_STATUS_Values = map[string]SearchServiceProperties_ProvisioningState_STATUS{ + "failed": SearchServiceProperties_ProvisioningState_STATUS_Failed, + "provisioning": SearchServiceProperties_ProvisioningState_STATUS_Provisioning, + "succeeded": SearchServiceProperties_ProvisioningState_STATUS_Succeeded, +} + // +kubebuilder:validation:Enum={"disabled","enabled"} type SearchServiceProperties_PublicNetworkAccess string @@ -2847,6 +2877,12 @@ const ( SearchServiceProperties_PublicNetworkAccess_Enabled = SearchServiceProperties_PublicNetworkAccess("enabled") ) +// Mapping from string to SearchServiceProperties_PublicNetworkAccess +var searchServiceProperties_PublicNetworkAccess_Values = map[string]SearchServiceProperties_PublicNetworkAccess{ + "disabled": SearchServiceProperties_PublicNetworkAccess_Disabled, + "enabled": SearchServiceProperties_PublicNetworkAccess_Enabled, +} + type SearchServiceProperties_PublicNetworkAccess_STATUS string const ( @@ -2854,6 +2890,12 @@ const ( SearchServiceProperties_PublicNetworkAccess_STATUS_Enabled = SearchServiceProperties_PublicNetworkAccess_STATUS("enabled") ) +// Mapping from string to SearchServiceProperties_PublicNetworkAccess_STATUS +var searchServiceProperties_PublicNetworkAccess_STATUS_Values = map[string]SearchServiceProperties_PublicNetworkAccess_STATUS{ + "disabled": SearchServiceProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": SearchServiceProperties_PublicNetworkAccess_STATUS_Enabled, +} + type SearchServiceProperties_Status_STATUS string const ( @@ -2865,6 +2907,16 @@ const ( SearchServiceProperties_Status_STATUS_Running = SearchServiceProperties_Status_STATUS("running") ) +// Mapping from string to SearchServiceProperties_Status_STATUS +var searchServiceProperties_Status_STATUS_Values = map[string]SearchServiceProperties_Status_STATUS{ + "degraded": SearchServiceProperties_Status_STATUS_Degraded, + "deleting": SearchServiceProperties_Status_STATUS_Deleting, + "disabled": SearchServiceProperties_Status_STATUS_Disabled, + "error": SearchServiceProperties_Status_STATUS_Error, + "provisioning": SearchServiceProperties_Status_STATUS_Provisioning, + "running": SearchServiceProperties_Status_STATUS_Running, +} + // Describes a Shared Private Link Resource managed by the Azure Cognitive Search service. type SharedPrivateLinkResource_STATUS struct { // Id: Fully qualified resource ID for the resource. Ex - @@ -2980,8 +3032,9 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20220901s.Sku) error { // Name if source.Name != nil { - name := Sku_Name(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3069,8 +3122,9 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20220901s.Sku_S // Name if source.Name != nil { - name := Sku_Name_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sku_Name_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } @@ -3154,8 +3208,9 @@ func (option *DataPlaneAadOrApiKeyAuthOption) AssignProperties_From_DataPlaneAad // AadAuthFailureMode if source.AadAuthFailureMode != nil { - aadAuthFailureMode := DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode(*source.AadAuthFailureMode) - option.AadAuthFailureMode = &aadAuthFailureMode + aadAuthFailureMode := *source.AadAuthFailureMode + aadAuthFailureModeTemp := genruntime.ToEnum(aadAuthFailureMode, dataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Values) + option.AadAuthFailureMode = &aadAuthFailureModeTemp } else { option.AadAuthFailureMode = nil } @@ -3239,8 +3294,9 @@ func (option *DataPlaneAadOrApiKeyAuthOption_STATUS) AssignProperties_From_DataP // AadAuthFailureMode if source.AadAuthFailureMode != nil { - aadAuthFailureMode := DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS(*source.AadAuthFailureMode) - option.AadAuthFailureMode = &aadAuthFailureMode + aadAuthFailureMode := *source.AadAuthFailureMode + aadAuthFailureModeTemp := genruntime.ToEnum(aadAuthFailureMode, dataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS_Values) + option.AadAuthFailureMode = &aadAuthFailureModeTemp } else { option.AadAuthFailureMode = nil } @@ -3280,6 +3336,12 @@ const ( EncryptionWithCmk_EncryptionComplianceStatus_STATUS_NonCompliant = EncryptionWithCmk_EncryptionComplianceStatus_STATUS("NonCompliant") ) +// Mapping from string to EncryptionWithCmk_EncryptionComplianceStatus_STATUS +var encryptionWithCmk_EncryptionComplianceStatus_STATUS_Values = map[string]EncryptionWithCmk_EncryptionComplianceStatus_STATUS{ + "compliant": EncryptionWithCmk_EncryptionComplianceStatus_STATUS_Compliant, + "noncompliant": EncryptionWithCmk_EncryptionComplianceStatus_STATUS_NonCompliant, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled","Unspecified"} type EncryptionWithCmk_Enforcement string @@ -3289,6 +3351,13 @@ const ( EncryptionWithCmk_Enforcement_Unspecified = EncryptionWithCmk_Enforcement("Unspecified") ) +// Mapping from string to EncryptionWithCmk_Enforcement +var encryptionWithCmk_Enforcement_Values = map[string]EncryptionWithCmk_Enforcement{ + "disabled": EncryptionWithCmk_Enforcement_Disabled, + "enabled": EncryptionWithCmk_Enforcement_Enabled, + "unspecified": EncryptionWithCmk_Enforcement_Unspecified, +} + type EncryptionWithCmk_Enforcement_STATUS string const ( @@ -3297,6 +3366,13 @@ const ( EncryptionWithCmk_Enforcement_STATUS_Unspecified = EncryptionWithCmk_Enforcement_STATUS("Unspecified") ) +// Mapping from string to EncryptionWithCmk_Enforcement_STATUS +var encryptionWithCmk_Enforcement_STATUS_Values = map[string]EncryptionWithCmk_Enforcement_STATUS{ + "disabled": EncryptionWithCmk_Enforcement_STATUS_Disabled, + "enabled": EncryptionWithCmk_Enforcement_STATUS_Enabled, + "unspecified": EncryptionWithCmk_Enforcement_STATUS_Unspecified, +} + // The IP restriction rule of the Azure Cognitive Search service. type IpRule struct { // Value: Value corresponding to a single IPv4 address (eg., 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) @@ -3534,6 +3610,12 @@ const ( DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http403 = DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode("http403") ) +// Mapping from string to DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode +var dataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Values = map[string]DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode{ + "http401withbearerchallenge": DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http401WithBearerChallenge, + "http403": DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_Http403, +} + type DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS string const ( @@ -3541,6 +3623,12 @@ const ( DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS_Http403 = DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS("http403") ) +// Mapping from string to DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS +var dataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS_Values = map[string]DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS{ + "http401withbearerchallenge": DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS_Http401WithBearerChallenge, + "http403": DataPlaneAadOrApiKeyAuthOption_AadAuthFailureMode_STATUS_Http403, +} + func init() { SchemeBuilder.Register(&SearchService{}, &SearchServiceList{}) } diff --git a/v2/api/servicebus/v1api20210101preview/namespace_spec_arm_types_gen.go b/v2/api/servicebus/v1api20210101preview/namespace_spec_arm_types_gen.go index 3b6ab7150de..33ea7a459c7 100644 --- a/v2/api/servicebus/v1api20210101preview/namespace_spec_arm_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/namespace_spec_arm_types_gen.go @@ -90,6 +90,14 @@ const ( Identity_Type_UserAssigned = Identity_Type("UserAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "systemassigned, userassigned": Identity_Type_SystemAssignedUserAssigned, + "userassigned": Identity_Type_UserAssigned, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type SBSku_Name string @@ -99,6 +107,13 @@ const ( SBSku_Name_Standard = SBSku_Name("Standard") ) +// Mapping from string to SBSku_Name +var sBSku_Name_Values = map[string]SBSku_Name{ + "basic": SBSku_Name_Basic, + "premium": SBSku_Name_Premium, + "standard": SBSku_Name_Standard, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type SBSku_Tier string @@ -108,6 +123,13 @@ const ( SBSku_Tier_Standard = SBSku_Tier("Standard") ) +// Mapping from string to SBSku_Tier +var sBSku_Tier_Values = map[string]SBSku_Tier{ + "basic": SBSku_Tier_Basic, + "premium": SBSku_Tier_Premium, + "standard": SBSku_Tier_Standard, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/servicebus/v1api20210101preview/namespace_status_arm_types_gen.go b/v2/api/servicebus/v1api20210101preview/namespace_status_arm_types_gen.go index 85ad9c99bb1..c8be544e798 100644 --- a/v2/api/servicebus/v1api20210101preview/namespace_status_arm_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/namespace_status_arm_types_gen.go @@ -140,6 +140,14 @@ const ( Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + // Properties of the PrivateEndpointConnection. type PrivateEndpointConnection_STATUS_ARM struct { // Id: Resource Id @@ -154,6 +162,13 @@ const ( SBSku_Name_STATUS_Standard = SBSku_Name_STATUS("Standard") ) +// Mapping from string to SBSku_Name_STATUS +var sBSku_Name_STATUS_Values = map[string]SBSku_Name_STATUS{ + "basic": SBSku_Name_STATUS_Basic, + "premium": SBSku_Name_STATUS_Premium, + "standard": SBSku_Name_STATUS_Standard, +} + type SBSku_Tier_STATUS string const ( @@ -162,6 +177,13 @@ const ( SBSku_Tier_STATUS_Standard = SBSku_Tier_STATUS("Standard") ) +// Mapping from string to SBSku_Tier_STATUS +var sBSku_Tier_STATUS_Values = map[string]SBSku_Tier_STATUS{ + "basic": SBSku_Tier_STATUS_Basic, + "premium": SBSku_Tier_STATUS_Premium, + "standard": SBSku_Tier_STATUS_Standard, +} + type SystemData_CreatedByType_STATUS string const ( @@ -171,6 +193,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -180,6 +210,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Properties to configure keyVault Properties type KeyVaultProperties_STATUS_ARM struct { Identity *UserAssignedIdentityProperties_STATUS_ARM `json:"identity,omitempty"` diff --git a/v2/api/servicebus/v1api20210101preview/namespace_types_gen.go b/v2/api/servicebus/v1api20210101preview/namespace_types_gen.go index 9b7c8044159..40abe851576 100644 --- a/v2/api/servicebus/v1api20210101preview/namespace_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/namespace_types_gen.go @@ -1380,8 +1380,9 @@ func (encryption *Encryption) AssignProperties_From_Encryption(source *v20210101 // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -1523,8 +1524,9 @@ func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(sou // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource_STATUS(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_STATUS_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -1675,8 +1677,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20210101ps.Ide // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1820,8 +1823,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2092,16 +2096,18 @@ func (sbSku *SBSku) AssignProperties_From_SBSku(source *v20210101ps.SBSku) error // Name if source.Name != nil { - name := SBSku_Name(*source.Name) - sbSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sBSku_Name_Values) + sbSku.Name = &nameTemp } else { sbSku.Name = nil } // Tier if source.Tier != nil { - tier := SBSku_Tier(*source.Tier) - sbSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sBSku_Tier_Values) + sbSku.Tier = &tierTemp } else { sbSku.Tier = nil } @@ -2201,16 +2207,18 @@ func (sbSku *SBSku_STATUS) AssignProperties_From_SBSku_STATUS(source *v20210101p // Name if source.Name != nil { - name := SBSku_Name_STATUS(*source.Name) - sbSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sBSku_Name_STATUS_Values) + sbSku.Name = &nameTemp } else { sbSku.Name = nil } // Tier if source.Tier != nil { - tier := SBSku_Tier_STATUS(*source.Tier) - sbSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sBSku_Tier_STATUS_Values) + sbSku.Tier = &tierTemp } else { sbSku.Tier = nil } @@ -2340,8 +2348,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -2354,8 +2363,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -2487,10 +2497,20 @@ type Encryption_KeySource string const Encryption_KeySource_MicrosoftKeyVault = Encryption_KeySource("Microsoft.KeyVault") +// Mapping from string to Encryption_KeySource +var encryption_KeySource_Values = map[string]Encryption_KeySource{ + "microsoft.keyvault": Encryption_KeySource_MicrosoftKeyVault, +} + type Encryption_KeySource_STATUS string const Encryption_KeySource_STATUS_MicrosoftKeyVault = Encryption_KeySource_STATUS("Microsoft.KeyVault") +// Mapping from string to Encryption_KeySource_STATUS +var encryption_KeySource_STATUS_Values = map[string]Encryption_KeySource_STATUS{ + "microsoft.keyvault": Encryption_KeySource_STATUS_MicrosoftKeyVault, +} + // Properties to configure keyVault Properties type KeyVaultProperties struct { Identity *UserAssignedIdentityProperties `json:"identity,omitempty"` diff --git a/v2/api/servicebus/v1api20210101preview/namespaces_authorization_rule_types_gen.go b/v2/api/servicebus/v1api20210101preview/namespaces_authorization_rule_types_gen.go index 65c51b7fc3f..84a29e15814 100644 --- a/v2/api/servicebus/v1api20210101preview/namespaces_authorization_rule_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/namespaces_authorization_rule_types_gen.go @@ -508,7 +508,7 @@ func (rule *Namespaces_AuthorizationRule_Spec) AssignProperties_From_Namespaces_ for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_AuthorizationRule_Properties_Rights_Spec(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_AuthorizationRule_Properties_Rights_Spec_Values) } rule.Rights = rightList } else { @@ -729,7 +729,7 @@ func (rule *Namespaces_AuthorizationRule_STATUS) AssignProperties_From_Namespace for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_AuthorizationRule_Properties_Rights_STATUS(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_AuthorizationRule_Properties_Rights_STATUS_Values) } rule.Rights = rightList } else { @@ -817,6 +817,13 @@ const ( Namespaces_AuthorizationRule_Properties_Rights_Spec_Send = Namespaces_AuthorizationRule_Properties_Rights_Spec("Send") ) +// Mapping from string to Namespaces_AuthorizationRule_Properties_Rights_Spec +var namespaces_AuthorizationRule_Properties_Rights_Spec_Values = map[string]Namespaces_AuthorizationRule_Properties_Rights_Spec{ + "listen": Namespaces_AuthorizationRule_Properties_Rights_Spec_Listen, + "manage": Namespaces_AuthorizationRule_Properties_Rights_Spec_Manage, + "send": Namespaces_AuthorizationRule_Properties_Rights_Spec_Send, +} + type Namespaces_AuthorizationRule_Properties_Rights_STATUS string const ( @@ -825,6 +832,13 @@ const ( Namespaces_AuthorizationRule_Properties_Rights_STATUS_Send = Namespaces_AuthorizationRule_Properties_Rights_STATUS("Send") ) +// Mapping from string to Namespaces_AuthorizationRule_Properties_Rights_STATUS +var namespaces_AuthorizationRule_Properties_Rights_STATUS_Values = map[string]Namespaces_AuthorizationRule_Properties_Rights_STATUS{ + "listen": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Listen, + "manage": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Manage, + "send": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Send, +} + // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type NamespacesAuthorizationRuleOperatorSpec struct { // Secrets: configures where to place Azure generated secrets. diff --git a/v2/api/servicebus/v1api20210101preview/namespaces_queue_types_gen.go b/v2/api/servicebus/v1api20210101preview/namespaces_queue_types_gen.go index db48b0a606c..dd086545fdc 100644 --- a/v2/api/servicebus/v1api20210101preview/namespaces_queue_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/namespaces_queue_types_gen.go @@ -1372,8 +1372,9 @@ func (queue *Namespaces_Queue_STATUS) AssignProperties_From_Namespaces_Queue_STA // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - queue.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + queue.Status = &statusTemp } else { queue.Status = nil } @@ -1562,6 +1563,19 @@ const ( EntityStatus_STATUS_Unknown = EntityStatus_STATUS("Unknown") ) +// Mapping from string to EntityStatus_STATUS +var entityStatus_STATUS_Values = map[string]EntityStatus_STATUS{ + "active": EntityStatus_STATUS_Active, + "creating": EntityStatus_STATUS_Creating, + "deleting": EntityStatus_STATUS_Deleting, + "disabled": EntityStatus_STATUS_Disabled, + "receivedisabled": EntityStatus_STATUS_ReceiveDisabled, + "renaming": EntityStatus_STATUS_Renaming, + "restoring": EntityStatus_STATUS_Restoring, + "senddisabled": EntityStatus_STATUS_SendDisabled, + "unknown": EntityStatus_STATUS_Unknown, +} + // Message Count Details. type MessageCountDetails_STATUS struct { // ActiveMessageCount: Number of active messages in the queue, topic, or subscription. diff --git a/v2/api/servicebus/v1api20210101preview/namespaces_topic_types_gen.go b/v2/api/servicebus/v1api20210101preview/namespaces_topic_types_gen.go index ffc8c74e83b..5e3f73d2264 100644 --- a/v2/api/servicebus/v1api20210101preview/namespaces_topic_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/namespaces_topic_types_gen.go @@ -1150,8 +1150,9 @@ func (topic *Namespaces_Topic_STATUS) AssignProperties_From_Namespaces_Topic_STA // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - topic.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + topic.Status = &statusTemp } else { topic.Status = nil } diff --git a/v2/api/servicebus/v1api20210101preview/namespaces_topics_subscription_types_gen.go b/v2/api/servicebus/v1api20210101preview/namespaces_topics_subscription_types_gen.go index 81f8e6d8514..1e88a0b99af 100644 --- a/v2/api/servicebus/v1api20210101preview/namespaces_topics_subscription_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/namespaces_topics_subscription_types_gen.go @@ -1210,8 +1210,9 @@ func (subscription *Namespaces_Topics_Subscription_STATUS) AssignProperties_From // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - subscription.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + subscription.Status = &statusTemp } else { subscription.Status = nil } diff --git a/v2/api/servicebus/v1api20210101preview/namespaces_topics_subscriptions_rule_types_gen.go b/v2/api/servicebus/v1api20210101preview/namespaces_topics_subscriptions_rule_types_gen.go index 8c7f0f12919..5942a4a9994 100644 --- a/v2/api/servicebus/v1api20210101preview/namespaces_topics_subscriptions_rule_types_gen.go +++ b/v2/api/servicebus/v1api20210101preview/namespaces_topics_subscriptions_rule_types_gen.go @@ -562,8 +562,9 @@ func (rule *Namespaces_Topics_Subscriptions_Rule_Spec) AssignProperties_From_Nam // FilterType if source.FilterType != nil { - filterType := FilterType(*source.FilterType) - rule.FilterType = &filterType + filterType := *source.FilterType + filterTypeTemp := genruntime.ToEnum(filterType, filterType_Values) + rule.FilterType = &filterTypeTemp } else { rule.FilterType = nil } @@ -888,8 +889,9 @@ func (rule *Namespaces_Topics_Subscriptions_Rule_STATUS) AssignProperties_From_N // FilterType if source.FilterType != nil { - filterType := FilterType_STATUS(*source.FilterType) - rule.FilterType = &filterType + filterType := *source.FilterType + filterTypeTemp := genruntime.ToEnum(filterType, filterType_STATUS_Values) + rule.FilterType = &filterTypeTemp } else { rule.FilterType = nil } @@ -1736,6 +1738,12 @@ const ( FilterType_SqlFilter = FilterType("SqlFilter") ) +// Mapping from string to FilterType +var filterType_Values = map[string]FilterType{ + "correlationfilter": FilterType_CorrelationFilter, + "sqlfilter": FilterType_SqlFilter, +} + // Rule filter types type FilterType_STATUS string @@ -1744,6 +1752,12 @@ const ( FilterType_STATUS_SqlFilter = FilterType_STATUS("SqlFilter") ) +// Mapping from string to FilterType_STATUS +var filterType_STATUS_Values = map[string]FilterType_STATUS{ + "correlationfilter": FilterType_STATUS_CorrelationFilter, + "sqlfilter": FilterType_STATUS_SqlFilter, +} + // Represents a filter which is a composition of an expression and an action that is executed in the pub/sub pipeline. type SqlFilter struct { // +kubebuilder:validation:Maximum=20 diff --git a/v2/api/servicebus/v1api20211101/namespace_spec_arm_types_gen.go b/v2/api/servicebus/v1api20211101/namespace_spec_arm_types_gen.go index dbe17b1e8a4..5a1ad32882e 100644 --- a/v2/api/servicebus/v1api20211101/namespace_spec_arm_types_gen.go +++ b/v2/api/servicebus/v1api20211101/namespace_spec_arm_types_gen.go @@ -96,6 +96,14 @@ const ( Identity_Type_UserAssigned = Identity_Type("UserAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "systemassigned, userassigned": Identity_Type_SystemAssignedUserAssigned, + "userassigned": Identity_Type_UserAssigned, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type SBSku_Name string @@ -105,6 +113,13 @@ const ( SBSku_Name_Standard = SBSku_Name("Standard") ) +// Mapping from string to SBSku_Name +var sBSku_Name_Values = map[string]SBSku_Name{ + "basic": SBSku_Name_Basic, + "premium": SBSku_Name_Premium, + "standard": SBSku_Name_Standard, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type SBSku_Tier string @@ -114,6 +129,13 @@ const ( SBSku_Tier_Standard = SBSku_Tier("Standard") ) +// Mapping from string to SBSku_Tier +var sBSku_Tier_Values = map[string]SBSku_Tier{ + "basic": SBSku_Tier_Basic, + "premium": SBSku_Tier_Premium, + "standard": SBSku_Tier_Standard, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/servicebus/v1api20211101/namespace_status_arm_types_gen.go b/v2/api/servicebus/v1api20211101/namespace_status_arm_types_gen.go index 768d65b09b3..606f474b64a 100644 --- a/v2/api/servicebus/v1api20211101/namespace_status_arm_types_gen.go +++ b/v2/api/servicebus/v1api20211101/namespace_status_arm_types_gen.go @@ -137,6 +137,14 @@ const ( Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + // Properties of the PrivateEndpointConnection. type PrivateEndpointConnection_STATUS_ARM struct { // Id: Fully qualified resource ID for the resource. Ex - @@ -152,6 +160,13 @@ const ( SBSku_Name_STATUS_Standard = SBSku_Name_STATUS("Standard") ) +// Mapping from string to SBSku_Name_STATUS +var sBSku_Name_STATUS_Values = map[string]SBSku_Name_STATUS{ + "basic": SBSku_Name_STATUS_Basic, + "premium": SBSku_Name_STATUS_Premium, + "standard": SBSku_Name_STATUS_Standard, +} + type SBSku_Tier_STATUS string const ( @@ -160,6 +175,13 @@ const ( SBSku_Tier_STATUS_Standard = SBSku_Tier_STATUS("Standard") ) +// Mapping from string to SBSku_Tier_STATUS +var sBSku_Tier_STATUS_Values = map[string]SBSku_Tier_STATUS{ + "basic": SBSku_Tier_STATUS_Basic, + "premium": SBSku_Tier_STATUS_Premium, + "standard": SBSku_Tier_STATUS_Standard, +} + type SystemData_CreatedByType_STATUS string const ( @@ -169,6 +191,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -178,6 +208,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Recognized Dictionary value. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: Client Id of user assigned identity diff --git a/v2/api/servicebus/v1api20211101/namespace_types_gen.go b/v2/api/servicebus/v1api20211101/namespace_types_gen.go index 2e31152a669..44ac278365f 100644 --- a/v2/api/servicebus/v1api20211101/namespace_types_gen.go +++ b/v2/api/servicebus/v1api20211101/namespace_types_gen.go @@ -1548,8 +1548,9 @@ func (encryption *Encryption) AssignProperties_From_Encryption(source *v20211101 // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -1732,8 +1733,9 @@ func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(sou // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource_STATUS(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_STATUS_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -1884,8 +1886,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20211101s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2056,8 +2059,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2329,16 +2333,18 @@ func (sbSku *SBSku) AssignProperties_From_SBSku(source *v20211101s.SBSku) error // Name if source.Name != nil { - name := SBSku_Name(*source.Name) - sbSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sBSku_Name_Values) + sbSku.Name = &nameTemp } else { sbSku.Name = nil } // Tier if source.Tier != nil { - tier := SBSku_Tier(*source.Tier) - sbSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sBSku_Tier_Values) + sbSku.Tier = &tierTemp } else { sbSku.Tier = nil } @@ -2464,16 +2470,18 @@ func (sbSku *SBSku_STATUS) AssignProperties_From_SBSku_STATUS(source *v20211101s // Name if source.Name != nil { - name := SBSku_Name_STATUS(*source.Name) - sbSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sBSku_Name_STATUS_Values) + sbSku.Name = &nameTemp } else { sbSku.Name = nil } // Tier if source.Tier != nil { - tier := SBSku_Tier_STATUS(*source.Tier) - sbSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sBSku_Tier_STATUS_Values) + sbSku.Tier = &tierTemp } else { sbSku.Tier = nil } @@ -2603,8 +2611,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -2617,8 +2626,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -2676,10 +2686,20 @@ type Encryption_KeySource string const Encryption_KeySource_MicrosoftKeyVault = Encryption_KeySource("Microsoft.KeyVault") +// Mapping from string to Encryption_KeySource +var encryption_KeySource_Values = map[string]Encryption_KeySource{ + "microsoft.keyvault": Encryption_KeySource_MicrosoftKeyVault, +} + type Encryption_KeySource_STATUS string const Encryption_KeySource_STATUS_MicrosoftKeyVault = Encryption_KeySource_STATUS("Microsoft.KeyVault") +// Mapping from string to Encryption_KeySource_STATUS +var encryption_KeySource_STATUS_Values = map[string]Encryption_KeySource_STATUS{ + "microsoft.keyvault": Encryption_KeySource_STATUS_MicrosoftKeyVault, +} + // Properties to configure keyVault Properties type KeyVaultProperties struct { Identity *UserAssignedIdentityProperties `json:"identity,omitempty"` diff --git a/v2/api/servicebus/v1api20211101/namespaces_authorization_rule_types_gen.go b/v2/api/servicebus/v1api20211101/namespaces_authorization_rule_types_gen.go index 628da9054d3..21111622a34 100644 --- a/v2/api/servicebus/v1api20211101/namespaces_authorization_rule_types_gen.go +++ b/v2/api/servicebus/v1api20211101/namespaces_authorization_rule_types_gen.go @@ -505,7 +505,7 @@ func (rule *Namespaces_AuthorizationRule_Spec) AssignProperties_From_Namespaces_ for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_AuthorizationRule_Properties_Rights_Spec(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_AuthorizationRule_Properties_Rights_Spec_Values) } rule.Rights = rightList } else { @@ -760,7 +760,7 @@ func (rule *Namespaces_AuthorizationRule_STATUS) AssignProperties_From_Namespace for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_AuthorizationRule_Properties_Rights_STATUS(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_AuthorizationRule_Properties_Rights_STATUS_Values) } rule.Rights = rightList } else { @@ -851,6 +851,13 @@ const ( Namespaces_AuthorizationRule_Properties_Rights_Spec_Send = Namespaces_AuthorizationRule_Properties_Rights_Spec("Send") ) +// Mapping from string to Namespaces_AuthorizationRule_Properties_Rights_Spec +var namespaces_AuthorizationRule_Properties_Rights_Spec_Values = map[string]Namespaces_AuthorizationRule_Properties_Rights_Spec{ + "listen": Namespaces_AuthorizationRule_Properties_Rights_Spec_Listen, + "manage": Namespaces_AuthorizationRule_Properties_Rights_Spec_Manage, + "send": Namespaces_AuthorizationRule_Properties_Rights_Spec_Send, +} + type Namespaces_AuthorizationRule_Properties_Rights_STATUS string const ( @@ -859,6 +866,13 @@ const ( Namespaces_AuthorizationRule_Properties_Rights_STATUS_Send = Namespaces_AuthorizationRule_Properties_Rights_STATUS("Send") ) +// Mapping from string to Namespaces_AuthorizationRule_Properties_Rights_STATUS +var namespaces_AuthorizationRule_Properties_Rights_STATUS_Values = map[string]Namespaces_AuthorizationRule_Properties_Rights_STATUS{ + "listen": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Listen, + "manage": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Manage, + "send": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Send, +} + // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type NamespacesAuthorizationRuleOperatorSpec struct { // Secrets: configures where to place Azure generated secrets. diff --git a/v2/api/servicebus/v1api20211101/namespaces_queue_types_gen.go b/v2/api/servicebus/v1api20211101/namespaces_queue_types_gen.go index 8a86ba457bf..315ca01198b 100644 --- a/v2/api/servicebus/v1api20211101/namespaces_queue_types_gen.go +++ b/v2/api/servicebus/v1api20211101/namespaces_queue_types_gen.go @@ -1504,8 +1504,9 @@ func (queue *Namespaces_Queue_STATUS) AssignProperties_From_Namespaces_Queue_STA // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - queue.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + queue.Status = &statusTemp } else { queue.Status = nil } @@ -1700,6 +1701,19 @@ const ( EntityStatus_STATUS_Unknown = EntityStatus_STATUS("Unknown") ) +// Mapping from string to EntityStatus_STATUS +var entityStatus_STATUS_Values = map[string]EntityStatus_STATUS{ + "active": EntityStatus_STATUS_Active, + "creating": EntityStatus_STATUS_Creating, + "deleting": EntityStatus_STATUS_Deleting, + "disabled": EntityStatus_STATUS_Disabled, + "receivedisabled": EntityStatus_STATUS_ReceiveDisabled, + "renaming": EntityStatus_STATUS_Renaming, + "restoring": EntityStatus_STATUS_Restoring, + "senddisabled": EntityStatus_STATUS_SendDisabled, + "unknown": EntityStatus_STATUS_Unknown, +} + // Message Count Details. type MessageCountDetails_STATUS struct { // ActiveMessageCount: Number of active messages in the queue, topic, or subscription. diff --git a/v2/api/servicebus/v1api20211101/namespaces_topic_types_gen.go b/v2/api/servicebus/v1api20211101/namespaces_topic_types_gen.go index 913bc44c141..ab1292affdd 100644 --- a/v2/api/servicebus/v1api20211101/namespaces_topic_types_gen.go +++ b/v2/api/servicebus/v1api20211101/namespaces_topic_types_gen.go @@ -1262,8 +1262,9 @@ func (topic *Namespaces_Topic_STATUS) AssignProperties_From_Namespaces_Topic_STA // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - topic.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + topic.Status = &statusTemp } else { topic.Status = nil } diff --git a/v2/api/servicebus/v1api20211101/namespaces_topics_subscription_types_gen.go b/v2/api/servicebus/v1api20211101/namespaces_topics_subscription_types_gen.go index 80bddf3f856..c49695439af 100644 --- a/v2/api/servicebus/v1api20211101/namespaces_topics_subscription_types_gen.go +++ b/v2/api/servicebus/v1api20211101/namespaces_topics_subscription_types_gen.go @@ -1432,8 +1432,9 @@ func (subscription *Namespaces_Topics_Subscription_STATUS) AssignProperties_From // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - subscription.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + subscription.Status = &statusTemp } else { subscription.Status = nil } diff --git a/v2/api/servicebus/v1api20211101/namespaces_topics_subscriptions_rule_types_gen.go b/v2/api/servicebus/v1api20211101/namespaces_topics_subscriptions_rule_types_gen.go index 68d85879187..4fe75ad75a1 100644 --- a/v2/api/servicebus/v1api20211101/namespaces_topics_subscriptions_rule_types_gen.go +++ b/v2/api/servicebus/v1api20211101/namespaces_topics_subscriptions_rule_types_gen.go @@ -559,8 +559,9 @@ func (rule *Namespaces_Topics_Subscriptions_Rule_Spec) AssignProperties_From_Nam // FilterType if source.FilterType != nil { - filterType := FilterType(*source.FilterType) - rule.FilterType = &filterType + filterType := *source.FilterType + filterTypeTemp := genruntime.ToEnum(filterType, filterType_Values) + rule.FilterType = &filterTypeTemp } else { rule.FilterType = nil } @@ -946,8 +947,9 @@ func (rule *Namespaces_Topics_Subscriptions_Rule_STATUS) AssignProperties_From_N // FilterType if source.FilterType != nil { - filterType := FilterType_STATUS(*source.FilterType) - rule.FilterType = &filterType + filterType := *source.FilterType + filterTypeTemp := genruntime.ToEnum(filterType, filterType_STATUS_Values) + rule.FilterType = &filterTypeTemp } else { rule.FilterType = nil } @@ -1863,6 +1865,12 @@ const ( FilterType_SqlFilter = FilterType("SqlFilter") ) +// Mapping from string to FilterType +var filterType_Values = map[string]FilterType{ + "correlationfilter": FilterType_CorrelationFilter, + "sqlfilter": FilterType_SqlFilter, +} + // Rule filter types type FilterType_STATUS string @@ -1871,6 +1879,12 @@ const ( FilterType_STATUS_SqlFilter = FilterType_STATUS("SqlFilter") ) +// Mapping from string to FilterType_STATUS +var filterType_STATUS_Values = map[string]FilterType_STATUS{ + "correlationfilter": FilterType_STATUS_CorrelationFilter, + "sqlfilter": FilterType_STATUS_SqlFilter, +} + // Represents a filter which is a composition of an expression and an action that is executed in the pub/sub pipeline. type SqlFilter struct { // CompatibilityLevel: This property is reserved for future use. An integer value showing the compatibility level, diff --git a/v2/api/servicebus/v1api20221001preview/namespace_spec_arm_types_gen.go b/v2/api/servicebus/v1api20221001preview/namespace_spec_arm_types_gen.go index fd1fc3c3634..6b1152108bf 100644 --- a/v2/api/servicebus/v1api20221001preview/namespace_spec_arm_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/namespace_spec_arm_types_gen.go @@ -109,6 +109,14 @@ const ( Identity_Type_UserAssigned = Identity_Type("UserAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "systemassigned, userassigned": Identity_Type_SystemAssignedUserAssigned, + "userassigned": Identity_Type_UserAssigned, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type SBSku_Name string @@ -118,6 +126,13 @@ const ( SBSku_Name_Standard = SBSku_Name("Standard") ) +// Mapping from string to SBSku_Name +var sBSku_Name_Values = map[string]SBSku_Name{ + "basic": SBSku_Name_Basic, + "premium": SBSku_Name_Premium, + "standard": SBSku_Name_Standard, +} + // +kubebuilder:validation:Enum={"Basic","Premium","Standard"} type SBSku_Tier string @@ -127,6 +142,13 @@ const ( SBSku_Tier_Standard = SBSku_Tier("Standard") ) +// Mapping from string to SBSku_Tier +var sBSku_Tier_Values = map[string]SBSku_Tier{ + "basic": SBSku_Tier_Basic, + "premium": SBSku_Tier_Premium, + "standard": SBSku_Tier_Standard, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/servicebus/v1api20221001preview/namespace_status_arm_types_gen.go b/v2/api/servicebus/v1api20221001preview/namespace_status_arm_types_gen.go index 9ea70821a2e..f7575d80040 100644 --- a/v2/api/servicebus/v1api20221001preview/namespace_status_arm_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/namespace_status_arm_types_gen.go @@ -150,6 +150,14 @@ const ( Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + // Properties of the PrivateEndpointConnection. type PrivateEndpointConnection_STATUS_ARM struct { // Id: Fully qualified resource ID for the resource. Ex - @@ -165,6 +173,13 @@ const ( SBSku_Name_STATUS_Standard = SBSku_Name_STATUS("Standard") ) +// Mapping from string to SBSku_Name_STATUS +var sBSku_Name_STATUS_Values = map[string]SBSku_Name_STATUS{ + "basic": SBSku_Name_STATUS_Basic, + "premium": SBSku_Name_STATUS_Premium, + "standard": SBSku_Name_STATUS_Standard, +} + type SBSku_Tier_STATUS string const ( @@ -173,6 +188,13 @@ const ( SBSku_Tier_STATUS_Standard = SBSku_Tier_STATUS("Standard") ) +// Mapping from string to SBSku_Tier_STATUS +var sBSku_Tier_STATUS_Values = map[string]SBSku_Tier_STATUS{ + "basic": SBSku_Tier_STATUS_Basic, + "premium": SBSku_Tier_STATUS_Premium, + "standard": SBSku_Tier_STATUS_Standard, +} + type SystemData_CreatedByType_STATUS string const ( @@ -182,6 +204,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -191,6 +221,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Recognized Dictionary value. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: Client Id of user assigned identity diff --git a/v2/api/servicebus/v1api20221001preview/namespace_types_gen.go b/v2/api/servicebus/v1api20221001preview/namespace_types_gen.go index 3385e4d8c7b..d5e247a4172 100644 --- a/v2/api/servicebus/v1api20221001preview/namespace_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/namespace_types_gen.go @@ -722,8 +722,9 @@ func (namespace *Namespace_Spec) AssignProperties_From_Namespace_Spec(source *v2 // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := SBNamespaceProperties_MinimumTlsVersion(*source.MinimumTlsVersion) - namespace.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, sBNamespaceProperties_MinimumTlsVersion_Values) + namespace.MinimumTlsVersion = &minimumTlsVersionTemp } else { namespace.MinimumTlsVersion = nil } @@ -753,8 +754,9 @@ func (namespace *Namespace_Spec) AssignProperties_From_Namespace_Spec(source *v2 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := SBNamespaceProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - namespace.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, sBNamespaceProperties_PublicNetworkAccess_Values) + namespace.PublicNetworkAccess = &publicNetworkAccessTemp } else { namespace.PublicNetworkAccess = nil } @@ -1313,8 +1315,9 @@ func (namespace *Namespace_STATUS) AssignProperties_From_Namespace_STATUS(source // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := SBNamespaceProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - namespace.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, sBNamespaceProperties_MinimumTlsVersion_STATUS_Values) + namespace.MinimumTlsVersion = &minimumTlsVersionTemp } else { namespace.MinimumTlsVersion = nil } @@ -1348,8 +1351,9 @@ func (namespace *Namespace_STATUS) AssignProperties_From_Namespace_STATUS(source // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := SBNamespaceProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - namespace.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, sBNamespaceProperties_PublicNetworkAccess_STATUS_Values) + namespace.PublicNetworkAccess = &publicNetworkAccessTemp } else { namespace.PublicNetworkAccess = nil } @@ -1648,8 +1652,9 @@ func (encryption *Encryption) AssignProperties_From_Encryption(source *v20221001 // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -1791,8 +1796,9 @@ func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(sou // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource_STATUS(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_STATUS_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -1943,8 +1949,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20221001ps.Ide // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2088,8 +2095,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2286,6 +2294,13 @@ const ( SBNamespaceProperties_MinimumTlsVersion_12 = SBNamespaceProperties_MinimumTlsVersion("1.2") ) +// Mapping from string to SBNamespaceProperties_MinimumTlsVersion +var sBNamespaceProperties_MinimumTlsVersion_Values = map[string]SBNamespaceProperties_MinimumTlsVersion{ + "1.0": SBNamespaceProperties_MinimumTlsVersion_10, + "1.1": SBNamespaceProperties_MinimumTlsVersion_11, + "1.2": SBNamespaceProperties_MinimumTlsVersion_12, +} + type SBNamespaceProperties_MinimumTlsVersion_STATUS string const ( @@ -2294,6 +2309,13 @@ const ( SBNamespaceProperties_MinimumTlsVersion_STATUS_12 = SBNamespaceProperties_MinimumTlsVersion_STATUS("1.2") ) +// Mapping from string to SBNamespaceProperties_MinimumTlsVersion_STATUS +var sBNamespaceProperties_MinimumTlsVersion_STATUS_Values = map[string]SBNamespaceProperties_MinimumTlsVersion_STATUS{ + "1.0": SBNamespaceProperties_MinimumTlsVersion_STATUS_10, + "1.1": SBNamespaceProperties_MinimumTlsVersion_STATUS_11, + "1.2": SBNamespaceProperties_MinimumTlsVersion_STATUS_12, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled","SecuredByPerimeter"} type SBNamespaceProperties_PublicNetworkAccess string @@ -2303,6 +2325,13 @@ const ( SBNamespaceProperties_PublicNetworkAccess_SecuredByPerimeter = SBNamespaceProperties_PublicNetworkAccess("SecuredByPerimeter") ) +// Mapping from string to SBNamespaceProperties_PublicNetworkAccess +var sBNamespaceProperties_PublicNetworkAccess_Values = map[string]SBNamespaceProperties_PublicNetworkAccess{ + "disabled": SBNamespaceProperties_PublicNetworkAccess_Disabled, + "enabled": SBNamespaceProperties_PublicNetworkAccess_Enabled, + "securedbyperimeter": SBNamespaceProperties_PublicNetworkAccess_SecuredByPerimeter, +} + type SBNamespaceProperties_PublicNetworkAccess_STATUS string const ( @@ -2311,6 +2340,13 @@ const ( SBNamespaceProperties_PublicNetworkAccess_STATUS_SecuredByPerimeter = SBNamespaceProperties_PublicNetworkAccess_STATUS("SecuredByPerimeter") ) +// Mapping from string to SBNamespaceProperties_PublicNetworkAccess_STATUS +var sBNamespaceProperties_PublicNetworkAccess_STATUS_Values = map[string]SBNamespaceProperties_PublicNetworkAccess_STATUS{ + "disabled": SBNamespaceProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": SBNamespaceProperties_PublicNetworkAccess_STATUS_Enabled, + "securedbyperimeter": SBNamespaceProperties_PublicNetworkAccess_STATUS_SecuredByPerimeter, +} + // SKU of the namespace. type SBSku struct { // Capacity: Messaging units for your service bus premium namespace. Valid capacities are {1, 2, 4, 8, 16} multiples of @@ -2398,16 +2434,18 @@ func (sbSku *SBSku) AssignProperties_From_SBSku(source *v20221001ps.SBSku) error // Name if source.Name != nil { - name := SBSku_Name(*source.Name) - sbSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sBSku_Name_Values) + sbSku.Name = &nameTemp } else { sbSku.Name = nil } // Tier if source.Tier != nil { - tier := SBSku_Tier(*source.Tier) - sbSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sBSku_Tier_Values) + sbSku.Tier = &tierTemp } else { sbSku.Tier = nil } @@ -2510,16 +2548,18 @@ func (sbSku *SBSku_STATUS) AssignProperties_From_SBSku_STATUS(source *v20221001p // Name if source.Name != nil { - name := SBSku_Name_STATUS(*source.Name) - sbSku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, sBSku_Name_STATUS_Values) + sbSku.Name = &nameTemp } else { sbSku.Name = nil } // Tier if source.Tier != nil { - tier := SBSku_Tier_STATUS(*source.Tier) - sbSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, sBSku_Tier_STATUS_Values) + sbSku.Tier = &tierTemp } else { sbSku.Tier = nil } @@ -2649,8 +2689,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -2663,8 +2704,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -2722,10 +2764,20 @@ type Encryption_KeySource string const Encryption_KeySource_MicrosoftKeyVault = Encryption_KeySource("Microsoft.KeyVault") +// Mapping from string to Encryption_KeySource +var encryption_KeySource_Values = map[string]Encryption_KeySource{ + "microsoft.keyvault": Encryption_KeySource_MicrosoftKeyVault, +} + type Encryption_KeySource_STATUS string const Encryption_KeySource_STATUS_MicrosoftKeyVault = Encryption_KeySource_STATUS("Microsoft.KeyVault") +// Mapping from string to Encryption_KeySource_STATUS +var encryption_KeySource_STATUS_Values = map[string]Encryption_KeySource_STATUS{ + "microsoft.keyvault": Encryption_KeySource_STATUS_MicrosoftKeyVault, +} + // Properties to configure keyVault Properties type KeyVaultProperties struct { Identity *UserAssignedIdentityProperties `json:"identity,omitempty"` diff --git a/v2/api/servicebus/v1api20221001preview/namespaces_authorization_rule_types_gen.go b/v2/api/servicebus/v1api20221001preview/namespaces_authorization_rule_types_gen.go index ee4d09b8fe5..a1c7be3157d 100644 --- a/v2/api/servicebus/v1api20221001preview/namespaces_authorization_rule_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/namespaces_authorization_rule_types_gen.go @@ -508,7 +508,7 @@ func (rule *Namespaces_AuthorizationRule_Spec) AssignProperties_From_Namespaces_ for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_AuthorizationRule_Properties_Rights_Spec(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_AuthorizationRule_Properties_Rights_Spec_Values) } rule.Rights = rightList } else { @@ -742,7 +742,7 @@ func (rule *Namespaces_AuthorizationRule_STATUS) AssignProperties_From_Namespace for rightIndex, rightItem := range source.Rights { // Shadow the loop variable to avoid aliasing rightItem := rightItem - rightList[rightIndex] = Namespaces_AuthorizationRule_Properties_Rights_STATUS(rightItem) + rightList[rightIndex] = genruntime.ToEnum(rightItem, namespaces_AuthorizationRule_Properties_Rights_STATUS_Values) } rule.Rights = rightList } else { @@ -833,6 +833,13 @@ const ( Namespaces_AuthorizationRule_Properties_Rights_Spec_Send = Namespaces_AuthorizationRule_Properties_Rights_Spec("Send") ) +// Mapping from string to Namespaces_AuthorizationRule_Properties_Rights_Spec +var namespaces_AuthorizationRule_Properties_Rights_Spec_Values = map[string]Namespaces_AuthorizationRule_Properties_Rights_Spec{ + "listen": Namespaces_AuthorizationRule_Properties_Rights_Spec_Listen, + "manage": Namespaces_AuthorizationRule_Properties_Rights_Spec_Manage, + "send": Namespaces_AuthorizationRule_Properties_Rights_Spec_Send, +} + type Namespaces_AuthorizationRule_Properties_Rights_STATUS string const ( @@ -841,6 +848,13 @@ const ( Namespaces_AuthorizationRule_Properties_Rights_STATUS_Send = Namespaces_AuthorizationRule_Properties_Rights_STATUS("Send") ) +// Mapping from string to Namespaces_AuthorizationRule_Properties_Rights_STATUS +var namespaces_AuthorizationRule_Properties_Rights_STATUS_Values = map[string]Namespaces_AuthorizationRule_Properties_Rights_STATUS{ + "listen": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Listen, + "manage": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Manage, + "send": Namespaces_AuthorizationRule_Properties_Rights_STATUS_Send, +} + // Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure type NamespacesAuthorizationRuleOperatorSpec struct { // Secrets: configures where to place Azure generated secrets. diff --git a/v2/api/servicebus/v1api20221001preview/namespaces_queue_types_gen.go b/v2/api/servicebus/v1api20221001preview/namespaces_queue_types_gen.go index b16acd26200..773c9859e88 100644 --- a/v2/api/servicebus/v1api20221001preview/namespaces_queue_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/namespaces_queue_types_gen.go @@ -1425,8 +1425,9 @@ func (queue *Namespaces_Queue_STATUS) AssignProperties_From_Namespaces_Queue_STA // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - queue.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + queue.Status = &statusTemp } else { queue.Status = nil } @@ -1621,6 +1622,19 @@ const ( EntityStatus_STATUS_Unknown = EntityStatus_STATUS("Unknown") ) +// Mapping from string to EntityStatus_STATUS +var entityStatus_STATUS_Values = map[string]EntityStatus_STATUS{ + "active": EntityStatus_STATUS_Active, + "creating": EntityStatus_STATUS_Creating, + "deleting": EntityStatus_STATUS_Deleting, + "disabled": EntityStatus_STATUS_Disabled, + "receivedisabled": EntityStatus_STATUS_ReceiveDisabled, + "renaming": EntityStatus_STATUS_Renaming, + "restoring": EntityStatus_STATUS_Restoring, + "senddisabled": EntityStatus_STATUS_SendDisabled, + "unknown": EntityStatus_STATUS_Unknown, +} + // Message Count Details. type MessageCountDetails_STATUS struct { // ActiveMessageCount: Number of active messages in the queue, topic, or subscription. diff --git a/v2/api/servicebus/v1api20221001preview/namespaces_topic_types_gen.go b/v2/api/servicebus/v1api20221001preview/namespaces_topic_types_gen.go index c310a1c596c..2aa491ac176 100644 --- a/v2/api/servicebus/v1api20221001preview/namespaces_topic_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/namespaces_topic_types_gen.go @@ -1203,8 +1203,9 @@ func (topic *Namespaces_Topic_STATUS) AssignProperties_From_Namespaces_Topic_STA // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - topic.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + topic.Status = &statusTemp } else { topic.Status = nil } diff --git a/v2/api/servicebus/v1api20221001preview/namespaces_topics_subscription_types_gen.go b/v2/api/servicebus/v1api20221001preview/namespaces_topics_subscription_types_gen.go index 7b59b4427eb..c5058ffc8b4 100644 --- a/v2/api/servicebus/v1api20221001preview/namespaces_topics_subscription_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/namespaces_topics_subscription_types_gen.go @@ -1355,8 +1355,9 @@ func (subscription *Namespaces_Topics_Subscription_STATUS) AssignProperties_From // Status if source.Status != nil { - status := EntityStatus_STATUS(*source.Status) - subscription.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, entityStatus_STATUS_Values) + subscription.Status = &statusTemp } else { subscription.Status = nil } diff --git a/v2/api/servicebus/v1api20221001preview/namespaces_topics_subscriptions_rule_types_gen.go b/v2/api/servicebus/v1api20221001preview/namespaces_topics_subscriptions_rule_types_gen.go index 7f147470e97..9e63110c9e1 100644 --- a/v2/api/servicebus/v1api20221001preview/namespaces_topics_subscriptions_rule_types_gen.go +++ b/v2/api/servicebus/v1api20221001preview/namespaces_topics_subscriptions_rule_types_gen.go @@ -562,8 +562,9 @@ func (rule *Namespaces_Topics_Subscriptions_Rule_Spec) AssignProperties_From_Nam // FilterType if source.FilterType != nil { - filterType := FilterType(*source.FilterType) - rule.FilterType = &filterType + filterType := *source.FilterType + filterTypeTemp := genruntime.ToEnum(filterType, filterType_Values) + rule.FilterType = &filterTypeTemp } else { rule.FilterType = nil } @@ -898,8 +899,9 @@ func (rule *Namespaces_Topics_Subscriptions_Rule_STATUS) AssignProperties_From_N // FilterType if source.FilterType != nil { - filterType := FilterType_STATUS(*source.FilterType) - rule.FilterType = &filterType + filterType := *source.FilterType + filterTypeTemp := genruntime.ToEnum(filterType, filterType_STATUS_Values) + rule.FilterType = &filterTypeTemp } else { rule.FilterType = nil } @@ -1752,6 +1754,12 @@ const ( FilterType_SqlFilter = FilterType("SqlFilter") ) +// Mapping from string to FilterType +var filterType_Values = map[string]FilterType{ + "correlationfilter": FilterType_CorrelationFilter, + "sqlfilter": FilterType_SqlFilter, +} + // Rule filter types type FilterType_STATUS string @@ -1760,6 +1768,12 @@ const ( FilterType_STATUS_SqlFilter = FilterType_STATUS("SqlFilter") ) +// Mapping from string to FilterType_STATUS +var filterType_STATUS_Values = map[string]FilterType_STATUS{ + "correlationfilter": FilterType_STATUS_CorrelationFilter, + "sqlfilter": FilterType_STATUS_SqlFilter, +} + // Represents a filter which is a composition of an expression and an action that is executed in the pub/sub pipeline. type SqlFilter struct { // CompatibilityLevel: This property is reserved for future use. An integer value showing the compatibility level, diff --git a/v2/api/signalrservice/v1api20211001/signal_r_spec_arm_types_gen.go b/v2/api/signalrservice/v1api20211001/signal_r_spec_arm_types_gen.go index 5bd3db680cb..f3cc303eb27 100644 --- a/v2/api/signalrservice/v1api20211001/signal_r_spec_arm_types_gen.go +++ b/v2/api/signalrservice/v1api20211001/signal_r_spec_arm_types_gen.go @@ -76,6 +76,12 @@ const ( ServiceKind_SignalR = ServiceKind("SignalR") ) +// Mapping from string to ServiceKind +var serviceKind_Values = map[string]ServiceKind{ + "rawwebsockets": ServiceKind_RawWebSockets, + "signalr": ServiceKind_SignalR, +} + // A class that describes the properties of the resource type SignalRProperties_ARM struct { // Cors: Cross-Origin Resource Sharing (CORS) settings. @@ -126,6 +132,13 @@ const ( ManagedIdentityType_UserAssigned = ManagedIdentityType("UserAssigned") ) +// Mapping from string to ManagedIdentityType +var managedIdentityType_Values = map[string]ManagedIdentityType{ + "none": ManagedIdentityType_None, + "systemassigned": ManagedIdentityType_SystemAssigned, + "userassigned": ManagedIdentityType_UserAssigned, +} + // Resource log configuration of a Microsoft.SignalRService resource. type ResourceLogConfiguration_ARM struct { // Categories: Gets or sets the list of category configurations. @@ -191,6 +204,14 @@ const ( SignalRSkuTier_Standard = SignalRSkuTier("Standard") ) +// Mapping from string to SignalRSkuTier +var signalRSkuTier_Values = map[string]SignalRSkuTier{ + "basic": SignalRSkuTier_Basic, + "free": SignalRSkuTier_Free, + "premium": SignalRSkuTier_Premium, + "standard": SignalRSkuTier_Standard, +} + // TLS settings for the resource type SignalRTlsSettings_ARM struct { // ClientCertEnabled: Request client certificate during TLS handshake if enabled diff --git a/v2/api/signalrservice/v1api20211001/signal_r_status_arm_types_gen.go b/v2/api/signalrservice/v1api20211001/signal_r_status_arm_types_gen.go index 87dda176f97..594a57c5a80 100644 --- a/v2/api/signalrservice/v1api20211001/signal_r_status_arm_types_gen.go +++ b/v2/api/signalrservice/v1api20211001/signal_r_status_arm_types_gen.go @@ -83,6 +83,12 @@ const ( ServiceKind_STATUS_SignalR = ServiceKind_STATUS("SignalR") ) +// Mapping from string to ServiceKind_STATUS +var serviceKind_STATUS_Values = map[string]ServiceKind_STATUS{ + "rawwebsockets": ServiceKind_STATUS_RawWebSockets, + "signalr": ServiceKind_STATUS_SignalR, +} + // A class that describes the properties of the resource type SignalRProperties_STATUS_ARM struct { // Cors: Cross-Origin Resource Sharing (CORS) settings. @@ -180,6 +186,13 @@ const ( ManagedIdentityType_STATUS_UserAssigned = ManagedIdentityType_STATUS("UserAssigned") ) +// Mapping from string to ManagedIdentityType_STATUS +var managedIdentityType_STATUS_Values = map[string]ManagedIdentityType_STATUS{ + "none": ManagedIdentityType_STATUS_None, + "systemassigned": ManagedIdentityType_STATUS_SystemAssigned, + "userassigned": ManagedIdentityType_STATUS_UserAssigned, +} + // A private endpoint connection to an azure resource type PrivateEndpointConnection_STATUS_SignalR_SubResourceEmbedded_ARM struct { // Id: Fully qualified resource Id for the resource. @@ -256,6 +269,14 @@ const ( SignalRSkuTier_STATUS_Standard = SignalRSkuTier_STATUS("Standard") ) +// Mapping from string to SignalRSkuTier_STATUS +var signalRSkuTier_STATUS_Values = map[string]SignalRSkuTier_STATUS{ + "basic": SignalRSkuTier_STATUS_Basic, + "free": SignalRSkuTier_STATUS_Free, + "premium": SignalRSkuTier_STATUS_Premium, + "standard": SignalRSkuTier_STATUS_Standard, +} + // TLS settings for the resource type SignalRTlsSettings_STATUS_ARM struct { // ClientCertEnabled: Request client certificate during TLS handshake if enabled @@ -271,6 +292,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -280,6 +309,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // Properties of user assigned identity. type UserAssignedIdentityProperty_STATUS_ARM struct { // ClientId: Get the client id for the user assigned identity diff --git a/v2/api/signalrservice/v1api20211001/signal_r_types_gen.go b/v2/api/signalrservice/v1api20211001/signal_r_types_gen.go index ecc7303e17f..2f28813873f 100644 --- a/v2/api/signalrservice/v1api20211001/signal_r_types_gen.go +++ b/v2/api/signalrservice/v1api20211001/signal_r_types_gen.go @@ -838,8 +838,9 @@ func (signalR *SignalR_Spec) AssignProperties_From_SignalR_Spec(source *v2021100 // Kind if source.Kind != nil { - kind := ServiceKind(*source.Kind) - signalR.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, serviceKind_Values) + signalR.Kind = &kindTemp } else { signalR.Kind = nil } @@ -1778,8 +1779,9 @@ func (signalR *SignalR_STATUS) AssignProperties_From_SignalR_STATUS(source *v202 // Kind if source.Kind != nil { - kind := ServiceKind_STATUS(*source.Kind) - signalR.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, serviceKind_STATUS_Values) + signalR.Kind = &kindTemp } else { signalR.Kind = nil } @@ -1822,8 +1824,9 @@ func (signalR *SignalR_STATUS) AssignProperties_From_SignalR_STATUS(source *v202 // ProvisioningState if source.ProvisioningState != nil { - provisioningState := ProvisioningState_STATUS(*source.ProvisioningState) - signalR.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, provisioningState_STATUS_Values) + signalR.ProvisioningState = &provisioningStateTemp } else { signalR.ProvisioningState = nil } @@ -2231,8 +2234,9 @@ func (identity *ManagedIdentity) AssignProperties_From_ManagedIdentity(source *v // Type if source.Type != nil { - typeVar := ManagedIdentityType(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedIdentityType_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2405,8 +2409,9 @@ func (identity *ManagedIdentity_STATUS) AssignProperties_From_ManagedIdentity_ST // Type if source.Type != nil { - typeVar := ManagedIdentityType_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedIdentityType_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2555,6 +2560,19 @@ const ( ProvisioningState_STATUS_Updating = ProvisioningState_STATUS("Updating") ) +// Mapping from string to ProvisioningState_STATUS +var provisioningState_STATUS_Values = map[string]ProvisioningState_STATUS{ + "canceled": ProvisioningState_STATUS_Canceled, + "creating": ProvisioningState_STATUS_Creating, + "deleting": ProvisioningState_STATUS_Deleting, + "failed": ProvisioningState_STATUS_Failed, + "moving": ProvisioningState_STATUS_Moving, + "running": ProvisioningState_STATUS_Running, + "succeeded": ProvisioningState_STATUS_Succeeded, + "unknown": ProvisioningState_STATUS_Unknown, + "updating": ProvisioningState_STATUS_Updating, +} + // Resource log configuration of a Microsoft.SignalRService resource. type ResourceLogConfiguration struct { // Categories: Gets or sets the list of category configurations. @@ -2876,8 +2894,9 @@ func (resourceSku *ResourceSku) AssignProperties_From_ResourceSku(source *v20211 // Tier if source.Tier != nil { - tier := SignalRSkuTier(*source.Tier) - resourceSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, signalRSkuTier_Values) + resourceSku.Tier = &tierTemp } else { resourceSku.Tier = nil } @@ -3025,8 +3044,9 @@ func (resourceSku *ResourceSku_STATUS) AssignProperties_From_ResourceSku_STATUS( // Tier if source.Tier != nil { - tier := SignalRSkuTier_STATUS(*source.Tier) - resourceSku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, signalRSkuTier_STATUS_Values) + resourceSku.Tier = &tierTemp } else { resourceSku.Tier = nil } @@ -3599,8 +3619,9 @@ func (feature *SignalRFeature) AssignProperties_From_SignalRFeature(source *v202 // Flag if source.Flag != nil { - flag := FeatureFlags(*source.Flag) - feature.Flag = &flag + flag := *source.Flag + flagTemp := genruntime.ToEnum(flag, featureFlags_Values) + feature.Flag = &flagTemp } else { feature.Flag = nil } @@ -3746,8 +3767,9 @@ func (feature *SignalRFeature_STATUS) AssignProperties_From_SignalRFeature_STATU // Flag if source.Flag != nil { - flag := FeatureFlags_STATUS(*source.Flag) - feature.Flag = &flag + flag := *source.Flag + flagTemp := genruntime.ToEnum(flag, featureFlags_STATUS_Values) + feature.Flag = &flagTemp } else { feature.Flag = nil } @@ -3888,8 +3910,9 @@ func (acLs *SignalRNetworkACLs) AssignProperties_From_SignalRNetworkACLs(source // DefaultAction if source.DefaultAction != nil { - defaultAction := ACLAction(*source.DefaultAction) - acLs.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, aCLAction_Values) + acLs.DefaultAction = &defaultActionTemp } else { acLs.DefaultAction = nil } @@ -4089,8 +4112,9 @@ func (acLs *SignalRNetworkACLs_STATUS) AssignProperties_From_SignalRNetworkACLs_ // DefaultAction if source.DefaultAction != nil { - defaultAction := ACLAction_STATUS(*source.DefaultAction) - acLs.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, aCLAction_STATUS_Values) + acLs.DefaultAction = &defaultActionTemp } else { acLs.DefaultAction = nil } @@ -4490,8 +4514,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -4504,8 +4529,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } @@ -4567,6 +4593,12 @@ const ( ACLAction_Deny = ACLAction("Deny") ) +// Mapping from string to ACLAction +var aCLAction_Values = map[string]ACLAction{ + "allow": ACLAction_Allow, + "deny": ACLAction_Deny, +} + // Azure Networking ACL Action. type ACLAction_STATUS string @@ -4575,6 +4607,12 @@ const ( ACLAction_STATUS_Deny = ACLAction_STATUS("Deny") ) +// Mapping from string to ACLAction_STATUS +var aCLAction_STATUS_Values = map[string]ACLAction_STATUS{ + "allow": ACLAction_STATUS_Allow, + "deny": ACLAction_STATUS_Deny, +} + // FeatureFlags is the supported features of Azure SignalR service. // - ServiceMode: Flag for backend server for SignalR // service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend @@ -4598,6 +4636,14 @@ const ( FeatureFlags_ServiceMode = FeatureFlags("ServiceMode") ) +// Mapping from string to FeatureFlags +var featureFlags_Values = map[string]FeatureFlags{ + "enableconnectivitylogs": FeatureFlags_EnableConnectivityLogs, + "enablelivetrace": FeatureFlags_EnableLiveTrace, + "enablemessaginglogs": FeatureFlags_EnableMessagingLogs, + "servicemode": FeatureFlags_ServiceMode, +} + // FeatureFlags is the supported features of Azure SignalR service. // - ServiceMode: Flag for backend server for SignalR // service. Values allowed: "Default": have your own backend server; "Serverless": your application doesn't have a backend @@ -4620,6 +4666,14 @@ const ( FeatureFlags_STATUS_ServiceMode = FeatureFlags_STATUS("ServiceMode") ) +// Mapping from string to FeatureFlags_STATUS +var featureFlags_STATUS_Values = map[string]FeatureFlags_STATUS{ + "enableconnectivitylogs": FeatureFlags_STATUS_EnableConnectivityLogs, + "enablelivetrace": FeatureFlags_STATUS_EnableLiveTrace, + "enablemessaginglogs": FeatureFlags_STATUS_EnableMessagingLogs, + "servicemode": FeatureFlags_STATUS_ServiceMode, +} + // Network ACL type NetworkACL struct { // Allow: Allowed request types. The value can be one or more of: ClientConnection, ServerConnection, RESTAPI. @@ -4685,7 +4739,7 @@ func (networkACL *NetworkACL) AssignProperties_From_NetworkACL(source *v20211001 for allowIndex, allowItem := range source.Allow { // Shadow the loop variable to avoid aliasing allowItem := allowItem - allowList[allowIndex] = SignalRRequestType(allowItem) + allowList[allowIndex] = genruntime.ToEnum(allowItem, signalRRequestType_Values) } networkACL.Allow = allowList } else { @@ -4698,7 +4752,7 @@ func (networkACL *NetworkACL) AssignProperties_From_NetworkACL(source *v20211001 for denyIndex, denyItem := range source.Deny { // Shadow the loop variable to avoid aliasing denyItem := denyItem - denyList[denyIndex] = SignalRRequestType(denyItem) + denyList[denyIndex] = genruntime.ToEnum(denyItem, signalRRequestType_Values) } networkACL.Deny = denyList } else { @@ -4832,7 +4886,7 @@ func (networkACL *NetworkACL_STATUS) AssignProperties_From_NetworkACL_STATUS(sou for allowIndex, allowItem := range source.Allow { // Shadow the loop variable to avoid aliasing allowItem := allowItem - allowList[allowIndex] = SignalRRequestType_STATUS(allowItem) + allowList[allowIndex] = genruntime.ToEnum(allowItem, signalRRequestType_STATUS_Values) } networkACL.Allow = allowList } else { @@ -4845,7 +4899,7 @@ func (networkACL *NetworkACL_STATUS) AssignProperties_From_NetworkACL_STATUS(sou for denyIndex, denyItem := range source.Deny { // Shadow the loop variable to avoid aliasing denyItem := denyItem - denyList[denyIndex] = SignalRRequestType_STATUS(denyItem) + denyList[denyIndex] = genruntime.ToEnum(denyItem, signalRRequestType_STATUS_Values) } networkACL.Deny = denyList } else { @@ -4979,7 +5033,7 @@ func (endpointACL *PrivateEndpointACL) AssignProperties_From_PrivateEndpointACL( for allowIndex, allowItem := range source.Allow { // Shadow the loop variable to avoid aliasing allowItem := allowItem - allowList[allowIndex] = SignalRRequestType(allowItem) + allowList[allowIndex] = genruntime.ToEnum(allowItem, signalRRequestType_Values) } endpointACL.Allow = allowList } else { @@ -4992,7 +5046,7 @@ func (endpointACL *PrivateEndpointACL) AssignProperties_From_PrivateEndpointACL( for denyIndex, denyItem := range source.Deny { // Shadow the loop variable to avoid aliasing denyItem := denyItem - denyList[denyIndex] = SignalRRequestType(denyItem) + denyList[denyIndex] = genruntime.ToEnum(denyItem, signalRRequestType_Values) } endpointACL.Deny = denyList } else { @@ -5144,7 +5198,7 @@ func (endpointACL *PrivateEndpointACL_STATUS) AssignProperties_From_PrivateEndpo for allowIndex, allowItem := range source.Allow { // Shadow the loop variable to avoid aliasing allowItem := allowItem - allowList[allowIndex] = SignalRRequestType_STATUS(allowItem) + allowList[allowIndex] = genruntime.ToEnum(allowItem, signalRRequestType_STATUS_Values) } endpointACL.Allow = allowList } else { @@ -5157,7 +5211,7 @@ func (endpointACL *PrivateEndpointACL_STATUS) AssignProperties_From_PrivateEndpo for denyIndex, denyItem := range source.Deny { // Shadow the loop variable to avoid aliasing denyItem := denyItem - denyList[denyIndex] = SignalRRequestType_STATUS(denyItem) + denyList[denyIndex] = genruntime.ToEnum(denyItem, signalRRequestType_STATUS_Values) } endpointACL.Deny = denyList } else { @@ -6025,6 +6079,14 @@ const ( SignalRRequestType_Trace = SignalRRequestType("Trace") ) +// Mapping from string to SignalRRequestType +var signalRRequestType_Values = map[string]SignalRRequestType{ + "clientconnection": SignalRRequestType_ClientConnection, + "restapi": SignalRRequestType_RESTAPI, + "serverconnection": SignalRRequestType_ServerConnection, + "trace": SignalRRequestType_Trace, +} + // The incoming request type to the service type SignalRRequestType_STATUS string @@ -6035,6 +6097,14 @@ const ( SignalRRequestType_STATUS_Trace = SignalRRequestType_STATUS("Trace") ) +// Mapping from string to SignalRRequestType_STATUS +var signalRRequestType_STATUS_Values = map[string]SignalRRequestType_STATUS{ + "clientconnection": SignalRRequestType_STATUS_ClientConnection, + "restapi": SignalRRequestType_STATUS_RESTAPI, + "serverconnection": SignalRRequestType_STATUS_ServerConnection, + "trace": SignalRRequestType_STATUS_Trace, +} + // Upstream auth settings. If not set, no auth is used for upstream messages. type UpstreamAuthSettings struct { // ManagedIdentity: Managed identity settings for upstream. @@ -6121,8 +6191,9 @@ func (settings *UpstreamAuthSettings) AssignProperties_From_UpstreamAuthSettings // Type if source.Type != nil { - typeVar := UpstreamAuthType(*source.Type) - settings.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, upstreamAuthType_Values) + settings.Type = &typeTemp } else { settings.Type = nil } @@ -6255,8 +6326,9 @@ func (settings *UpstreamAuthSettings_STATUS) AssignProperties_From_UpstreamAuthS // Type if source.Type != nil { - typeVar := UpstreamAuthType_STATUS(*source.Type) - settings.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, upstreamAuthType_STATUS_Values) + settings.Type = &typeTemp } else { settings.Type = nil } @@ -6455,6 +6527,12 @@ const ( UpstreamAuthType_None = UpstreamAuthType("None") ) +// Mapping from string to UpstreamAuthType +var upstreamAuthType_Values = map[string]UpstreamAuthType{ + "managedidentity": UpstreamAuthType_ManagedIdentity, + "none": UpstreamAuthType_None, +} + // Upstream auth type enum. type UpstreamAuthType_STATUS string @@ -6463,6 +6541,12 @@ const ( UpstreamAuthType_STATUS_None = UpstreamAuthType_STATUS("None") ) +// Mapping from string to UpstreamAuthType_STATUS +var upstreamAuthType_STATUS_Values = map[string]UpstreamAuthType_STATUS{ + "managedidentity": UpstreamAuthType_STATUS_ManagedIdentity, + "none": UpstreamAuthType_STATUS_None, +} + func init() { SchemeBuilder.Register(&SignalR{}, &SignalRList{}) } diff --git a/v2/api/sql/v1api20211101/server_spec_arm_types_gen.go b/v2/api/sql/v1api20211101/server_spec_arm_types_gen.go index 29a7b6d6499..5a6c9034741 100644 --- a/v2/api/sql/v1api20211101/server_spec_arm_types_gen.go +++ b/v2/api/sql/v1api20211101/server_spec_arm_types_gen.go @@ -88,6 +88,14 @@ const ( ResourceIdentity_Type_UserAssigned = ResourceIdentity_Type("UserAssigned") ) +// Mapping from string to ResourceIdentity_Type +var resourceIdentity_Type_Values = map[string]ResourceIdentity_Type{ + "none": ResourceIdentity_Type_None, + "systemassigned": ResourceIdentity_Type_SystemAssigned, + "systemassigned,userassigned": ResourceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ResourceIdentity_Type_UserAssigned, +} + // Properties of a active directory administrator. type ServerExternalAdministrator_ARM struct { // AdministratorType: Type of the sever administrator. diff --git a/v2/api/sql/v1api20211101/server_status_arm_types_gen.go b/v2/api/sql/v1api20211101/server_status_arm_types_gen.go index 12ba8bdfcfc..4fb1b228d79 100644 --- a/v2/api/sql/v1api20211101/server_status_arm_types_gen.go +++ b/v2/api/sql/v1api20211101/server_status_arm_types_gen.go @@ -99,6 +99,14 @@ const ( ResourceIdentity_Type_STATUS_UserAssigned = ResourceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ResourceIdentity_Type_STATUS +var resourceIdentity_Type_STATUS_Values = map[string]ResourceIdentity_Type_STATUS{ + "none": ResourceIdentity_Type_STATUS_None, + "systemassigned": ResourceIdentity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": ResourceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ResourceIdentity_Type_STATUS_UserAssigned, +} + // Properties of a active directory administrator. type ServerExternalAdministrator_STATUS_ARM struct { // AdministratorType: Type of the sever administrator. diff --git a/v2/api/sql/v1api20211101/server_types_gen.go b/v2/api/sql/v1api20211101/server_types_gen.go index 5ecd38a4c7d..88591c06690 100644 --- a/v2/api/sql/v1api20211101/server_types_gen.go +++ b/v2/api/sql/v1api20211101/server_types_gen.go @@ -802,16 +802,18 @@ func (server *Server_Spec) AssignProperties_From_Server_Spec(source *v20211101s. // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ServerProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - server.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, serverProperties_PublicNetworkAccess_Values) + server.PublicNetworkAccess = &publicNetworkAccessTemp } else { server.PublicNetworkAccess = nil } // RestrictOutboundNetworkAccess if source.RestrictOutboundNetworkAccess != nil { - restrictOutboundNetworkAccess := ServerProperties_RestrictOutboundNetworkAccess(*source.RestrictOutboundNetworkAccess) - server.RestrictOutboundNetworkAccess = &restrictOutboundNetworkAccess + restrictOutboundNetworkAccess := *source.RestrictOutboundNetworkAccess + restrictOutboundNetworkAccessTemp := genruntime.ToEnum(restrictOutboundNetworkAccess, serverProperties_RestrictOutboundNetworkAccess_Values) + server.RestrictOutboundNetworkAccess = &restrictOutboundNetworkAccessTemp } else { server.RestrictOutboundNetworkAccess = nil } @@ -1432,16 +1434,18 @@ func (server *Server_STATUS) AssignProperties_From_Server_STATUS(source *v202111 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := ServerProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - server.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, serverProperties_PublicNetworkAccess_STATUS_Values) + server.PublicNetworkAccess = &publicNetworkAccessTemp } else { server.PublicNetworkAccess = nil } // RestrictOutboundNetworkAccess if source.RestrictOutboundNetworkAccess != nil { - restrictOutboundNetworkAccess := ServerProperties_RestrictOutboundNetworkAccess_STATUS(*source.RestrictOutboundNetworkAccess) - server.RestrictOutboundNetworkAccess = &restrictOutboundNetworkAccess + restrictOutboundNetworkAccess := *source.RestrictOutboundNetworkAccess + restrictOutboundNetworkAccessTemp := genruntime.ToEnum(restrictOutboundNetworkAccess, serverProperties_RestrictOutboundNetworkAccess_STATUS_Values) + server.RestrictOutboundNetworkAccess = &restrictOutboundNetworkAccessTemp } else { server.RestrictOutboundNetworkAccess = nil } @@ -1460,8 +1464,9 @@ func (server *Server_STATUS) AssignProperties_From_Server_STATUS(source *v202111 // WorkspaceFeature if source.WorkspaceFeature != nil { - workspaceFeature := ServerProperties_WorkspaceFeature_STATUS(*source.WorkspaceFeature) - server.WorkspaceFeature = &workspaceFeature + workspaceFeature := *source.WorkspaceFeature + workspaceFeatureTemp := genruntime.ToEnum(workspaceFeature, serverProperties_WorkspaceFeature_STATUS_Values) + server.WorkspaceFeature = &workspaceFeatureTemp } else { server.WorkspaceFeature = nil } @@ -1664,8 +1669,9 @@ func (identity *ResourceIdentity) AssignProperties_From_ResourceIdentity(source // Type if source.Type != nil { - typeVar := ResourceIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, resourceIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -1837,8 +1843,9 @@ func (identity *ResourceIdentity_STATUS) AssignProperties_From_ResourceIdentity_ // Type if source.Type != nil { - typeVar := ResourceIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, resourceIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -2040,8 +2047,9 @@ func (administrator *ServerExternalAdministrator) AssignProperties_From_ServerEx // AdministratorType if source.AdministratorType != nil { - administratorType := ServerExternalAdministrator_AdministratorType(*source.AdministratorType) - administrator.AdministratorType = &administratorType + administratorType := *source.AdministratorType + administratorTypeTemp := genruntime.ToEnum(administratorType, serverExternalAdministrator_AdministratorType_Values) + administrator.AdministratorType = &administratorTypeTemp } else { administrator.AdministratorType = nil } @@ -2059,8 +2067,9 @@ func (administrator *ServerExternalAdministrator) AssignProperties_From_ServerEx // PrincipalType if source.PrincipalType != nil { - principalType := ServerExternalAdministrator_PrincipalType(*source.PrincipalType) - administrator.PrincipalType = &principalType + principalType := *source.PrincipalType + principalTypeTemp := genruntime.ToEnum(principalType, serverExternalAdministrator_PrincipalType_Values) + administrator.PrincipalType = &principalTypeTemp } else { administrator.PrincipalType = nil } @@ -2274,8 +2283,9 @@ func (administrator *ServerExternalAdministrator_STATUS) AssignProperties_From_S // AdministratorType if source.AdministratorType != nil { - administratorType := ServerExternalAdministrator_AdministratorType_STATUS(*source.AdministratorType) - administrator.AdministratorType = &administratorType + administratorType := *source.AdministratorType + administratorTypeTemp := genruntime.ToEnum(administratorType, serverExternalAdministrator_AdministratorType_STATUS_Values) + administrator.AdministratorType = &administratorTypeTemp } else { administrator.AdministratorType = nil } @@ -2293,8 +2303,9 @@ func (administrator *ServerExternalAdministrator_STATUS) AssignProperties_From_S // PrincipalType if source.PrincipalType != nil { - principalType := ServerExternalAdministrator_PrincipalType_STATUS(*source.PrincipalType) - administrator.PrincipalType = &principalType + principalType := *source.PrincipalType + principalTypeTemp := genruntime.ToEnum(principalType, serverExternalAdministrator_PrincipalType_STATUS_Values) + administrator.PrincipalType = &principalTypeTemp } else { administrator.PrincipalType = nil } @@ -2516,6 +2527,12 @@ const ( ServerProperties_PublicNetworkAccess_Enabled = ServerProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to ServerProperties_PublicNetworkAccess +var serverProperties_PublicNetworkAccess_Values = map[string]ServerProperties_PublicNetworkAccess{ + "disabled": ServerProperties_PublicNetworkAccess_Disabled, + "enabled": ServerProperties_PublicNetworkAccess_Enabled, +} + type ServerProperties_PublicNetworkAccess_STATUS string const ( @@ -2523,6 +2540,12 @@ const ( ServerProperties_PublicNetworkAccess_STATUS_Enabled = ServerProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ServerProperties_PublicNetworkAccess_STATUS +var serverProperties_PublicNetworkAccess_STATUS_Values = map[string]ServerProperties_PublicNetworkAccess_STATUS{ + "disabled": ServerProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": ServerProperties_PublicNetworkAccess_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type ServerProperties_RestrictOutboundNetworkAccess string @@ -2531,6 +2554,12 @@ const ( ServerProperties_RestrictOutboundNetworkAccess_Enabled = ServerProperties_RestrictOutboundNetworkAccess("Enabled") ) +// Mapping from string to ServerProperties_RestrictOutboundNetworkAccess +var serverProperties_RestrictOutboundNetworkAccess_Values = map[string]ServerProperties_RestrictOutboundNetworkAccess{ + "disabled": ServerProperties_RestrictOutboundNetworkAccess_Disabled, + "enabled": ServerProperties_RestrictOutboundNetworkAccess_Enabled, +} + type ServerProperties_RestrictOutboundNetworkAccess_STATUS string const ( @@ -2538,6 +2567,12 @@ const ( ServerProperties_RestrictOutboundNetworkAccess_STATUS_Enabled = ServerProperties_RestrictOutboundNetworkAccess_STATUS("Enabled") ) +// Mapping from string to ServerProperties_RestrictOutboundNetworkAccess_STATUS +var serverProperties_RestrictOutboundNetworkAccess_STATUS_Values = map[string]ServerProperties_RestrictOutboundNetworkAccess_STATUS{ + "disabled": ServerProperties_RestrictOutboundNetworkAccess_STATUS_Disabled, + "enabled": ServerProperties_RestrictOutboundNetworkAccess_STATUS_Enabled, +} + type ServerProperties_WorkspaceFeature_STATUS string const ( @@ -2545,6 +2580,12 @@ const ( ServerProperties_WorkspaceFeature_STATUS_Disconnected = ServerProperties_WorkspaceFeature_STATUS("Disconnected") ) +// Mapping from string to ServerProperties_WorkspaceFeature_STATUS +var serverProperties_WorkspaceFeature_STATUS_Values = map[string]ServerProperties_WorkspaceFeature_STATUS{ + "connected": ServerProperties_WorkspaceFeature_STATUS_Connected, + "disconnected": ServerProperties_WorkspaceFeature_STATUS_Disconnected, +} + // Properties of a private endpoint connection. type PrivateEndpointConnectionProperties_STATUS struct { // GroupIds: Group IDs. @@ -2643,8 +2684,9 @@ func (properties *PrivateEndpointConnectionProperties_STATUS) AssignProperties_F // ProvisioningState if source.ProvisioningState != nil { - provisioningState := PrivateEndpointConnectionProperties_ProvisioningState_STATUS(*source.ProvisioningState) - properties.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, privateEndpointConnectionProperties_ProvisioningState_STATUS_Values) + properties.ProvisioningState = &provisioningStateTemp } else { properties.ProvisioningState = nil } @@ -2709,10 +2751,20 @@ type ServerExternalAdministrator_AdministratorType string const ServerExternalAdministrator_AdministratorType_ActiveDirectory = ServerExternalAdministrator_AdministratorType("ActiveDirectory") +// Mapping from string to ServerExternalAdministrator_AdministratorType +var serverExternalAdministrator_AdministratorType_Values = map[string]ServerExternalAdministrator_AdministratorType{ + "activedirectory": ServerExternalAdministrator_AdministratorType_ActiveDirectory, +} + type ServerExternalAdministrator_AdministratorType_STATUS string const ServerExternalAdministrator_AdministratorType_STATUS_ActiveDirectory = ServerExternalAdministrator_AdministratorType_STATUS("ActiveDirectory") +// Mapping from string to ServerExternalAdministrator_AdministratorType_STATUS +var serverExternalAdministrator_AdministratorType_STATUS_Values = map[string]ServerExternalAdministrator_AdministratorType_STATUS{ + "activedirectory": ServerExternalAdministrator_AdministratorType_STATUS_ActiveDirectory, +} + // +kubebuilder:validation:Enum={"Application","Group","User"} type ServerExternalAdministrator_PrincipalType string @@ -2722,6 +2774,13 @@ const ( ServerExternalAdministrator_PrincipalType_User = ServerExternalAdministrator_PrincipalType("User") ) +// Mapping from string to ServerExternalAdministrator_PrincipalType +var serverExternalAdministrator_PrincipalType_Values = map[string]ServerExternalAdministrator_PrincipalType{ + "application": ServerExternalAdministrator_PrincipalType_Application, + "group": ServerExternalAdministrator_PrincipalType_Group, + "user": ServerExternalAdministrator_PrincipalType_User, +} + type ServerExternalAdministrator_PrincipalType_STATUS string const ( @@ -2730,6 +2789,13 @@ const ( ServerExternalAdministrator_PrincipalType_STATUS_User = ServerExternalAdministrator_PrincipalType_STATUS("User") ) +// Mapping from string to ServerExternalAdministrator_PrincipalType_STATUS +var serverExternalAdministrator_PrincipalType_STATUS_Values = map[string]ServerExternalAdministrator_PrincipalType_STATUS{ + "application": ServerExternalAdministrator_PrincipalType_STATUS_Application, + "group": ServerExternalAdministrator_PrincipalType_STATUS_Group, + "user": ServerExternalAdministrator_PrincipalType_STATUS_User, +} + type ServerOperatorConfigMaps struct { // FullyQualifiedDomainName: indicates where the FullyQualifiedDomainName config map should be placed. If omitted, no // config map will be created. @@ -2893,6 +2959,15 @@ const ( PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Rejecting = PrivateEndpointConnectionProperties_ProvisioningState_STATUS("Rejecting") ) +// Mapping from string to PrivateEndpointConnectionProperties_ProvisioningState_STATUS +var privateEndpointConnectionProperties_ProvisioningState_STATUS_Values = map[string]PrivateEndpointConnectionProperties_ProvisioningState_STATUS{ + "approving": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Approving, + "dropping": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Dropping, + "failed": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Failed, + "ready": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Ready, + "rejecting": PrivateEndpointConnectionProperties_ProvisioningState_STATUS_Rejecting, +} + type PrivateEndpointProperty_STATUS struct { // Id: Resource id of the private endpoint. Id *string `json:"id,omitempty"` @@ -3003,8 +3078,9 @@ func (property *PrivateLinkServiceConnectionStateProperty_STATUS) AssignProperti // ActionsRequired if source.ActionsRequired != nil { - actionsRequired := PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS(*source.ActionsRequired) - property.ActionsRequired = &actionsRequired + actionsRequired := *source.ActionsRequired + actionsRequiredTemp := genruntime.ToEnum(actionsRequired, privateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_Values) + property.ActionsRequired = &actionsRequiredTemp } else { property.ActionsRequired = nil } @@ -3014,8 +3090,9 @@ func (property *PrivateLinkServiceConnectionStateProperty_STATUS) AssignProperti // Status if source.Status != nil { - status := PrivateLinkServiceConnectionStateProperty_Status_STATUS(*source.Status) - property.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, privateLinkServiceConnectionStateProperty_Status_STATUS_Values) + property.Status = &statusTemp } else { property.Status = nil } @@ -3063,6 +3140,11 @@ type PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS string const PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_None = PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS("None") +// Mapping from string to PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS +var privateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_Values = map[string]PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS{ + "none": PrivateLinkServiceConnectionStateProperty_ActionsRequired_STATUS_None, +} + type PrivateLinkServiceConnectionStateProperty_Status_STATUS string const ( @@ -3072,6 +3154,14 @@ const ( PrivateLinkServiceConnectionStateProperty_Status_STATUS_Rejected = PrivateLinkServiceConnectionStateProperty_Status_STATUS("Rejected") ) +// Mapping from string to PrivateLinkServiceConnectionStateProperty_Status_STATUS +var privateLinkServiceConnectionStateProperty_Status_STATUS_Values = map[string]PrivateLinkServiceConnectionStateProperty_Status_STATUS{ + "approved": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Approved, + "disconnected": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Disconnected, + "pending": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Pending, + "rejected": PrivateLinkServiceConnectionStateProperty_Status_STATUS_Rejected, +} + func init() { SchemeBuilder.Register(&Server{}, &ServerList{}) } diff --git a/v2/api/sql/v1api20211101/servers_administrator_types_gen.go b/v2/api/sql/v1api20211101/servers_administrator_types_gen.go index a17822c3c3c..da89d9197cd 100644 --- a/v2/api/sql/v1api20211101/servers_administrator_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_administrator_types_gen.go @@ -532,8 +532,9 @@ func (administrator *Servers_Administrator_Spec) AssignProperties_From_Servers_A // AdministratorType if source.AdministratorType != nil { - administratorType := AdministratorProperties_AdministratorType(*source.AdministratorType) - administrator.AdministratorType = &administratorType + administratorType := *source.AdministratorType + administratorTypeTemp := genruntime.ToEnum(administratorType, administratorProperties_AdministratorType_Values) + administrator.AdministratorType = &administratorTypeTemp } else { administrator.AdministratorType = nil } @@ -861,8 +862,9 @@ func (administrator *Servers_Administrator_STATUS) AssignProperties_From_Servers // AdministratorType if source.AdministratorType != nil { - administratorType := AdministratorProperties_AdministratorType_STATUS(*source.AdministratorType) - administrator.AdministratorType = &administratorType + administratorType := *source.AdministratorType + administratorTypeTemp := genruntime.ToEnum(administratorType, administratorProperties_AdministratorType_STATUS_Values) + administrator.AdministratorType = &administratorTypeTemp } else { administrator.AdministratorType = nil } @@ -958,10 +960,20 @@ type AdministratorProperties_AdministratorType string const AdministratorProperties_AdministratorType_ActiveDirectory = AdministratorProperties_AdministratorType("ActiveDirectory") +// Mapping from string to AdministratorProperties_AdministratorType +var administratorProperties_AdministratorType_Values = map[string]AdministratorProperties_AdministratorType{ + "activedirectory": AdministratorProperties_AdministratorType_ActiveDirectory, +} + type AdministratorProperties_AdministratorType_STATUS string const AdministratorProperties_AdministratorType_STATUS_ActiveDirectory = AdministratorProperties_AdministratorType_STATUS("ActiveDirectory") +// Mapping from string to AdministratorProperties_AdministratorType_STATUS +var administratorProperties_AdministratorType_STATUS_Values = map[string]AdministratorProperties_AdministratorType_STATUS{ + "activedirectory": AdministratorProperties_AdministratorType_STATUS_ActiveDirectory, +} + func init() { SchemeBuilder.Register(&ServersAdministrator{}, &ServersAdministratorList{}) } diff --git a/v2/api/sql/v1api20211101/servers_advanced_threat_protection_setting_status_arm_types_gen.go b/v2/api/sql/v1api20211101/servers_advanced_threat_protection_setting_status_arm_types_gen.go index 3363bc57df6..7afc16c93e3 100644 --- a/v2/api/sql/v1api20211101/servers_advanced_threat_protection_setting_status_arm_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_advanced_threat_protection_setting_status_arm_types_gen.go @@ -60,6 +60,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -68,3 +76,11 @@ const ( SystemData_LastModifiedByType_STATUS_ManagedIdentity = SystemData_LastModifiedByType_STATUS("ManagedIdentity") SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) + +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} diff --git a/v2/api/sql/v1api20211101/servers_advanced_threat_protection_setting_types_gen.go b/v2/api/sql/v1api20211101/servers_advanced_threat_protection_setting_types_gen.go index 6d26c601d85..cb43db4769a 100644 --- a/v2/api/sql/v1api20211101/servers_advanced_threat_protection_setting_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_advanced_threat_protection_setting_types_gen.go @@ -446,8 +446,9 @@ func (setting *Servers_AdvancedThreatProtectionSetting_Spec) AssignProperties_Fr // State if source.State != nil { - state := AdvancedThreatProtectionProperties_State(*source.State) - setting.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, advancedThreatProtectionProperties_State_Values) + setting.State = &stateTemp } else { setting.State = nil } @@ -669,8 +670,9 @@ func (setting *Servers_AdvancedThreatProtectionSetting_STATUS) AssignProperties_ // State if source.State != nil { - state := AdvancedThreatProtectionProperties_State_STATUS(*source.State) - setting.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, advancedThreatProtectionProperties_State_STATUS_Values) + setting.State = &stateTemp } else { setting.State = nil } @@ -754,6 +756,13 @@ const ( AdvancedThreatProtectionProperties_State_New = AdvancedThreatProtectionProperties_State("New") ) +// Mapping from string to AdvancedThreatProtectionProperties_State +var advancedThreatProtectionProperties_State_Values = map[string]AdvancedThreatProtectionProperties_State{ + "disabled": AdvancedThreatProtectionProperties_State_Disabled, + "enabled": AdvancedThreatProtectionProperties_State_Enabled, + "new": AdvancedThreatProtectionProperties_State_New, +} + type AdvancedThreatProtectionProperties_State_STATUS string const ( @@ -762,6 +771,13 @@ const ( AdvancedThreatProtectionProperties_State_STATUS_New = AdvancedThreatProtectionProperties_State_STATUS("New") ) +// Mapping from string to AdvancedThreatProtectionProperties_State_STATUS +var advancedThreatProtectionProperties_State_STATUS_Values = map[string]AdvancedThreatProtectionProperties_State_STATUS{ + "disabled": AdvancedThreatProtectionProperties_State_STATUS_Disabled, + "enabled": AdvancedThreatProtectionProperties_State_STATUS_Enabled, + "new": AdvancedThreatProtectionProperties_State_STATUS_New, +} + // Metadata pertaining to creation and last modification of the resource. type SystemData_STATUS struct { // CreatedAt: The timestamp of resource creation (UTC). @@ -848,8 +864,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -862,8 +879,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } diff --git a/v2/api/sql/v1api20211101/servers_auditing_setting_types_gen.go b/v2/api/sql/v1api20211101/servers_auditing_setting_types_gen.go index 314daee3443..02d5c980ec0 100644 --- a/v2/api/sql/v1api20211101/servers_auditing_setting_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_auditing_setting_types_gen.go @@ -738,8 +738,9 @@ func (setting *Servers_AuditingSetting_Spec) AssignProperties_From_Servers_Audit // State if source.State != nil { - state := ServerBlobAuditingPolicyProperties_State(*source.State) - setting.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverBlobAuditingPolicyProperties_State_Values) + setting.State = &stateTemp } else { setting.State = nil } @@ -1288,8 +1289,9 @@ func (setting *Servers_AuditingSetting_STATUS) AssignProperties_From_Servers_Aud // State if source.State != nil { - state := ServerBlobAuditingPolicyProperties_State_STATUS(*source.State) - setting.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverBlobAuditingPolicyProperties_State_STATUS_Values) + setting.State = &stateTemp } else { setting.State = nil } @@ -1398,6 +1400,12 @@ const ( ServerBlobAuditingPolicyProperties_State_Enabled = ServerBlobAuditingPolicyProperties_State("Enabled") ) +// Mapping from string to ServerBlobAuditingPolicyProperties_State +var serverBlobAuditingPolicyProperties_State_Values = map[string]ServerBlobAuditingPolicyProperties_State{ + "disabled": ServerBlobAuditingPolicyProperties_State_Disabled, + "enabled": ServerBlobAuditingPolicyProperties_State_Enabled, +} + type ServerBlobAuditingPolicyProperties_State_STATUS string const ( @@ -1405,6 +1413,12 @@ const ( ServerBlobAuditingPolicyProperties_State_STATUS_Enabled = ServerBlobAuditingPolicyProperties_State_STATUS("Enabled") ) +// Mapping from string to ServerBlobAuditingPolicyProperties_State_STATUS +var serverBlobAuditingPolicyProperties_State_STATUS_Values = map[string]ServerBlobAuditingPolicyProperties_State_STATUS{ + "disabled": ServerBlobAuditingPolicyProperties_State_STATUS_Disabled, + "enabled": ServerBlobAuditingPolicyProperties_State_STATUS_Enabled, +} + func init() { SchemeBuilder.Register(&ServersAuditingSetting{}, &ServersAuditingSettingList{}) } diff --git a/v2/api/sql/v1api20211101/servers_connection_policy_types_gen.go b/v2/api/sql/v1api20211101/servers_connection_policy_types_gen.go index 7da45a179a5..57641cee830 100644 --- a/v2/api/sql/v1api20211101/servers_connection_policy_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_connection_policy_types_gen.go @@ -437,8 +437,9 @@ func (policy *Servers_ConnectionPolicy_Spec) AssignProperties_From_Servers_Conne // ConnectionType if source.ConnectionType != nil { - connectionType := ServerConnectionPolicyProperties_ConnectionType(*source.ConnectionType) - policy.ConnectionType = &connectionType + connectionType := *source.ConnectionType + connectionTypeTemp := genruntime.ToEnum(connectionType, serverConnectionPolicyProperties_ConnectionType_Values) + policy.ConnectionType = &connectionTypeTemp } else { policy.ConnectionType = nil } @@ -650,8 +651,9 @@ func (policy *Servers_ConnectionPolicy_STATUS) AssignProperties_From_Servers_Con // ConnectionType if source.ConnectionType != nil { - connectionType := ServerConnectionPolicyProperties_ConnectionType_STATUS(*source.ConnectionType) - policy.ConnectionType = &connectionType + connectionType := *source.ConnectionType + connectionTypeTemp := genruntime.ToEnum(connectionType, serverConnectionPolicyProperties_ConnectionType_STATUS_Values) + policy.ConnectionType = &connectionTypeTemp } else { policy.ConnectionType = nil } @@ -726,6 +728,13 @@ const ( ServerConnectionPolicyProperties_ConnectionType_Redirect = ServerConnectionPolicyProperties_ConnectionType("Redirect") ) +// Mapping from string to ServerConnectionPolicyProperties_ConnectionType +var serverConnectionPolicyProperties_ConnectionType_Values = map[string]ServerConnectionPolicyProperties_ConnectionType{ + "default": ServerConnectionPolicyProperties_ConnectionType_Default, + "proxy": ServerConnectionPolicyProperties_ConnectionType_Proxy, + "redirect": ServerConnectionPolicyProperties_ConnectionType_Redirect, +} + type ServerConnectionPolicyProperties_ConnectionType_STATUS string const ( @@ -734,6 +743,13 @@ const ( ServerConnectionPolicyProperties_ConnectionType_STATUS_Redirect = ServerConnectionPolicyProperties_ConnectionType_STATUS("Redirect") ) +// Mapping from string to ServerConnectionPolicyProperties_ConnectionType_STATUS +var serverConnectionPolicyProperties_ConnectionType_STATUS_Values = map[string]ServerConnectionPolicyProperties_ConnectionType_STATUS{ + "default": ServerConnectionPolicyProperties_ConnectionType_STATUS_Default, + "proxy": ServerConnectionPolicyProperties_ConnectionType_STATUS_Proxy, + "redirect": ServerConnectionPolicyProperties_ConnectionType_STATUS_Redirect, +} + func init() { SchemeBuilder.Register(&ServersConnectionPolicy{}, &ServersConnectionPolicyList{}) } diff --git a/v2/api/sql/v1api20211101/servers_database_spec_arm_types_gen.go b/v2/api/sql/v1api20211101/servers_database_spec_arm_types_gen.go index 4fac08063de..7f8485f8c2a 100644 --- a/v2/api/sql/v1api20211101/servers_database_spec_arm_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_database_spec_arm_types_gen.go @@ -170,3 +170,9 @@ const ( DatabaseIdentity_Type_None = DatabaseIdentity_Type("None") DatabaseIdentity_Type_UserAssigned = DatabaseIdentity_Type("UserAssigned") ) + +// Mapping from string to DatabaseIdentity_Type +var databaseIdentity_Type_Values = map[string]DatabaseIdentity_Type{ + "none": DatabaseIdentity_Type_None, + "userassigned": DatabaseIdentity_Type_UserAssigned, +} diff --git a/v2/api/sql/v1api20211101/servers_database_status_arm_types_gen.go b/v2/api/sql/v1api20211101/servers_database_status_arm_types_gen.go index 0f21af98fb2..719ed78cf70 100644 --- a/v2/api/sql/v1api20211101/servers_database_status_arm_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_database_status_arm_types_gen.go @@ -245,6 +245,12 @@ const ( DatabaseIdentity_Type_STATUS_UserAssigned = DatabaseIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to DatabaseIdentity_Type_STATUS +var databaseIdentity_Type_STATUS_Values = map[string]DatabaseIdentity_Type_STATUS{ + "none": DatabaseIdentity_Type_STATUS_None, + "userassigned": DatabaseIdentity_Type_STATUS_UserAssigned, +} + // Azure Active Directory identity configuration for a resource. type DatabaseUserIdentity_STATUS_ARM struct { // ClientId: The Azure Active Directory client id. diff --git a/v2/api/sql/v1api20211101/servers_database_types_gen.go b/v2/api/sql/v1api20211101/servers_database_types_gen.go index 6d90dc6b07d..87cfb5fc5b1 100644 --- a/v2/api/sql/v1api20211101/servers_database_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_database_types_gen.go @@ -979,8 +979,9 @@ func (database *Servers_Database_Spec) AssignProperties_From_Servers_Database_Sp // CatalogCollation if source.CatalogCollation != nil { - catalogCollation := DatabaseProperties_CatalogCollation(*source.CatalogCollation) - database.CatalogCollation = &catalogCollation + catalogCollation := *source.CatalogCollation + catalogCollationTemp := genruntime.ToEnum(catalogCollation, databaseProperties_CatalogCollation_Values) + database.CatalogCollation = &catalogCollationTemp } else { database.CatalogCollation = nil } @@ -990,8 +991,9 @@ func (database *Servers_Database_Spec) AssignProperties_From_Servers_Database_Sp // CreateMode if source.CreateMode != nil { - createMode := DatabaseProperties_CreateMode(*source.CreateMode) - database.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, databaseProperties_CreateMode_Values) + database.CreateMode = &createModeTemp } else { database.CreateMode = nil } @@ -1037,8 +1039,9 @@ func (database *Servers_Database_Spec) AssignProperties_From_Servers_Database_Sp // LicenseType if source.LicenseType != nil { - licenseType := DatabaseProperties_LicenseType(*source.LicenseType) - database.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, databaseProperties_LicenseType_Values) + database.LicenseType = &licenseTypeTemp } else { database.LicenseType = nil } @@ -1078,8 +1081,9 @@ func (database *Servers_Database_Spec) AssignProperties_From_Servers_Database_Sp // ReadScale if source.ReadScale != nil { - readScale := DatabaseProperties_ReadScale(*source.ReadScale) - database.ReadScale = &readScale + readScale := *source.ReadScale + readScaleTemp := genruntime.ToEnum(readScale, databaseProperties_ReadScale_Values) + database.ReadScale = &readScaleTemp } else { database.ReadScale = nil } @@ -1102,8 +1106,9 @@ func (database *Servers_Database_Spec) AssignProperties_From_Servers_Database_Sp // RequestedBackupStorageRedundancy if source.RequestedBackupStorageRedundancy != nil { - requestedBackupStorageRedundancy := DatabaseProperties_RequestedBackupStorageRedundancy(*source.RequestedBackupStorageRedundancy) - database.RequestedBackupStorageRedundancy = &requestedBackupStorageRedundancy + requestedBackupStorageRedundancy := *source.RequestedBackupStorageRedundancy + requestedBackupStorageRedundancyTemp := genruntime.ToEnum(requestedBackupStorageRedundancy, databaseProperties_RequestedBackupStorageRedundancy_Values) + database.RequestedBackupStorageRedundancy = &requestedBackupStorageRedundancyTemp } else { database.RequestedBackupStorageRedundancy = nil } @@ -1121,16 +1126,18 @@ func (database *Servers_Database_Spec) AssignProperties_From_Servers_Database_Sp // SampleName if source.SampleName != nil { - sampleName := DatabaseProperties_SampleName(*source.SampleName) - database.SampleName = &sampleName + sampleName := *source.SampleName + sampleNameTemp := genruntime.ToEnum(sampleName, databaseProperties_SampleName_Values) + database.SampleName = &sampleNameTemp } else { database.SampleName = nil } // SecondaryType if source.SecondaryType != nil { - secondaryType := DatabaseProperties_SecondaryType(*source.SecondaryType) - database.SecondaryType = &secondaryType + secondaryType := *source.SecondaryType + secondaryTypeTemp := genruntime.ToEnum(secondaryType, databaseProperties_SecondaryType_Values) + database.SecondaryType = &secondaryTypeTemp } else { database.SecondaryType = nil } @@ -2318,8 +2325,9 @@ func (database *Servers_Database_STATUS) AssignProperties_From_Servers_Database_ // CatalogCollation if source.CatalogCollation != nil { - catalogCollation := DatabaseProperties_CatalogCollation_STATUS(*source.CatalogCollation) - database.CatalogCollation = &catalogCollation + catalogCollation := *source.CatalogCollation + catalogCollationTemp := genruntime.ToEnum(catalogCollation, databaseProperties_CatalogCollation_STATUS_Values) + database.CatalogCollation = &catalogCollationTemp } else { database.CatalogCollation = nil } @@ -2332,8 +2340,9 @@ func (database *Servers_Database_STATUS) AssignProperties_From_Servers_Database_ // CreateMode if source.CreateMode != nil { - createMode := DatabaseProperties_CreateMode_STATUS(*source.CreateMode) - database.CreateMode = &createMode + createMode := *source.CreateMode + createModeTemp := genruntime.ToEnum(createMode, databaseProperties_CreateMode_STATUS_Values) + database.CreateMode = &createModeTemp } else { database.CreateMode = nil } @@ -2343,8 +2352,9 @@ func (database *Servers_Database_STATUS) AssignProperties_From_Servers_Database_ // CurrentBackupStorageRedundancy if source.CurrentBackupStorageRedundancy != nil { - currentBackupStorageRedundancy := DatabaseProperties_CurrentBackupStorageRedundancy_STATUS(*source.CurrentBackupStorageRedundancy) - database.CurrentBackupStorageRedundancy = ¤tBackupStorageRedundancy + currentBackupStorageRedundancy := *source.CurrentBackupStorageRedundancy + currentBackupStorageRedundancyTemp := genruntime.ToEnum(currentBackupStorageRedundancy, databaseProperties_CurrentBackupStorageRedundancy_STATUS_Values) + database.CurrentBackupStorageRedundancy = ¤tBackupStorageRedundancyTemp } else { database.CurrentBackupStorageRedundancy = nil } @@ -2421,8 +2431,9 @@ func (database *Servers_Database_STATUS) AssignProperties_From_Servers_Database_ // LicenseType if source.LicenseType != nil { - licenseType := DatabaseProperties_LicenseType_STATUS(*source.LicenseType) - database.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, databaseProperties_LicenseType_STATUS_Values) + database.LicenseType = &licenseTypeTemp } else { database.LicenseType = nil } @@ -2461,8 +2472,9 @@ func (database *Servers_Database_STATUS) AssignProperties_From_Servers_Database_ // ReadScale if source.ReadScale != nil { - readScale := DatabaseProperties_ReadScale_STATUS(*source.ReadScale) - database.ReadScale = &readScale + readScale := *source.ReadScale + readScaleTemp := genruntime.ToEnum(readScale, databaseProperties_ReadScale_STATUS_Values) + database.ReadScale = &readScaleTemp } else { database.ReadScale = nil } @@ -2475,8 +2487,9 @@ func (database *Servers_Database_STATUS) AssignProperties_From_Servers_Database_ // RequestedBackupStorageRedundancy if source.RequestedBackupStorageRedundancy != nil { - requestedBackupStorageRedundancy := DatabaseProperties_RequestedBackupStorageRedundancy_STATUS(*source.RequestedBackupStorageRedundancy) - database.RequestedBackupStorageRedundancy = &requestedBackupStorageRedundancy + requestedBackupStorageRedundancy := *source.RequestedBackupStorageRedundancy + requestedBackupStorageRedundancyTemp := genruntime.ToEnum(requestedBackupStorageRedundancy, databaseProperties_RequestedBackupStorageRedundancy_STATUS_Values) + database.RequestedBackupStorageRedundancy = &requestedBackupStorageRedundancyTemp } else { database.RequestedBackupStorageRedundancy = nil } @@ -2495,16 +2508,18 @@ func (database *Servers_Database_STATUS) AssignProperties_From_Servers_Database_ // SampleName if source.SampleName != nil { - sampleName := DatabaseProperties_SampleName_STATUS(*source.SampleName) - database.SampleName = &sampleName + sampleName := *source.SampleName + sampleNameTemp := genruntime.ToEnum(sampleName, databaseProperties_SampleName_STATUS_Values) + database.SampleName = &sampleNameTemp } else { database.SampleName = nil } // SecondaryType if source.SecondaryType != nil { - secondaryType := DatabaseProperties_SecondaryType_STATUS(*source.SecondaryType) - database.SecondaryType = &secondaryType + secondaryType := *source.SecondaryType + secondaryTypeTemp := genruntime.ToEnum(secondaryType, databaseProperties_SecondaryType_STATUS_Values) + database.SecondaryType = &secondaryTypeTemp } else { database.SecondaryType = nil } @@ -2532,8 +2547,9 @@ func (database *Servers_Database_STATUS) AssignProperties_From_Servers_Database_ // Status if source.Status != nil { - status := DatabaseProperties_Status_STATUS(*source.Status) - database.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, databaseProperties_Status_STATUS_Values) + database.Status = &statusTemp } else { database.Status = nil } @@ -2877,8 +2893,9 @@ func (identity *DatabaseIdentity) AssignProperties_From_DatabaseIdentity(source // Type if source.Type != nil { - typeVar := DatabaseIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, databaseIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3037,8 +3054,9 @@ func (identity *DatabaseIdentity_STATUS) AssignProperties_From_DatabaseIdentity_ // Type if source.Type != nil { - typeVar := DatabaseIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, databaseIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3118,6 +3136,12 @@ const ( DatabaseProperties_CatalogCollation_SQL_Latin1_General_CP1_CI_AS = DatabaseProperties_CatalogCollation("SQL_Latin1_General_CP1_CI_AS") ) +// Mapping from string to DatabaseProperties_CatalogCollation +var databaseProperties_CatalogCollation_Values = map[string]DatabaseProperties_CatalogCollation{ + "database_default": DatabaseProperties_CatalogCollation_DATABASE_DEFAULT, + "sql_latin1_general_cp1_ci_as": DatabaseProperties_CatalogCollation_SQL_Latin1_General_CP1_CI_AS, +} + type DatabaseProperties_CatalogCollation_STATUS string const ( @@ -3125,6 +3149,12 @@ const ( DatabaseProperties_CatalogCollation_STATUS_SQL_Latin1_General_CP1_CI_AS = DatabaseProperties_CatalogCollation_STATUS("SQL_Latin1_General_CP1_CI_AS") ) +// Mapping from string to DatabaseProperties_CatalogCollation_STATUS +var databaseProperties_CatalogCollation_STATUS_Values = map[string]DatabaseProperties_CatalogCollation_STATUS{ + "database_default": DatabaseProperties_CatalogCollation_STATUS_DATABASE_DEFAULT, + "sql_latin1_general_cp1_ci_as": DatabaseProperties_CatalogCollation_STATUS_SQL_Latin1_General_CP1_CI_AS, +} + // +kubebuilder:validation:Enum={"Copy","Default","OnlineSecondary","PointInTimeRestore","Recovery","Restore","RestoreExternalBackup","RestoreExternalBackupSecondary","RestoreLongTermRetentionBackup","Secondary"} type DatabaseProperties_CreateMode string @@ -3141,6 +3171,20 @@ const ( DatabaseProperties_CreateMode_Secondary = DatabaseProperties_CreateMode("Secondary") ) +// Mapping from string to DatabaseProperties_CreateMode +var databaseProperties_CreateMode_Values = map[string]DatabaseProperties_CreateMode{ + "copy": DatabaseProperties_CreateMode_Copy, + "default": DatabaseProperties_CreateMode_Default, + "onlinesecondary": DatabaseProperties_CreateMode_OnlineSecondary, + "pointintimerestore": DatabaseProperties_CreateMode_PointInTimeRestore, + "recovery": DatabaseProperties_CreateMode_Recovery, + "restore": DatabaseProperties_CreateMode_Restore, + "restoreexternalbackup": DatabaseProperties_CreateMode_RestoreExternalBackup, + "restoreexternalbackupsecondary": DatabaseProperties_CreateMode_RestoreExternalBackupSecondary, + "restorelongtermretentionbackup": DatabaseProperties_CreateMode_RestoreLongTermRetentionBackup, + "secondary": DatabaseProperties_CreateMode_Secondary, +} + type DatabaseProperties_CreateMode_STATUS string const ( @@ -3156,6 +3200,20 @@ const ( DatabaseProperties_CreateMode_STATUS_Secondary = DatabaseProperties_CreateMode_STATUS("Secondary") ) +// Mapping from string to DatabaseProperties_CreateMode_STATUS +var databaseProperties_CreateMode_STATUS_Values = map[string]DatabaseProperties_CreateMode_STATUS{ + "copy": DatabaseProperties_CreateMode_STATUS_Copy, + "default": DatabaseProperties_CreateMode_STATUS_Default, + "onlinesecondary": DatabaseProperties_CreateMode_STATUS_OnlineSecondary, + "pointintimerestore": DatabaseProperties_CreateMode_STATUS_PointInTimeRestore, + "recovery": DatabaseProperties_CreateMode_STATUS_Recovery, + "restore": DatabaseProperties_CreateMode_STATUS_Restore, + "restoreexternalbackup": DatabaseProperties_CreateMode_STATUS_RestoreExternalBackup, + "restoreexternalbackupsecondary": DatabaseProperties_CreateMode_STATUS_RestoreExternalBackupSecondary, + "restorelongtermretentionbackup": DatabaseProperties_CreateMode_STATUS_RestoreLongTermRetentionBackup, + "secondary": DatabaseProperties_CreateMode_STATUS_Secondary, +} + type DatabaseProperties_CurrentBackupStorageRedundancy_STATUS string const ( @@ -3165,6 +3223,14 @@ const ( DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_Zone = DatabaseProperties_CurrentBackupStorageRedundancy_STATUS("Zone") ) +// Mapping from string to DatabaseProperties_CurrentBackupStorageRedundancy_STATUS +var databaseProperties_CurrentBackupStorageRedundancy_STATUS_Values = map[string]DatabaseProperties_CurrentBackupStorageRedundancy_STATUS{ + "geo": DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_Geo, + "geozone": DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_GeoZone, + "local": DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_Local, + "zone": DatabaseProperties_CurrentBackupStorageRedundancy_STATUS_Zone, +} + // +kubebuilder:validation:Enum={"BasePrice","LicenseIncluded"} type DatabaseProperties_LicenseType string @@ -3173,6 +3239,12 @@ const ( DatabaseProperties_LicenseType_LicenseIncluded = DatabaseProperties_LicenseType("LicenseIncluded") ) +// Mapping from string to DatabaseProperties_LicenseType +var databaseProperties_LicenseType_Values = map[string]DatabaseProperties_LicenseType{ + "baseprice": DatabaseProperties_LicenseType_BasePrice, + "licenseincluded": DatabaseProperties_LicenseType_LicenseIncluded, +} + type DatabaseProperties_LicenseType_STATUS string const ( @@ -3180,6 +3252,12 @@ const ( DatabaseProperties_LicenseType_STATUS_LicenseIncluded = DatabaseProperties_LicenseType_STATUS("LicenseIncluded") ) +// Mapping from string to DatabaseProperties_LicenseType_STATUS +var databaseProperties_LicenseType_STATUS_Values = map[string]DatabaseProperties_LicenseType_STATUS{ + "baseprice": DatabaseProperties_LicenseType_STATUS_BasePrice, + "licenseincluded": DatabaseProperties_LicenseType_STATUS_LicenseIncluded, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type DatabaseProperties_ReadScale string @@ -3188,6 +3266,12 @@ const ( DatabaseProperties_ReadScale_Enabled = DatabaseProperties_ReadScale("Enabled") ) +// Mapping from string to DatabaseProperties_ReadScale +var databaseProperties_ReadScale_Values = map[string]DatabaseProperties_ReadScale{ + "disabled": DatabaseProperties_ReadScale_Disabled, + "enabled": DatabaseProperties_ReadScale_Enabled, +} + type DatabaseProperties_ReadScale_STATUS string const ( @@ -3195,6 +3279,12 @@ const ( DatabaseProperties_ReadScale_STATUS_Enabled = DatabaseProperties_ReadScale_STATUS("Enabled") ) +// Mapping from string to DatabaseProperties_ReadScale_STATUS +var databaseProperties_ReadScale_STATUS_Values = map[string]DatabaseProperties_ReadScale_STATUS{ + "disabled": DatabaseProperties_ReadScale_STATUS_Disabled, + "enabled": DatabaseProperties_ReadScale_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Geo","GeoZone","Local","Zone"} type DatabaseProperties_RequestedBackupStorageRedundancy string @@ -3205,6 +3295,14 @@ const ( DatabaseProperties_RequestedBackupStorageRedundancy_Zone = DatabaseProperties_RequestedBackupStorageRedundancy("Zone") ) +// Mapping from string to DatabaseProperties_RequestedBackupStorageRedundancy +var databaseProperties_RequestedBackupStorageRedundancy_Values = map[string]DatabaseProperties_RequestedBackupStorageRedundancy{ + "geo": DatabaseProperties_RequestedBackupStorageRedundancy_Geo, + "geozone": DatabaseProperties_RequestedBackupStorageRedundancy_GeoZone, + "local": DatabaseProperties_RequestedBackupStorageRedundancy_Local, + "zone": DatabaseProperties_RequestedBackupStorageRedundancy_Zone, +} + type DatabaseProperties_RequestedBackupStorageRedundancy_STATUS string const ( @@ -3214,6 +3312,14 @@ const ( DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_Zone = DatabaseProperties_RequestedBackupStorageRedundancy_STATUS("Zone") ) +// Mapping from string to DatabaseProperties_RequestedBackupStorageRedundancy_STATUS +var databaseProperties_RequestedBackupStorageRedundancy_STATUS_Values = map[string]DatabaseProperties_RequestedBackupStorageRedundancy_STATUS{ + "geo": DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_Geo, + "geozone": DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_GeoZone, + "local": DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_Local, + "zone": DatabaseProperties_RequestedBackupStorageRedundancy_STATUS_Zone, +} + // +kubebuilder:validation:Enum={"AdventureWorksLT","WideWorldImportersFull","WideWorldImportersStd"} type DatabaseProperties_SampleName string @@ -3223,6 +3329,13 @@ const ( DatabaseProperties_SampleName_WideWorldImportersStd = DatabaseProperties_SampleName("WideWorldImportersStd") ) +// Mapping from string to DatabaseProperties_SampleName +var databaseProperties_SampleName_Values = map[string]DatabaseProperties_SampleName{ + "adventureworkslt": DatabaseProperties_SampleName_AdventureWorksLT, + "wideworldimportersfull": DatabaseProperties_SampleName_WideWorldImportersFull, + "wideworldimportersstd": DatabaseProperties_SampleName_WideWorldImportersStd, +} + type DatabaseProperties_SampleName_STATUS string const ( @@ -3231,6 +3344,13 @@ const ( DatabaseProperties_SampleName_STATUS_WideWorldImportersStd = DatabaseProperties_SampleName_STATUS("WideWorldImportersStd") ) +// Mapping from string to DatabaseProperties_SampleName_STATUS +var databaseProperties_SampleName_STATUS_Values = map[string]DatabaseProperties_SampleName_STATUS{ + "adventureworkslt": DatabaseProperties_SampleName_STATUS_AdventureWorksLT, + "wideworldimportersfull": DatabaseProperties_SampleName_STATUS_WideWorldImportersFull, + "wideworldimportersstd": DatabaseProperties_SampleName_STATUS_WideWorldImportersStd, +} + // +kubebuilder:validation:Enum={"Geo","Named"} type DatabaseProperties_SecondaryType string @@ -3239,6 +3359,12 @@ const ( DatabaseProperties_SecondaryType_Named = DatabaseProperties_SecondaryType("Named") ) +// Mapping from string to DatabaseProperties_SecondaryType +var databaseProperties_SecondaryType_Values = map[string]DatabaseProperties_SecondaryType{ + "geo": DatabaseProperties_SecondaryType_Geo, + "named": DatabaseProperties_SecondaryType_Named, +} + type DatabaseProperties_SecondaryType_STATUS string const ( @@ -3246,6 +3372,12 @@ const ( DatabaseProperties_SecondaryType_STATUS_Named = DatabaseProperties_SecondaryType_STATUS("Named") ) +// Mapping from string to DatabaseProperties_SecondaryType_STATUS +var databaseProperties_SecondaryType_STATUS_Values = map[string]DatabaseProperties_SecondaryType_STATUS{ + "geo": DatabaseProperties_SecondaryType_STATUS_Geo, + "named": DatabaseProperties_SecondaryType_STATUS_Named, +} + type DatabaseProperties_Status_STATUS string const ( @@ -3275,6 +3407,34 @@ const ( DatabaseProperties_Status_STATUS_Suspect = DatabaseProperties_Status_STATUS("Suspect") ) +// Mapping from string to DatabaseProperties_Status_STATUS +var databaseProperties_Status_STATUS_Values = map[string]DatabaseProperties_Status_STATUS{ + "autoclosed": DatabaseProperties_Status_STATUS_AutoClosed, + "copying": DatabaseProperties_Status_STATUS_Copying, + "creating": DatabaseProperties_Status_STATUS_Creating, + "disabled": DatabaseProperties_Status_STATUS_Disabled, + "emergencymode": DatabaseProperties_Status_STATUS_EmergencyMode, + "inaccessible": DatabaseProperties_Status_STATUS_Inaccessible, + "offline": DatabaseProperties_Status_STATUS_Offline, + "offlinechangingdwperformancetiers": DatabaseProperties_Status_STATUS_OfflineChangingDwPerformanceTiers, + "offlinesecondary": DatabaseProperties_Status_STATUS_OfflineSecondary, + "online": DatabaseProperties_Status_STATUS_Online, + "onlinechangingdwperformancetiers": DatabaseProperties_Status_STATUS_OnlineChangingDwPerformanceTiers, + "paused": DatabaseProperties_Status_STATUS_Paused, + "pausing": DatabaseProperties_Status_STATUS_Pausing, + "recovering": DatabaseProperties_Status_STATUS_Recovering, + "recoverypending": DatabaseProperties_Status_STATUS_RecoveryPending, + "restoring": DatabaseProperties_Status_STATUS_Restoring, + "resuming": DatabaseProperties_Status_STATUS_Resuming, + "scaling": DatabaseProperties_Status_STATUS_Scaling, + "shutdown": DatabaseProperties_Status_STATUS_Shutdown, + "standby": DatabaseProperties_Status_STATUS_Standby, + "starting": DatabaseProperties_Status_STATUS_Starting, + "stopped": DatabaseProperties_Status_STATUS_Stopped, + "stopping": DatabaseProperties_Status_STATUS_Stopping, + "suspect": DatabaseProperties_Status_STATUS_Suspect, +} + // An ARM Resource SKU. type Sku struct { // Capacity: Capacity of the particular SKU. diff --git a/v2/api/sql/v1api20211101/servers_databases_advanced_threat_protection_setting_types_gen.go b/v2/api/sql/v1api20211101/servers_databases_advanced_threat_protection_setting_types_gen.go index d8c2d341767..fe1de59d848 100644 --- a/v2/api/sql/v1api20211101/servers_databases_advanced_threat_protection_setting_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_databases_advanced_threat_protection_setting_types_gen.go @@ -446,8 +446,9 @@ func (setting *Servers_Databases_AdvancedThreatProtectionSetting_Spec) AssignPro // State if source.State != nil { - state := AdvancedThreatProtectionProperties_State(*source.State) - setting.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, advancedThreatProtectionProperties_State_Values) + setting.State = &stateTemp } else { setting.State = nil } @@ -669,8 +670,9 @@ func (setting *Servers_Databases_AdvancedThreatProtectionSetting_STATUS) AssignP // State if source.State != nil { - state := AdvancedThreatProtectionProperties_State_STATUS(*source.State) - setting.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, advancedThreatProtectionProperties_State_STATUS_Values) + setting.State = &stateTemp } else { setting.State = nil } diff --git a/v2/api/sql/v1api20211101/servers_databases_auditing_setting_types_gen.go b/v2/api/sql/v1api20211101/servers_databases_auditing_setting_types_gen.go index 7e6ac398b91..1943598b9ca 100644 --- a/v2/api/sql/v1api20211101/servers_databases_auditing_setting_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_databases_auditing_setting_types_gen.go @@ -703,8 +703,9 @@ func (setting *Servers_Databases_AuditingSetting_Spec) AssignProperties_From_Ser // State if source.State != nil { - state := DatabaseBlobAuditingPolicyProperties_State(*source.State) - setting.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, databaseBlobAuditingPolicyProperties_State_Values) + setting.State = &stateTemp } else { setting.State = nil } @@ -1219,8 +1220,9 @@ func (setting *Servers_Databases_AuditingSetting_STATUS) AssignProperties_From_S // State if source.State != nil { - state := DatabaseBlobAuditingPolicyProperties_State_STATUS(*source.State) - setting.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, databaseBlobAuditingPolicyProperties_State_STATUS_Values) + setting.State = &stateTemp } else { setting.State = nil } @@ -1324,6 +1326,12 @@ const ( DatabaseBlobAuditingPolicyProperties_State_Enabled = DatabaseBlobAuditingPolicyProperties_State("Enabled") ) +// Mapping from string to DatabaseBlobAuditingPolicyProperties_State +var databaseBlobAuditingPolicyProperties_State_Values = map[string]DatabaseBlobAuditingPolicyProperties_State{ + "disabled": DatabaseBlobAuditingPolicyProperties_State_Disabled, + "enabled": DatabaseBlobAuditingPolicyProperties_State_Enabled, +} + type DatabaseBlobAuditingPolicyProperties_State_STATUS string const ( @@ -1331,6 +1339,12 @@ const ( DatabaseBlobAuditingPolicyProperties_State_STATUS_Enabled = DatabaseBlobAuditingPolicyProperties_State_STATUS("Enabled") ) +// Mapping from string to DatabaseBlobAuditingPolicyProperties_State_STATUS +var databaseBlobAuditingPolicyProperties_State_STATUS_Values = map[string]DatabaseBlobAuditingPolicyProperties_State_STATUS{ + "disabled": DatabaseBlobAuditingPolicyProperties_State_STATUS_Disabled, + "enabled": DatabaseBlobAuditingPolicyProperties_State_STATUS_Enabled, +} + func init() { SchemeBuilder.Register(&ServersDatabasesAuditingSetting{}, &ServersDatabasesAuditingSettingList{}) } diff --git a/v2/api/sql/v1api20211101/servers_databases_security_alert_policy_types_gen.go b/v2/api/sql/v1api20211101/servers_databases_security_alert_policy_types_gen.go index f370dc811da..8a5a233c549 100644 --- a/v2/api/sql/v1api20211101/servers_databases_security_alert_policy_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_databases_security_alert_policy_types_gen.go @@ -560,8 +560,9 @@ func (policy *Servers_Databases_SecurityAlertPolicy_Spec) AssignProperties_From_ // State if source.State != nil { - state := DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State(*source.State) - policy.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, databaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Values) + policy.State = &stateTemp } else { policy.State = nil } @@ -919,8 +920,9 @@ func (policy *Servers_Databases_SecurityAlertPolicy_STATUS) AssignProperties_Fro // State if source.State != nil { - state := DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS(*source.State) - policy.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, databaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Values) + policy.State = &stateTemp } else { policy.State = nil } @@ -1026,6 +1028,12 @@ const ( DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Enabled = DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State("Enabled") ) +// Mapping from string to DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State +var databaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Values = map[string]DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State{ + "disabled": DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Disabled, + "enabled": DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Enabled, +} + type DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS string const ( @@ -1033,6 +1041,12 @@ const ( DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Enabled = DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS("Enabled") ) +// Mapping from string to DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS +var databaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Values = map[string]DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS{ + "disabled": DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Disabled, + "enabled": DatabaseSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Enabled, +} + func init() { SchemeBuilder.Register(&ServersDatabasesSecurityAlertPolicy{}, &ServersDatabasesSecurityAlertPolicyList{}) } diff --git a/v2/api/sql/v1api20211101/servers_databases_transparent_data_encryption_types_gen.go b/v2/api/sql/v1api20211101/servers_databases_transparent_data_encryption_types_gen.go index 96a723cc04d..eac899a209f 100644 --- a/v2/api/sql/v1api20211101/servers_databases_transparent_data_encryption_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_databases_transparent_data_encryption_types_gen.go @@ -445,8 +445,9 @@ func (encryption *Servers_Databases_TransparentDataEncryption_Spec) AssignProper // State if source.State != nil { - state := TransparentDataEncryptionProperties_State(*source.State) - encryption.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, transparentDataEncryptionProperties_State_Values) + encryption.State = &stateTemp } else { encryption.State = nil } @@ -638,8 +639,9 @@ func (encryption *Servers_Databases_TransparentDataEncryption_STATUS) AssignProp // State if source.State != nil { - state := TransparentDataEncryptionProperties_State_STATUS(*source.State) - encryption.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, transparentDataEncryptionProperties_State_STATUS_Values) + encryption.State = &stateTemp } else { encryption.State = nil } @@ -695,6 +697,12 @@ const ( TransparentDataEncryptionProperties_State_Enabled = TransparentDataEncryptionProperties_State("Enabled") ) +// Mapping from string to TransparentDataEncryptionProperties_State +var transparentDataEncryptionProperties_State_Values = map[string]TransparentDataEncryptionProperties_State{ + "disabled": TransparentDataEncryptionProperties_State_Disabled, + "enabled": TransparentDataEncryptionProperties_State_Enabled, +} + type TransparentDataEncryptionProperties_State_STATUS string const ( @@ -702,6 +710,12 @@ const ( TransparentDataEncryptionProperties_State_STATUS_Enabled = TransparentDataEncryptionProperties_State_STATUS("Enabled") ) +// Mapping from string to TransparentDataEncryptionProperties_State_STATUS +var transparentDataEncryptionProperties_State_STATUS_Values = map[string]TransparentDataEncryptionProperties_State_STATUS{ + "disabled": TransparentDataEncryptionProperties_State_STATUS_Disabled, + "enabled": TransparentDataEncryptionProperties_State_STATUS_Enabled, +} + func init() { SchemeBuilder.Register(&ServersDatabasesTransparentDataEncryption{}, &ServersDatabasesTransparentDataEncryptionList{}) } diff --git a/v2/api/sql/v1api20211101/servers_elastic_pool_types_gen.go b/v2/api/sql/v1api20211101/servers_elastic_pool_types_gen.go index 9c08d3117dc..0813de36fc9 100644 --- a/v2/api/sql/v1api20211101/servers_elastic_pool_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_elastic_pool_types_gen.go @@ -636,8 +636,9 @@ func (pool *Servers_ElasticPool_Spec) AssignProperties_From_Servers_ElasticPool_ // LicenseType if source.LicenseType != nil { - licenseType := ElasticPoolProperties_LicenseType(*source.LicenseType) - pool.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, elasticPoolProperties_LicenseType_Values) + pool.LicenseType = &licenseTypeTemp } else { pool.LicenseType = nil } @@ -1164,8 +1165,9 @@ func (pool *Servers_ElasticPool_STATUS) AssignProperties_From_Servers_ElasticPoo // LicenseType if source.LicenseType != nil { - licenseType := ElasticPoolProperties_LicenseType_STATUS(*source.LicenseType) - pool.LicenseType = &licenseType + licenseType := *source.LicenseType + licenseTypeTemp := genruntime.ToEnum(licenseType, elasticPoolProperties_LicenseType_STATUS_Values) + pool.LicenseType = &licenseTypeTemp } else { pool.LicenseType = nil } @@ -1216,8 +1218,9 @@ func (pool *Servers_ElasticPool_STATUS) AssignProperties_From_Servers_ElasticPoo // State if source.State != nil { - state := ElasticPoolProperties_State_STATUS(*source.State) - pool.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, elasticPoolProperties_State_STATUS_Values) + pool.State = &stateTemp } else { pool.State = nil } @@ -1585,6 +1588,12 @@ const ( ElasticPoolProperties_LicenseType_LicenseIncluded = ElasticPoolProperties_LicenseType("LicenseIncluded") ) +// Mapping from string to ElasticPoolProperties_LicenseType +var elasticPoolProperties_LicenseType_Values = map[string]ElasticPoolProperties_LicenseType{ + "baseprice": ElasticPoolProperties_LicenseType_BasePrice, + "licenseincluded": ElasticPoolProperties_LicenseType_LicenseIncluded, +} + type ElasticPoolProperties_LicenseType_STATUS string const ( @@ -1592,6 +1601,12 @@ const ( ElasticPoolProperties_LicenseType_STATUS_LicenseIncluded = ElasticPoolProperties_LicenseType_STATUS("LicenseIncluded") ) +// Mapping from string to ElasticPoolProperties_LicenseType_STATUS +var elasticPoolProperties_LicenseType_STATUS_Values = map[string]ElasticPoolProperties_LicenseType_STATUS{ + "baseprice": ElasticPoolProperties_LicenseType_STATUS_BasePrice, + "licenseincluded": ElasticPoolProperties_LicenseType_STATUS_LicenseIncluded, +} + type ElasticPoolProperties_State_STATUS string const ( @@ -1600,6 +1615,13 @@ const ( ElasticPoolProperties_State_STATUS_Ready = ElasticPoolProperties_State_STATUS("Ready") ) +// Mapping from string to ElasticPoolProperties_State_STATUS +var elasticPoolProperties_State_STATUS_Values = map[string]ElasticPoolProperties_State_STATUS{ + "creating": ElasticPoolProperties_State_STATUS_Creating, + "disabled": ElasticPoolProperties_State_STATUS_Disabled, + "ready": ElasticPoolProperties_State_STATUS_Ready, +} + func init() { SchemeBuilder.Register(&ServersElasticPool{}, &ServersElasticPoolList{}) } diff --git a/v2/api/sql/v1api20211101/servers_failover_group_types_gen.go b/v2/api/sql/v1api20211101/servers_failover_group_types_gen.go index 6f4c6f17c3d..ab9a327a706 100644 --- a/v2/api/sql/v1api20211101/servers_failover_group_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_failover_group_types_gen.go @@ -1032,8 +1032,9 @@ func (group *Servers_FailoverGroup_STATUS) AssignProperties_From_Servers_Failove // ReplicationRole if source.ReplicationRole != nil { - replicationRole := FailoverGroupProperties_ReplicationRole_STATUS(*source.ReplicationRole) - group.ReplicationRole = &replicationRole + replicationRole := *source.ReplicationRole + replicationRoleTemp := genruntime.ToEnum(replicationRole, failoverGroupProperties_ReplicationRole_STATUS_Values) + group.ReplicationRole = &replicationRoleTemp } else { group.ReplicationRole = nil } @@ -1148,6 +1149,12 @@ const ( FailoverGroupProperties_ReplicationRole_STATUS_Secondary = FailoverGroupProperties_ReplicationRole_STATUS("Secondary") ) +// Mapping from string to FailoverGroupProperties_ReplicationRole_STATUS +var failoverGroupProperties_ReplicationRole_STATUS_Values = map[string]FailoverGroupProperties_ReplicationRole_STATUS{ + "primary": FailoverGroupProperties_ReplicationRole_STATUS_Primary, + "secondary": FailoverGroupProperties_ReplicationRole_STATUS_Secondary, +} + // Read-only endpoint of the failover group instance. type FailoverGroupReadOnlyEndpoint struct { // FailoverPolicy: Failover policy of the read-only endpoint for the failover group. @@ -1198,8 +1205,9 @@ func (endpoint *FailoverGroupReadOnlyEndpoint) AssignProperties_From_FailoverGro // FailoverPolicy if source.FailoverPolicy != nil { - failoverPolicy := FailoverGroupReadOnlyEndpoint_FailoverPolicy(*source.FailoverPolicy) - endpoint.FailoverPolicy = &failoverPolicy + failoverPolicy := *source.FailoverPolicy + failoverPolicyTemp := genruntime.ToEnum(failoverPolicy, failoverGroupReadOnlyEndpoint_FailoverPolicy_Values) + endpoint.FailoverPolicy = &failoverPolicyTemp } else { endpoint.FailoverPolicy = nil } @@ -1282,8 +1290,9 @@ func (endpoint *FailoverGroupReadOnlyEndpoint_STATUS) AssignProperties_From_Fail // FailoverPolicy if source.FailoverPolicy != nil { - failoverPolicy := FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS(*source.FailoverPolicy) - endpoint.FailoverPolicy = &failoverPolicy + failoverPolicy := *source.FailoverPolicy + failoverPolicyTemp := genruntime.ToEnum(failoverPolicy, failoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Values) + endpoint.FailoverPolicy = &failoverPolicyTemp } else { endpoint.FailoverPolicy = nil } @@ -1384,8 +1393,9 @@ func (endpoint *FailoverGroupReadWriteEndpoint) AssignProperties_From_FailoverGr // FailoverPolicy if source.FailoverPolicy != nil { - failoverPolicy := FailoverGroupReadWriteEndpoint_FailoverPolicy(*source.FailoverPolicy) - endpoint.FailoverPolicy = &failoverPolicy + failoverPolicy := *source.FailoverPolicy + failoverPolicyTemp := genruntime.ToEnum(failoverPolicy, failoverGroupReadWriteEndpoint_FailoverPolicy_Values) + endpoint.FailoverPolicy = &failoverPolicyTemp } else { endpoint.FailoverPolicy = nil } @@ -1488,8 +1498,9 @@ func (endpoint *FailoverGroupReadWriteEndpoint_STATUS) AssignProperties_From_Fai // FailoverPolicy if source.FailoverPolicy != nil { - failoverPolicy := FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS(*source.FailoverPolicy) - endpoint.FailoverPolicy = &failoverPolicy + failoverPolicy := *source.FailoverPolicy + failoverPolicyTemp := genruntime.ToEnum(failoverPolicy, failoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Values) + endpoint.FailoverPolicy = &failoverPolicyTemp } else { endpoint.FailoverPolicy = nil } @@ -1687,8 +1698,9 @@ func (info *PartnerInfo_STATUS) AssignProperties_From_PartnerInfo_STATUS(source // ReplicationRole if source.ReplicationRole != nil { - replicationRole := PartnerInfo_ReplicationRole_STATUS(*source.ReplicationRole) - info.ReplicationRole = &replicationRole + replicationRole := *source.ReplicationRole + replicationRoleTemp := genruntime.ToEnum(replicationRole, partnerInfo_ReplicationRole_STATUS_Values) + info.ReplicationRole = &replicationRoleTemp } else { info.ReplicationRole = nil } @@ -1735,6 +1747,12 @@ const ( FailoverGroupReadOnlyEndpoint_FailoverPolicy_Enabled = FailoverGroupReadOnlyEndpoint_FailoverPolicy("Enabled") ) +// Mapping from string to FailoverGroupReadOnlyEndpoint_FailoverPolicy +var failoverGroupReadOnlyEndpoint_FailoverPolicy_Values = map[string]FailoverGroupReadOnlyEndpoint_FailoverPolicy{ + "disabled": FailoverGroupReadOnlyEndpoint_FailoverPolicy_Disabled, + "enabled": FailoverGroupReadOnlyEndpoint_FailoverPolicy_Enabled, +} + type FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS string const ( @@ -1742,6 +1760,12 @@ const ( FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Enabled = FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS("Enabled") ) +// Mapping from string to FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS +var failoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Values = map[string]FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS{ + "disabled": FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Disabled, + "enabled": FailoverGroupReadOnlyEndpoint_FailoverPolicy_STATUS_Enabled, +} + // +kubebuilder:validation:Enum={"Automatic","Manual"} type FailoverGroupReadWriteEndpoint_FailoverPolicy string @@ -1750,6 +1774,12 @@ const ( FailoverGroupReadWriteEndpoint_FailoverPolicy_Manual = FailoverGroupReadWriteEndpoint_FailoverPolicy("Manual") ) +// Mapping from string to FailoverGroupReadWriteEndpoint_FailoverPolicy +var failoverGroupReadWriteEndpoint_FailoverPolicy_Values = map[string]FailoverGroupReadWriteEndpoint_FailoverPolicy{ + "automatic": FailoverGroupReadWriteEndpoint_FailoverPolicy_Automatic, + "manual": FailoverGroupReadWriteEndpoint_FailoverPolicy_Manual, +} + type FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS string const ( @@ -1757,6 +1787,12 @@ const ( FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Manual = FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS("Manual") ) +// Mapping from string to FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS +var failoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Values = map[string]FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS{ + "automatic": FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Automatic, + "manual": FailoverGroupReadWriteEndpoint_FailoverPolicy_STATUS_Manual, +} + type PartnerInfo_ReplicationRole_STATUS string const ( @@ -1764,6 +1800,12 @@ const ( PartnerInfo_ReplicationRole_STATUS_Secondary = PartnerInfo_ReplicationRole_STATUS("Secondary") ) +// Mapping from string to PartnerInfo_ReplicationRole_STATUS +var partnerInfo_ReplicationRole_STATUS_Values = map[string]PartnerInfo_ReplicationRole_STATUS{ + "primary": PartnerInfo_ReplicationRole_STATUS_Primary, + "secondary": PartnerInfo_ReplicationRole_STATUS_Secondary, +} + func init() { SchemeBuilder.Register(&ServersFailoverGroup{}, &ServersFailoverGroupList{}) } diff --git a/v2/api/sql/v1api20211101/servers_security_alert_policy_types_gen.go b/v2/api/sql/v1api20211101/servers_security_alert_policy_types_gen.go index e7e98811ca9..5cb3807ceb5 100644 --- a/v2/api/sql/v1api20211101/servers_security_alert_policy_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_security_alert_policy_types_gen.go @@ -560,8 +560,9 @@ func (policy *Servers_SecurityAlertPolicy_Spec) AssignProperties_From_Servers_Se // State if source.State != nil { - state := ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State(*source.State) - policy.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Values) + policy.State = &stateTemp } else { policy.State = nil } @@ -919,8 +920,9 @@ func (policy *Servers_SecurityAlertPolicy_STATUS) AssignProperties_From_Servers_ // State if source.State != nil { - state := ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS(*source.State) - policy.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, serverSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Values) + policy.State = &stateTemp } else { policy.State = nil } @@ -1026,6 +1028,12 @@ const ( ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Enabled = ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State("Enabled") ) +// Mapping from string to ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State +var serverSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Values = map[string]ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State{ + "disabled": ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Disabled, + "enabled": ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_Enabled, +} + type ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS string const ( @@ -1033,6 +1041,12 @@ const ( ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Enabled = ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS("Enabled") ) +// Mapping from string to ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS +var serverSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Values = map[string]ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS{ + "disabled": ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Disabled, + "enabled": ServerSecurityAlertPoliciesSecurityAlertsPolicyProperties_State_STATUS_Enabled, +} + func init() { SchemeBuilder.Register(&ServersSecurityAlertPolicy{}, &ServersSecurityAlertPolicyList{}) } diff --git a/v2/api/sql/v1api20211101/servers_virtual_network_rule_types_gen.go b/v2/api/sql/v1api20211101/servers_virtual_network_rule_types_gen.go index 46cb2d46c9d..ea672115cc7 100644 --- a/v2/api/sql/v1api20211101/servers_virtual_network_rule_types_gen.go +++ b/v2/api/sql/v1api20211101/servers_virtual_network_rule_types_gen.go @@ -733,8 +733,9 @@ func (rule *Servers_VirtualNetworkRule_STATUS) AssignProperties_From_Servers_Vir // State if source.State != nil { - state := VirtualNetworkRuleProperties_State_STATUS(*source.State) - rule.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, virtualNetworkRuleProperties_State_STATUS_Values) + rule.State = &stateTemp } else { rule.State = nil } @@ -807,6 +808,16 @@ const ( VirtualNetworkRuleProperties_State_STATUS_Unknown = VirtualNetworkRuleProperties_State_STATUS("Unknown") ) +// Mapping from string to VirtualNetworkRuleProperties_State_STATUS +var virtualNetworkRuleProperties_State_STATUS_Values = map[string]VirtualNetworkRuleProperties_State_STATUS{ + "deleting": VirtualNetworkRuleProperties_State_STATUS_Deleting, + "failed": VirtualNetworkRuleProperties_State_STATUS_Failed, + "inprogress": VirtualNetworkRuleProperties_State_STATUS_InProgress, + "initializing": VirtualNetworkRuleProperties_State_STATUS_Initializing, + "ready": VirtualNetworkRuleProperties_State_STATUS_Ready, + "unknown": VirtualNetworkRuleProperties_State_STATUS_Unknown, +} + func init() { SchemeBuilder.Register(&ServersVirtualNetworkRule{}, &ServersVirtualNetworkRuleList{}) } diff --git a/v2/api/storage/v1api20210401/storage_account_spec_arm_types_gen.go b/v2/api/storage/v1api20210401/storage_account_spec_arm_types_gen.go index 40718ebf91c..5501fc1e16d 100644 --- a/v2/api/storage/v1api20210401/storage_account_spec_arm_types_gen.go +++ b/v2/api/storage/v1api20210401/storage_account_spec_arm_types_gen.go @@ -88,6 +88,15 @@ const ( StorageAccount_Kind_Spec_StorageV2 = StorageAccount_Kind_Spec("StorageV2") ) +// Mapping from string to StorageAccount_Kind_Spec +var storageAccount_Kind_Spec_Values = map[string]StorageAccount_Kind_Spec{ + "blobstorage": StorageAccount_Kind_Spec_BlobStorage, + "blockblobstorage": StorageAccount_Kind_Spec_BlockBlobStorage, + "filestorage": StorageAccount_Kind_Spec_FileStorage, + "storage": StorageAccount_Kind_Spec_Storage, + "storagev2": StorageAccount_Kind_Spec_StorageV2, +} + // The parameters used to create the storage account. type StorageAccountPropertiesCreateParameters_ARM struct { // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier used for billing. @@ -195,6 +204,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned,UserAssigned","UserAssigned"} type Identity_Type string @@ -205,6 +219,14 @@ const ( Identity_Type_UserAssigned = Identity_Type("UserAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "systemassigned,userassigned": Identity_Type_SystemAssignedUserAssigned, + "userassigned": Identity_Type_UserAssigned, +} + // KeyPolicy assigned to the storage account. type KeyPolicy_ARM struct { // KeyExpirationPeriodInDays: The key expiration period in days. @@ -268,6 +290,18 @@ const ( SkuName_Standard_ZRS = SkuName("Standard_ZRS") ) +// Mapping from string to SkuName +var skuName_Values = map[string]SkuName{ + "premium_lrs": SkuName_Premium_LRS, + "premium_zrs": SkuName_Premium_ZRS, + "standard_grs": SkuName_Standard_GRS, + "standard_gzrs": SkuName_Standard_GZRS, + "standard_lrs": SkuName_Standard_LRS, + "standard_ragrs": SkuName_Standard_RAGRS, + "standard_ragzrs": SkuName_Standard_RAGZRS, + "standard_zrs": SkuName_Standard_ZRS, +} + // The SKU tier. This is based on the SKU name. // +kubebuilder:validation:Enum={"Premium","Standard"} type Tier string @@ -277,6 +311,12 @@ const ( Tier_Standard = Tier("Standard") ) +// Mapping from string to Tier +var tier_Values = map[string]Tier{ + "premium": Tier_Premium, + "standard": Tier_Standard, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/storage/v1api20210401/storage_account_status_arm_types_gen.go b/v2/api/storage/v1api20210401/storage_account_status_arm_types_gen.go index 17ef9cd655d..ad272be2cf3 100644 --- a/v2/api/storage/v1api20210401/storage_account_status_arm_types_gen.go +++ b/v2/api/storage/v1api20210401/storage_account_status_arm_types_gen.go @@ -83,6 +83,15 @@ const ( StorageAccount_Kind_STATUS_StorageV2 = StorageAccount_Kind_STATUS("StorageV2") ) +// Mapping from string to StorageAccount_Kind_STATUS +var storageAccount_Kind_STATUS_Values = map[string]StorageAccount_Kind_STATUS{ + "blobstorage": StorageAccount_Kind_STATUS_BlobStorage, + "blockblobstorage": StorageAccount_Kind_STATUS_BlockBlobStorage, + "filestorage": StorageAccount_Kind_STATUS_FileStorage, + "storage": StorageAccount_Kind_STATUS_Storage, + "storagev2": StorageAccount_Kind_STATUS_StorageV2, +} + // Properties of the storage account. type StorageAccountProperties_STATUS_ARM struct { // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier used for billing. @@ -278,6 +287,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when // geo-redundant replication is enabled for the storage account. type GeoReplicationStats_STATUS_ARM struct { @@ -305,6 +319,14 @@ const ( Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + // Storage account keys creation time. type KeyCreationTime_STATUS_ARM struct { Key1 *string `json:"key1,omitempty"` @@ -380,6 +402,18 @@ const ( SkuName_STATUS_Standard_ZRS = SkuName_STATUS("Standard_ZRS") ) +// Mapping from string to SkuName_STATUS +var skuName_STATUS_Values = map[string]SkuName_STATUS{ + "premium_lrs": SkuName_STATUS_Premium_LRS, + "premium_zrs": SkuName_STATUS_Premium_ZRS, + "standard_grs": SkuName_STATUS_Standard_GRS, + "standard_gzrs": SkuName_STATUS_Standard_GZRS, + "standard_lrs": SkuName_STATUS_Standard_LRS, + "standard_ragrs": SkuName_STATUS_Standard_RAGRS, + "standard_ragzrs": SkuName_STATUS_Standard_RAGZRS, + "standard_zrs": SkuName_STATUS_Standard_ZRS, +} + // The SKU tier. This is based on the SKU name. type Tier_STATUS string @@ -388,6 +422,12 @@ const ( Tier_STATUS_Standard = Tier_STATUS("Standard") ) +// Mapping from string to Tier_STATUS +var tier_STATUS_Values = map[string]Tier_STATUS{ + "premium": Tier_STATUS_Premium, + "standard": Tier_STATUS_Standard, +} + // UserAssignedIdentity for the resource. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The client ID of the identity. diff --git a/v2/api/storage/v1api20210401/storage_account_types_gen.go b/v2/api/storage/v1api20210401/storage_account_types_gen.go index 46fb4094138..7784f6e6008 100644 --- a/v2/api/storage/v1api20210401/storage_account_types_gen.go +++ b/v2/api/storage/v1api20210401/storage_account_types_gen.go @@ -1027,8 +1027,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // AccessTier if source.AccessTier != nil { - accessTier := StorageAccountPropertiesCreateParameters_AccessTier(*source.AccessTier) - account.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, storageAccountPropertiesCreateParameters_AccessTier_Values) + account.AccessTier = &accessTierTemp } else { account.AccessTier = nil } @@ -1150,16 +1151,18 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // Kind if source.Kind != nil { - kind := StorageAccount_Kind_Spec(*source.Kind) - account.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, storageAccount_Kind_Spec_Values) + account.Kind = &kindTemp } else { account.Kind = nil } // LargeFileSharesState if source.LargeFileSharesState != nil { - largeFileSharesState := StorageAccountPropertiesCreateParameters_LargeFileSharesState(*source.LargeFileSharesState) - account.LargeFileSharesState = &largeFileSharesState + largeFileSharesState := *source.LargeFileSharesState + largeFileSharesStateTemp := genruntime.ToEnum(largeFileSharesState, storageAccountPropertiesCreateParameters_LargeFileSharesState_Values) + account.LargeFileSharesState = &largeFileSharesStateTemp } else { account.LargeFileSharesState = nil } @@ -1169,8 +1172,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := StorageAccountPropertiesCreateParameters_MinimumTlsVersion(*source.MinimumTlsVersion) - account.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, storageAccountPropertiesCreateParameters_MinimumTlsVersion_Values) + account.MinimumTlsVersion = &minimumTlsVersionTemp } else { account.MinimumTlsVersion = nil } @@ -2130,8 +2134,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // AccessTier if source.AccessTier != nil { - accessTier := StorageAccountProperties_AccessTier_STATUS(*source.AccessTier) - account.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, storageAccountProperties_AccessTier_STATUS_Values) + account.AccessTier = &accessTierTemp } else { account.AccessTier = nil } @@ -2303,16 +2308,18 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // Kind if source.Kind != nil { - kind := StorageAccount_Kind_STATUS(*source.Kind) - account.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, storageAccount_Kind_STATUS_Values) + account.Kind = &kindTemp } else { account.Kind = nil } // LargeFileSharesState if source.LargeFileSharesState != nil { - largeFileSharesState := StorageAccountProperties_LargeFileSharesState_STATUS(*source.LargeFileSharesState) - account.LargeFileSharesState = &largeFileSharesState + largeFileSharesState := *source.LargeFileSharesState + largeFileSharesStateTemp := genruntime.ToEnum(largeFileSharesState, storageAccountProperties_LargeFileSharesState_STATUS_Values) + account.LargeFileSharesState = &largeFileSharesStateTemp } else { account.LargeFileSharesState = nil } @@ -2325,8 +2332,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := StorageAccountProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - account.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, storageAccountProperties_MinimumTlsVersion_STATUS_Values) + account.MinimumTlsVersion = &minimumTlsVersionTemp } else { account.MinimumTlsVersion = nil } @@ -2381,8 +2389,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // ProvisioningState if source.ProvisioningState != nil { - provisioningState := StorageAccountProperties_ProvisioningState_STATUS(*source.ProvisioningState) - account.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, storageAccountProperties_ProvisioningState_STATUS_Values) + account.ProvisioningState = &provisioningStateTemp } else { account.ProvisioningState = nil } @@ -2440,16 +2449,18 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // StatusOfPrimary if source.StatusOfPrimary != nil { - statusOfPrimary := StorageAccountProperties_StatusOfPrimary_STATUS(*source.StatusOfPrimary) - account.StatusOfPrimary = &statusOfPrimary + statusOfPrimary := *source.StatusOfPrimary + statusOfPrimaryTemp := genruntime.ToEnum(statusOfPrimary, storageAccountProperties_StatusOfPrimary_STATUS_Values) + account.StatusOfPrimary = &statusOfPrimaryTemp } else { account.StatusOfPrimary = nil } // StatusOfSecondary if source.StatusOfSecondary != nil { - statusOfSecondary := StorageAccountProperties_StatusOfSecondary_STATUS(*source.StatusOfSecondary) - account.StatusOfSecondary = &statusOfSecondary + statusOfSecondary := *source.StatusOfSecondary + statusOfSecondaryTemp := genruntime.ToEnum(statusOfSecondary, storageAccountProperties_StatusOfSecondary_STATUS_Values) + account.StatusOfSecondary = &statusOfSecondaryTemp } else { account.StatusOfSecondary = nil } @@ -2930,16 +2941,18 @@ func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_Fr // DefaultSharePermission if source.DefaultSharePermission != nil { - defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission(*source.DefaultSharePermission) - authentication.DefaultSharePermission = &defaultSharePermission + defaultSharePermission := *source.DefaultSharePermission + defaultSharePermissionTemp := genruntime.ToEnum(defaultSharePermission, azureFilesIdentityBasedAuthentication_DefaultSharePermission_Values) + authentication.DefaultSharePermission = &defaultSharePermissionTemp } else { authentication.DefaultSharePermission = nil } // DirectoryServiceOptions if source.DirectoryServiceOptions != nil { - directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions(*source.DirectoryServiceOptions) - authentication.DirectoryServiceOptions = &directoryServiceOption + directoryServiceOption := *source.DirectoryServiceOptions + directoryServiceOptionTemp := genruntime.ToEnum(directoryServiceOption, azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_Values) + authentication.DirectoryServiceOptions = &directoryServiceOptionTemp } else { authentication.DirectoryServiceOptions = nil } @@ -3062,16 +3075,18 @@ func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProper // DefaultSharePermission if source.DefaultSharePermission != nil { - defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS(*source.DefaultSharePermission) - authentication.DefaultSharePermission = &defaultSharePermission + defaultSharePermission := *source.DefaultSharePermission + defaultSharePermissionTemp := genruntime.ToEnum(defaultSharePermission, azureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_Values) + authentication.DefaultSharePermission = &defaultSharePermissionTemp } else { authentication.DefaultSharePermission = nil } // DirectoryServiceOptions if source.DirectoryServiceOptions != nil { - directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS(*source.DirectoryServiceOptions) - authentication.DirectoryServiceOptions = &directoryServiceOption + directoryServiceOption := *source.DirectoryServiceOptions + directoryServiceOptionTemp := genruntime.ToEnum(directoryServiceOption, azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_Values) + authentication.DirectoryServiceOptions = &directoryServiceOptionTemp } else { authentication.DirectoryServiceOptions = nil } @@ -3210,7 +3225,8 @@ func (status *BlobRestoreStatus_STATUS) AssignProperties_From_BlobRestoreStatus_ // Status if source.Status != nil { - statusTemp := BlobRestoreStatus_Status_STATUS(*source.Status) + statusValue := *source.Status + statusTemp := genruntime.ToEnum(statusValue, blobRestoreStatus_Status_STATUS_Values) status.Status = &statusTemp } else { status.Status = nil @@ -3606,8 +3622,9 @@ func (encryption *Encryption) AssignProperties_From_Encryption(source *v20210401 // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -3816,8 +3833,9 @@ func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(sou // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource_STATUS(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_STATUS_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -4204,8 +4222,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -4288,8 +4307,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -4395,8 +4415,9 @@ func (stats *GeoReplicationStats_STATUS) AssignProperties_From_GeoReplicationSta // Status if source.Status != nil { - status := GeoReplicationStats_Status_STATUS(*source.Status) - stats.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, geoReplicationStats_Status_STATUS_Values) + stats.Status = &statusTemp } else { stats.Status = nil } @@ -4509,8 +4530,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20210401s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -4656,8 +4678,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -5070,16 +5093,18 @@ func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *v202 // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -5312,16 +5337,18 @@ func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATU // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass_STATUS(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_STATUS_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction_STATUS(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_STATUS_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -5627,8 +5654,9 @@ func (preference *RoutingPreference) AssignProperties_From_RoutingPreference(sou // RoutingChoice if source.RoutingChoice != nil { - routingChoice := RoutingPreference_RoutingChoice(*source.RoutingChoice) - preference.RoutingChoice = &routingChoice + routingChoice := *source.RoutingChoice + routingChoiceTemp := genruntime.ToEnum(routingChoice, routingPreference_RoutingChoice_Values) + preference.RoutingChoice = &routingChoiceTemp } else { preference.RoutingChoice = nil } @@ -5747,8 +5775,9 @@ func (preference *RoutingPreference_STATUS) AssignProperties_From_RoutingPrefere // RoutingChoice if source.RoutingChoice != nil { - routingChoice := RoutingPreference_RoutingChoice_STATUS(*source.RoutingChoice) - preference.RoutingChoice = &routingChoice + routingChoice := *source.RoutingChoice + routingChoiceTemp := genruntime.ToEnum(routingChoice, routingPreference_RoutingChoice_STATUS_Values) + preference.RoutingChoice = &routingChoiceTemp } else { preference.RoutingChoice = nil } @@ -5864,8 +5893,9 @@ func (policy *SasPolicy) AssignProperties_From_SasPolicy(source *v20210401s.SasP // ExpirationAction if source.ExpirationAction != nil { - expirationAction := SasPolicy_ExpirationAction(*source.ExpirationAction) - policy.ExpirationAction = &expirationAction + expirationAction := *source.ExpirationAction + expirationActionTemp := genruntime.ToEnum(expirationAction, sasPolicy_ExpirationAction_Values) + policy.ExpirationAction = &expirationActionTemp } else { policy.ExpirationAction = nil } @@ -5948,8 +5978,9 @@ func (policy *SasPolicy_STATUS) AssignProperties_From_SasPolicy_STATUS(source *v // ExpirationAction if source.ExpirationAction != nil { - expirationAction := SasPolicy_ExpirationAction_STATUS(*source.ExpirationAction) - policy.ExpirationAction = &expirationAction + expirationAction := *source.ExpirationAction + expirationActionTemp := genruntime.ToEnum(expirationAction, sasPolicy_ExpirationAction_STATUS_Values) + policy.ExpirationAction = &expirationActionTemp } else { policy.ExpirationAction = nil } @@ -6055,16 +6086,18 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20210401s.Sku) error { // Name if source.Name != nil { - name := SkuName(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, skuName_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -6150,16 +6183,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20210401s.Sku_S // Name if source.Name != nil { - name := SkuName_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, skuName_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -6287,6 +6322,12 @@ const ( StorageAccountProperties_AccessTier_STATUS_Hot = StorageAccountProperties_AccessTier_STATUS("Hot") ) +// Mapping from string to StorageAccountProperties_AccessTier_STATUS +var storageAccountProperties_AccessTier_STATUS_Values = map[string]StorageAccountProperties_AccessTier_STATUS{ + "cool": StorageAccountProperties_AccessTier_STATUS_Cool, + "hot": StorageAccountProperties_AccessTier_STATUS_Hot, +} + type StorageAccountProperties_LargeFileSharesState_STATUS string const ( @@ -6294,6 +6335,12 @@ const ( StorageAccountProperties_LargeFileSharesState_STATUS_Enabled = StorageAccountProperties_LargeFileSharesState_STATUS("Enabled") ) +// Mapping from string to StorageAccountProperties_LargeFileSharesState_STATUS +var storageAccountProperties_LargeFileSharesState_STATUS_Values = map[string]StorageAccountProperties_LargeFileSharesState_STATUS{ + "disabled": StorageAccountProperties_LargeFileSharesState_STATUS_Disabled, + "enabled": StorageAccountProperties_LargeFileSharesState_STATUS_Enabled, +} + type StorageAccountProperties_MinimumTlsVersion_STATUS string const ( @@ -6302,6 +6349,13 @@ const ( StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_2") ) +// Mapping from string to StorageAccountProperties_MinimumTlsVersion_STATUS +var storageAccountProperties_MinimumTlsVersion_STATUS_Values = map[string]StorageAccountProperties_MinimumTlsVersion_STATUS{ + "tls1_0": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_0, + "tls1_1": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_1, + "tls1_2": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2, +} + type StorageAccountProperties_ProvisioningState_STATUS string const ( @@ -6310,6 +6364,13 @@ const ( StorageAccountProperties_ProvisioningState_STATUS_Succeeded = StorageAccountProperties_ProvisioningState_STATUS("Succeeded") ) +// Mapping from string to StorageAccountProperties_ProvisioningState_STATUS +var storageAccountProperties_ProvisioningState_STATUS_Values = map[string]StorageAccountProperties_ProvisioningState_STATUS{ + "creating": StorageAccountProperties_ProvisioningState_STATUS_Creating, + "resolvingdns": StorageAccountProperties_ProvisioningState_STATUS_ResolvingDNS, + "succeeded": StorageAccountProperties_ProvisioningState_STATUS_Succeeded, +} + type StorageAccountProperties_StatusOfPrimary_STATUS string const ( @@ -6317,6 +6378,12 @@ const ( StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable = StorageAccountProperties_StatusOfPrimary_STATUS("unavailable") ) +// Mapping from string to StorageAccountProperties_StatusOfPrimary_STATUS +var storageAccountProperties_StatusOfPrimary_STATUS_Values = map[string]StorageAccountProperties_StatusOfPrimary_STATUS{ + "available": StorageAccountProperties_StatusOfPrimary_STATUS_Available, + "unavailable": StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable, +} + type StorageAccountProperties_StatusOfSecondary_STATUS string const ( @@ -6324,6 +6391,12 @@ const ( StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable = StorageAccountProperties_StatusOfSecondary_STATUS("unavailable") ) +// Mapping from string to StorageAccountProperties_StatusOfSecondary_STATUS +var storageAccountProperties_StatusOfSecondary_STATUS_Values = map[string]StorageAccountProperties_StatusOfSecondary_STATUS{ + "available": StorageAccountProperties_StatusOfSecondary_STATUS_Available, + "unavailable": StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable, +} + // +kubebuilder:validation:Enum={"Cool","Hot"} type StorageAccountPropertiesCreateParameters_AccessTier string @@ -6332,6 +6405,12 @@ const ( StorageAccountPropertiesCreateParameters_AccessTier_Hot = StorageAccountPropertiesCreateParameters_AccessTier("Hot") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_AccessTier +var storageAccountPropertiesCreateParameters_AccessTier_Values = map[string]StorageAccountPropertiesCreateParameters_AccessTier{ + "cool": StorageAccountPropertiesCreateParameters_AccessTier_Cool, + "hot": StorageAccountPropertiesCreateParameters_AccessTier_Hot, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type StorageAccountPropertiesCreateParameters_LargeFileSharesState string @@ -6340,6 +6419,12 @@ const ( StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled = StorageAccountPropertiesCreateParameters_LargeFileSharesState("Enabled") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_LargeFileSharesState +var storageAccountPropertiesCreateParameters_LargeFileSharesState_Values = map[string]StorageAccountPropertiesCreateParameters_LargeFileSharesState{ + "disabled": StorageAccountPropertiesCreateParameters_LargeFileSharesState_Disabled, + "enabled": StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled, +} + // +kubebuilder:validation:Enum={"TLS1_0","TLS1_1","TLS1_2"} type StorageAccountPropertiesCreateParameters_MinimumTlsVersion string @@ -6349,6 +6434,13 @@ const ( StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_2") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_MinimumTlsVersion +var storageAccountPropertiesCreateParameters_MinimumTlsVersion_Values = map[string]StorageAccountPropertiesCreateParameters_MinimumTlsVersion{ + "tls1_0": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_0, + "tls1_1": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_1, + "tls1_2": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2, +} + // Settings properties for Active Directory (AD). type ActiveDirectoryProperties struct { // +kubebuilder:validation:Required @@ -6679,6 +6771,15 @@ const ( AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareReader") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DefaultSharePermission +var azureFilesIdentityBasedAuthentication_DefaultSharePermission_Values = map[string]AzureFilesIdentityBasedAuthentication_DefaultSharePermission{ + "none": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_None, + "storagefiledatasmbsharecontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareContributor, + "storagefiledatasmbshareelevatedcontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareElevatedContributor, + "storagefiledatasmbshareowner": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareOwner, + "storagefiledatasmbsharereader": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader, +} + type AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS string const ( @@ -6689,6 +6790,15 @@ const ( AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareReader") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS +var azureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_Values = map[string]AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS{ + "none": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_None, + "storagefiledatasmbsharecontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareContributor, + "storagefiledatasmbshareelevatedcontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareElevatedContributor, + "storagefiledatasmbshareowner": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareOwner, + "storagefiledatasmbsharereader": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader, +} + // +kubebuilder:validation:Enum={"AADDS","AD","None"} type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions string @@ -6698,6 +6808,13 @@ const ( AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("None") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions +var azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_Values = map[string]AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions{ + "aadds": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADDS, + "ad": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AD, + "none": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None, +} + type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS string const ( @@ -6706,6 +6823,13 @@ const ( AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("None") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS +var azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_Values = map[string]AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS{ + "aadds": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADDS, + "ad": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AD, + "none": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None, +} + // Blob restore parameters type BlobRestoreParameters_STATUS struct { // BlobRanges: Blob ranges to restore. @@ -6822,6 +6946,13 @@ const ( BlobRestoreStatus_Status_STATUS_InProgress = BlobRestoreStatus_Status_STATUS("InProgress") ) +// Mapping from string to BlobRestoreStatus_Status_STATUS +var blobRestoreStatus_Status_STATUS_Values = map[string]BlobRestoreStatus_Status_STATUS{ + "complete": BlobRestoreStatus_Status_STATUS_Complete, + "failed": BlobRestoreStatus_Status_STATUS_Failed, + "inprogress": BlobRestoreStatus_Status_STATUS_InProgress, +} + // +kubebuilder:validation:Enum={"Microsoft.Keyvault","Microsoft.Storage"} type Encryption_KeySource string @@ -6830,6 +6961,12 @@ const ( Encryption_KeySource_MicrosoftStorage = Encryption_KeySource("Microsoft.Storage") ) +// Mapping from string to Encryption_KeySource +var encryption_KeySource_Values = map[string]Encryption_KeySource{ + "microsoft.keyvault": Encryption_KeySource_MicrosoftKeyvault, + "microsoft.storage": Encryption_KeySource_MicrosoftStorage, +} + type Encryption_KeySource_STATUS string const ( @@ -6837,6 +6974,12 @@ const ( Encryption_KeySource_STATUS_MicrosoftStorage = Encryption_KeySource_STATUS("Microsoft.Storage") ) +// Mapping from string to Encryption_KeySource_STATUS +var encryption_KeySource_STATUS_Values = map[string]Encryption_KeySource_STATUS{ + "microsoft.keyvault": Encryption_KeySource_STATUS_MicrosoftKeyvault, + "microsoft.storage": Encryption_KeySource_STATUS_MicrosoftStorage, +} + // Encryption identity for the storage account. type EncryptionIdentity struct { // UserAssignedIdentityReference: Resource identifier of the UserAssigned identity to be associated with server-side @@ -7431,6 +7574,13 @@ const ( GeoReplicationStats_Status_STATUS_Unavailable = GeoReplicationStats_Status_STATUS("Unavailable") ) +// Mapping from string to GeoReplicationStats_Status_STATUS +var geoReplicationStats_Status_STATUS_Values = map[string]GeoReplicationStats_Status_STATUS{ + "bootstrap": GeoReplicationStats_Status_STATUS_Bootstrap, + "live": GeoReplicationStats_Status_STATUS_Live, + "unavailable": GeoReplicationStats_Status_STATUS_Unavailable, +} + // IP rule with specific IP or IP range in CIDR format. type IPRule struct { // Action: The action of IP ACL rule. @@ -7497,8 +7647,9 @@ func (rule *IPRule) AssignProperties_From_IPRule(source *v20210401s.IPRule) erro // Action if source.Action != nil { - action := IPRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, iPRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -7581,8 +7732,9 @@ func (rule *IPRule_STATUS) AssignProperties_From_IPRule_STATUS(source *v20210401 // Action if source.Action != nil { - action := IPRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, iPRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -7866,6 +8018,14 @@ const ( NetworkRuleSet_Bypass_None = NetworkRuleSet_Bypass("None") ) +// Mapping from string to NetworkRuleSet_Bypass +var networkRuleSet_Bypass_Values = map[string]NetworkRuleSet_Bypass{ + "azureservices": NetworkRuleSet_Bypass_AzureServices, + "logging": NetworkRuleSet_Bypass_Logging, + "metrics": NetworkRuleSet_Bypass_Metrics, + "none": NetworkRuleSet_Bypass_None, +} + type NetworkRuleSet_Bypass_STATUS string const ( @@ -7875,6 +8035,14 @@ const ( NetworkRuleSet_Bypass_STATUS_None = NetworkRuleSet_Bypass_STATUS("None") ) +// Mapping from string to NetworkRuleSet_Bypass_STATUS +var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{ + "azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices, + "logging": NetworkRuleSet_Bypass_STATUS_Logging, + "metrics": NetworkRuleSet_Bypass_STATUS_Metrics, + "none": NetworkRuleSet_Bypass_STATUS_None, +} + // +kubebuilder:validation:Enum={"Allow","Deny"} type NetworkRuleSet_DefaultAction string @@ -7883,6 +8051,12 @@ const ( NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction +var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{ + "allow": NetworkRuleSet_DefaultAction_Allow, + "deny": NetworkRuleSet_DefaultAction_Deny, +} + type NetworkRuleSet_DefaultAction_STATUS string const ( @@ -7890,6 +8064,12 @@ const ( NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction_STATUS +var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{ + "allow": NetworkRuleSet_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSet_DefaultAction_STATUS_Deny, +} + // Resource Access Rule. type ResourceAccessRule struct { // ResourceReference: Resource Id @@ -8077,6 +8257,12 @@ const ( RoutingPreference_RoutingChoice_MicrosoftRouting = RoutingPreference_RoutingChoice("MicrosoftRouting") ) +// Mapping from string to RoutingPreference_RoutingChoice +var routingPreference_RoutingChoice_Values = map[string]RoutingPreference_RoutingChoice{ + "internetrouting": RoutingPreference_RoutingChoice_InternetRouting, + "microsoftrouting": RoutingPreference_RoutingChoice_MicrosoftRouting, +} + type RoutingPreference_RoutingChoice_STATUS string const ( @@ -8084,15 +8270,31 @@ const ( RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting = RoutingPreference_RoutingChoice_STATUS("MicrosoftRouting") ) +// Mapping from string to RoutingPreference_RoutingChoice_STATUS +var routingPreference_RoutingChoice_STATUS_Values = map[string]RoutingPreference_RoutingChoice_STATUS{ + "internetrouting": RoutingPreference_RoutingChoice_STATUS_InternetRouting, + "microsoftrouting": RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting, +} + // +kubebuilder:validation:Enum={"Log"} type SasPolicy_ExpirationAction string const SasPolicy_ExpirationAction_Log = SasPolicy_ExpirationAction("Log") +// Mapping from string to SasPolicy_ExpirationAction +var sasPolicy_ExpirationAction_Values = map[string]SasPolicy_ExpirationAction{ + "log": SasPolicy_ExpirationAction_Log, +} + type SasPolicy_ExpirationAction_STATUS string const SasPolicy_ExpirationAction_STATUS_Log = SasPolicy_ExpirationAction_STATUS("Log") +// Mapping from string to SasPolicy_ExpirationAction_STATUS +var sasPolicy_ExpirationAction_STATUS_Values = map[string]SasPolicy_ExpirationAction_STATUS{ + "log": SasPolicy_ExpirationAction_STATUS_Log, +} + // The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. type StorageAccountInternetEndpoints_STATUS struct { // Blob: Gets the blob endpoint. @@ -8844,8 +9046,9 @@ func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source // Action if source.Action != nil { - action := VirtualNetworkRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, virtualNetworkRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -8860,8 +9063,9 @@ func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source // State if source.State != nil { - state := VirtualNetworkRule_State(*source.State) - rule.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, virtualNetworkRule_State_Values) + rule.State = &stateTemp } else { rule.State = nil } @@ -8964,8 +9168,9 @@ func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_ // Action if source.Action != nil { - action := VirtualNetworkRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, virtualNetworkRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -8975,8 +9180,9 @@ func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_ // State if source.State != nil { - state := VirtualNetworkRule_State_STATUS(*source.State) - rule.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, virtualNetworkRule_State_STATUS_Values) + rule.State = &stateTemp } else { rule.State = nil } @@ -9168,8 +9374,9 @@ func (service *EncryptionService) AssignProperties_From_EncryptionService(source // KeyType if source.KeyType != nil { - keyType := EncryptionService_KeyType(*source.KeyType) - service.KeyType = &keyType + keyType := *source.KeyType + keyTypeTemp := genruntime.ToEnum(keyType, encryptionService_KeyType_Values) + service.KeyType = &keyTypeTemp } else { service.KeyType = nil } @@ -9274,8 +9481,9 @@ func (service *EncryptionService_STATUS) AssignProperties_From_EncryptionService // KeyType if source.KeyType != nil { - keyType := EncryptionService_KeyType_STATUS(*source.KeyType) - service.KeyType = &keyType + keyType := *source.KeyType + keyTypeTemp := genruntime.ToEnum(keyType, encryptionService_KeyType_STATUS_Values) + service.KeyType = &keyTypeTemp } else { service.KeyType = nil } @@ -9327,19 +9535,39 @@ type IPRule_Action string const IPRule_Action_Allow = IPRule_Action("Allow") +// Mapping from string to IPRule_Action +var iPRule_Action_Values = map[string]IPRule_Action{ + "allow": IPRule_Action_Allow, +} + type IPRule_Action_STATUS string const IPRule_Action_STATUS_Allow = IPRule_Action_STATUS("Allow") +// Mapping from string to IPRule_Action_STATUS +var iPRule_Action_STATUS_Values = map[string]IPRule_Action_STATUS{ + "allow": IPRule_Action_STATUS_Allow, +} + // +kubebuilder:validation:Enum={"Allow"} type VirtualNetworkRule_Action string const VirtualNetworkRule_Action_Allow = VirtualNetworkRule_Action("Allow") +// Mapping from string to VirtualNetworkRule_Action +var virtualNetworkRule_Action_Values = map[string]VirtualNetworkRule_Action{ + "allow": VirtualNetworkRule_Action_Allow, +} + type VirtualNetworkRule_Action_STATUS string const VirtualNetworkRule_Action_STATUS_Allow = VirtualNetworkRule_Action_STATUS("Allow") +// Mapping from string to VirtualNetworkRule_Action_STATUS +var virtualNetworkRule_Action_STATUS_Values = map[string]VirtualNetworkRule_Action_STATUS{ + "allow": VirtualNetworkRule_Action_STATUS_Allow, +} + // +kubebuilder:validation:Enum={"Deprovisioning","Failed","NetworkSourceDeleted","Provisioning","Succeeded"} type VirtualNetworkRule_State string @@ -9351,6 +9579,15 @@ const ( VirtualNetworkRule_State_Succeeded = VirtualNetworkRule_State("Succeeded") ) +// Mapping from string to VirtualNetworkRule_State +var virtualNetworkRule_State_Values = map[string]VirtualNetworkRule_State{ + "deprovisioning": VirtualNetworkRule_State_Deprovisioning, + "failed": VirtualNetworkRule_State_Failed, + "networksourcedeleted": VirtualNetworkRule_State_NetworkSourceDeleted, + "provisioning": VirtualNetworkRule_State_Provisioning, + "succeeded": VirtualNetworkRule_State_Succeeded, +} + type VirtualNetworkRule_State_STATUS string const ( @@ -9361,6 +9598,15 @@ const ( VirtualNetworkRule_State_STATUS_Succeeded = VirtualNetworkRule_State_STATUS("Succeeded") ) +// Mapping from string to VirtualNetworkRule_State_STATUS +var virtualNetworkRule_State_STATUS_Values = map[string]VirtualNetworkRule_State_STATUS{ + "deprovisioning": VirtualNetworkRule_State_STATUS_Deprovisioning, + "failed": VirtualNetworkRule_State_STATUS_Failed, + "networksourcedeleted": VirtualNetworkRule_State_STATUS_NetworkSourceDeleted, + "provisioning": VirtualNetworkRule_State_STATUS_Provisioning, + "succeeded": VirtualNetworkRule_State_STATUS_Succeeded, +} + // +kubebuilder:validation:Enum={"Account","Service"} type EncryptionService_KeyType string @@ -9369,6 +9615,12 @@ const ( EncryptionService_KeyType_Service = EncryptionService_KeyType("Service") ) +// Mapping from string to EncryptionService_KeyType +var encryptionService_KeyType_Values = map[string]EncryptionService_KeyType{ + "account": EncryptionService_KeyType_Account, + "service": EncryptionService_KeyType_Service, +} + type EncryptionService_KeyType_STATUS string const ( @@ -9376,6 +9628,12 @@ const ( EncryptionService_KeyType_STATUS_Service = EncryptionService_KeyType_STATUS("Service") ) +// Mapping from string to EncryptionService_KeyType_STATUS +var encryptionService_KeyType_STATUS_Values = map[string]EncryptionService_KeyType_STATUS{ + "account": EncryptionService_KeyType_STATUS_Account, + "service": EncryptionService_KeyType_STATUS_Service, +} + func init() { SchemeBuilder.Register(&StorageAccount{}, &StorageAccountList{}) } diff --git a/v2/api/storage/v1api20210401/storage_accounts_blob_service_types_gen.go b/v2/api/storage/v1api20210401/storage_accounts_blob_service_types_gen.go index ebb8d32ce77..1f143abca39 100644 --- a/v2/api/storage/v1api20210401/storage_accounts_blob_service_types_gen.go +++ b/v2/api/storage/v1api20210401/storage_accounts_blob_service_types_gen.go @@ -2084,8 +2084,9 @@ func (policy *LastAccessTimeTrackingPolicy) AssignProperties_From_LastAccessTime // Name if source.Name != nil { - name := LastAccessTimeTrackingPolicy_Name(*source.Name) - policy.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, lastAccessTimeTrackingPolicy_Name_Values) + policy.Name = &nameTemp } else { policy.Name = nil } @@ -2209,8 +2210,9 @@ func (policy *LastAccessTimeTrackingPolicy_STATUS) AssignProperties_From_LastAcc // Name if source.Name != nil { - name := LastAccessTimeTrackingPolicy_Name_STATUS(*source.Name) - policy.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, lastAccessTimeTrackingPolicy_Name_STATUS_Values) + policy.Name = &nameTemp } else { policy.Name = nil } @@ -2610,7 +2612,7 @@ func (rule *CorsRule) AssignProperties_From_CorsRule(source *v20210401s.CorsRule for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { // Shadow the loop variable to avoid aliasing allowedMethodItem := allowedMethodItem - allowedMethodList[allowedMethodIndex] = CorsRule_AllowedMethods(allowedMethodItem) + allowedMethodList[allowedMethodIndex] = genruntime.ToEnum(allowedMethodItem, corsRule_AllowedMethods_Values) } rule.AllowedMethods = allowedMethodList } else { @@ -2749,7 +2751,7 @@ func (rule *CorsRule_STATUS) AssignProperties_From_CorsRule_STATUS(source *v2021 for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { // Shadow the loop variable to avoid aliasing allowedMethodItem := allowedMethodItem - allowedMethodList[allowedMethodIndex] = CorsRule_AllowedMethods_STATUS(allowedMethodItem) + allowedMethodList[allowedMethodIndex] = genruntime.ToEnum(allowedMethodItem, corsRule_AllowedMethods_STATUS_Values) } rule.AllowedMethods = allowedMethodList } else { @@ -2815,10 +2817,20 @@ type LastAccessTimeTrackingPolicy_Name string const LastAccessTimeTrackingPolicy_Name_AccessTimeTracking = LastAccessTimeTrackingPolicy_Name("AccessTimeTracking") +// Mapping from string to LastAccessTimeTrackingPolicy_Name +var lastAccessTimeTrackingPolicy_Name_Values = map[string]LastAccessTimeTrackingPolicy_Name{ + "accesstimetracking": LastAccessTimeTrackingPolicy_Name_AccessTimeTracking, +} + type LastAccessTimeTrackingPolicy_Name_STATUS string const LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking = LastAccessTimeTrackingPolicy_Name_STATUS("AccessTimeTracking") +// Mapping from string to LastAccessTimeTrackingPolicy_Name_STATUS +var lastAccessTimeTrackingPolicy_Name_STATUS_Values = map[string]LastAccessTimeTrackingPolicy_Name_STATUS{ + "accesstimetracking": LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking, +} + // +kubebuilder:validation:Enum={"DELETE","GET","HEAD","MERGE","OPTIONS","POST","PUT"} type CorsRule_AllowedMethods string @@ -2832,6 +2844,17 @@ const ( CorsRule_AllowedMethods_PUT = CorsRule_AllowedMethods("PUT") ) +// Mapping from string to CorsRule_AllowedMethods +var corsRule_AllowedMethods_Values = map[string]CorsRule_AllowedMethods{ + "delete": CorsRule_AllowedMethods_DELETE, + "get": CorsRule_AllowedMethods_GET, + "head": CorsRule_AllowedMethods_HEAD, + "merge": CorsRule_AllowedMethods_MERGE, + "options": CorsRule_AllowedMethods_OPTIONS, + "post": CorsRule_AllowedMethods_POST, + "put": CorsRule_AllowedMethods_PUT, +} + type CorsRule_AllowedMethods_STATUS string const ( @@ -2844,6 +2867,17 @@ const ( CorsRule_AllowedMethods_STATUS_PUT = CorsRule_AllowedMethods_STATUS("PUT") ) +// Mapping from string to CorsRule_AllowedMethods_STATUS +var corsRule_AllowedMethods_STATUS_Values = map[string]CorsRule_AllowedMethods_STATUS{ + "delete": CorsRule_AllowedMethods_STATUS_DELETE, + "get": CorsRule_AllowedMethods_STATUS_GET, + "head": CorsRule_AllowedMethods_STATUS_HEAD, + "merge": CorsRule_AllowedMethods_STATUS_MERGE, + "options": CorsRule_AllowedMethods_STATUS_OPTIONS, + "post": CorsRule_AllowedMethods_STATUS_POST, + "put": CorsRule_AllowedMethods_STATUS_PUT, +} + func init() { SchemeBuilder.Register(&StorageAccountsBlobService{}, &StorageAccountsBlobServiceList{}) } diff --git a/v2/api/storage/v1api20210401/storage_accounts_blob_services_container_types_gen.go b/v2/api/storage/v1api20210401/storage_accounts_blob_services_container_types_gen.go index 59dcce4e02b..fd230ac6000 100644 --- a/v2/api/storage/v1api20210401/storage_accounts_blob_services_container_types_gen.go +++ b/v2/api/storage/v1api20210401/storage_accounts_blob_services_container_types_gen.go @@ -575,8 +575,9 @@ func (container *StorageAccounts_BlobServices_Container_Spec) AssignProperties_F // PublicAccess if source.PublicAccess != nil { - publicAccess := ContainerProperties_PublicAccess(*source.PublicAccess) - container.PublicAccess = &publicAccess + publicAccess := *source.PublicAccess + publicAccessTemp := genruntime.ToEnum(publicAccess, containerProperties_PublicAccess_Values) + container.PublicAccess = &publicAccessTemp } else { container.PublicAccess = nil } @@ -1077,24 +1078,27 @@ func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties // LeaseDuration if source.LeaseDuration != nil { - leaseDuration := ContainerProperties_LeaseDuration_STATUS(*source.LeaseDuration) - container.LeaseDuration = &leaseDuration + leaseDuration := *source.LeaseDuration + leaseDurationTemp := genruntime.ToEnum(leaseDuration, containerProperties_LeaseDuration_STATUS_Values) + container.LeaseDuration = &leaseDurationTemp } else { container.LeaseDuration = nil } // LeaseState if source.LeaseState != nil { - leaseState := ContainerProperties_LeaseState_STATUS(*source.LeaseState) - container.LeaseState = &leaseState + leaseState := *source.LeaseState + leaseStateTemp := genruntime.ToEnum(leaseState, containerProperties_LeaseState_STATUS_Values) + container.LeaseState = &leaseStateTemp } else { container.LeaseState = nil } // LeaseStatus if source.LeaseStatus != nil { - leaseStatus := ContainerProperties_LeaseStatus_STATUS(*source.LeaseStatus) - container.LeaseStatus = &leaseStatus + leaseStatus := *source.LeaseStatus + leaseStatusTemp := genruntime.ToEnum(leaseStatus, containerProperties_LeaseStatus_STATUS_Values) + container.LeaseStatus = &leaseStatusTemp } else { container.LeaseStatus = nil } @@ -1119,8 +1123,9 @@ func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties // PublicAccess if source.PublicAccess != nil { - publicAccess := ContainerProperties_PublicAccess_STATUS(*source.PublicAccess) - container.PublicAccess = &publicAccess + publicAccess := *source.PublicAccess + publicAccessTemp := genruntime.ToEnum(publicAccess, containerProperties_PublicAccess_STATUS_Values) + container.PublicAccess = &publicAccessTemp } else { container.PublicAccess = nil } @@ -1294,6 +1299,12 @@ const ( ContainerProperties_LeaseDuration_STATUS_Infinite = ContainerProperties_LeaseDuration_STATUS("Infinite") ) +// Mapping from string to ContainerProperties_LeaseDuration_STATUS +var containerProperties_LeaseDuration_STATUS_Values = map[string]ContainerProperties_LeaseDuration_STATUS{ + "fixed": ContainerProperties_LeaseDuration_STATUS_Fixed, + "infinite": ContainerProperties_LeaseDuration_STATUS_Infinite, +} + type ContainerProperties_LeaseState_STATUS string const ( @@ -1304,6 +1315,15 @@ const ( ContainerProperties_LeaseState_STATUS_Leased = ContainerProperties_LeaseState_STATUS("Leased") ) +// Mapping from string to ContainerProperties_LeaseState_STATUS +var containerProperties_LeaseState_STATUS_Values = map[string]ContainerProperties_LeaseState_STATUS{ + "available": ContainerProperties_LeaseState_STATUS_Available, + "breaking": ContainerProperties_LeaseState_STATUS_Breaking, + "broken": ContainerProperties_LeaseState_STATUS_Broken, + "expired": ContainerProperties_LeaseState_STATUS_Expired, + "leased": ContainerProperties_LeaseState_STATUS_Leased, +} + type ContainerProperties_LeaseStatus_STATUS string const ( @@ -1311,6 +1331,12 @@ const ( ContainerProperties_LeaseStatus_STATUS_Unlocked = ContainerProperties_LeaseStatus_STATUS("Unlocked") ) +// Mapping from string to ContainerProperties_LeaseStatus_STATUS +var containerProperties_LeaseStatus_STATUS_Values = map[string]ContainerProperties_LeaseStatus_STATUS{ + "locked": ContainerProperties_LeaseStatus_STATUS_Locked, + "unlocked": ContainerProperties_LeaseStatus_STATUS_Unlocked, +} + // +kubebuilder:validation:Enum={"Blob","Container","None"} type ContainerProperties_PublicAccess string @@ -1320,6 +1346,13 @@ const ( ContainerProperties_PublicAccess_None = ContainerProperties_PublicAccess("None") ) +// Mapping from string to ContainerProperties_PublicAccess +var containerProperties_PublicAccess_Values = map[string]ContainerProperties_PublicAccess{ + "blob": ContainerProperties_PublicAccess_Blob, + "container": ContainerProperties_PublicAccess_Container, + "none": ContainerProperties_PublicAccess_None, +} + type ContainerProperties_PublicAccess_STATUS string const ( @@ -1328,6 +1361,13 @@ const ( ContainerProperties_PublicAccess_STATUS_None = ContainerProperties_PublicAccess_STATUS("None") ) +// Mapping from string to ContainerProperties_PublicAccess_STATUS +var containerProperties_PublicAccess_STATUS_Values = map[string]ContainerProperties_PublicAccess_STATUS{ + "blob": ContainerProperties_PublicAccess_STATUS_Blob, + "container": ContainerProperties_PublicAccess_STATUS_Container, + "none": ContainerProperties_PublicAccess_STATUS_None, +} + // The properties of an ImmutabilityPolicy of a blob container. type ImmutabilityPolicyProperties_STATUS struct { // AllowProtectedAppendWrites: This property can only be changed for unlocked time-based retention policies. When enabled, @@ -1430,8 +1470,9 @@ func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_From_Imm // State if source.State != nil { - state := ImmutabilityPolicyProperty_State_STATUS(*source.State) - properties.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, immutabilityPolicyProperty_State_STATUS_Values) + properties.State = &stateTemp } else { properties.State = nil } @@ -1659,8 +1700,9 @@ func (versioning *ImmutableStorageWithVersioning_STATUS) AssignProperties_From_I // MigrationState if source.MigrationState != nil { - migrationState := ImmutableStorageWithVersioning_MigrationState_STATUS(*source.MigrationState) - versioning.MigrationState = &migrationState + migrationState := *source.MigrationState + migrationStateTemp := genruntime.ToEnum(migrationState, immutableStorageWithVersioning_MigrationState_STATUS_Values) + versioning.MigrationState = &migrationStateTemp } else { versioning.MigrationState = nil } @@ -1834,6 +1876,12 @@ const ( ImmutabilityPolicyProperty_State_STATUS_Unlocked = ImmutabilityPolicyProperty_State_STATUS("Unlocked") ) +// Mapping from string to ImmutabilityPolicyProperty_State_STATUS +var immutabilityPolicyProperty_State_STATUS_Values = map[string]ImmutabilityPolicyProperty_State_STATUS{ + "locked": ImmutabilityPolicyProperty_State_STATUS_Locked, + "unlocked": ImmutabilityPolicyProperty_State_STATUS_Unlocked, +} + type ImmutableStorageWithVersioning_MigrationState_STATUS string const ( @@ -1841,6 +1889,12 @@ const ( ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress = ImmutableStorageWithVersioning_MigrationState_STATUS("InProgress") ) +// Mapping from string to ImmutableStorageWithVersioning_MigrationState_STATUS +var immutableStorageWithVersioning_MigrationState_STATUS_Values = map[string]ImmutableStorageWithVersioning_MigrationState_STATUS{ + "completed": ImmutableStorageWithVersioning_MigrationState_STATUS_Completed, + "inprogress": ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress, +} + // A tag of the LegalHold of a blob container. type TagProperty_STATUS struct { // ObjectIdentifier: Returns the Object ID of the user who added the tag. @@ -2053,8 +2107,9 @@ func (property *UpdateHistoryProperty_STATUS) AssignProperties_From_UpdateHistor // Update if source.Update != nil { - update := UpdateHistoryProperty_Update_STATUS(*source.Update) - property.Update = &update + update := *source.Update + updateTemp := genruntime.ToEnum(update, updateHistoryProperty_Update_STATUS_Values) + property.Update = &updateTemp } else { property.Update = nil } @@ -2113,6 +2168,13 @@ const ( UpdateHistoryProperty_Update_STATUS_Put = UpdateHistoryProperty_Update_STATUS("put") ) +// Mapping from string to UpdateHistoryProperty_Update_STATUS +var updateHistoryProperty_Update_STATUS_Values = map[string]UpdateHistoryProperty_Update_STATUS{ + "extend": UpdateHistoryProperty_Update_STATUS_Extend, + "lock": UpdateHistoryProperty_Update_STATUS_Lock, + "put": UpdateHistoryProperty_Update_STATUS_Put, +} + func init() { SchemeBuilder.Register(&StorageAccountsBlobServicesContainer{}, &StorageAccountsBlobServicesContainerList{}) } diff --git a/v2/api/storage/v1api20210401/storage_accounts_management_policy_types_gen.go b/v2/api/storage/v1api20210401/storage_accounts_management_policy_types_gen.go index 027e5a380ab..58f85dd302a 100644 --- a/v2/api/storage/v1api20210401/storage_accounts_management_policy_types_gen.go +++ b/v2/api/storage/v1api20210401/storage_accounts_management_policy_types_gen.go @@ -1067,8 +1067,9 @@ func (rule *ManagementPolicyRule) AssignProperties_From_ManagementPolicyRule(sou // Type if source.Type != nil { - typeVar := ManagementPolicyRule_Type(*source.Type) - rule.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managementPolicyRule_Type_Values) + rule.Type = &typeTemp } else { rule.Type = nil } @@ -1215,8 +1216,9 @@ func (rule *ManagementPolicyRule_STATUS) AssignProperties_From_ManagementPolicyR // Type if source.Type != nil { - typeVar := ManagementPolicyRule_Type_STATUS(*source.Type) - rule.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managementPolicyRule_Type_STATUS_Values) + rule.Type = &typeTemp } else { rule.Type = nil } @@ -1547,10 +1549,20 @@ type ManagementPolicyRule_Type string const ManagementPolicyRule_Type_Lifecycle = ManagementPolicyRule_Type("Lifecycle") +// Mapping from string to ManagementPolicyRule_Type +var managementPolicyRule_Type_Values = map[string]ManagementPolicyRule_Type{ + "lifecycle": ManagementPolicyRule_Type_Lifecycle, +} + type ManagementPolicyRule_Type_STATUS string const ManagementPolicyRule_Type_STATUS_Lifecycle = ManagementPolicyRule_Type_STATUS("Lifecycle") +// Mapping from string to ManagementPolicyRule_Type_STATUS +var managementPolicyRule_Type_STATUS_Values = map[string]ManagementPolicyRule_Type_STATUS{ + "lifecycle": ManagementPolicyRule_Type_STATUS_Lifecycle, +} + // Actions are applied to the filtered blobs when the execution condition is met. type ManagementPolicyAction struct { // BaseBlob: The management policy action for base blob diff --git a/v2/api/storage/v1api20220901/storage_account_spec_arm_types_gen.go b/v2/api/storage/v1api20220901/storage_account_spec_arm_types_gen.go index 3ad65c99880..e95ada5b571 100644 --- a/v2/api/storage/v1api20220901/storage_account_spec_arm_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_account_spec_arm_types_gen.go @@ -88,6 +88,15 @@ const ( StorageAccount_Kind_Spec_StorageV2 = StorageAccount_Kind_Spec("StorageV2") ) +// Mapping from string to StorageAccount_Kind_Spec +var storageAccount_Kind_Spec_Values = map[string]StorageAccount_Kind_Spec{ + "blobstorage": StorageAccount_Kind_Spec_BlobStorage, + "blockblobstorage": StorageAccount_Kind_Spec_BlockBlobStorage, + "filestorage": StorageAccount_Kind_Spec_FileStorage, + "storage": StorageAccount_Kind_Spec_Storage, + "storagev2": StorageAccount_Kind_Spec_StorageV2, +} + // The parameters used to create the storage account. type StorageAccountPropertiesCreateParameters_ARM struct { // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' @@ -223,6 +232,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned,UserAssigned","UserAssigned"} type Identity_Type string @@ -233,6 +247,14 @@ const ( Identity_Type_UserAssigned = Identity_Type("UserAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "systemassigned,userassigned": Identity_Type_SystemAssignedUserAssigned, + "userassigned": Identity_Type_UserAssigned, +} + // This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. type ImmutableStorageAccount_ARM struct { // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have @@ -309,6 +331,18 @@ const ( SkuName_Standard_ZRS = SkuName("Standard_ZRS") ) +// Mapping from string to SkuName +var skuName_Values = map[string]SkuName{ + "premium_lrs": SkuName_Premium_LRS, + "premium_zrs": SkuName_Premium_ZRS, + "standard_grs": SkuName_Standard_GRS, + "standard_gzrs": SkuName_Standard_GZRS, + "standard_lrs": SkuName_Standard_LRS, + "standard_ragrs": SkuName_Standard_RAGRS, + "standard_ragzrs": SkuName_Standard_RAGZRS, + "standard_zrs": SkuName_Standard_ZRS, +} + // The SKU tier. This is based on the SKU name. // +kubebuilder:validation:Enum={"Premium","Standard"} type Tier string @@ -318,6 +352,12 @@ const ( Tier_Standard = Tier("Standard") ) +// Mapping from string to Tier +var tier_Values = map[string]Tier{ + "premium": Tier_Premium, + "standard": Tier_Standard, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/storage/v1api20220901/storage_account_status_arm_types_gen.go b/v2/api/storage/v1api20220901/storage_account_status_arm_types_gen.go index 6ced75c90a0..304d3a28564 100644 --- a/v2/api/storage/v1api20220901/storage_account_status_arm_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_account_status_arm_types_gen.go @@ -83,6 +83,15 @@ const ( StorageAccount_Kind_STATUS_StorageV2 = StorageAccount_Kind_STATUS("StorageV2") ) +// Mapping from string to StorageAccount_Kind_STATUS +var storageAccount_Kind_STATUS_Values = map[string]StorageAccount_Kind_STATUS{ + "blobstorage": StorageAccount_Kind_STATUS_BlobStorage, + "blockblobstorage": StorageAccount_Kind_STATUS_BlockBlobStorage, + "filestorage": StorageAccount_Kind_STATUS_FileStorage, + "storage": StorageAccount_Kind_STATUS_Storage, + "storagev2": StorageAccount_Kind_STATUS_StorageV2, +} + // Properties of the storage account. type StorageAccountProperties_STATUS_ARM struct { // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' @@ -310,6 +319,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when // geo-redundant replication is enabled for the storage account. type GeoReplicationStats_STATUS_ARM struct { @@ -337,6 +351,14 @@ const ( Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + // This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. type ImmutableStorageAccount_STATUS_ARM struct { // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have @@ -425,6 +447,18 @@ const ( SkuName_STATUS_Standard_ZRS = SkuName_STATUS("Standard_ZRS") ) +// Mapping from string to SkuName_STATUS +var skuName_STATUS_Values = map[string]SkuName_STATUS{ + "premium_lrs": SkuName_STATUS_Premium_LRS, + "premium_zrs": SkuName_STATUS_Premium_ZRS, + "standard_grs": SkuName_STATUS_Standard_GRS, + "standard_gzrs": SkuName_STATUS_Standard_GZRS, + "standard_lrs": SkuName_STATUS_Standard_LRS, + "standard_ragrs": SkuName_STATUS_Standard_RAGRS, + "standard_ragzrs": SkuName_STATUS_Standard_RAGZRS, + "standard_zrs": SkuName_STATUS_Standard_ZRS, +} + // This defines the sku conversion status object for asynchronous sku conversions. type StorageAccountSkuConversionStatus_STATUS_ARM struct { // EndTime: This property represents the sku conversion end time. @@ -448,6 +482,12 @@ const ( Tier_STATUS_Standard = Tier_STATUS("Standard") ) +// Mapping from string to Tier_STATUS +var tier_STATUS_Values = map[string]Tier_STATUS{ + "premium": Tier_STATUS_Premium, + "standard": Tier_STATUS_Standard, +} + // UserAssignedIdentity for the resource. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The client ID of the identity. diff --git a/v2/api/storage/v1api20220901/storage_account_types_gen.go b/v2/api/storage/v1api20220901/storage_account_types_gen.go index 316148b14d4..150d9f24902 100644 --- a/v2/api/storage/v1api20220901/storage_account_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_account_types_gen.go @@ -1162,8 +1162,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // AccessTier if source.AccessTier != nil { - accessTier := StorageAccountPropertiesCreateParameters_AccessTier(*source.AccessTier) - account.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, storageAccountPropertiesCreateParameters_AccessTier_Values) + account.AccessTier = &accessTierTemp } else { account.AccessTier = nil } @@ -1194,8 +1195,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // AllowedCopyScope if source.AllowedCopyScope != nil { - allowedCopyScope := StorageAccountPropertiesCreateParameters_AllowedCopyScope(*source.AllowedCopyScope) - account.AllowedCopyScope = &allowedCopyScope + allowedCopyScope := *source.AllowedCopyScope + allowedCopyScopeTemp := genruntime.ToEnum(allowedCopyScope, storageAccountPropertiesCreateParameters_AllowedCopyScope_Values) + account.AllowedCopyScope = &allowedCopyScopeTemp } else { account.AllowedCopyScope = nil } @@ -1237,8 +1239,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // DnsEndpointType if source.DnsEndpointType != nil { - dnsEndpointType := StorageAccountPropertiesCreateParameters_DnsEndpointType(*source.DnsEndpointType) - account.DnsEndpointType = &dnsEndpointType + dnsEndpointType := *source.DnsEndpointType + dnsEndpointTypeTemp := genruntime.ToEnum(dnsEndpointType, storageAccountPropertiesCreateParameters_DnsEndpointType_Values) + account.DnsEndpointType = &dnsEndpointTypeTemp } else { account.DnsEndpointType = nil } @@ -1337,16 +1340,18 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // Kind if source.Kind != nil { - kind := StorageAccount_Kind_Spec(*source.Kind) - account.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, storageAccount_Kind_Spec_Values) + account.Kind = &kindTemp } else { account.Kind = nil } // LargeFileSharesState if source.LargeFileSharesState != nil { - largeFileSharesState := StorageAccountPropertiesCreateParameters_LargeFileSharesState(*source.LargeFileSharesState) - account.LargeFileSharesState = &largeFileSharesState + largeFileSharesState := *source.LargeFileSharesState + largeFileSharesStateTemp := genruntime.ToEnum(largeFileSharesState, storageAccountPropertiesCreateParameters_LargeFileSharesState_Values) + account.LargeFileSharesState = &largeFileSharesStateTemp } else { account.LargeFileSharesState = nil } @@ -1356,8 +1361,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := StorageAccountPropertiesCreateParameters_MinimumTlsVersion(*source.MinimumTlsVersion) - account.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, storageAccountPropertiesCreateParameters_MinimumTlsVersion_Values) + account.MinimumTlsVersion = &minimumTlsVersionTemp } else { account.MinimumTlsVersion = nil } @@ -1396,8 +1402,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := StorageAccountPropertiesCreateParameters_PublicNetworkAccess(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, storageAccountPropertiesCreateParameters_PublicNetworkAccess_Values) + account.PublicNetworkAccess = &publicNetworkAccessTemp } else { account.PublicNetworkAccess = nil } @@ -2499,8 +2506,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // AccessTier if source.AccessTier != nil { - accessTier := StorageAccountProperties_AccessTier_STATUS(*source.AccessTier) - account.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, storageAccountProperties_AccessTier_STATUS_Values) + account.AccessTier = &accessTierTemp } else { account.AccessTier = nil } @@ -2531,8 +2539,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // AllowedCopyScope if source.AllowedCopyScope != nil { - allowedCopyScope := StorageAccountProperties_AllowedCopyScope_STATUS(*source.AllowedCopyScope) - account.AllowedCopyScope = &allowedCopyScope + allowedCopyScope := *source.AllowedCopyScope + allowedCopyScopeTemp := genruntime.ToEnum(allowedCopyScope, storageAccountProperties_AllowedCopyScope_STATUS_Values) + account.AllowedCopyScope = &allowedCopyScopeTemp } else { account.AllowedCopyScope = nil } @@ -2589,8 +2598,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // DnsEndpointType if source.DnsEndpointType != nil { - dnsEndpointType := StorageAccountProperties_DnsEndpointType_STATUS(*source.DnsEndpointType) - account.DnsEndpointType = &dnsEndpointType + dnsEndpointType := *source.DnsEndpointType + dnsEndpointTypeTemp := genruntime.ToEnum(dnsEndpointType, storageAccountProperties_DnsEndpointType_STATUS_Values) + account.DnsEndpointType = &dnsEndpointTypeTemp } else { account.DnsEndpointType = nil } @@ -2724,16 +2734,18 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // Kind if source.Kind != nil { - kind := StorageAccount_Kind_STATUS(*source.Kind) - account.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, storageAccount_Kind_STATUS_Values) + account.Kind = &kindTemp } else { account.Kind = nil } // LargeFileSharesState if source.LargeFileSharesState != nil { - largeFileSharesState := StorageAccountProperties_LargeFileSharesState_STATUS(*source.LargeFileSharesState) - account.LargeFileSharesState = &largeFileSharesState + largeFileSharesState := *source.LargeFileSharesState + largeFileSharesStateTemp := genruntime.ToEnum(largeFileSharesState, storageAccountProperties_LargeFileSharesState_STATUS_Values) + account.LargeFileSharesState = &largeFileSharesStateTemp } else { account.LargeFileSharesState = nil } @@ -2746,8 +2758,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := StorageAccountProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - account.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, storageAccountProperties_MinimumTlsVersion_STATUS_Values) + account.MinimumTlsVersion = &minimumTlsVersionTemp } else { account.MinimumTlsVersion = nil } @@ -2802,16 +2815,18 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // ProvisioningState if source.ProvisioningState != nil { - provisioningState := StorageAccountProperties_ProvisioningState_STATUS(*source.ProvisioningState) - account.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, storageAccountProperties_ProvisioningState_STATUS_Values) + account.ProvisioningState = &provisioningStateTemp } else { account.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := StorageAccountProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, storageAccountProperties_PublicNetworkAccess_STATUS_Values) + account.PublicNetworkAccess = &publicNetworkAccessTemp } else { account.PublicNetworkAccess = nil } @@ -2869,16 +2884,18 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // StatusOfPrimary if source.StatusOfPrimary != nil { - statusOfPrimary := StorageAccountProperties_StatusOfPrimary_STATUS(*source.StatusOfPrimary) - account.StatusOfPrimary = &statusOfPrimary + statusOfPrimary := *source.StatusOfPrimary + statusOfPrimaryTemp := genruntime.ToEnum(statusOfPrimary, storageAccountProperties_StatusOfPrimary_STATUS_Values) + account.StatusOfPrimary = &statusOfPrimaryTemp } else { account.StatusOfPrimary = nil } // StatusOfSecondary if source.StatusOfSecondary != nil { - statusOfSecondary := StorageAccountProperties_StatusOfSecondary_STATUS(*source.StatusOfSecondary) - account.StatusOfSecondary = &statusOfSecondary + statusOfSecondary := *source.StatusOfSecondary + statusOfSecondaryTemp := genruntime.ToEnum(statusOfSecondary, storageAccountProperties_StatusOfSecondary_STATUS_Values) + account.StatusOfSecondary = &statusOfSecondaryTemp } else { account.StatusOfSecondary = nil } @@ -3443,16 +3460,18 @@ func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_Fr // DefaultSharePermission if source.DefaultSharePermission != nil { - defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission(*source.DefaultSharePermission) - authentication.DefaultSharePermission = &defaultSharePermission + defaultSharePermission := *source.DefaultSharePermission + defaultSharePermissionTemp := genruntime.ToEnum(defaultSharePermission, azureFilesIdentityBasedAuthentication_DefaultSharePermission_Values) + authentication.DefaultSharePermission = &defaultSharePermissionTemp } else { authentication.DefaultSharePermission = nil } // DirectoryServiceOptions if source.DirectoryServiceOptions != nil { - directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions(*source.DirectoryServiceOptions) - authentication.DirectoryServiceOptions = &directoryServiceOption + directoryServiceOption := *source.DirectoryServiceOptions + directoryServiceOptionTemp := genruntime.ToEnum(directoryServiceOption, azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_Values) + authentication.DirectoryServiceOptions = &directoryServiceOptionTemp } else { authentication.DirectoryServiceOptions = nil } @@ -3575,16 +3594,18 @@ func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProper // DefaultSharePermission if source.DefaultSharePermission != nil { - defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS(*source.DefaultSharePermission) - authentication.DefaultSharePermission = &defaultSharePermission + defaultSharePermission := *source.DefaultSharePermission + defaultSharePermissionTemp := genruntime.ToEnum(defaultSharePermission, azureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_Values) + authentication.DefaultSharePermission = &defaultSharePermissionTemp } else { authentication.DefaultSharePermission = nil } // DirectoryServiceOptions if source.DirectoryServiceOptions != nil { - directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS(*source.DirectoryServiceOptions) - authentication.DirectoryServiceOptions = &directoryServiceOption + directoryServiceOption := *source.DirectoryServiceOptions + directoryServiceOptionTemp := genruntime.ToEnum(directoryServiceOption, azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_Values) + authentication.DirectoryServiceOptions = &directoryServiceOptionTemp } else { authentication.DirectoryServiceOptions = nil } @@ -3723,7 +3744,8 @@ func (status *BlobRestoreStatus_STATUS) AssignProperties_From_BlobRestoreStatus_ // Status if source.Status != nil { - statusTemp := BlobRestoreStatus_Status_STATUS(*source.Status) + statusValue := *source.Status + statusTemp := genruntime.ToEnum(statusValue, blobRestoreStatus_Status_STATUS_Values) status.Status = &statusTemp } else { status.Status = nil @@ -4118,8 +4140,9 @@ func (encryption *Encryption) AssignProperties_From_Encryption(source *v20220901 // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -4328,8 +4351,9 @@ func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(sou // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource_STATUS(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_STATUS_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -4716,8 +4740,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -4800,8 +4825,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -4907,8 +4933,9 @@ func (stats *GeoReplicationStats_STATUS) AssignProperties_From_GeoReplicationSta // Status if source.Status != nil { - status := GeoReplicationStats_Status_STATUS(*source.Status) - stats.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, geoReplicationStats_Status_STATUS_Values) + stats.Status = &statusTemp } else { stats.Status = nil } @@ -5021,8 +5048,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20220901s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -5168,8 +5196,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -5829,16 +5858,18 @@ func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *v202 // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -6071,16 +6102,18 @@ func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATU // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass_STATUS(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_STATUS_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction_STATUS(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_STATUS_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -6386,8 +6419,9 @@ func (preference *RoutingPreference) AssignProperties_From_RoutingPreference(sou // RoutingChoice if source.RoutingChoice != nil { - routingChoice := RoutingPreference_RoutingChoice(*source.RoutingChoice) - preference.RoutingChoice = &routingChoice + routingChoice := *source.RoutingChoice + routingChoiceTemp := genruntime.ToEnum(routingChoice, routingPreference_RoutingChoice_Values) + preference.RoutingChoice = &routingChoiceTemp } else { preference.RoutingChoice = nil } @@ -6506,8 +6540,9 @@ func (preference *RoutingPreference_STATUS) AssignProperties_From_RoutingPrefere // RoutingChoice if source.RoutingChoice != nil { - routingChoice := RoutingPreference_RoutingChoice_STATUS(*source.RoutingChoice) - preference.RoutingChoice = &routingChoice + routingChoice := *source.RoutingChoice + routingChoiceTemp := genruntime.ToEnum(routingChoice, routingPreference_RoutingChoice_STATUS_Values) + preference.RoutingChoice = &routingChoiceTemp } else { preference.RoutingChoice = nil } @@ -6623,8 +6658,9 @@ func (policy *SasPolicy) AssignProperties_From_SasPolicy(source *v20220901s.SasP // ExpirationAction if source.ExpirationAction != nil { - expirationAction := SasPolicy_ExpirationAction(*source.ExpirationAction) - policy.ExpirationAction = &expirationAction + expirationAction := *source.ExpirationAction + expirationActionTemp := genruntime.ToEnum(expirationAction, sasPolicy_ExpirationAction_Values) + policy.ExpirationAction = &expirationActionTemp } else { policy.ExpirationAction = nil } @@ -6707,8 +6743,9 @@ func (policy *SasPolicy_STATUS) AssignProperties_From_SasPolicy_STATUS(source *v // ExpirationAction if source.ExpirationAction != nil { - expirationAction := SasPolicy_ExpirationAction_STATUS(*source.ExpirationAction) - policy.ExpirationAction = &expirationAction + expirationAction := *source.ExpirationAction + expirationActionTemp := genruntime.ToEnum(expirationAction, sasPolicy_ExpirationAction_STATUS_Values) + policy.ExpirationAction = &expirationActionTemp } else { policy.ExpirationAction = nil } @@ -6814,16 +6851,18 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20220901s.Sku) error { // Name if source.Name != nil { - name := SkuName(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, skuName_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -6909,16 +6948,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20220901s.Sku_S // Name if source.Name != nil { - name := SkuName_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, skuName_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -7047,6 +7088,13 @@ const ( StorageAccountProperties_AccessTier_STATUS_Premium = StorageAccountProperties_AccessTier_STATUS("Premium") ) +// Mapping from string to StorageAccountProperties_AccessTier_STATUS +var storageAccountProperties_AccessTier_STATUS_Values = map[string]StorageAccountProperties_AccessTier_STATUS{ + "cool": StorageAccountProperties_AccessTier_STATUS_Cool, + "hot": StorageAccountProperties_AccessTier_STATUS_Hot, + "premium": StorageAccountProperties_AccessTier_STATUS_Premium, +} + type StorageAccountProperties_AllowedCopyScope_STATUS string const ( @@ -7054,6 +7102,12 @@ const ( StorageAccountProperties_AllowedCopyScope_STATUS_PrivateLink = StorageAccountProperties_AllowedCopyScope_STATUS("PrivateLink") ) +// Mapping from string to StorageAccountProperties_AllowedCopyScope_STATUS +var storageAccountProperties_AllowedCopyScope_STATUS_Values = map[string]StorageAccountProperties_AllowedCopyScope_STATUS{ + "aad": StorageAccountProperties_AllowedCopyScope_STATUS_AAD, + "privatelink": StorageAccountProperties_AllowedCopyScope_STATUS_PrivateLink, +} + type StorageAccountProperties_DnsEndpointType_STATUS string const ( @@ -7061,6 +7115,12 @@ const ( StorageAccountProperties_DnsEndpointType_STATUS_Standard = StorageAccountProperties_DnsEndpointType_STATUS("Standard") ) +// Mapping from string to StorageAccountProperties_DnsEndpointType_STATUS +var storageAccountProperties_DnsEndpointType_STATUS_Values = map[string]StorageAccountProperties_DnsEndpointType_STATUS{ + "azurednszone": StorageAccountProperties_DnsEndpointType_STATUS_AzureDnsZone, + "standard": StorageAccountProperties_DnsEndpointType_STATUS_Standard, +} + type StorageAccountProperties_LargeFileSharesState_STATUS string const ( @@ -7068,6 +7128,12 @@ const ( StorageAccountProperties_LargeFileSharesState_STATUS_Enabled = StorageAccountProperties_LargeFileSharesState_STATUS("Enabled") ) +// Mapping from string to StorageAccountProperties_LargeFileSharesState_STATUS +var storageAccountProperties_LargeFileSharesState_STATUS_Values = map[string]StorageAccountProperties_LargeFileSharesState_STATUS{ + "disabled": StorageAccountProperties_LargeFileSharesState_STATUS_Disabled, + "enabled": StorageAccountProperties_LargeFileSharesState_STATUS_Enabled, +} + type StorageAccountProperties_MinimumTlsVersion_STATUS string const ( @@ -7076,6 +7142,13 @@ const ( StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_2") ) +// Mapping from string to StorageAccountProperties_MinimumTlsVersion_STATUS +var storageAccountProperties_MinimumTlsVersion_STATUS_Values = map[string]StorageAccountProperties_MinimumTlsVersion_STATUS{ + "tls1_0": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_0, + "tls1_1": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_1, + "tls1_2": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2, +} + type StorageAccountProperties_ProvisioningState_STATUS string const ( @@ -7084,6 +7157,13 @@ const ( StorageAccountProperties_ProvisioningState_STATUS_Succeeded = StorageAccountProperties_ProvisioningState_STATUS("Succeeded") ) +// Mapping from string to StorageAccountProperties_ProvisioningState_STATUS +var storageAccountProperties_ProvisioningState_STATUS_Values = map[string]StorageAccountProperties_ProvisioningState_STATUS{ + "creating": StorageAccountProperties_ProvisioningState_STATUS_Creating, + "resolvingdns": StorageAccountProperties_ProvisioningState_STATUS_ResolvingDNS, + "succeeded": StorageAccountProperties_ProvisioningState_STATUS_Succeeded, +} + type StorageAccountProperties_PublicNetworkAccess_STATUS string const ( @@ -7091,6 +7171,12 @@ const ( StorageAccountProperties_PublicNetworkAccess_STATUS_Enabled = StorageAccountProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to StorageAccountProperties_PublicNetworkAccess_STATUS +var storageAccountProperties_PublicNetworkAccess_STATUS_Values = map[string]StorageAccountProperties_PublicNetworkAccess_STATUS{ + "disabled": StorageAccountProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": StorageAccountProperties_PublicNetworkAccess_STATUS_Enabled, +} + type StorageAccountProperties_StatusOfPrimary_STATUS string const ( @@ -7098,6 +7184,12 @@ const ( StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable = StorageAccountProperties_StatusOfPrimary_STATUS("unavailable") ) +// Mapping from string to StorageAccountProperties_StatusOfPrimary_STATUS +var storageAccountProperties_StatusOfPrimary_STATUS_Values = map[string]StorageAccountProperties_StatusOfPrimary_STATUS{ + "available": StorageAccountProperties_StatusOfPrimary_STATUS_Available, + "unavailable": StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable, +} + type StorageAccountProperties_StatusOfSecondary_STATUS string const ( @@ -7105,6 +7197,12 @@ const ( StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable = StorageAccountProperties_StatusOfSecondary_STATUS("unavailable") ) +// Mapping from string to StorageAccountProperties_StatusOfSecondary_STATUS +var storageAccountProperties_StatusOfSecondary_STATUS_Values = map[string]StorageAccountProperties_StatusOfSecondary_STATUS{ + "available": StorageAccountProperties_StatusOfSecondary_STATUS_Available, + "unavailable": StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable, +} + // +kubebuilder:validation:Enum={"Cool","Hot","Premium"} type StorageAccountPropertiesCreateParameters_AccessTier string @@ -7114,6 +7212,13 @@ const ( StorageAccountPropertiesCreateParameters_AccessTier_Premium = StorageAccountPropertiesCreateParameters_AccessTier("Premium") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_AccessTier +var storageAccountPropertiesCreateParameters_AccessTier_Values = map[string]StorageAccountPropertiesCreateParameters_AccessTier{ + "cool": StorageAccountPropertiesCreateParameters_AccessTier_Cool, + "hot": StorageAccountPropertiesCreateParameters_AccessTier_Hot, + "premium": StorageAccountPropertiesCreateParameters_AccessTier_Premium, +} + // +kubebuilder:validation:Enum={"AAD","PrivateLink"} type StorageAccountPropertiesCreateParameters_AllowedCopyScope string @@ -7122,6 +7227,12 @@ const ( StorageAccountPropertiesCreateParameters_AllowedCopyScope_PrivateLink = StorageAccountPropertiesCreateParameters_AllowedCopyScope("PrivateLink") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_AllowedCopyScope +var storageAccountPropertiesCreateParameters_AllowedCopyScope_Values = map[string]StorageAccountPropertiesCreateParameters_AllowedCopyScope{ + "aad": StorageAccountPropertiesCreateParameters_AllowedCopyScope_AAD, + "privatelink": StorageAccountPropertiesCreateParameters_AllowedCopyScope_PrivateLink, +} + // +kubebuilder:validation:Enum={"AzureDnsZone","Standard"} type StorageAccountPropertiesCreateParameters_DnsEndpointType string @@ -7130,6 +7241,12 @@ const ( StorageAccountPropertiesCreateParameters_DnsEndpointType_Standard = StorageAccountPropertiesCreateParameters_DnsEndpointType("Standard") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_DnsEndpointType +var storageAccountPropertiesCreateParameters_DnsEndpointType_Values = map[string]StorageAccountPropertiesCreateParameters_DnsEndpointType{ + "azurednszone": StorageAccountPropertiesCreateParameters_DnsEndpointType_AzureDnsZone, + "standard": StorageAccountPropertiesCreateParameters_DnsEndpointType_Standard, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type StorageAccountPropertiesCreateParameters_LargeFileSharesState string @@ -7138,6 +7255,12 @@ const ( StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled = StorageAccountPropertiesCreateParameters_LargeFileSharesState("Enabled") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_LargeFileSharesState +var storageAccountPropertiesCreateParameters_LargeFileSharesState_Values = map[string]StorageAccountPropertiesCreateParameters_LargeFileSharesState{ + "disabled": StorageAccountPropertiesCreateParameters_LargeFileSharesState_Disabled, + "enabled": StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled, +} + // +kubebuilder:validation:Enum={"TLS1_0","TLS1_1","TLS1_2"} type StorageAccountPropertiesCreateParameters_MinimumTlsVersion string @@ -7147,6 +7270,13 @@ const ( StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_2") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_MinimumTlsVersion +var storageAccountPropertiesCreateParameters_MinimumTlsVersion_Values = map[string]StorageAccountPropertiesCreateParameters_MinimumTlsVersion{ + "tls1_0": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_0, + "tls1_1": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_1, + "tls1_2": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type StorageAccountPropertiesCreateParameters_PublicNetworkAccess string @@ -7155,6 +7285,12 @@ const ( StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Enabled = StorageAccountPropertiesCreateParameters_PublicNetworkAccess("Enabled") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_PublicNetworkAccess +var storageAccountPropertiesCreateParameters_PublicNetworkAccess_Values = map[string]StorageAccountPropertiesCreateParameters_PublicNetworkAccess{ + "disabled": StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Disabled, + "enabled": StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Enabled, +} + // This defines the sku conversion status object for asynchronous sku conversions. type StorageAccountSkuConversionStatus_STATUS struct { // EndTime: This property represents the sku conversion end time. @@ -7220,8 +7356,9 @@ func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_From_St // SkuConversionStatus if source.SkuConversionStatus != nil { - skuConversionStatus := StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS(*source.SkuConversionStatus) - status.SkuConversionStatus = &skuConversionStatus + skuConversionStatus := *source.SkuConversionStatus + skuConversionStatusTemp := genruntime.ToEnum(skuConversionStatus, storageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Values) + status.SkuConversionStatus = &skuConversionStatusTemp } else { status.SkuConversionStatus = nil } @@ -7231,8 +7368,9 @@ func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_From_St // TargetSkuName if source.TargetSkuName != nil { - targetSkuName := SkuName_STATUS(*source.TargetSkuName) - status.TargetSkuName = &targetSkuName + targetSkuName := *source.TargetSkuName + targetSkuNameTemp := genruntime.ToEnum(targetSkuName, skuName_STATUS_Values) + status.TargetSkuName = &targetSkuNameTemp } else { status.TargetSkuName = nil } @@ -7384,8 +7522,9 @@ func (properties *AccountImmutabilityPolicyProperties) AssignProperties_From_Acc // State if source.State != nil { - state := AccountImmutabilityPolicyProperties_State(*source.State) - properties.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, accountImmutabilityPolicyProperties_State_Values) + properties.State = &stateTemp } else { properties.State = nil } @@ -7505,8 +7644,9 @@ func (properties *AccountImmutabilityPolicyProperties_STATUS) AssignProperties_F // State if source.State != nil { - state := AccountImmutabilityPolicyProperties_State_STATUS(*source.State) - properties.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, accountImmutabilityPolicyProperties_State_STATUS_Values) + properties.State = &stateTemp } else { properties.State = nil } @@ -7707,8 +7847,9 @@ func (properties *ActiveDirectoryProperties) AssignProperties_From_ActiveDirecto // AccountType if source.AccountType != nil { - accountType := ActiveDirectoryProperties_AccountType(*source.AccountType) - properties.AccountType = &accountType + accountType := *source.AccountType + accountTypeTemp := genruntime.ToEnum(accountType, activeDirectoryProperties_AccountType_Values) + properties.AccountType = &accountTypeTemp } else { properties.AccountType = nil } @@ -7881,8 +8022,9 @@ func (properties *ActiveDirectoryProperties_STATUS) AssignProperties_From_Active // AccountType if source.AccountType != nil { - accountType := ActiveDirectoryProperties_AccountType_STATUS(*source.AccountType) - properties.AccountType = &accountType + accountType := *source.AccountType + accountTypeTemp := genruntime.ToEnum(accountType, activeDirectoryProperties_AccountType_STATUS_Values) + properties.AccountType = &accountTypeTemp } else { properties.AccountType = nil } @@ -7967,6 +8109,14 @@ const ( AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareReader") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DefaultSharePermission +var azureFilesIdentityBasedAuthentication_DefaultSharePermission_Values = map[string]AzureFilesIdentityBasedAuthentication_DefaultSharePermission{ + "none": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_None, + "storagefiledatasmbsharecontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareContributor, + "storagefiledatasmbshareelevatedcontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareElevatedContributor, + "storagefiledatasmbsharereader": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader, +} + type AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS string const ( @@ -7976,6 +8126,14 @@ const ( AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareReader") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS +var azureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_Values = map[string]AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS{ + "none": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_None, + "storagefiledatasmbsharecontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareContributor, + "storagefiledatasmbshareelevatedcontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareElevatedContributor, + "storagefiledatasmbsharereader": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader, +} + // +kubebuilder:validation:Enum={"AADDS","AADKERB","AD","None"} type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions string @@ -7986,6 +8144,14 @@ const ( AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("None") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions +var azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_Values = map[string]AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions{ + "aadds": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADDS, + "aadkerb": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADKERB, + "ad": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AD, + "none": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None, +} + type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS string const ( @@ -7995,6 +8161,14 @@ const ( AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("None") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS +var azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_Values = map[string]AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS{ + "aadds": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADDS, + "aadkerb": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADKERB, + "ad": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AD, + "none": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None, +} + // Blob restore parameters type BlobRestoreParameters_STATUS struct { // BlobRanges: Blob ranges to restore. @@ -8111,6 +8285,13 @@ const ( BlobRestoreStatus_Status_STATUS_InProgress = BlobRestoreStatus_Status_STATUS("InProgress") ) +// Mapping from string to BlobRestoreStatus_Status_STATUS +var blobRestoreStatus_Status_STATUS_Values = map[string]BlobRestoreStatus_Status_STATUS{ + "complete": BlobRestoreStatus_Status_STATUS_Complete, + "failed": BlobRestoreStatus_Status_STATUS_Failed, + "inprogress": BlobRestoreStatus_Status_STATUS_InProgress, +} + // +kubebuilder:validation:Enum={"Microsoft.Keyvault","Microsoft.Storage"} type Encryption_KeySource string @@ -8119,6 +8300,12 @@ const ( Encryption_KeySource_MicrosoftStorage = Encryption_KeySource("Microsoft.Storage") ) +// Mapping from string to Encryption_KeySource +var encryption_KeySource_Values = map[string]Encryption_KeySource{ + "microsoft.keyvault": Encryption_KeySource_MicrosoftKeyvault, + "microsoft.storage": Encryption_KeySource_MicrosoftStorage, +} + type Encryption_KeySource_STATUS string const ( @@ -8126,6 +8313,12 @@ const ( Encryption_KeySource_STATUS_MicrosoftStorage = Encryption_KeySource_STATUS("Microsoft.Storage") ) +// Mapping from string to Encryption_KeySource_STATUS +var encryption_KeySource_STATUS_Values = map[string]Encryption_KeySource_STATUS{ + "microsoft.keyvault": Encryption_KeySource_STATUS_MicrosoftKeyvault, + "microsoft.storage": Encryption_KeySource_STATUS_MicrosoftStorage, +} + // Encryption identity for the storage account. type EncryptionIdentity struct { // FederatedIdentityClientId: ClientId of the multi-tenant application to be used in conjunction with the user-assigned @@ -8758,6 +8951,13 @@ const ( GeoReplicationStats_Status_STATUS_Unavailable = GeoReplicationStats_Status_STATUS("Unavailable") ) +// Mapping from string to GeoReplicationStats_Status_STATUS +var geoReplicationStats_Status_STATUS_Values = map[string]GeoReplicationStats_Status_STATUS{ + "bootstrap": GeoReplicationStats_Status_STATUS_Bootstrap, + "live": GeoReplicationStats_Status_STATUS_Live, + "unavailable": GeoReplicationStats_Status_STATUS_Unavailable, +} + // IP rule with specific IP or IP range in CIDR format. type IPRule struct { // Action: The action of IP ACL rule. @@ -8824,8 +9024,9 @@ func (rule *IPRule) AssignProperties_From_IPRule(source *v20220901s.IPRule) erro // Action if source.Action != nil { - action := IPRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, iPRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -8908,8 +9109,9 @@ func (rule *IPRule_STATUS) AssignProperties_From_IPRule_STATUS(source *v20220901 // Action if source.Action != nil { - action := IPRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, iPRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -9209,6 +9411,14 @@ const ( NetworkRuleSet_Bypass_None = NetworkRuleSet_Bypass("None") ) +// Mapping from string to NetworkRuleSet_Bypass +var networkRuleSet_Bypass_Values = map[string]NetworkRuleSet_Bypass{ + "azureservices": NetworkRuleSet_Bypass_AzureServices, + "logging": NetworkRuleSet_Bypass_Logging, + "metrics": NetworkRuleSet_Bypass_Metrics, + "none": NetworkRuleSet_Bypass_None, +} + type NetworkRuleSet_Bypass_STATUS string const ( @@ -9218,6 +9428,14 @@ const ( NetworkRuleSet_Bypass_STATUS_None = NetworkRuleSet_Bypass_STATUS("None") ) +// Mapping from string to NetworkRuleSet_Bypass_STATUS +var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{ + "azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices, + "logging": NetworkRuleSet_Bypass_STATUS_Logging, + "metrics": NetworkRuleSet_Bypass_STATUS_Metrics, + "none": NetworkRuleSet_Bypass_STATUS_None, +} + // +kubebuilder:validation:Enum={"Allow","Deny"} type NetworkRuleSet_DefaultAction string @@ -9226,6 +9444,12 @@ const ( NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction +var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{ + "allow": NetworkRuleSet_DefaultAction_Allow, + "deny": NetworkRuleSet_DefaultAction_Deny, +} + type NetworkRuleSet_DefaultAction_STATUS string const ( @@ -9233,6 +9457,12 @@ const ( NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction_STATUS +var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{ + "allow": NetworkRuleSet_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSet_DefaultAction_STATUS_Deny, +} + // Resource Access Rule. type ResourceAccessRule struct { // ResourceReference: Resource Id @@ -9420,6 +9650,12 @@ const ( RoutingPreference_RoutingChoice_MicrosoftRouting = RoutingPreference_RoutingChoice("MicrosoftRouting") ) +// Mapping from string to RoutingPreference_RoutingChoice +var routingPreference_RoutingChoice_Values = map[string]RoutingPreference_RoutingChoice{ + "internetrouting": RoutingPreference_RoutingChoice_InternetRouting, + "microsoftrouting": RoutingPreference_RoutingChoice_MicrosoftRouting, +} + type RoutingPreference_RoutingChoice_STATUS string const ( @@ -9427,15 +9663,31 @@ const ( RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting = RoutingPreference_RoutingChoice_STATUS("MicrosoftRouting") ) +// Mapping from string to RoutingPreference_RoutingChoice_STATUS +var routingPreference_RoutingChoice_STATUS_Values = map[string]RoutingPreference_RoutingChoice_STATUS{ + "internetrouting": RoutingPreference_RoutingChoice_STATUS_InternetRouting, + "microsoftrouting": RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting, +} + // +kubebuilder:validation:Enum={"Log"} type SasPolicy_ExpirationAction string const SasPolicy_ExpirationAction_Log = SasPolicy_ExpirationAction("Log") +// Mapping from string to SasPolicy_ExpirationAction +var sasPolicy_ExpirationAction_Values = map[string]SasPolicy_ExpirationAction{ + "log": SasPolicy_ExpirationAction_Log, +} + type SasPolicy_ExpirationAction_STATUS string const SasPolicy_ExpirationAction_STATUS_Log = SasPolicy_ExpirationAction_STATUS("Log") +// Mapping from string to SasPolicy_ExpirationAction_STATUS +var sasPolicy_ExpirationAction_STATUS_Values = map[string]SasPolicy_ExpirationAction_STATUS{ + "log": SasPolicy_ExpirationAction_STATUS_Log, +} + // The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. type StorageAccountInternetEndpoints_STATUS struct { // Blob: Gets the blob endpoint. @@ -10005,6 +10257,13 @@ const ( StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Succeeded = StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS("Succeeded") ) +// Mapping from string to StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS +var storageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Values = map[string]StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS{ + "failed": StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Failed, + "inprogress": StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_InProgress, + "succeeded": StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Succeeded, +} + // UserAssignedIdentity for the resource. type UserAssignedIdentity_STATUS struct { // ClientId: The client ID of the identity. @@ -10195,8 +10454,9 @@ func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source // Action if source.Action != nil { - action := VirtualNetworkRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, virtualNetworkRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -10211,8 +10471,9 @@ func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source // State if source.State != nil { - state := VirtualNetworkRule_State(*source.State) - rule.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, virtualNetworkRule_State_Values) + rule.State = &stateTemp } else { rule.State = nil } @@ -10315,8 +10576,9 @@ func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_ // Action if source.Action != nil { - action := VirtualNetworkRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, virtualNetworkRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -10326,8 +10588,9 @@ func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_ // State if source.State != nil { - state := VirtualNetworkRule_State_STATUS(*source.State) - rule.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, virtualNetworkRule_State_STATUS_Values) + rule.State = &stateTemp } else { rule.State = nil } @@ -10380,6 +10643,13 @@ const ( AccountImmutabilityPolicyProperties_State_Unlocked = AccountImmutabilityPolicyProperties_State("Unlocked") ) +// Mapping from string to AccountImmutabilityPolicyProperties_State +var accountImmutabilityPolicyProperties_State_Values = map[string]AccountImmutabilityPolicyProperties_State{ + "disabled": AccountImmutabilityPolicyProperties_State_Disabled, + "locked": AccountImmutabilityPolicyProperties_State_Locked, + "unlocked": AccountImmutabilityPolicyProperties_State_Unlocked, +} + type AccountImmutabilityPolicyProperties_State_STATUS string const ( @@ -10388,6 +10658,13 @@ const ( AccountImmutabilityPolicyProperties_State_STATUS_Unlocked = AccountImmutabilityPolicyProperties_State_STATUS("Unlocked") ) +// Mapping from string to AccountImmutabilityPolicyProperties_State_STATUS +var accountImmutabilityPolicyProperties_State_STATUS_Values = map[string]AccountImmutabilityPolicyProperties_State_STATUS{ + "disabled": AccountImmutabilityPolicyProperties_State_STATUS_Disabled, + "locked": AccountImmutabilityPolicyProperties_State_STATUS_Locked, + "unlocked": AccountImmutabilityPolicyProperties_State_STATUS_Unlocked, +} + // +kubebuilder:validation:Enum={"Computer","User"} type ActiveDirectoryProperties_AccountType string @@ -10396,6 +10673,12 @@ const ( ActiveDirectoryProperties_AccountType_User = ActiveDirectoryProperties_AccountType("User") ) +// Mapping from string to ActiveDirectoryProperties_AccountType +var activeDirectoryProperties_AccountType_Values = map[string]ActiveDirectoryProperties_AccountType{ + "computer": ActiveDirectoryProperties_AccountType_Computer, + "user": ActiveDirectoryProperties_AccountType_User, +} + type ActiveDirectoryProperties_AccountType_STATUS string const ( @@ -10403,6 +10686,12 @@ const ( ActiveDirectoryProperties_AccountType_STATUS_User = ActiveDirectoryProperties_AccountType_STATUS("User") ) +// Mapping from string to ActiveDirectoryProperties_AccountType_STATUS +var activeDirectoryProperties_AccountType_STATUS_Values = map[string]ActiveDirectoryProperties_AccountType_STATUS{ + "computer": ActiveDirectoryProperties_AccountType_STATUS_Computer, + "user": ActiveDirectoryProperties_AccountType_STATUS_User, +} + // Blob range type BlobRestoreRange_STATUS struct { // EndRange: Blob end range. This is exclusive. Empty means account end. @@ -10552,8 +10841,9 @@ func (service *EncryptionService) AssignProperties_From_EncryptionService(source // KeyType if source.KeyType != nil { - keyType := EncryptionService_KeyType(*source.KeyType) - service.KeyType = &keyType + keyType := *source.KeyType + keyTypeTemp := genruntime.ToEnum(keyType, encryptionService_KeyType_Values) + service.KeyType = &keyTypeTemp } else { service.KeyType = nil } @@ -10658,8 +10948,9 @@ func (service *EncryptionService_STATUS) AssignProperties_From_EncryptionService // KeyType if source.KeyType != nil { - keyType := EncryptionService_KeyType_STATUS(*source.KeyType) - service.KeyType = &keyType + keyType := *source.KeyType + keyTypeTemp := genruntime.ToEnum(keyType, encryptionService_KeyType_STATUS_Values) + service.KeyType = &keyTypeTemp } else { service.KeyType = nil } @@ -10711,19 +11002,39 @@ type IPRule_Action string const IPRule_Action_Allow = IPRule_Action("Allow") +// Mapping from string to IPRule_Action +var iPRule_Action_Values = map[string]IPRule_Action{ + "allow": IPRule_Action_Allow, +} + type IPRule_Action_STATUS string const IPRule_Action_STATUS_Allow = IPRule_Action_STATUS("Allow") +// Mapping from string to IPRule_Action_STATUS +var iPRule_Action_STATUS_Values = map[string]IPRule_Action_STATUS{ + "allow": IPRule_Action_STATUS_Allow, +} + // +kubebuilder:validation:Enum={"Allow"} type VirtualNetworkRule_Action string const VirtualNetworkRule_Action_Allow = VirtualNetworkRule_Action("Allow") +// Mapping from string to VirtualNetworkRule_Action +var virtualNetworkRule_Action_Values = map[string]VirtualNetworkRule_Action{ + "allow": VirtualNetworkRule_Action_Allow, +} + type VirtualNetworkRule_Action_STATUS string const VirtualNetworkRule_Action_STATUS_Allow = VirtualNetworkRule_Action_STATUS("Allow") +// Mapping from string to VirtualNetworkRule_Action_STATUS +var virtualNetworkRule_Action_STATUS_Values = map[string]VirtualNetworkRule_Action_STATUS{ + "allow": VirtualNetworkRule_Action_STATUS_Allow, +} + // +kubebuilder:validation:Enum={"Deprovisioning","Failed","NetworkSourceDeleted","Provisioning","Succeeded"} type VirtualNetworkRule_State string @@ -10735,6 +11046,15 @@ const ( VirtualNetworkRule_State_Succeeded = VirtualNetworkRule_State("Succeeded") ) +// Mapping from string to VirtualNetworkRule_State +var virtualNetworkRule_State_Values = map[string]VirtualNetworkRule_State{ + "deprovisioning": VirtualNetworkRule_State_Deprovisioning, + "failed": VirtualNetworkRule_State_Failed, + "networksourcedeleted": VirtualNetworkRule_State_NetworkSourceDeleted, + "provisioning": VirtualNetworkRule_State_Provisioning, + "succeeded": VirtualNetworkRule_State_Succeeded, +} + type VirtualNetworkRule_State_STATUS string const ( @@ -10745,6 +11065,15 @@ const ( VirtualNetworkRule_State_STATUS_Succeeded = VirtualNetworkRule_State_STATUS("Succeeded") ) +// Mapping from string to VirtualNetworkRule_State_STATUS +var virtualNetworkRule_State_STATUS_Values = map[string]VirtualNetworkRule_State_STATUS{ + "deprovisioning": VirtualNetworkRule_State_STATUS_Deprovisioning, + "failed": VirtualNetworkRule_State_STATUS_Failed, + "networksourcedeleted": VirtualNetworkRule_State_STATUS_NetworkSourceDeleted, + "provisioning": VirtualNetworkRule_State_STATUS_Provisioning, + "succeeded": VirtualNetworkRule_State_STATUS_Succeeded, +} + // +kubebuilder:validation:Enum={"Account","Service"} type EncryptionService_KeyType string @@ -10753,6 +11082,12 @@ const ( EncryptionService_KeyType_Service = EncryptionService_KeyType("Service") ) +// Mapping from string to EncryptionService_KeyType +var encryptionService_KeyType_Values = map[string]EncryptionService_KeyType{ + "account": EncryptionService_KeyType_Account, + "service": EncryptionService_KeyType_Service, +} + type EncryptionService_KeyType_STATUS string const ( @@ -10760,6 +11095,12 @@ const ( EncryptionService_KeyType_STATUS_Service = EncryptionService_KeyType_STATUS("Service") ) +// Mapping from string to EncryptionService_KeyType_STATUS +var encryptionService_KeyType_STATUS_Values = map[string]EncryptionService_KeyType_STATUS{ + "account": EncryptionService_KeyType_STATUS_Account, + "service": EncryptionService_KeyType_STATUS_Service, +} + func init() { SchemeBuilder.Register(&StorageAccount{}, &StorageAccountList{}) } diff --git a/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen.go index 8506005d7e7..870b3b8d1a9 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_blob_service_types_gen.go @@ -2144,8 +2144,9 @@ func (policy *LastAccessTimeTrackingPolicy) AssignProperties_From_LastAccessTime // Name if source.Name != nil { - name := LastAccessTimeTrackingPolicy_Name(*source.Name) - policy.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, lastAccessTimeTrackingPolicy_Name_Values) + policy.Name = &nameTemp } else { policy.Name = nil } @@ -2269,8 +2270,9 @@ func (policy *LastAccessTimeTrackingPolicy_STATUS) AssignProperties_From_LastAcc // Name if source.Name != nil { - name := LastAccessTimeTrackingPolicy_Name_STATUS(*source.Name) - policy.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, lastAccessTimeTrackingPolicy_Name_STATUS_Values) + policy.Name = &nameTemp } else { policy.Name = nil } @@ -2670,7 +2672,7 @@ func (rule *CorsRule) AssignProperties_From_CorsRule(source *v20220901s.CorsRule for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { // Shadow the loop variable to avoid aliasing allowedMethodItem := allowedMethodItem - allowedMethodList[allowedMethodIndex] = CorsRule_AllowedMethods(allowedMethodItem) + allowedMethodList[allowedMethodIndex] = genruntime.ToEnum(allowedMethodItem, corsRule_AllowedMethods_Values) } rule.AllowedMethods = allowedMethodList } else { @@ -2809,7 +2811,7 @@ func (rule *CorsRule_STATUS) AssignProperties_From_CorsRule_STATUS(source *v2022 for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { // Shadow the loop variable to avoid aliasing allowedMethodItem := allowedMethodItem - allowedMethodList[allowedMethodIndex] = CorsRule_AllowedMethods_STATUS(allowedMethodItem) + allowedMethodList[allowedMethodIndex] = genruntime.ToEnum(allowedMethodItem, corsRule_AllowedMethods_STATUS_Values) } rule.AllowedMethods = allowedMethodList } else { @@ -2875,10 +2877,20 @@ type LastAccessTimeTrackingPolicy_Name string const LastAccessTimeTrackingPolicy_Name_AccessTimeTracking = LastAccessTimeTrackingPolicy_Name("AccessTimeTracking") +// Mapping from string to LastAccessTimeTrackingPolicy_Name +var lastAccessTimeTrackingPolicy_Name_Values = map[string]LastAccessTimeTrackingPolicy_Name{ + "accesstimetracking": LastAccessTimeTrackingPolicy_Name_AccessTimeTracking, +} + type LastAccessTimeTrackingPolicy_Name_STATUS string const LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking = LastAccessTimeTrackingPolicy_Name_STATUS("AccessTimeTracking") +// Mapping from string to LastAccessTimeTrackingPolicy_Name_STATUS +var lastAccessTimeTrackingPolicy_Name_STATUS_Values = map[string]LastAccessTimeTrackingPolicy_Name_STATUS{ + "accesstimetracking": LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking, +} + // +kubebuilder:validation:Enum={"DELETE","GET","HEAD","MERGE","OPTIONS","PATCH","POST","PUT"} type CorsRule_AllowedMethods string @@ -2893,6 +2905,18 @@ const ( CorsRule_AllowedMethods_PUT = CorsRule_AllowedMethods("PUT") ) +// Mapping from string to CorsRule_AllowedMethods +var corsRule_AllowedMethods_Values = map[string]CorsRule_AllowedMethods{ + "delete": CorsRule_AllowedMethods_DELETE, + "get": CorsRule_AllowedMethods_GET, + "head": CorsRule_AllowedMethods_HEAD, + "merge": CorsRule_AllowedMethods_MERGE, + "options": CorsRule_AllowedMethods_OPTIONS, + "patch": CorsRule_AllowedMethods_PATCH, + "post": CorsRule_AllowedMethods_POST, + "put": CorsRule_AllowedMethods_PUT, +} + type CorsRule_AllowedMethods_STATUS string const ( @@ -2906,6 +2930,18 @@ const ( CorsRule_AllowedMethods_STATUS_PUT = CorsRule_AllowedMethods_STATUS("PUT") ) +// Mapping from string to CorsRule_AllowedMethods_STATUS +var corsRule_AllowedMethods_STATUS_Values = map[string]CorsRule_AllowedMethods_STATUS{ + "delete": CorsRule_AllowedMethods_STATUS_DELETE, + "get": CorsRule_AllowedMethods_STATUS_GET, + "head": CorsRule_AllowedMethods_STATUS_HEAD, + "merge": CorsRule_AllowedMethods_STATUS_MERGE, + "options": CorsRule_AllowedMethods_STATUS_OPTIONS, + "patch": CorsRule_AllowedMethods_STATUS_PATCH, + "post": CorsRule_AllowedMethods_STATUS_POST, + "put": CorsRule_AllowedMethods_STATUS_PUT, +} + func init() { SchemeBuilder.Register(&StorageAccountsBlobService{}, &StorageAccountsBlobServiceList{}) } diff --git a/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen.go index 59a3e7fc00c..5745e236aaa 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_blob_services_container_types_gen.go @@ -625,8 +625,9 @@ func (container *StorageAccounts_BlobServices_Container_Spec) AssignProperties_F // PublicAccess if source.PublicAccess != nil { - publicAccess := ContainerProperties_PublicAccess(*source.PublicAccess) - container.PublicAccess = &publicAccess + publicAccess := *source.PublicAccess + publicAccessTemp := genruntime.ToEnum(publicAccess, containerProperties_PublicAccess_Values) + container.PublicAccess = &publicAccessTemp } else { container.PublicAccess = nil } @@ -1183,24 +1184,27 @@ func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties // LeaseDuration if source.LeaseDuration != nil { - leaseDuration := ContainerProperties_LeaseDuration_STATUS(*source.LeaseDuration) - container.LeaseDuration = &leaseDuration + leaseDuration := *source.LeaseDuration + leaseDurationTemp := genruntime.ToEnum(leaseDuration, containerProperties_LeaseDuration_STATUS_Values) + container.LeaseDuration = &leaseDurationTemp } else { container.LeaseDuration = nil } // LeaseState if source.LeaseState != nil { - leaseState := ContainerProperties_LeaseState_STATUS(*source.LeaseState) - container.LeaseState = &leaseState + leaseState := *source.LeaseState + leaseStateTemp := genruntime.ToEnum(leaseState, containerProperties_LeaseState_STATUS_Values) + container.LeaseState = &leaseStateTemp } else { container.LeaseState = nil } // LeaseStatus if source.LeaseStatus != nil { - leaseStatus := ContainerProperties_LeaseStatus_STATUS(*source.LeaseStatus) - container.LeaseStatus = &leaseStatus + leaseStatus := *source.LeaseStatus + leaseStatusTemp := genruntime.ToEnum(leaseStatus, containerProperties_LeaseStatus_STATUS_Values) + container.LeaseStatus = &leaseStatusTemp } else { container.LeaseStatus = nil } @@ -1225,8 +1229,9 @@ func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties // PublicAccess if source.PublicAccess != nil { - publicAccess := ContainerProperties_PublicAccess_STATUS(*source.PublicAccess) - container.PublicAccess = &publicAccess + publicAccess := *source.PublicAccess + publicAccessTemp := genruntime.ToEnum(publicAccess, containerProperties_PublicAccess_STATUS_Values) + container.PublicAccess = &publicAccessTemp } else { container.PublicAccess = nil } @@ -1416,6 +1421,12 @@ const ( ContainerProperties_LeaseDuration_STATUS_Infinite = ContainerProperties_LeaseDuration_STATUS("Infinite") ) +// Mapping from string to ContainerProperties_LeaseDuration_STATUS +var containerProperties_LeaseDuration_STATUS_Values = map[string]ContainerProperties_LeaseDuration_STATUS{ + "fixed": ContainerProperties_LeaseDuration_STATUS_Fixed, + "infinite": ContainerProperties_LeaseDuration_STATUS_Infinite, +} + type ContainerProperties_LeaseState_STATUS string const ( @@ -1426,6 +1437,15 @@ const ( ContainerProperties_LeaseState_STATUS_Leased = ContainerProperties_LeaseState_STATUS("Leased") ) +// Mapping from string to ContainerProperties_LeaseState_STATUS +var containerProperties_LeaseState_STATUS_Values = map[string]ContainerProperties_LeaseState_STATUS{ + "available": ContainerProperties_LeaseState_STATUS_Available, + "breaking": ContainerProperties_LeaseState_STATUS_Breaking, + "broken": ContainerProperties_LeaseState_STATUS_Broken, + "expired": ContainerProperties_LeaseState_STATUS_Expired, + "leased": ContainerProperties_LeaseState_STATUS_Leased, +} + type ContainerProperties_LeaseStatus_STATUS string const ( @@ -1433,6 +1453,12 @@ const ( ContainerProperties_LeaseStatus_STATUS_Unlocked = ContainerProperties_LeaseStatus_STATUS("Unlocked") ) +// Mapping from string to ContainerProperties_LeaseStatus_STATUS +var containerProperties_LeaseStatus_STATUS_Values = map[string]ContainerProperties_LeaseStatus_STATUS{ + "locked": ContainerProperties_LeaseStatus_STATUS_Locked, + "unlocked": ContainerProperties_LeaseStatus_STATUS_Unlocked, +} + // +kubebuilder:validation:Enum={"Blob","Container","None"} type ContainerProperties_PublicAccess string @@ -1442,6 +1468,13 @@ const ( ContainerProperties_PublicAccess_None = ContainerProperties_PublicAccess("None") ) +// Mapping from string to ContainerProperties_PublicAccess +var containerProperties_PublicAccess_Values = map[string]ContainerProperties_PublicAccess{ + "blob": ContainerProperties_PublicAccess_Blob, + "container": ContainerProperties_PublicAccess_Container, + "none": ContainerProperties_PublicAccess_None, +} + type ContainerProperties_PublicAccess_STATUS string const ( @@ -1450,6 +1483,13 @@ const ( ContainerProperties_PublicAccess_STATUS_None = ContainerProperties_PublicAccess_STATUS("None") ) +// Mapping from string to ContainerProperties_PublicAccess_STATUS +var containerProperties_PublicAccess_STATUS_Values = map[string]ContainerProperties_PublicAccess_STATUS{ + "blob": ContainerProperties_PublicAccess_STATUS_Blob, + "container": ContainerProperties_PublicAccess_STATUS_Container, + "none": ContainerProperties_PublicAccess_STATUS_None, +} + // The properties of an ImmutabilityPolicy of a blob container. type ImmutabilityPolicyProperties_STATUS struct { // AllowProtectedAppendWrites: This property can only be changed for unlocked time-based retention policies. When enabled, @@ -1576,8 +1616,9 @@ func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_From_Imm // State if source.State != nil { - state := ImmutabilityPolicyProperty_State_STATUS(*source.State) - properties.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, immutabilityPolicyProperty_State_STATUS_Values) + properties.State = &stateTemp } else { properties.State = nil } @@ -1813,8 +1854,9 @@ func (versioning *ImmutableStorageWithVersioning_STATUS) AssignProperties_From_I // MigrationState if source.MigrationState != nil { - migrationState := ImmutableStorageWithVersioning_MigrationState_STATUS(*source.MigrationState) - versioning.MigrationState = &migrationState + migrationState := *source.MigrationState + migrationStateTemp := genruntime.ToEnum(migrationState, immutableStorageWithVersioning_MigrationState_STATUS_Values) + versioning.MigrationState = &migrationStateTemp } else { versioning.MigrationState = nil } @@ -2026,6 +2068,12 @@ const ( ImmutabilityPolicyProperty_State_STATUS_Unlocked = ImmutabilityPolicyProperty_State_STATUS("Unlocked") ) +// Mapping from string to ImmutabilityPolicyProperty_State_STATUS +var immutabilityPolicyProperty_State_STATUS_Values = map[string]ImmutabilityPolicyProperty_State_STATUS{ + "locked": ImmutabilityPolicyProperty_State_STATUS_Locked, + "unlocked": ImmutabilityPolicyProperty_State_STATUS_Unlocked, +} + type ImmutableStorageWithVersioning_MigrationState_STATUS string const ( @@ -2033,6 +2081,12 @@ const ( ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress = ImmutableStorageWithVersioning_MigrationState_STATUS("InProgress") ) +// Mapping from string to ImmutableStorageWithVersioning_MigrationState_STATUS +var immutableStorageWithVersioning_MigrationState_STATUS_Values = map[string]ImmutableStorageWithVersioning_MigrationState_STATUS{ + "completed": ImmutableStorageWithVersioning_MigrationState_STATUS_Completed, + "inprogress": ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress, +} + // Protected append writes history setting for the blob container with Legal holds. type ProtectedAppendWritesHistory_STATUS struct { // AllowProtectedAppendWritesAll: When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining @@ -2371,8 +2425,9 @@ func (property *UpdateHistoryProperty_STATUS) AssignProperties_From_UpdateHistor // Update if source.Update != nil { - update := UpdateHistoryProperty_Update_STATUS(*source.Update) - property.Update = &update + update := *source.Update + updateTemp := genruntime.ToEnum(update, updateHistoryProperty_Update_STATUS_Values) + property.Update = &updateTemp } else { property.Update = nil } @@ -2447,6 +2502,13 @@ const ( UpdateHistoryProperty_Update_STATUS_Put = UpdateHistoryProperty_Update_STATUS("put") ) +// Mapping from string to UpdateHistoryProperty_Update_STATUS +var updateHistoryProperty_Update_STATUS_Values = map[string]UpdateHistoryProperty_Update_STATUS{ + "extend": UpdateHistoryProperty_Update_STATUS_Extend, + "lock": UpdateHistoryProperty_Update_STATUS_Lock, + "put": UpdateHistoryProperty_Update_STATUS_Put, +} + func init() { SchemeBuilder.Register(&StorageAccountsBlobServicesContainer{}, &StorageAccountsBlobServicesContainerList{}) } diff --git a/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen.go index 97f5ca4f723..b2b040bcf89 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_file_services_share_types_gen.go @@ -557,8 +557,9 @@ func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_From_Stor // AccessTier if source.AccessTier != nil { - accessTier := FileShareProperties_AccessTier(*source.AccessTier) - share.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, fileShareProperties_AccessTier_Values) + share.AccessTier = &accessTierTemp } else { share.AccessTier = nil } @@ -568,8 +569,9 @@ func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_From_Stor // EnabledProtocols if source.EnabledProtocols != nil { - enabledProtocol := FileShareProperties_EnabledProtocols(*source.EnabledProtocols) - share.EnabledProtocols = &enabledProtocol + enabledProtocol := *source.EnabledProtocols + enabledProtocolTemp := genruntime.ToEnum(enabledProtocol, fileShareProperties_EnabledProtocols_Values) + share.EnabledProtocols = &enabledProtocolTemp } else { share.EnabledProtocols = nil } @@ -587,8 +589,9 @@ func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_From_Stor // RootSquash if source.RootSquash != nil { - rootSquash := FileShareProperties_RootSquash(*source.RootSquash) - share.RootSquash = &rootSquash + rootSquash := *source.RootSquash + rootSquashTemp := genruntime.ToEnum(rootSquash, fileShareProperties_RootSquash_Values) + share.RootSquash = &rootSquashTemp } else { share.RootSquash = nil } @@ -1059,8 +1062,9 @@ func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_St // AccessTier if source.AccessTier != nil { - accessTier := FileShareProperties_AccessTier_STATUS(*source.AccessTier) - share.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, fileShareProperties_AccessTier_STATUS_Values) + share.AccessTier = &accessTierTemp } else { share.AccessTier = nil } @@ -1087,8 +1091,9 @@ func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_St // EnabledProtocols if source.EnabledProtocols != nil { - enabledProtocol := FileShareProperties_EnabledProtocols_STATUS(*source.EnabledProtocols) - share.EnabledProtocols = &enabledProtocol + enabledProtocol := *source.EnabledProtocols + enabledProtocolTemp := genruntime.ToEnum(enabledProtocol, fileShareProperties_EnabledProtocols_STATUS_Values) + share.EnabledProtocols = &enabledProtocolTemp } else { share.EnabledProtocols = nil } @@ -1104,24 +1109,27 @@ func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_St // LeaseDuration if source.LeaseDuration != nil { - leaseDuration := FileShareProperties_LeaseDuration_STATUS(*source.LeaseDuration) - share.LeaseDuration = &leaseDuration + leaseDuration := *source.LeaseDuration + leaseDurationTemp := genruntime.ToEnum(leaseDuration, fileShareProperties_LeaseDuration_STATUS_Values) + share.LeaseDuration = &leaseDurationTemp } else { share.LeaseDuration = nil } // LeaseState if source.LeaseState != nil { - leaseState := FileShareProperties_LeaseState_STATUS(*source.LeaseState) - share.LeaseState = &leaseState + leaseState := *source.LeaseState + leaseStateTemp := genruntime.ToEnum(leaseState, fileShareProperties_LeaseState_STATUS_Values) + share.LeaseState = &leaseStateTemp } else { share.LeaseState = nil } // LeaseStatus if source.LeaseStatus != nil { - leaseStatus := FileShareProperties_LeaseStatus_STATUS(*source.LeaseStatus) - share.LeaseStatus = &leaseStatus + leaseStatus := *source.LeaseStatus + leaseStatusTemp := genruntime.ToEnum(leaseStatus, fileShareProperties_LeaseStatus_STATUS_Values) + share.LeaseStatus = &leaseStatusTemp } else { share.LeaseStatus = nil } @@ -1137,8 +1145,9 @@ func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_St // RootSquash if source.RootSquash != nil { - rootSquash := FileShareProperties_RootSquash_STATUS(*source.RootSquash) - share.RootSquash = &rootSquash + rootSquash := *source.RootSquash + rootSquashTemp := genruntime.ToEnum(rootSquash, fileShareProperties_RootSquash_STATUS_Values) + share.RootSquash = &rootSquashTemp } else { share.RootSquash = nil } @@ -1325,6 +1334,14 @@ const ( FileShareProperties_AccessTier_TransactionOptimized = FileShareProperties_AccessTier("TransactionOptimized") ) +// Mapping from string to FileShareProperties_AccessTier +var fileShareProperties_AccessTier_Values = map[string]FileShareProperties_AccessTier{ + "cool": FileShareProperties_AccessTier_Cool, + "hot": FileShareProperties_AccessTier_Hot, + "premium": FileShareProperties_AccessTier_Premium, + "transactionoptimized": FileShareProperties_AccessTier_TransactionOptimized, +} + type FileShareProperties_AccessTier_STATUS string const ( @@ -1334,6 +1351,14 @@ const ( FileShareProperties_AccessTier_STATUS_TransactionOptimized = FileShareProperties_AccessTier_STATUS("TransactionOptimized") ) +// Mapping from string to FileShareProperties_AccessTier_STATUS +var fileShareProperties_AccessTier_STATUS_Values = map[string]FileShareProperties_AccessTier_STATUS{ + "cool": FileShareProperties_AccessTier_STATUS_Cool, + "hot": FileShareProperties_AccessTier_STATUS_Hot, + "premium": FileShareProperties_AccessTier_STATUS_Premium, + "transactionoptimized": FileShareProperties_AccessTier_STATUS_TransactionOptimized, +} + // +kubebuilder:validation:Enum={"NFS","SMB"} type FileShareProperties_EnabledProtocols string @@ -1342,6 +1367,12 @@ const ( FileShareProperties_EnabledProtocols_SMB = FileShareProperties_EnabledProtocols("SMB") ) +// Mapping from string to FileShareProperties_EnabledProtocols +var fileShareProperties_EnabledProtocols_Values = map[string]FileShareProperties_EnabledProtocols{ + "nfs": FileShareProperties_EnabledProtocols_NFS, + "smb": FileShareProperties_EnabledProtocols_SMB, +} + type FileShareProperties_EnabledProtocols_STATUS string const ( @@ -1349,6 +1380,12 @@ const ( FileShareProperties_EnabledProtocols_STATUS_SMB = FileShareProperties_EnabledProtocols_STATUS("SMB") ) +// Mapping from string to FileShareProperties_EnabledProtocols_STATUS +var fileShareProperties_EnabledProtocols_STATUS_Values = map[string]FileShareProperties_EnabledProtocols_STATUS{ + "nfs": FileShareProperties_EnabledProtocols_STATUS_NFS, + "smb": FileShareProperties_EnabledProtocols_STATUS_SMB, +} + type FileShareProperties_LeaseDuration_STATUS string const ( @@ -1356,6 +1393,12 @@ const ( FileShareProperties_LeaseDuration_STATUS_Infinite = FileShareProperties_LeaseDuration_STATUS("Infinite") ) +// Mapping from string to FileShareProperties_LeaseDuration_STATUS +var fileShareProperties_LeaseDuration_STATUS_Values = map[string]FileShareProperties_LeaseDuration_STATUS{ + "fixed": FileShareProperties_LeaseDuration_STATUS_Fixed, + "infinite": FileShareProperties_LeaseDuration_STATUS_Infinite, +} + type FileShareProperties_LeaseState_STATUS string const ( @@ -1366,6 +1409,15 @@ const ( FileShareProperties_LeaseState_STATUS_Leased = FileShareProperties_LeaseState_STATUS("Leased") ) +// Mapping from string to FileShareProperties_LeaseState_STATUS +var fileShareProperties_LeaseState_STATUS_Values = map[string]FileShareProperties_LeaseState_STATUS{ + "available": FileShareProperties_LeaseState_STATUS_Available, + "breaking": FileShareProperties_LeaseState_STATUS_Breaking, + "broken": FileShareProperties_LeaseState_STATUS_Broken, + "expired": FileShareProperties_LeaseState_STATUS_Expired, + "leased": FileShareProperties_LeaseState_STATUS_Leased, +} + type FileShareProperties_LeaseStatus_STATUS string const ( @@ -1373,6 +1425,12 @@ const ( FileShareProperties_LeaseStatus_STATUS_Unlocked = FileShareProperties_LeaseStatus_STATUS("Unlocked") ) +// Mapping from string to FileShareProperties_LeaseStatus_STATUS +var fileShareProperties_LeaseStatus_STATUS_Values = map[string]FileShareProperties_LeaseStatus_STATUS{ + "locked": FileShareProperties_LeaseStatus_STATUS_Locked, + "unlocked": FileShareProperties_LeaseStatus_STATUS_Unlocked, +} + // +kubebuilder:validation:Enum={"AllSquash","NoRootSquash","RootSquash"} type FileShareProperties_RootSquash string @@ -1382,6 +1440,13 @@ const ( FileShareProperties_RootSquash_RootSquash = FileShareProperties_RootSquash("RootSquash") ) +// Mapping from string to FileShareProperties_RootSquash +var fileShareProperties_RootSquash_Values = map[string]FileShareProperties_RootSquash{ + "allsquash": FileShareProperties_RootSquash_AllSquash, + "norootsquash": FileShareProperties_RootSquash_NoRootSquash, + "rootsquash": FileShareProperties_RootSquash_RootSquash, +} + type FileShareProperties_RootSquash_STATUS string const ( @@ -1390,6 +1455,13 @@ const ( FileShareProperties_RootSquash_STATUS_RootSquash = FileShareProperties_RootSquash_STATUS("RootSquash") ) +// Mapping from string to FileShareProperties_RootSquash_STATUS +var fileShareProperties_RootSquash_STATUS_Values = map[string]FileShareProperties_RootSquash_STATUS{ + "allsquash": FileShareProperties_RootSquash_STATUS_AllSquash, + "norootsquash": FileShareProperties_RootSquash_STATUS_NoRootSquash, + "rootsquash": FileShareProperties_RootSquash_STATUS_RootSquash, +} + type SignedIdentifier struct { // AccessPolicy: Access policy AccessPolicy *AccessPolicy `json:"accessPolicy,omitempty"` diff --git a/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen.go b/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen.go index 888157c94ee..3e745da77e6 100644 --- a/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen.go +++ b/v2/api/storage/v1api20220901/storage_accounts_management_policy_types_gen.go @@ -1067,8 +1067,9 @@ func (rule *ManagementPolicyRule) AssignProperties_From_ManagementPolicyRule(sou // Type if source.Type != nil { - typeVar := ManagementPolicyRule_Type(*source.Type) - rule.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managementPolicyRule_Type_Values) + rule.Type = &typeTemp } else { rule.Type = nil } @@ -1215,8 +1216,9 @@ func (rule *ManagementPolicyRule_STATUS) AssignProperties_From_ManagementPolicyR // Type if source.Type != nil { - typeVar := ManagementPolicyRule_Type_STATUS(*source.Type) - rule.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managementPolicyRule_Type_STATUS_Values) + rule.Type = &typeTemp } else { rule.Type = nil } @@ -1547,10 +1549,20 @@ type ManagementPolicyRule_Type string const ManagementPolicyRule_Type_Lifecycle = ManagementPolicyRule_Type("Lifecycle") +// Mapping from string to ManagementPolicyRule_Type +var managementPolicyRule_Type_Values = map[string]ManagementPolicyRule_Type{ + "lifecycle": ManagementPolicyRule_Type_Lifecycle, +} + type ManagementPolicyRule_Type_STATUS string const ManagementPolicyRule_Type_STATUS_Lifecycle = ManagementPolicyRule_Type_STATUS("Lifecycle") +// Mapping from string to ManagementPolicyRule_Type_STATUS +var managementPolicyRule_Type_STATUS_Values = map[string]ManagementPolicyRule_Type_STATUS{ + "lifecycle": ManagementPolicyRule_Type_STATUS_Lifecycle, +} + // Actions are applied to the filtered blobs when the execution condition is met. type ManagementPolicyAction struct { // BaseBlob: The management policy action for base blob diff --git a/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen.go index 0b38bf7b1df..d6123e317f9 100644 --- a/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen.go +++ b/v2/api/storage/v1api20230101/storage_account_spec_arm_types_gen.go @@ -88,6 +88,15 @@ const ( StorageAccount_Kind_Spec_StorageV2 = StorageAccount_Kind_Spec("StorageV2") ) +// Mapping from string to StorageAccount_Kind_Spec +var storageAccount_Kind_Spec_Values = map[string]StorageAccount_Kind_Spec{ + "blobstorage": StorageAccount_Kind_Spec_BlobStorage, + "blockblobstorage": StorageAccount_Kind_Spec_BlockBlobStorage, + "filestorage": StorageAccount_Kind_Spec_FileStorage, + "storage": StorageAccount_Kind_Spec_Storage, + "storagev2": StorageAccount_Kind_Spec_StorageV2, +} + // The parameters used to create the storage account. type StorageAccountPropertiesCreateParameters_ARM struct { // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' @@ -224,6 +233,11 @@ type ExtendedLocationType string const ExtendedLocationType_EdgeZone = ExtendedLocationType("EdgeZone") +// Mapping from string to ExtendedLocationType +var extendedLocationType_Values = map[string]ExtendedLocationType{ + "edgezone": ExtendedLocationType_EdgeZone, +} + // +kubebuilder:validation:Enum={"None","SystemAssigned","SystemAssigned,UserAssigned","UserAssigned"} type Identity_Type string @@ -234,6 +248,14 @@ const ( Identity_Type_UserAssigned = Identity_Type("UserAssigned") ) +// Mapping from string to Identity_Type +var identity_Type_Values = map[string]Identity_Type{ + "none": Identity_Type_None, + "systemassigned": Identity_Type_SystemAssigned, + "systemassigned,userassigned": Identity_Type_SystemAssignedUserAssigned, + "userassigned": Identity_Type_UserAssigned, +} + // This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. type ImmutableStorageAccount_ARM struct { // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have @@ -310,6 +332,18 @@ const ( SkuName_Standard_ZRS = SkuName("Standard_ZRS") ) +// Mapping from string to SkuName +var skuName_Values = map[string]SkuName{ + "premium_lrs": SkuName_Premium_LRS, + "premium_zrs": SkuName_Premium_ZRS, + "standard_grs": SkuName_Standard_GRS, + "standard_gzrs": SkuName_Standard_GZRS, + "standard_lrs": SkuName_Standard_LRS, + "standard_ragrs": SkuName_Standard_RAGRS, + "standard_ragzrs": SkuName_Standard_RAGZRS, + "standard_zrs": SkuName_Standard_ZRS, +} + // The SKU tier. This is based on the SKU name. // +kubebuilder:validation:Enum={"Premium","Standard"} type Tier string @@ -319,6 +353,12 @@ const ( Tier_Standard = Tier("Standard") ) +// Mapping from string to Tier +var tier_Values = map[string]Tier{ + "premium": Tier_Premium, + "standard": Tier_Standard, +} + // Information about the user assigned identity for the resource type UserAssignedIdentityDetails_ARM struct { } diff --git a/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen.go b/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen.go index c1191df3532..376fa5fb6cd 100644 --- a/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen.go +++ b/v2/api/storage/v1api20230101/storage_account_status_arm_types_gen.go @@ -83,6 +83,15 @@ const ( StorageAccount_Kind_STATUS_StorageV2 = StorageAccount_Kind_STATUS("StorageV2") ) +// Mapping from string to StorageAccount_Kind_STATUS +var storageAccount_Kind_STATUS_Values = map[string]StorageAccount_Kind_STATUS{ + "blobstorage": StorageAccount_Kind_STATUS_BlobStorage, + "blockblobstorage": StorageAccount_Kind_STATUS_BlockBlobStorage, + "filestorage": StorageAccount_Kind_STATUS_FileStorage, + "storage": StorageAccount_Kind_STATUS_Storage, + "storagev2": StorageAccount_Kind_STATUS_StorageV2, +} + // Properties of the storage account. type StorageAccountProperties_STATUS_ARM struct { // AccessTier: Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' @@ -319,6 +328,11 @@ type ExtendedLocationType_STATUS string const ExtendedLocationType_STATUS_EdgeZone = ExtendedLocationType_STATUS("EdgeZone") +// Mapping from string to ExtendedLocationType_STATUS +var extendedLocationType_STATUS_Values = map[string]ExtendedLocationType_STATUS{ + "edgezone": ExtendedLocationType_STATUS_EdgeZone, +} + // Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when // geo-redundant replication is enabled for the storage account. type GeoReplicationStats_STATUS_ARM struct { @@ -355,6 +369,14 @@ const ( Identity_Type_STATUS_UserAssigned = Identity_Type_STATUS("UserAssigned") ) +// Mapping from string to Identity_Type_STATUS +var identity_Type_STATUS_Values = map[string]Identity_Type_STATUS{ + "none": Identity_Type_STATUS_None, + "systemassigned": Identity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": Identity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": Identity_Type_STATUS_UserAssigned, +} + // This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. type ImmutableStorageAccount_STATUS_ARM struct { // Enabled: A boolean flag which enables account-level immutability. All the containers under such an account have @@ -443,6 +465,18 @@ const ( SkuName_STATUS_Standard_ZRS = SkuName_STATUS("Standard_ZRS") ) +// Mapping from string to SkuName_STATUS +var skuName_STATUS_Values = map[string]SkuName_STATUS{ + "premium_lrs": SkuName_STATUS_Premium_LRS, + "premium_zrs": SkuName_STATUS_Premium_ZRS, + "standard_grs": SkuName_STATUS_Standard_GRS, + "standard_gzrs": SkuName_STATUS_Standard_GZRS, + "standard_lrs": SkuName_STATUS_Standard_LRS, + "standard_ragrs": SkuName_STATUS_Standard_RAGRS, + "standard_ragzrs": SkuName_STATUS_Standard_RAGZRS, + "standard_zrs": SkuName_STATUS_Standard_ZRS, +} + // This defines the sku conversion status object for asynchronous sku conversions. type StorageAccountSkuConversionStatus_STATUS_ARM struct { // EndTime: This property represents the sku conversion end time. @@ -466,6 +500,12 @@ const ( Tier_STATUS_Standard = Tier_STATUS("Standard") ) +// Mapping from string to Tier_STATUS +var tier_STATUS_Values = map[string]Tier_STATUS{ + "premium": Tier_STATUS_Premium, + "standard": Tier_STATUS_Standard, +} + // UserAssignedIdentity for the resource. type UserAssignedIdentity_STATUS_ARM struct { // ClientId: The client ID of the identity. diff --git a/v2/api/storage/v1api20230101/storage_account_types_gen.go b/v2/api/storage/v1api20230101/storage_account_types_gen.go index 2e7c9f1ce28..d34bb42a76a 100644 --- a/v2/api/storage/v1api20230101/storage_account_types_gen.go +++ b/v2/api/storage/v1api20230101/storage_account_types_gen.go @@ -1161,8 +1161,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // AccessTier if source.AccessTier != nil { - accessTier := StorageAccountPropertiesCreateParameters_AccessTier(*source.AccessTier) - account.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, storageAccountPropertiesCreateParameters_AccessTier_Values) + account.AccessTier = &accessTierTemp } else { account.AccessTier = nil } @@ -1193,8 +1194,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // AllowedCopyScope if source.AllowedCopyScope != nil { - allowedCopyScope := StorageAccountPropertiesCreateParameters_AllowedCopyScope(*source.AllowedCopyScope) - account.AllowedCopyScope = &allowedCopyScope + allowedCopyScope := *source.AllowedCopyScope + allowedCopyScopeTemp := genruntime.ToEnum(allowedCopyScope, storageAccountPropertiesCreateParameters_AllowedCopyScope_Values) + account.AllowedCopyScope = &allowedCopyScopeTemp } else { account.AllowedCopyScope = nil } @@ -1236,8 +1238,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // DnsEndpointType if source.DnsEndpointType != nil { - dnsEndpointType := StorageAccountPropertiesCreateParameters_DnsEndpointType(*source.DnsEndpointType) - account.DnsEndpointType = &dnsEndpointType + dnsEndpointType := *source.DnsEndpointType + dnsEndpointTypeTemp := genruntime.ToEnum(dnsEndpointType, storageAccountPropertiesCreateParameters_DnsEndpointType_Values) + account.DnsEndpointType = &dnsEndpointTypeTemp } else { account.DnsEndpointType = nil } @@ -1336,16 +1339,18 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // Kind if source.Kind != nil { - kind := StorageAccount_Kind_Spec(*source.Kind) - account.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, storageAccount_Kind_Spec_Values) + account.Kind = &kindTemp } else { account.Kind = nil } // LargeFileSharesState if source.LargeFileSharesState != nil { - largeFileSharesState := StorageAccountPropertiesCreateParameters_LargeFileSharesState(*source.LargeFileSharesState) - account.LargeFileSharesState = &largeFileSharesState + largeFileSharesState := *source.LargeFileSharesState + largeFileSharesStateTemp := genruntime.ToEnum(largeFileSharesState, storageAccountPropertiesCreateParameters_LargeFileSharesState_Values) + account.LargeFileSharesState = &largeFileSharesStateTemp } else { account.LargeFileSharesState = nil } @@ -1355,8 +1360,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := StorageAccountPropertiesCreateParameters_MinimumTlsVersion(*source.MinimumTlsVersion) - account.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, storageAccountPropertiesCreateParameters_MinimumTlsVersion_Values) + account.MinimumTlsVersion = &minimumTlsVersionTemp } else { account.MinimumTlsVersion = nil } @@ -1395,8 +1401,9 @@ func (account *StorageAccount_Spec) AssignProperties_From_StorageAccount_Spec(so // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := StorageAccountPropertiesCreateParameters_PublicNetworkAccess(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, storageAccountPropertiesCreateParameters_PublicNetworkAccess_Values) + account.PublicNetworkAccess = &publicNetworkAccessTemp } else { account.PublicNetworkAccess = nil } @@ -2798,8 +2805,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // AccessTier if source.AccessTier != nil { - accessTier := StorageAccountProperties_AccessTier_STATUS(*source.AccessTier) - account.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, storageAccountProperties_AccessTier_STATUS_Values) + account.AccessTier = &accessTierTemp } else { account.AccessTier = nil } @@ -2838,8 +2846,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // AllowedCopyScope if source.AllowedCopyScope != nil { - allowedCopyScope := StorageAccountProperties_AllowedCopyScope_STATUS(*source.AllowedCopyScope) - account.AllowedCopyScope = &allowedCopyScope + allowedCopyScope := *source.AllowedCopyScope + allowedCopyScopeTemp := genruntime.ToEnum(allowedCopyScope, storageAccountProperties_AllowedCopyScope_STATUS_Values) + account.AllowedCopyScope = &allowedCopyScopeTemp } else { account.AllowedCopyScope = nil } @@ -2896,8 +2905,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // DnsEndpointType if source.DnsEndpointType != nil { - dnsEndpointType := StorageAccountProperties_DnsEndpointType_STATUS(*source.DnsEndpointType) - account.DnsEndpointType = &dnsEndpointType + dnsEndpointType := *source.DnsEndpointType + dnsEndpointTypeTemp := genruntime.ToEnum(dnsEndpointType, storageAccountProperties_DnsEndpointType_STATUS_Values) + account.DnsEndpointType = &dnsEndpointTypeTemp } else { account.DnsEndpointType = nil } @@ -3039,16 +3049,18 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // Kind if source.Kind != nil { - kind := StorageAccount_Kind_STATUS(*source.Kind) - account.Kind = &kind + kind := *source.Kind + kindTemp := genruntime.ToEnum(kind, storageAccount_Kind_STATUS_Values) + account.Kind = &kindTemp } else { account.Kind = nil } // LargeFileSharesState if source.LargeFileSharesState != nil { - largeFileSharesState := StorageAccountProperties_LargeFileSharesState_STATUS(*source.LargeFileSharesState) - account.LargeFileSharesState = &largeFileSharesState + largeFileSharesState := *source.LargeFileSharesState + largeFileSharesStateTemp := genruntime.ToEnum(largeFileSharesState, storageAccountProperties_LargeFileSharesState_STATUS_Values) + account.LargeFileSharesState = &largeFileSharesStateTemp } else { account.LargeFileSharesState = nil } @@ -3061,8 +3073,9 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // MinimumTlsVersion if source.MinimumTlsVersion != nil { - minimumTlsVersion := StorageAccountProperties_MinimumTlsVersion_STATUS(*source.MinimumTlsVersion) - account.MinimumTlsVersion = &minimumTlsVersion + minimumTlsVersion := *source.MinimumTlsVersion + minimumTlsVersionTemp := genruntime.ToEnum(minimumTlsVersion, storageAccountProperties_MinimumTlsVersion_STATUS_Values) + account.MinimumTlsVersion = &minimumTlsVersionTemp } else { account.MinimumTlsVersion = nil } @@ -3117,16 +3130,18 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // ProvisioningState if source.ProvisioningState != nil { - provisioningState := StorageAccountProperties_ProvisioningState_STATUS(*source.ProvisioningState) - account.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, storageAccountProperties_ProvisioningState_STATUS_Values) + account.ProvisioningState = &provisioningStateTemp } else { account.ProvisioningState = nil } // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := StorageAccountProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - account.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, storageAccountProperties_PublicNetworkAccess_STATUS_Values) + account.PublicNetworkAccess = &publicNetworkAccessTemp } else { account.PublicNetworkAccess = nil } @@ -3184,16 +3199,18 @@ func (account *StorageAccount_STATUS) AssignProperties_From_StorageAccount_STATU // StatusOfPrimary if source.StatusOfPrimary != nil { - statusOfPrimary := StorageAccountProperties_StatusOfPrimary_STATUS(*source.StatusOfPrimary) - account.StatusOfPrimary = &statusOfPrimary + statusOfPrimary := *source.StatusOfPrimary + statusOfPrimaryTemp := genruntime.ToEnum(statusOfPrimary, storageAccountProperties_StatusOfPrimary_STATUS_Values) + account.StatusOfPrimary = &statusOfPrimaryTemp } else { account.StatusOfPrimary = nil } // StatusOfSecondary if source.StatusOfSecondary != nil { - statusOfSecondary := StorageAccountProperties_StatusOfSecondary_STATUS(*source.StatusOfSecondary) - account.StatusOfSecondary = &statusOfSecondary + statusOfSecondary := *source.StatusOfSecondary + statusOfSecondaryTemp := genruntime.ToEnum(statusOfSecondary, storageAccountProperties_StatusOfSecondary_STATUS_Values) + account.StatusOfSecondary = &statusOfSecondaryTemp } else { account.StatusOfSecondary = nil } @@ -3774,16 +3791,18 @@ func (authentication *AzureFilesIdentityBasedAuthentication) AssignProperties_Fr // DefaultSharePermission if source.DefaultSharePermission != nil { - defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission(*source.DefaultSharePermission) - authentication.DefaultSharePermission = &defaultSharePermission + defaultSharePermission := *source.DefaultSharePermission + defaultSharePermissionTemp := genruntime.ToEnum(defaultSharePermission, azureFilesIdentityBasedAuthentication_DefaultSharePermission_Values) + authentication.DefaultSharePermission = &defaultSharePermissionTemp } else { authentication.DefaultSharePermission = nil } // DirectoryServiceOptions if source.DirectoryServiceOptions != nil { - directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions(*source.DirectoryServiceOptions) - authentication.DirectoryServiceOptions = &directoryServiceOption + directoryServiceOption := *source.DirectoryServiceOptions + directoryServiceOptionTemp := genruntime.ToEnum(directoryServiceOption, azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_Values) + authentication.DirectoryServiceOptions = &directoryServiceOptionTemp } else { authentication.DirectoryServiceOptions = nil } @@ -3941,16 +3960,18 @@ func (authentication *AzureFilesIdentityBasedAuthentication_STATUS) AssignProper // DefaultSharePermission if source.DefaultSharePermission != nil { - defaultSharePermission := AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS(*source.DefaultSharePermission) - authentication.DefaultSharePermission = &defaultSharePermission + defaultSharePermission := *source.DefaultSharePermission + defaultSharePermissionTemp := genruntime.ToEnum(defaultSharePermission, azureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_Values) + authentication.DefaultSharePermission = &defaultSharePermissionTemp } else { authentication.DefaultSharePermission = nil } // DirectoryServiceOptions if source.DirectoryServiceOptions != nil { - directoryServiceOption := AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS(*source.DirectoryServiceOptions) - authentication.DirectoryServiceOptions = &directoryServiceOption + directoryServiceOption := *source.DirectoryServiceOptions + directoryServiceOptionTemp := genruntime.ToEnum(directoryServiceOption, azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_Values) + authentication.DirectoryServiceOptions = &directoryServiceOptionTemp } else { authentication.DirectoryServiceOptions = nil } @@ -4089,7 +4110,8 @@ func (status *BlobRestoreStatus_STATUS) AssignProperties_From_BlobRestoreStatus_ // Status if source.Status != nil { - statusTemp := BlobRestoreStatus_Status_STATUS(*source.Status) + statusValue := *source.Status + statusTemp := genruntime.ToEnum(statusValue, blobRestoreStatus_Status_STATUS_Values) status.Status = &statusTemp } else { status.Status = nil @@ -4502,8 +4524,9 @@ func (encryption *Encryption) AssignProperties_From_Encryption(source *v20230101 // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -4771,8 +4794,9 @@ func (encryption *Encryption_STATUS) AssignProperties_From_Encryption_STATUS(sou // KeySource if source.KeySource != nil { - keySource := Encryption_KeySource_STATUS(*source.KeySource) - encryption.KeySource = &keySource + keySource := *source.KeySource + keySourceTemp := genruntime.ToEnum(keySource, encryption_KeySource_STATUS_Values) + encryption.KeySource = &keySourceTemp } else { encryption.KeySource = nil } @@ -5159,8 +5183,9 @@ func (location *ExtendedLocation) AssignProperties_From_ExtendedLocation(source // Type if source.Type != nil { - typeVar := ExtendedLocationType(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -5261,8 +5286,9 @@ func (location *ExtendedLocation_STATUS) AssignProperties_From_ExtendedLocation_ // Type if source.Type != nil { - typeVar := ExtendedLocationType_STATUS(*source.Type) - location.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, extendedLocationType_STATUS_Values) + location.Type = &typeTemp } else { location.Type = nil } @@ -5403,24 +5429,27 @@ func (stats *GeoReplicationStats_STATUS) AssignProperties_From_GeoReplicationSta // PostFailoverRedundancy if source.PostFailoverRedundancy != nil { - postFailoverRedundancy := GeoReplicationStats_PostFailoverRedundancy_STATUS(*source.PostFailoverRedundancy) - stats.PostFailoverRedundancy = &postFailoverRedundancy + postFailoverRedundancy := *source.PostFailoverRedundancy + postFailoverRedundancyTemp := genruntime.ToEnum(postFailoverRedundancy, geoReplicationStats_PostFailoverRedundancy_STATUS_Values) + stats.PostFailoverRedundancy = &postFailoverRedundancyTemp } else { stats.PostFailoverRedundancy = nil } // PostPlannedFailoverRedundancy if source.PostPlannedFailoverRedundancy != nil { - postPlannedFailoverRedundancy := GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS(*source.PostPlannedFailoverRedundancy) - stats.PostPlannedFailoverRedundancy = &postPlannedFailoverRedundancy + postPlannedFailoverRedundancy := *source.PostPlannedFailoverRedundancy + postPlannedFailoverRedundancyTemp := genruntime.ToEnum(postPlannedFailoverRedundancy, geoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Values) + stats.PostPlannedFailoverRedundancy = &postPlannedFailoverRedundancyTemp } else { stats.PostPlannedFailoverRedundancy = nil } // Status if source.Status != nil { - status := GeoReplicationStats_Status_STATUS(*source.Status) - stats.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, geoReplicationStats_Status_STATUS_Values) + stats.Status = &statusTemp } else { stats.Status = nil } @@ -5557,8 +5586,9 @@ func (identity *Identity) AssignProperties_From_Identity(source *v20230101s.Iden // Type if source.Type != nil { - typeVar := Identity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -5731,8 +5761,9 @@ func (identity *Identity_STATUS) AssignProperties_From_Identity_STATUS(source *v // Type if source.Type != nil { - typeVar := Identity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, identity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -6429,16 +6460,18 @@ func (ruleSet *NetworkRuleSet) AssignProperties_From_NetworkRuleSet(source *v202 // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -6748,16 +6781,18 @@ func (ruleSet *NetworkRuleSet_STATUS) AssignProperties_From_NetworkRuleSet_STATU // Bypass if source.Bypass != nil { - bypass := NetworkRuleSet_Bypass_STATUS(*source.Bypass) - ruleSet.Bypass = &bypass + bypass := *source.Bypass + bypassTemp := genruntime.ToEnum(bypass, networkRuleSet_Bypass_STATUS_Values) + ruleSet.Bypass = &bypassTemp } else { ruleSet.Bypass = nil } // DefaultAction if source.DefaultAction != nil { - defaultAction := NetworkRuleSet_DefaultAction_STATUS(*source.DefaultAction) - ruleSet.DefaultAction = &defaultAction + defaultAction := *source.DefaultAction + defaultActionTemp := genruntime.ToEnum(defaultAction, networkRuleSet_DefaultAction_STATUS_Values) + ruleSet.DefaultAction = &defaultActionTemp } else { ruleSet.DefaultAction = nil } @@ -7063,8 +7098,9 @@ func (preference *RoutingPreference) AssignProperties_From_RoutingPreference(sou // RoutingChoice if source.RoutingChoice != nil { - routingChoice := RoutingPreference_RoutingChoice(*source.RoutingChoice) - preference.RoutingChoice = &routingChoice + routingChoice := *source.RoutingChoice + routingChoiceTemp := genruntime.ToEnum(routingChoice, routingPreference_RoutingChoice_Values) + preference.RoutingChoice = &routingChoiceTemp } else { preference.RoutingChoice = nil } @@ -7214,8 +7250,9 @@ func (preference *RoutingPreference_STATUS) AssignProperties_From_RoutingPrefere // RoutingChoice if source.RoutingChoice != nil { - routingChoice := RoutingPreference_RoutingChoice_STATUS(*source.RoutingChoice) - preference.RoutingChoice = &routingChoice + routingChoice := *source.RoutingChoice + routingChoiceTemp := genruntime.ToEnum(routingChoice, routingPreference_RoutingChoice_STATUS_Values) + preference.RoutingChoice = &routingChoiceTemp } else { preference.RoutingChoice = nil } @@ -7331,8 +7368,9 @@ func (policy *SasPolicy) AssignProperties_From_SasPolicy(source *v20230101s.SasP // ExpirationAction if source.ExpirationAction != nil { - expirationAction := SasPolicy_ExpirationAction(*source.ExpirationAction) - policy.ExpirationAction = &expirationAction + expirationAction := *source.ExpirationAction + expirationActionTemp := genruntime.ToEnum(expirationAction, sasPolicy_ExpirationAction_Values) + policy.ExpirationAction = &expirationActionTemp } else { policy.ExpirationAction = nil } @@ -7433,8 +7471,9 @@ func (policy *SasPolicy_STATUS) AssignProperties_From_SasPolicy_STATUS(source *v // ExpirationAction if source.ExpirationAction != nil { - expirationAction := SasPolicy_ExpirationAction_STATUS(*source.ExpirationAction) - policy.ExpirationAction = &expirationAction + expirationAction := *source.ExpirationAction + expirationActionTemp := genruntime.ToEnum(expirationAction, sasPolicy_ExpirationAction_STATUS_Values) + policy.ExpirationAction = &expirationActionTemp } else { policy.ExpirationAction = nil } @@ -7540,16 +7579,18 @@ func (sku *Sku) AssignProperties_From_Sku(source *v20230101s.Sku) error { // Name if source.Name != nil { - name := SkuName(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, skuName_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Tier(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, tier_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -7658,16 +7699,18 @@ func (sku *Sku_STATUS) AssignProperties_From_Sku_STATUS(source *v20230101s.Sku_S // Name if source.Name != nil { - name := SkuName_STATUS(*source.Name) - sku.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, skuName_STATUS_Values) + sku.Name = &nameTemp } else { sku.Name = nil } // Tier if source.Tier != nil { - tier := Tier_STATUS(*source.Tier) - sku.Tier = &tier + tier := *source.Tier + tierTemp := genruntime.ToEnum(tier, tier_STATUS_Values) + sku.Tier = &tierTemp } else { sku.Tier = nil } @@ -7796,6 +7839,13 @@ const ( StorageAccountProperties_AccessTier_STATUS_Premium = StorageAccountProperties_AccessTier_STATUS("Premium") ) +// Mapping from string to StorageAccountProperties_AccessTier_STATUS +var storageAccountProperties_AccessTier_STATUS_Values = map[string]StorageAccountProperties_AccessTier_STATUS{ + "cool": StorageAccountProperties_AccessTier_STATUS_Cool, + "hot": StorageAccountProperties_AccessTier_STATUS_Hot, + "premium": StorageAccountProperties_AccessTier_STATUS_Premium, +} + type StorageAccountProperties_AllowedCopyScope_STATUS string const ( @@ -7803,6 +7853,12 @@ const ( StorageAccountProperties_AllowedCopyScope_STATUS_PrivateLink = StorageAccountProperties_AllowedCopyScope_STATUS("PrivateLink") ) +// Mapping from string to StorageAccountProperties_AllowedCopyScope_STATUS +var storageAccountProperties_AllowedCopyScope_STATUS_Values = map[string]StorageAccountProperties_AllowedCopyScope_STATUS{ + "aad": StorageAccountProperties_AllowedCopyScope_STATUS_AAD, + "privatelink": StorageAccountProperties_AllowedCopyScope_STATUS_PrivateLink, +} + type StorageAccountProperties_DnsEndpointType_STATUS string const ( @@ -7810,6 +7866,12 @@ const ( StorageAccountProperties_DnsEndpointType_STATUS_Standard = StorageAccountProperties_DnsEndpointType_STATUS("Standard") ) +// Mapping from string to StorageAccountProperties_DnsEndpointType_STATUS +var storageAccountProperties_DnsEndpointType_STATUS_Values = map[string]StorageAccountProperties_DnsEndpointType_STATUS{ + "azurednszone": StorageAccountProperties_DnsEndpointType_STATUS_AzureDnsZone, + "standard": StorageAccountProperties_DnsEndpointType_STATUS_Standard, +} + type StorageAccountProperties_LargeFileSharesState_STATUS string const ( @@ -7817,6 +7879,12 @@ const ( StorageAccountProperties_LargeFileSharesState_STATUS_Enabled = StorageAccountProperties_LargeFileSharesState_STATUS("Enabled") ) +// Mapping from string to StorageAccountProperties_LargeFileSharesState_STATUS +var storageAccountProperties_LargeFileSharesState_STATUS_Values = map[string]StorageAccountProperties_LargeFileSharesState_STATUS{ + "disabled": StorageAccountProperties_LargeFileSharesState_STATUS_Disabled, + "enabled": StorageAccountProperties_LargeFileSharesState_STATUS_Enabled, +} + type StorageAccountProperties_MinimumTlsVersion_STATUS string const ( @@ -7825,6 +7893,13 @@ const ( StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2 = StorageAccountProperties_MinimumTlsVersion_STATUS("TLS1_2") ) +// Mapping from string to StorageAccountProperties_MinimumTlsVersion_STATUS +var storageAccountProperties_MinimumTlsVersion_STATUS_Values = map[string]StorageAccountProperties_MinimumTlsVersion_STATUS{ + "tls1_0": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_0, + "tls1_1": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_1, + "tls1_2": StorageAccountProperties_MinimumTlsVersion_STATUS_TLS1_2, +} + type StorageAccountProperties_ProvisioningState_STATUS string const ( @@ -7833,6 +7908,13 @@ const ( StorageAccountProperties_ProvisioningState_STATUS_Succeeded = StorageAccountProperties_ProvisioningState_STATUS("Succeeded") ) +// Mapping from string to StorageAccountProperties_ProvisioningState_STATUS +var storageAccountProperties_ProvisioningState_STATUS_Values = map[string]StorageAccountProperties_ProvisioningState_STATUS{ + "creating": StorageAccountProperties_ProvisioningState_STATUS_Creating, + "resolvingdns": StorageAccountProperties_ProvisioningState_STATUS_ResolvingDNS, + "succeeded": StorageAccountProperties_ProvisioningState_STATUS_Succeeded, +} + type StorageAccountProperties_PublicNetworkAccess_STATUS string const ( @@ -7840,6 +7922,12 @@ const ( StorageAccountProperties_PublicNetworkAccess_STATUS_Enabled = StorageAccountProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to StorageAccountProperties_PublicNetworkAccess_STATUS +var storageAccountProperties_PublicNetworkAccess_STATUS_Values = map[string]StorageAccountProperties_PublicNetworkAccess_STATUS{ + "disabled": StorageAccountProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": StorageAccountProperties_PublicNetworkAccess_STATUS_Enabled, +} + type StorageAccountProperties_StatusOfPrimary_STATUS string const ( @@ -7847,6 +7935,12 @@ const ( StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable = StorageAccountProperties_StatusOfPrimary_STATUS("unavailable") ) +// Mapping from string to StorageAccountProperties_StatusOfPrimary_STATUS +var storageAccountProperties_StatusOfPrimary_STATUS_Values = map[string]StorageAccountProperties_StatusOfPrimary_STATUS{ + "available": StorageAccountProperties_StatusOfPrimary_STATUS_Available, + "unavailable": StorageAccountProperties_StatusOfPrimary_STATUS_Unavailable, +} + type StorageAccountProperties_StatusOfSecondary_STATUS string const ( @@ -7854,6 +7948,12 @@ const ( StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable = StorageAccountProperties_StatusOfSecondary_STATUS("unavailable") ) +// Mapping from string to StorageAccountProperties_StatusOfSecondary_STATUS +var storageAccountProperties_StatusOfSecondary_STATUS_Values = map[string]StorageAccountProperties_StatusOfSecondary_STATUS{ + "available": StorageAccountProperties_StatusOfSecondary_STATUS_Available, + "unavailable": StorageAccountProperties_StatusOfSecondary_STATUS_Unavailable, +} + // +kubebuilder:validation:Enum={"Cool","Hot","Premium"} type StorageAccountPropertiesCreateParameters_AccessTier string @@ -7863,6 +7963,13 @@ const ( StorageAccountPropertiesCreateParameters_AccessTier_Premium = StorageAccountPropertiesCreateParameters_AccessTier("Premium") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_AccessTier +var storageAccountPropertiesCreateParameters_AccessTier_Values = map[string]StorageAccountPropertiesCreateParameters_AccessTier{ + "cool": StorageAccountPropertiesCreateParameters_AccessTier_Cool, + "hot": StorageAccountPropertiesCreateParameters_AccessTier_Hot, + "premium": StorageAccountPropertiesCreateParameters_AccessTier_Premium, +} + // +kubebuilder:validation:Enum={"AAD","PrivateLink"} type StorageAccountPropertiesCreateParameters_AllowedCopyScope string @@ -7871,6 +7978,12 @@ const ( StorageAccountPropertiesCreateParameters_AllowedCopyScope_PrivateLink = StorageAccountPropertiesCreateParameters_AllowedCopyScope("PrivateLink") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_AllowedCopyScope +var storageAccountPropertiesCreateParameters_AllowedCopyScope_Values = map[string]StorageAccountPropertiesCreateParameters_AllowedCopyScope{ + "aad": StorageAccountPropertiesCreateParameters_AllowedCopyScope_AAD, + "privatelink": StorageAccountPropertiesCreateParameters_AllowedCopyScope_PrivateLink, +} + // +kubebuilder:validation:Enum={"AzureDnsZone","Standard"} type StorageAccountPropertiesCreateParameters_DnsEndpointType string @@ -7879,6 +7992,12 @@ const ( StorageAccountPropertiesCreateParameters_DnsEndpointType_Standard = StorageAccountPropertiesCreateParameters_DnsEndpointType("Standard") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_DnsEndpointType +var storageAccountPropertiesCreateParameters_DnsEndpointType_Values = map[string]StorageAccountPropertiesCreateParameters_DnsEndpointType{ + "azurednszone": StorageAccountPropertiesCreateParameters_DnsEndpointType_AzureDnsZone, + "standard": StorageAccountPropertiesCreateParameters_DnsEndpointType_Standard, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type StorageAccountPropertiesCreateParameters_LargeFileSharesState string @@ -7887,6 +8006,12 @@ const ( StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled = StorageAccountPropertiesCreateParameters_LargeFileSharesState("Enabled") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_LargeFileSharesState +var storageAccountPropertiesCreateParameters_LargeFileSharesState_Values = map[string]StorageAccountPropertiesCreateParameters_LargeFileSharesState{ + "disabled": StorageAccountPropertiesCreateParameters_LargeFileSharesState_Disabled, + "enabled": StorageAccountPropertiesCreateParameters_LargeFileSharesState_Enabled, +} + // +kubebuilder:validation:Enum={"TLS1_0","TLS1_1","TLS1_2"} type StorageAccountPropertiesCreateParameters_MinimumTlsVersion string @@ -7896,6 +8021,13 @@ const ( StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2 = StorageAccountPropertiesCreateParameters_MinimumTlsVersion("TLS1_2") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_MinimumTlsVersion +var storageAccountPropertiesCreateParameters_MinimumTlsVersion_Values = map[string]StorageAccountPropertiesCreateParameters_MinimumTlsVersion{ + "tls1_0": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_0, + "tls1_1": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_1, + "tls1_2": StorageAccountPropertiesCreateParameters_MinimumTlsVersion_TLS1_2, +} + // +kubebuilder:validation:Enum={"Disabled","Enabled"} type StorageAccountPropertiesCreateParameters_PublicNetworkAccess string @@ -7904,6 +8036,12 @@ const ( StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Enabled = StorageAccountPropertiesCreateParameters_PublicNetworkAccess("Enabled") ) +// Mapping from string to StorageAccountPropertiesCreateParameters_PublicNetworkAccess +var storageAccountPropertiesCreateParameters_PublicNetworkAccess_Values = map[string]StorageAccountPropertiesCreateParameters_PublicNetworkAccess{ + "disabled": StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Disabled, + "enabled": StorageAccountPropertiesCreateParameters_PublicNetworkAccess_Enabled, +} + // This defines the sku conversion status object for asynchronous sku conversions. type StorageAccountSkuConversionStatus_STATUS struct { // EndTime: This property represents the sku conversion end time. @@ -7969,8 +8107,9 @@ func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_From_St // SkuConversionStatus if source.SkuConversionStatus != nil { - skuConversionStatus := StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS(*source.SkuConversionStatus) - status.SkuConversionStatus = &skuConversionStatus + skuConversionStatus := *source.SkuConversionStatus + skuConversionStatusTemp := genruntime.ToEnum(skuConversionStatus, storageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Values) + status.SkuConversionStatus = &skuConversionStatusTemp } else { status.SkuConversionStatus = nil } @@ -7980,8 +8119,9 @@ func (status *StorageAccountSkuConversionStatus_STATUS) AssignProperties_From_St // TargetSkuName if source.TargetSkuName != nil { - targetSkuName := SkuName_STATUS(*source.TargetSkuName) - status.TargetSkuName = &targetSkuName + targetSkuName := *source.TargetSkuName + targetSkuNameTemp := genruntime.ToEnum(targetSkuName, skuName_STATUS_Values) + status.TargetSkuName = &targetSkuNameTemp } else { status.TargetSkuName = nil } @@ -8133,8 +8273,9 @@ func (properties *AccountImmutabilityPolicyProperties) AssignProperties_From_Acc // State if source.State != nil { - state := AccountImmutabilityPolicyProperties_State(*source.State) - properties.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, accountImmutabilityPolicyProperties_State_Values) + properties.State = &stateTemp } else { properties.State = nil } @@ -8285,8 +8426,9 @@ func (properties *AccountImmutabilityPolicyProperties_STATUS) AssignProperties_F // State if source.State != nil { - state := AccountImmutabilityPolicyProperties_State_STATUS(*source.State) - properties.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, accountImmutabilityPolicyProperties_State_STATUS_Values) + properties.State = &stateTemp } else { properties.State = nil } @@ -8487,8 +8629,9 @@ func (properties *ActiveDirectoryProperties) AssignProperties_From_ActiveDirecto // AccountType if source.AccountType != nil { - accountType := ActiveDirectoryProperties_AccountType(*source.AccountType) - properties.AccountType = &accountType + accountType := *source.AccountType + accountTypeTemp := genruntime.ToEnum(accountType, activeDirectoryProperties_AccountType_Values) + properties.AccountType = &accountTypeTemp } else { properties.AccountType = nil } @@ -8697,8 +8840,9 @@ func (properties *ActiveDirectoryProperties_STATUS) AssignProperties_From_Active // AccountType if source.AccountType != nil { - accountType := ActiveDirectoryProperties_AccountType_STATUS(*source.AccountType) - properties.AccountType = &accountType + accountType := *source.AccountType + accountTypeTemp := genruntime.ToEnum(accountType, activeDirectoryProperties_AccountType_STATUS_Values) + properties.AccountType = &accountTypeTemp } else { properties.AccountType = nil } @@ -8783,6 +8927,14 @@ const ( AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader = AzureFilesIdentityBasedAuthentication_DefaultSharePermission("StorageFileDataSmbShareReader") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DefaultSharePermission +var azureFilesIdentityBasedAuthentication_DefaultSharePermission_Values = map[string]AzureFilesIdentityBasedAuthentication_DefaultSharePermission{ + "none": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_None, + "storagefiledatasmbsharecontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareContributor, + "storagefiledatasmbshareelevatedcontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareElevatedContributor, + "storagefiledatasmbsharereader": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_StorageFileDataSmbShareReader, +} + type AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS string const ( @@ -8792,6 +8944,14 @@ const ( AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader = AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS("StorageFileDataSmbShareReader") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS +var azureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_Values = map[string]AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS{ + "none": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_None, + "storagefiledatasmbsharecontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareContributor, + "storagefiledatasmbshareelevatedcontributor": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareElevatedContributor, + "storagefiledatasmbsharereader": AzureFilesIdentityBasedAuthentication_DefaultSharePermission_STATUS_StorageFileDataSmbShareReader, +} + // +kubebuilder:validation:Enum={"AADDS","AADKERB","AD","None"} type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions string @@ -8802,6 +8962,14 @@ const ( AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions("None") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions +var azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_Values = map[string]AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions{ + "aadds": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADDS, + "aadkerb": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AADKERB, + "ad": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_AD, + "none": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_None, +} + type AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS string const ( @@ -8811,6 +8979,14 @@ const ( AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None = AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS("None") ) +// Mapping from string to AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS +var azureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_Values = map[string]AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS{ + "aadds": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADDS, + "aadkerb": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AADKERB, + "ad": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_AD, + "none": AzureFilesIdentityBasedAuthentication_DirectoryServiceOptions_STATUS_None, +} + // Blob restore parameters type BlobRestoreParameters_STATUS struct { // BlobRanges: Blob ranges to restore. @@ -8927,6 +9103,13 @@ const ( BlobRestoreStatus_Status_STATUS_InProgress = BlobRestoreStatus_Status_STATUS("InProgress") ) +// Mapping from string to BlobRestoreStatus_Status_STATUS +var blobRestoreStatus_Status_STATUS_Values = map[string]BlobRestoreStatus_Status_STATUS{ + "complete": BlobRestoreStatus_Status_STATUS_Complete, + "failed": BlobRestoreStatus_Status_STATUS_Failed, + "inprogress": BlobRestoreStatus_Status_STATUS_InProgress, +} + // +kubebuilder:validation:Enum={"Microsoft.Keyvault","Microsoft.Storage"} type Encryption_KeySource string @@ -8935,6 +9118,12 @@ const ( Encryption_KeySource_MicrosoftStorage = Encryption_KeySource("Microsoft.Storage") ) +// Mapping from string to Encryption_KeySource +var encryption_KeySource_Values = map[string]Encryption_KeySource{ + "microsoft.keyvault": Encryption_KeySource_MicrosoftKeyvault, + "microsoft.storage": Encryption_KeySource_MicrosoftStorage, +} + type Encryption_KeySource_STATUS string const ( @@ -8942,6 +9131,12 @@ const ( Encryption_KeySource_STATUS_MicrosoftStorage = Encryption_KeySource_STATUS("Microsoft.Storage") ) +// Mapping from string to Encryption_KeySource_STATUS +var encryption_KeySource_STATUS_Values = map[string]Encryption_KeySource_STATUS{ + "microsoft.keyvault": Encryption_KeySource_STATUS_MicrosoftKeyvault, + "microsoft.storage": Encryption_KeySource_STATUS_MicrosoftStorage, +} + // Encryption identity for the storage account. type EncryptionIdentity struct { // FederatedIdentityClientId: ClientId of the multi-tenant application to be used in conjunction with the user-assigned @@ -9638,6 +9833,12 @@ const ( GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_ZRS = GeoReplicationStats_PostFailoverRedundancy_STATUS("Standard_ZRS") ) +// Mapping from string to GeoReplicationStats_PostFailoverRedundancy_STATUS +var geoReplicationStats_PostFailoverRedundancy_STATUS_Values = map[string]GeoReplicationStats_PostFailoverRedundancy_STATUS{ + "standard_lrs": GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_LRS, + "standard_zrs": GeoReplicationStats_PostFailoverRedundancy_STATUS_Standard_ZRS, +} + type GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS string const ( @@ -9647,6 +9848,14 @@ const ( GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGZRS = GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS("Standard_RAGZRS") ) +// Mapping from string to GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS +var geoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Values = map[string]GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS{ + "standard_grs": GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_GRS, + "standard_gzrs": GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_GZRS, + "standard_ragrs": GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGRS, + "standard_ragzrs": GeoReplicationStats_PostPlannedFailoverRedundancy_STATUS_Standard_RAGZRS, +} + type GeoReplicationStats_Status_STATUS string const ( @@ -9655,6 +9864,13 @@ const ( GeoReplicationStats_Status_STATUS_Unavailable = GeoReplicationStats_Status_STATUS("Unavailable") ) +// Mapping from string to GeoReplicationStats_Status_STATUS +var geoReplicationStats_Status_STATUS_Values = map[string]GeoReplicationStats_Status_STATUS{ + "bootstrap": GeoReplicationStats_Status_STATUS_Bootstrap, + "live": GeoReplicationStats_Status_STATUS_Live, + "unavailable": GeoReplicationStats_Status_STATUS_Unavailable, +} + // IP rule with specific IP or IP range in CIDR format. type IPRule struct { // Action: The action of IP ACL rule. @@ -9721,8 +9937,9 @@ func (rule *IPRule) AssignProperties_From_IPRule(source *v20230101s.IPRule) erro // Action if source.Action != nil { - action := IPRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, iPRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -9823,8 +10040,9 @@ func (rule *IPRule_STATUS) AssignProperties_From_IPRule_STATUS(source *v20230101 // Action if source.Action != nil { - action := IPRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, iPRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -10140,6 +10358,14 @@ const ( NetworkRuleSet_Bypass_None = NetworkRuleSet_Bypass("None") ) +// Mapping from string to NetworkRuleSet_Bypass +var networkRuleSet_Bypass_Values = map[string]NetworkRuleSet_Bypass{ + "azureservices": NetworkRuleSet_Bypass_AzureServices, + "logging": NetworkRuleSet_Bypass_Logging, + "metrics": NetworkRuleSet_Bypass_Metrics, + "none": NetworkRuleSet_Bypass_None, +} + type NetworkRuleSet_Bypass_STATUS string const ( @@ -10149,6 +10375,14 @@ const ( NetworkRuleSet_Bypass_STATUS_None = NetworkRuleSet_Bypass_STATUS("None") ) +// Mapping from string to NetworkRuleSet_Bypass_STATUS +var networkRuleSet_Bypass_STATUS_Values = map[string]NetworkRuleSet_Bypass_STATUS{ + "azureservices": NetworkRuleSet_Bypass_STATUS_AzureServices, + "logging": NetworkRuleSet_Bypass_STATUS_Logging, + "metrics": NetworkRuleSet_Bypass_STATUS_Metrics, + "none": NetworkRuleSet_Bypass_STATUS_None, +} + // +kubebuilder:validation:Enum={"Allow","Deny"} type NetworkRuleSet_DefaultAction string @@ -10157,6 +10391,12 @@ const ( NetworkRuleSet_DefaultAction_Deny = NetworkRuleSet_DefaultAction("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction +var networkRuleSet_DefaultAction_Values = map[string]NetworkRuleSet_DefaultAction{ + "allow": NetworkRuleSet_DefaultAction_Allow, + "deny": NetworkRuleSet_DefaultAction_Deny, +} + type NetworkRuleSet_DefaultAction_STATUS string const ( @@ -10164,6 +10404,12 @@ const ( NetworkRuleSet_DefaultAction_STATUS_Deny = NetworkRuleSet_DefaultAction_STATUS("Deny") ) +// Mapping from string to NetworkRuleSet_DefaultAction_STATUS +var networkRuleSet_DefaultAction_STATUS_Values = map[string]NetworkRuleSet_DefaultAction_STATUS{ + "allow": NetworkRuleSet_DefaultAction_STATUS_Allow, + "deny": NetworkRuleSet_DefaultAction_STATUS_Deny, +} + // Resource Access Rule. type ResourceAccessRule struct { // ResourceReference: Resource Id @@ -10369,6 +10615,12 @@ const ( RoutingPreference_RoutingChoice_MicrosoftRouting = RoutingPreference_RoutingChoice("MicrosoftRouting") ) +// Mapping from string to RoutingPreference_RoutingChoice +var routingPreference_RoutingChoice_Values = map[string]RoutingPreference_RoutingChoice{ + "internetrouting": RoutingPreference_RoutingChoice_InternetRouting, + "microsoftrouting": RoutingPreference_RoutingChoice_MicrosoftRouting, +} + type RoutingPreference_RoutingChoice_STATUS string const ( @@ -10376,15 +10628,31 @@ const ( RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting = RoutingPreference_RoutingChoice_STATUS("MicrosoftRouting") ) +// Mapping from string to RoutingPreference_RoutingChoice_STATUS +var routingPreference_RoutingChoice_STATUS_Values = map[string]RoutingPreference_RoutingChoice_STATUS{ + "internetrouting": RoutingPreference_RoutingChoice_STATUS_InternetRouting, + "microsoftrouting": RoutingPreference_RoutingChoice_STATUS_MicrosoftRouting, +} + // +kubebuilder:validation:Enum={"Log"} type SasPolicy_ExpirationAction string const SasPolicy_ExpirationAction_Log = SasPolicy_ExpirationAction("Log") +// Mapping from string to SasPolicy_ExpirationAction +var sasPolicy_ExpirationAction_Values = map[string]SasPolicy_ExpirationAction{ + "log": SasPolicy_ExpirationAction_Log, +} + type SasPolicy_ExpirationAction_STATUS string const SasPolicy_ExpirationAction_STATUS_Log = SasPolicy_ExpirationAction_STATUS("Log") +// Mapping from string to SasPolicy_ExpirationAction_STATUS +var sasPolicy_ExpirationAction_STATUS_Values = map[string]SasPolicy_ExpirationAction_STATUS{ + "log": SasPolicy_ExpirationAction_STATUS_Log, +} + // The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. type StorageAccountInternetEndpoints_STATUS struct { // Blob: Gets the blob endpoint. @@ -10954,6 +11222,13 @@ const ( StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Succeeded = StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS("Succeeded") ) +// Mapping from string to StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS +var storageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Values = map[string]StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS{ + "failed": StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Failed, + "inprogress": StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_InProgress, + "succeeded": StorageAccountSkuConversionStatus_SkuConversionStatus_STATUS_Succeeded, +} + // UserAssignedIdentity for the resource. type UserAssignedIdentity_STATUS struct { // ClientId: The client ID of the identity. @@ -11144,8 +11419,9 @@ func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source // Action if source.Action != nil { - action := VirtualNetworkRule_Action(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, virtualNetworkRule_Action_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -11160,8 +11436,9 @@ func (rule *VirtualNetworkRule) AssignProperties_From_VirtualNetworkRule(source // State if source.State != nil { - state := VirtualNetworkRule_State(*source.State) - rule.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, virtualNetworkRule_State_Values) + rule.State = &stateTemp } else { rule.State = nil } @@ -11295,8 +11572,9 @@ func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_ // Action if source.Action != nil { - action := VirtualNetworkRule_Action_STATUS(*source.Action) - rule.Action = &action + action := *source.Action + actionTemp := genruntime.ToEnum(action, virtualNetworkRule_Action_STATUS_Values) + rule.Action = &actionTemp } else { rule.Action = nil } @@ -11306,8 +11584,9 @@ func (rule *VirtualNetworkRule_STATUS) AssignProperties_From_VirtualNetworkRule_ // State if source.State != nil { - state := VirtualNetworkRule_State_STATUS(*source.State) - rule.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, virtualNetworkRule_State_STATUS_Values) + rule.State = &stateTemp } else { rule.State = nil } @@ -11360,6 +11639,13 @@ const ( AccountImmutabilityPolicyProperties_State_Unlocked = AccountImmutabilityPolicyProperties_State("Unlocked") ) +// Mapping from string to AccountImmutabilityPolicyProperties_State +var accountImmutabilityPolicyProperties_State_Values = map[string]AccountImmutabilityPolicyProperties_State{ + "disabled": AccountImmutabilityPolicyProperties_State_Disabled, + "locked": AccountImmutabilityPolicyProperties_State_Locked, + "unlocked": AccountImmutabilityPolicyProperties_State_Unlocked, +} + type AccountImmutabilityPolicyProperties_State_STATUS string const ( @@ -11368,6 +11654,13 @@ const ( AccountImmutabilityPolicyProperties_State_STATUS_Unlocked = AccountImmutabilityPolicyProperties_State_STATUS("Unlocked") ) +// Mapping from string to AccountImmutabilityPolicyProperties_State_STATUS +var accountImmutabilityPolicyProperties_State_STATUS_Values = map[string]AccountImmutabilityPolicyProperties_State_STATUS{ + "disabled": AccountImmutabilityPolicyProperties_State_STATUS_Disabled, + "locked": AccountImmutabilityPolicyProperties_State_STATUS_Locked, + "unlocked": AccountImmutabilityPolicyProperties_State_STATUS_Unlocked, +} + // +kubebuilder:validation:Enum={"Computer","User"} type ActiveDirectoryProperties_AccountType string @@ -11376,6 +11669,12 @@ const ( ActiveDirectoryProperties_AccountType_User = ActiveDirectoryProperties_AccountType("User") ) +// Mapping from string to ActiveDirectoryProperties_AccountType +var activeDirectoryProperties_AccountType_Values = map[string]ActiveDirectoryProperties_AccountType{ + "computer": ActiveDirectoryProperties_AccountType_Computer, + "user": ActiveDirectoryProperties_AccountType_User, +} + type ActiveDirectoryProperties_AccountType_STATUS string const ( @@ -11383,6 +11682,12 @@ const ( ActiveDirectoryProperties_AccountType_STATUS_User = ActiveDirectoryProperties_AccountType_STATUS("User") ) +// Mapping from string to ActiveDirectoryProperties_AccountType_STATUS +var activeDirectoryProperties_AccountType_STATUS_Values = map[string]ActiveDirectoryProperties_AccountType_STATUS{ + "computer": ActiveDirectoryProperties_AccountType_STATUS_Computer, + "user": ActiveDirectoryProperties_AccountType_STATUS_User, +} + // Blob range type BlobRestoreRange_STATUS struct { // EndRange: Blob end range. This is exclusive. Empty means account end. @@ -11532,8 +11837,9 @@ func (service *EncryptionService) AssignProperties_From_EncryptionService(source // KeyType if source.KeyType != nil { - keyType := EncryptionService_KeyType(*source.KeyType) - service.KeyType = &keyType + keyType := *source.KeyType + keyTypeTemp := genruntime.ToEnum(keyType, encryptionService_KeyType_Values) + service.KeyType = &keyTypeTemp } else { service.KeyType = nil } @@ -11661,8 +11967,9 @@ func (service *EncryptionService_STATUS) AssignProperties_From_EncryptionService // KeyType if source.KeyType != nil { - keyType := EncryptionService_KeyType_STATUS(*source.KeyType) - service.KeyType = &keyType + keyType := *source.KeyType + keyTypeTemp := genruntime.ToEnum(keyType, encryptionService_KeyType_STATUS_Values) + service.KeyType = &keyTypeTemp } else { service.KeyType = nil } @@ -11714,19 +12021,39 @@ type IPRule_Action string const IPRule_Action_Allow = IPRule_Action("Allow") +// Mapping from string to IPRule_Action +var iPRule_Action_Values = map[string]IPRule_Action{ + "allow": IPRule_Action_Allow, +} + type IPRule_Action_STATUS string const IPRule_Action_STATUS_Allow = IPRule_Action_STATUS("Allow") +// Mapping from string to IPRule_Action_STATUS +var iPRule_Action_STATUS_Values = map[string]IPRule_Action_STATUS{ + "allow": IPRule_Action_STATUS_Allow, +} + // +kubebuilder:validation:Enum={"Allow"} type VirtualNetworkRule_Action string const VirtualNetworkRule_Action_Allow = VirtualNetworkRule_Action("Allow") +// Mapping from string to VirtualNetworkRule_Action +var virtualNetworkRule_Action_Values = map[string]VirtualNetworkRule_Action{ + "allow": VirtualNetworkRule_Action_Allow, +} + type VirtualNetworkRule_Action_STATUS string const VirtualNetworkRule_Action_STATUS_Allow = VirtualNetworkRule_Action_STATUS("Allow") +// Mapping from string to VirtualNetworkRule_Action_STATUS +var virtualNetworkRule_Action_STATUS_Values = map[string]VirtualNetworkRule_Action_STATUS{ + "allow": VirtualNetworkRule_Action_STATUS_Allow, +} + // +kubebuilder:validation:Enum={"Deprovisioning","Failed","NetworkSourceDeleted","Provisioning","Succeeded"} type VirtualNetworkRule_State string @@ -11738,6 +12065,15 @@ const ( VirtualNetworkRule_State_Succeeded = VirtualNetworkRule_State("Succeeded") ) +// Mapping from string to VirtualNetworkRule_State +var virtualNetworkRule_State_Values = map[string]VirtualNetworkRule_State{ + "deprovisioning": VirtualNetworkRule_State_Deprovisioning, + "failed": VirtualNetworkRule_State_Failed, + "networksourcedeleted": VirtualNetworkRule_State_NetworkSourceDeleted, + "provisioning": VirtualNetworkRule_State_Provisioning, + "succeeded": VirtualNetworkRule_State_Succeeded, +} + type VirtualNetworkRule_State_STATUS string const ( @@ -11748,6 +12084,15 @@ const ( VirtualNetworkRule_State_STATUS_Succeeded = VirtualNetworkRule_State_STATUS("Succeeded") ) +// Mapping from string to VirtualNetworkRule_State_STATUS +var virtualNetworkRule_State_STATUS_Values = map[string]VirtualNetworkRule_State_STATUS{ + "deprovisioning": VirtualNetworkRule_State_STATUS_Deprovisioning, + "failed": VirtualNetworkRule_State_STATUS_Failed, + "networksourcedeleted": VirtualNetworkRule_State_STATUS_NetworkSourceDeleted, + "provisioning": VirtualNetworkRule_State_STATUS_Provisioning, + "succeeded": VirtualNetworkRule_State_STATUS_Succeeded, +} + // +kubebuilder:validation:Enum={"Account","Service"} type EncryptionService_KeyType string @@ -11756,6 +12101,12 @@ const ( EncryptionService_KeyType_Service = EncryptionService_KeyType("Service") ) +// Mapping from string to EncryptionService_KeyType +var encryptionService_KeyType_Values = map[string]EncryptionService_KeyType{ + "account": EncryptionService_KeyType_Account, + "service": EncryptionService_KeyType_Service, +} + type EncryptionService_KeyType_STATUS string const ( @@ -11763,6 +12114,12 @@ const ( EncryptionService_KeyType_STATUS_Service = EncryptionService_KeyType_STATUS("Service") ) +// Mapping from string to EncryptionService_KeyType_STATUS +var encryptionService_KeyType_STATUS_Values = map[string]EncryptionService_KeyType_STATUS{ + "account": EncryptionService_KeyType_STATUS_Account, + "service": EncryptionService_KeyType_STATUS_Service, +} + func init() { SchemeBuilder.Register(&StorageAccount{}, &StorageAccountList{}) } diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen.go index cf2aecd9ce8..2ba5f38b732 100644 --- a/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen.go +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_service_types_gen.go @@ -2318,8 +2318,9 @@ func (policy *LastAccessTimeTrackingPolicy) AssignProperties_From_LastAccessTime // Name if source.Name != nil { - name := LastAccessTimeTrackingPolicy_Name(*source.Name) - policy.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, lastAccessTimeTrackingPolicy_Name_Values) + policy.Name = &nameTemp } else { policy.Name = nil } @@ -2472,8 +2473,9 @@ func (policy *LastAccessTimeTrackingPolicy_STATUS) AssignProperties_From_LastAcc // Name if source.Name != nil { - name := LastAccessTimeTrackingPolicy_Name_STATUS(*source.Name) - policy.Name = &name + name := *source.Name + nameTemp := genruntime.ToEnum(name, lastAccessTimeTrackingPolicy_Name_STATUS_Values) + policy.Name = &nameTemp } else { policy.Name = nil } @@ -2896,7 +2898,7 @@ func (rule *CorsRule) AssignProperties_From_CorsRule(source *v20230101s.CorsRule for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { // Shadow the loop variable to avoid aliasing allowedMethodItem := allowedMethodItem - allowedMethodList[allowedMethodIndex] = CorsRule_AllowedMethods(allowedMethodItem) + allowedMethodList[allowedMethodIndex] = genruntime.ToEnum(allowedMethodItem, corsRule_AllowedMethods_Values) } rule.AllowedMethods = allowedMethodList } else { @@ -3068,7 +3070,7 @@ func (rule *CorsRule_STATUS) AssignProperties_From_CorsRule_STATUS(source *v2023 for allowedMethodIndex, allowedMethodItem := range source.AllowedMethods { // Shadow the loop variable to avoid aliasing allowedMethodItem := allowedMethodItem - allowedMethodList[allowedMethodIndex] = CorsRule_AllowedMethods_STATUS(allowedMethodItem) + allowedMethodList[allowedMethodIndex] = genruntime.ToEnum(allowedMethodItem, corsRule_AllowedMethods_STATUS_Values) } rule.AllowedMethods = allowedMethodList } else { @@ -3134,10 +3136,20 @@ type LastAccessTimeTrackingPolicy_Name string const LastAccessTimeTrackingPolicy_Name_AccessTimeTracking = LastAccessTimeTrackingPolicy_Name("AccessTimeTracking") +// Mapping from string to LastAccessTimeTrackingPolicy_Name +var lastAccessTimeTrackingPolicy_Name_Values = map[string]LastAccessTimeTrackingPolicy_Name{ + "accesstimetracking": LastAccessTimeTrackingPolicy_Name_AccessTimeTracking, +} + type LastAccessTimeTrackingPolicy_Name_STATUS string const LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking = LastAccessTimeTrackingPolicy_Name_STATUS("AccessTimeTracking") +// Mapping from string to LastAccessTimeTrackingPolicy_Name_STATUS +var lastAccessTimeTrackingPolicy_Name_STATUS_Values = map[string]LastAccessTimeTrackingPolicy_Name_STATUS{ + "accesstimetracking": LastAccessTimeTrackingPolicy_Name_STATUS_AccessTimeTracking, +} + // +kubebuilder:validation:Enum={"CONNECT","DELETE","GET","HEAD","MERGE","OPTIONS","PATCH","POST","PUT","TRACE"} type CorsRule_AllowedMethods string @@ -3154,6 +3166,20 @@ const ( CorsRule_AllowedMethods_TRACE = CorsRule_AllowedMethods("TRACE") ) +// Mapping from string to CorsRule_AllowedMethods +var corsRule_AllowedMethods_Values = map[string]CorsRule_AllowedMethods{ + "connect": CorsRule_AllowedMethods_CONNECT, + "delete": CorsRule_AllowedMethods_DELETE, + "get": CorsRule_AllowedMethods_GET, + "head": CorsRule_AllowedMethods_HEAD, + "merge": CorsRule_AllowedMethods_MERGE, + "options": CorsRule_AllowedMethods_OPTIONS, + "patch": CorsRule_AllowedMethods_PATCH, + "post": CorsRule_AllowedMethods_POST, + "put": CorsRule_AllowedMethods_PUT, + "trace": CorsRule_AllowedMethods_TRACE, +} + type CorsRule_AllowedMethods_STATUS string const ( @@ -3169,6 +3195,20 @@ const ( CorsRule_AllowedMethods_STATUS_TRACE = CorsRule_AllowedMethods_STATUS("TRACE") ) +// Mapping from string to CorsRule_AllowedMethods_STATUS +var corsRule_AllowedMethods_STATUS_Values = map[string]CorsRule_AllowedMethods_STATUS{ + "connect": CorsRule_AllowedMethods_STATUS_CONNECT, + "delete": CorsRule_AllowedMethods_STATUS_DELETE, + "get": CorsRule_AllowedMethods_STATUS_GET, + "head": CorsRule_AllowedMethods_STATUS_HEAD, + "merge": CorsRule_AllowedMethods_STATUS_MERGE, + "options": CorsRule_AllowedMethods_STATUS_OPTIONS, + "patch": CorsRule_AllowedMethods_STATUS_PATCH, + "post": CorsRule_AllowedMethods_STATUS_POST, + "put": CorsRule_AllowedMethods_STATUS_PUT, + "trace": CorsRule_AllowedMethods_STATUS_TRACE, +} + func init() { SchemeBuilder.Register(&StorageAccountsBlobService{}, &StorageAccountsBlobServiceList{}) } diff --git a/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen.go index 480747156a3..a90eabb8c0f 100644 --- a/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen.go +++ b/v2/api/storage/v1api20230101/storage_accounts_blob_services_container_types_gen.go @@ -622,8 +622,9 @@ func (container *StorageAccounts_BlobServices_Container_Spec) AssignProperties_F // PublicAccess if source.PublicAccess != nil { - publicAccess := ContainerProperties_PublicAccess(*source.PublicAccess) - container.PublicAccess = &publicAccess + publicAccess := *source.PublicAccess + publicAccessTemp := genruntime.ToEnum(publicAccess, containerProperties_PublicAccess_Values) + container.PublicAccess = &publicAccessTemp } else { container.PublicAccess = nil } @@ -1237,24 +1238,27 @@ func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties // LeaseDuration if source.LeaseDuration != nil { - leaseDuration := ContainerProperties_LeaseDuration_STATUS(*source.LeaseDuration) - container.LeaseDuration = &leaseDuration + leaseDuration := *source.LeaseDuration + leaseDurationTemp := genruntime.ToEnum(leaseDuration, containerProperties_LeaseDuration_STATUS_Values) + container.LeaseDuration = &leaseDurationTemp } else { container.LeaseDuration = nil } // LeaseState if source.LeaseState != nil { - leaseState := ContainerProperties_LeaseState_STATUS(*source.LeaseState) - container.LeaseState = &leaseState + leaseState := *source.LeaseState + leaseStateTemp := genruntime.ToEnum(leaseState, containerProperties_LeaseState_STATUS_Values) + container.LeaseState = &leaseStateTemp } else { container.LeaseState = nil } // LeaseStatus if source.LeaseStatus != nil { - leaseStatus := ContainerProperties_LeaseStatus_STATUS(*source.LeaseStatus) - container.LeaseStatus = &leaseStatus + leaseStatus := *source.LeaseStatus + leaseStatusTemp := genruntime.ToEnum(leaseStatus, containerProperties_LeaseStatus_STATUS_Values) + container.LeaseStatus = &leaseStatusTemp } else { container.LeaseStatus = nil } @@ -1279,8 +1283,9 @@ func (container *StorageAccounts_BlobServices_Container_STATUS) AssignProperties // PublicAccess if source.PublicAccess != nil { - publicAccess := ContainerProperties_PublicAccess_STATUS(*source.PublicAccess) - container.PublicAccess = &publicAccess + publicAccess := *source.PublicAccess + publicAccessTemp := genruntime.ToEnum(publicAccess, containerProperties_PublicAccess_STATUS_Values) + container.PublicAccess = &publicAccessTemp } else { container.PublicAccess = nil } @@ -1470,6 +1475,12 @@ const ( ContainerProperties_LeaseDuration_STATUS_Infinite = ContainerProperties_LeaseDuration_STATUS("Infinite") ) +// Mapping from string to ContainerProperties_LeaseDuration_STATUS +var containerProperties_LeaseDuration_STATUS_Values = map[string]ContainerProperties_LeaseDuration_STATUS{ + "fixed": ContainerProperties_LeaseDuration_STATUS_Fixed, + "infinite": ContainerProperties_LeaseDuration_STATUS_Infinite, +} + type ContainerProperties_LeaseState_STATUS string const ( @@ -1480,6 +1491,15 @@ const ( ContainerProperties_LeaseState_STATUS_Leased = ContainerProperties_LeaseState_STATUS("Leased") ) +// Mapping from string to ContainerProperties_LeaseState_STATUS +var containerProperties_LeaseState_STATUS_Values = map[string]ContainerProperties_LeaseState_STATUS{ + "available": ContainerProperties_LeaseState_STATUS_Available, + "breaking": ContainerProperties_LeaseState_STATUS_Breaking, + "broken": ContainerProperties_LeaseState_STATUS_Broken, + "expired": ContainerProperties_LeaseState_STATUS_Expired, + "leased": ContainerProperties_LeaseState_STATUS_Leased, +} + type ContainerProperties_LeaseStatus_STATUS string const ( @@ -1487,6 +1507,12 @@ const ( ContainerProperties_LeaseStatus_STATUS_Unlocked = ContainerProperties_LeaseStatus_STATUS("Unlocked") ) +// Mapping from string to ContainerProperties_LeaseStatus_STATUS +var containerProperties_LeaseStatus_STATUS_Values = map[string]ContainerProperties_LeaseStatus_STATUS{ + "locked": ContainerProperties_LeaseStatus_STATUS_Locked, + "unlocked": ContainerProperties_LeaseStatus_STATUS_Unlocked, +} + // +kubebuilder:validation:Enum={"Blob","Container","None"} type ContainerProperties_PublicAccess string @@ -1496,6 +1522,13 @@ const ( ContainerProperties_PublicAccess_None = ContainerProperties_PublicAccess("None") ) +// Mapping from string to ContainerProperties_PublicAccess +var containerProperties_PublicAccess_Values = map[string]ContainerProperties_PublicAccess{ + "blob": ContainerProperties_PublicAccess_Blob, + "container": ContainerProperties_PublicAccess_Container, + "none": ContainerProperties_PublicAccess_None, +} + type ContainerProperties_PublicAccess_STATUS string const ( @@ -1504,6 +1537,13 @@ const ( ContainerProperties_PublicAccess_STATUS_None = ContainerProperties_PublicAccess_STATUS("None") ) +// Mapping from string to ContainerProperties_PublicAccess_STATUS +var containerProperties_PublicAccess_STATUS_Values = map[string]ContainerProperties_PublicAccess_STATUS{ + "blob": ContainerProperties_PublicAccess_STATUS_Blob, + "container": ContainerProperties_PublicAccess_STATUS_Container, + "none": ContainerProperties_PublicAccess_STATUS_None, +} + // The properties of an ImmutabilityPolicy of a blob container. type ImmutabilityPolicyProperties_STATUS struct { // AllowProtectedAppendWrites: This property can only be changed for unlocked time-based retention policies. When enabled, @@ -1630,8 +1670,9 @@ func (properties *ImmutabilityPolicyProperties_STATUS) AssignProperties_From_Imm // State if source.State != nil { - state := ImmutabilityPolicyProperty_State_STATUS(*source.State) - properties.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, immutabilityPolicyProperty_State_STATUS_Values) + properties.State = &stateTemp } else { properties.State = nil } @@ -1882,8 +1923,9 @@ func (versioning *ImmutableStorageWithVersioning_STATUS) AssignProperties_From_I // MigrationState if source.MigrationState != nil { - migrationState := ImmutableStorageWithVersioning_MigrationState_STATUS(*source.MigrationState) - versioning.MigrationState = &migrationState + migrationState := *source.MigrationState + migrationStateTemp := genruntime.ToEnum(migrationState, immutableStorageWithVersioning_MigrationState_STATUS_Values) + versioning.MigrationState = &migrationStateTemp } else { versioning.MigrationState = nil } @@ -2095,6 +2137,12 @@ const ( ImmutabilityPolicyProperty_State_STATUS_Unlocked = ImmutabilityPolicyProperty_State_STATUS("Unlocked") ) +// Mapping from string to ImmutabilityPolicyProperty_State_STATUS +var immutabilityPolicyProperty_State_STATUS_Values = map[string]ImmutabilityPolicyProperty_State_STATUS{ + "locked": ImmutabilityPolicyProperty_State_STATUS_Locked, + "unlocked": ImmutabilityPolicyProperty_State_STATUS_Unlocked, +} + type ImmutableStorageWithVersioning_MigrationState_STATUS string const ( @@ -2102,6 +2150,12 @@ const ( ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress = ImmutableStorageWithVersioning_MigrationState_STATUS("InProgress") ) +// Mapping from string to ImmutableStorageWithVersioning_MigrationState_STATUS +var immutableStorageWithVersioning_MigrationState_STATUS_Values = map[string]ImmutableStorageWithVersioning_MigrationState_STATUS{ + "completed": ImmutableStorageWithVersioning_MigrationState_STATUS_Completed, + "inprogress": ImmutableStorageWithVersioning_MigrationState_STATUS_InProgress, +} + // Protected append writes history setting for the blob container with Legal holds. type ProtectedAppendWritesHistory_STATUS struct { // AllowProtectedAppendWritesAll: When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining @@ -2440,8 +2494,9 @@ func (property *UpdateHistoryProperty_STATUS) AssignProperties_From_UpdateHistor // Update if source.Update != nil { - update := UpdateHistoryProperty_Update_STATUS(*source.Update) - property.Update = &update + update := *source.Update + updateTemp := genruntime.ToEnum(update, updateHistoryProperty_Update_STATUS_Values) + property.Update = &updateTemp } else { property.Update = nil } @@ -2516,6 +2571,13 @@ const ( UpdateHistoryProperty_Update_STATUS_Put = UpdateHistoryProperty_Update_STATUS("put") ) +// Mapping from string to UpdateHistoryProperty_Update_STATUS +var updateHistoryProperty_Update_STATUS_Values = map[string]UpdateHistoryProperty_Update_STATUS{ + "extend": UpdateHistoryProperty_Update_STATUS_Extend, + "lock": UpdateHistoryProperty_Update_STATUS_Lock, + "put": UpdateHistoryProperty_Update_STATUS_Put, +} + func init() { SchemeBuilder.Register(&StorageAccountsBlobServicesContainer{}, &StorageAccountsBlobServicesContainerList{}) } diff --git a/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen.go index e1974a170e0..5cfdec4c234 100644 --- a/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen.go +++ b/v2/api/storage/v1api20230101/storage_accounts_file_services_share_types_gen.go @@ -554,8 +554,9 @@ func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_From_Stor // AccessTier if source.AccessTier != nil { - accessTier := FileShareProperties_AccessTier(*source.AccessTier) - share.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, fileShareProperties_AccessTier_Values) + share.AccessTier = &accessTierTemp } else { share.AccessTier = nil } @@ -565,8 +566,9 @@ func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_From_Stor // EnabledProtocols if source.EnabledProtocols != nil { - enabledProtocol := FileShareProperties_EnabledProtocols(*source.EnabledProtocols) - share.EnabledProtocols = &enabledProtocol + enabledProtocol := *source.EnabledProtocols + enabledProtocolTemp := genruntime.ToEnum(enabledProtocol, fileShareProperties_EnabledProtocols_Values) + share.EnabledProtocols = &enabledProtocolTemp } else { share.EnabledProtocols = nil } @@ -584,8 +586,9 @@ func (share *StorageAccounts_FileServices_Share_Spec) AssignProperties_From_Stor // RootSquash if source.RootSquash != nil { - rootSquash := FileShareProperties_RootSquash(*source.RootSquash) - share.RootSquash = &rootSquash + rootSquash := *source.RootSquash + rootSquashTemp := genruntime.ToEnum(rootSquash, fileShareProperties_RootSquash_Values) + share.RootSquash = &rootSquashTemp } else { share.RootSquash = nil } @@ -1116,8 +1119,9 @@ func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_St // AccessTier if source.AccessTier != nil { - accessTier := FileShareProperties_AccessTier_STATUS(*source.AccessTier) - share.AccessTier = &accessTier + accessTier := *source.AccessTier + accessTierTemp := genruntime.ToEnum(accessTier, fileShareProperties_AccessTier_STATUS_Values) + share.AccessTier = &accessTierTemp } else { share.AccessTier = nil } @@ -1144,8 +1148,9 @@ func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_St // EnabledProtocols if source.EnabledProtocols != nil { - enabledProtocol := FileShareProperties_EnabledProtocols_STATUS(*source.EnabledProtocols) - share.EnabledProtocols = &enabledProtocol + enabledProtocol := *source.EnabledProtocols + enabledProtocolTemp := genruntime.ToEnum(enabledProtocol, fileShareProperties_EnabledProtocols_STATUS_Values) + share.EnabledProtocols = &enabledProtocolTemp } else { share.EnabledProtocols = nil } @@ -1161,24 +1166,27 @@ func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_St // LeaseDuration if source.LeaseDuration != nil { - leaseDuration := FileShareProperties_LeaseDuration_STATUS(*source.LeaseDuration) - share.LeaseDuration = &leaseDuration + leaseDuration := *source.LeaseDuration + leaseDurationTemp := genruntime.ToEnum(leaseDuration, fileShareProperties_LeaseDuration_STATUS_Values) + share.LeaseDuration = &leaseDurationTemp } else { share.LeaseDuration = nil } // LeaseState if source.LeaseState != nil { - leaseState := FileShareProperties_LeaseState_STATUS(*source.LeaseState) - share.LeaseState = &leaseState + leaseState := *source.LeaseState + leaseStateTemp := genruntime.ToEnum(leaseState, fileShareProperties_LeaseState_STATUS_Values) + share.LeaseState = &leaseStateTemp } else { share.LeaseState = nil } // LeaseStatus if source.LeaseStatus != nil { - leaseStatus := FileShareProperties_LeaseStatus_STATUS(*source.LeaseStatus) - share.LeaseStatus = &leaseStatus + leaseStatus := *source.LeaseStatus + leaseStatusTemp := genruntime.ToEnum(leaseStatus, fileShareProperties_LeaseStatus_STATUS_Values) + share.LeaseStatus = &leaseStatusTemp } else { share.LeaseStatus = nil } @@ -1194,8 +1202,9 @@ func (share *StorageAccounts_FileServices_Share_STATUS) AssignProperties_From_St // RootSquash if source.RootSquash != nil { - rootSquash := FileShareProperties_RootSquash_STATUS(*source.RootSquash) - share.RootSquash = &rootSquash + rootSquash := *source.RootSquash + rootSquashTemp := genruntime.ToEnum(rootSquash, fileShareProperties_RootSquash_STATUS_Values) + share.RootSquash = &rootSquashTemp } else { share.RootSquash = nil } @@ -1382,6 +1391,14 @@ const ( FileShareProperties_AccessTier_TransactionOptimized = FileShareProperties_AccessTier("TransactionOptimized") ) +// Mapping from string to FileShareProperties_AccessTier +var fileShareProperties_AccessTier_Values = map[string]FileShareProperties_AccessTier{ + "cool": FileShareProperties_AccessTier_Cool, + "hot": FileShareProperties_AccessTier_Hot, + "premium": FileShareProperties_AccessTier_Premium, + "transactionoptimized": FileShareProperties_AccessTier_TransactionOptimized, +} + type FileShareProperties_AccessTier_STATUS string const ( @@ -1391,6 +1408,14 @@ const ( FileShareProperties_AccessTier_STATUS_TransactionOptimized = FileShareProperties_AccessTier_STATUS("TransactionOptimized") ) +// Mapping from string to FileShareProperties_AccessTier_STATUS +var fileShareProperties_AccessTier_STATUS_Values = map[string]FileShareProperties_AccessTier_STATUS{ + "cool": FileShareProperties_AccessTier_STATUS_Cool, + "hot": FileShareProperties_AccessTier_STATUS_Hot, + "premium": FileShareProperties_AccessTier_STATUS_Premium, + "transactionoptimized": FileShareProperties_AccessTier_STATUS_TransactionOptimized, +} + // +kubebuilder:validation:Enum={"NFS","SMB"} type FileShareProperties_EnabledProtocols string @@ -1399,6 +1424,12 @@ const ( FileShareProperties_EnabledProtocols_SMB = FileShareProperties_EnabledProtocols("SMB") ) +// Mapping from string to FileShareProperties_EnabledProtocols +var fileShareProperties_EnabledProtocols_Values = map[string]FileShareProperties_EnabledProtocols{ + "nfs": FileShareProperties_EnabledProtocols_NFS, + "smb": FileShareProperties_EnabledProtocols_SMB, +} + type FileShareProperties_EnabledProtocols_STATUS string const ( @@ -1406,6 +1437,12 @@ const ( FileShareProperties_EnabledProtocols_STATUS_SMB = FileShareProperties_EnabledProtocols_STATUS("SMB") ) +// Mapping from string to FileShareProperties_EnabledProtocols_STATUS +var fileShareProperties_EnabledProtocols_STATUS_Values = map[string]FileShareProperties_EnabledProtocols_STATUS{ + "nfs": FileShareProperties_EnabledProtocols_STATUS_NFS, + "smb": FileShareProperties_EnabledProtocols_STATUS_SMB, +} + type FileShareProperties_LeaseDuration_STATUS string const ( @@ -1413,6 +1450,12 @@ const ( FileShareProperties_LeaseDuration_STATUS_Infinite = FileShareProperties_LeaseDuration_STATUS("Infinite") ) +// Mapping from string to FileShareProperties_LeaseDuration_STATUS +var fileShareProperties_LeaseDuration_STATUS_Values = map[string]FileShareProperties_LeaseDuration_STATUS{ + "fixed": FileShareProperties_LeaseDuration_STATUS_Fixed, + "infinite": FileShareProperties_LeaseDuration_STATUS_Infinite, +} + type FileShareProperties_LeaseState_STATUS string const ( @@ -1423,6 +1466,15 @@ const ( FileShareProperties_LeaseState_STATUS_Leased = FileShareProperties_LeaseState_STATUS("Leased") ) +// Mapping from string to FileShareProperties_LeaseState_STATUS +var fileShareProperties_LeaseState_STATUS_Values = map[string]FileShareProperties_LeaseState_STATUS{ + "available": FileShareProperties_LeaseState_STATUS_Available, + "breaking": FileShareProperties_LeaseState_STATUS_Breaking, + "broken": FileShareProperties_LeaseState_STATUS_Broken, + "expired": FileShareProperties_LeaseState_STATUS_Expired, + "leased": FileShareProperties_LeaseState_STATUS_Leased, +} + type FileShareProperties_LeaseStatus_STATUS string const ( @@ -1430,6 +1482,12 @@ const ( FileShareProperties_LeaseStatus_STATUS_Unlocked = FileShareProperties_LeaseStatus_STATUS("Unlocked") ) +// Mapping from string to FileShareProperties_LeaseStatus_STATUS +var fileShareProperties_LeaseStatus_STATUS_Values = map[string]FileShareProperties_LeaseStatus_STATUS{ + "locked": FileShareProperties_LeaseStatus_STATUS_Locked, + "unlocked": FileShareProperties_LeaseStatus_STATUS_Unlocked, +} + // +kubebuilder:validation:Enum={"AllSquash","NoRootSquash","RootSquash"} type FileShareProperties_RootSquash string @@ -1439,6 +1497,13 @@ const ( FileShareProperties_RootSquash_RootSquash = FileShareProperties_RootSquash("RootSquash") ) +// Mapping from string to FileShareProperties_RootSquash +var fileShareProperties_RootSquash_Values = map[string]FileShareProperties_RootSquash{ + "allsquash": FileShareProperties_RootSquash_AllSquash, + "norootsquash": FileShareProperties_RootSquash_NoRootSquash, + "rootsquash": FileShareProperties_RootSquash_RootSquash, +} + type FileShareProperties_RootSquash_STATUS string const ( @@ -1447,6 +1512,13 @@ const ( FileShareProperties_RootSquash_STATUS_RootSquash = FileShareProperties_RootSquash_STATUS("RootSquash") ) +// Mapping from string to FileShareProperties_RootSquash_STATUS +var fileShareProperties_RootSquash_STATUS_Values = map[string]FileShareProperties_RootSquash_STATUS{ + "allsquash": FileShareProperties_RootSquash_STATUS_AllSquash, + "norootsquash": FileShareProperties_RootSquash_STATUS_NoRootSquash, + "rootsquash": FileShareProperties_RootSquash_STATUS_RootSquash, +} + type SignedIdentifier struct { // AccessPolicy: Access policy AccessPolicy *AccessPolicy `json:"accessPolicy,omitempty"` diff --git a/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen.go b/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen.go index 539f998c12f..0e932d8fc5a 100644 --- a/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen.go +++ b/v2/api/storage/v1api20230101/storage_accounts_management_policy_types_gen.go @@ -1108,8 +1108,9 @@ func (rule *ManagementPolicyRule) AssignProperties_From_ManagementPolicyRule(sou // Type if source.Type != nil { - typeVar := ManagementPolicyRule_Type(*source.Type) - rule.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managementPolicyRule_Type_Values) + rule.Type = &typeTemp } else { rule.Type = nil } @@ -1294,8 +1295,9 @@ func (rule *ManagementPolicyRule_STATUS) AssignProperties_From_ManagementPolicyR // Type if source.Type != nil { - typeVar := ManagementPolicyRule_Type_STATUS(*source.Type) - rule.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managementPolicyRule_Type_STATUS_Values) + rule.Type = &typeTemp } else { rule.Type = nil } @@ -1657,10 +1659,20 @@ type ManagementPolicyRule_Type string const ManagementPolicyRule_Type_Lifecycle = ManagementPolicyRule_Type("Lifecycle") +// Mapping from string to ManagementPolicyRule_Type +var managementPolicyRule_Type_Values = map[string]ManagementPolicyRule_Type{ + "lifecycle": ManagementPolicyRule_Type_Lifecycle, +} + type ManagementPolicyRule_Type_STATUS string const ManagementPolicyRule_Type_STATUS_Lifecycle = ManagementPolicyRule_Type_STATUS("Lifecycle") +// Mapping from string to ManagementPolicyRule_Type_STATUS +var managementPolicyRule_Type_STATUS_Values = map[string]ManagementPolicyRule_Type_STATUS{ + "lifecycle": ManagementPolicyRule_Type_STATUS_Lifecycle, +} + // Actions are applied to the filtered blobs when the execution condition is met. type ManagementPolicyAction struct { // BaseBlob: The management policy action for base blob diff --git a/v2/api/subscription/v1api20211001/alias_spec_arm_types_gen.go b/v2/api/subscription/v1api20211001/alias_spec_arm_types_gen.go index f9d4912a6c0..7e1d6079af9 100644 --- a/v2/api/subscription/v1api20211001/alias_spec_arm_types_gen.go +++ b/v2/api/subscription/v1api20211001/alias_spec_arm_types_gen.go @@ -71,3 +71,9 @@ const ( Workload_DevTest = Workload("DevTest") Workload_Production = Workload("Production") ) + +// Mapping from string to Workload +var workload_Values = map[string]Workload{ + "devtest": Workload_DevTest, + "production": Workload_Production, +} diff --git a/v2/api/subscription/v1api20211001/alias_status_arm_types_gen.go b/v2/api/subscription/v1api20211001/alias_status_arm_types_gen.go index 378d2852f90..1aeee5370c9 100644 --- a/v2/api/subscription/v1api20211001/alias_status_arm_types_gen.go +++ b/v2/api/subscription/v1api20211001/alias_status_arm_types_gen.go @@ -87,6 +87,13 @@ const ( AcceptOwnershipState_STATUS_Pending = AcceptOwnershipState_STATUS("Pending") ) +// Mapping from string to AcceptOwnershipState_STATUS +var acceptOwnershipState_STATUS_Values = map[string]AcceptOwnershipState_STATUS{ + "completed": AcceptOwnershipState_STATUS_Completed, + "expired": AcceptOwnershipState_STATUS_Expired, + "pending": AcceptOwnershipState_STATUS_Pending, +} + type SubscriptionAliasResponseProperties_ProvisioningState_STATUS string const ( @@ -95,6 +102,13 @@ const ( SubscriptionAliasResponseProperties_ProvisioningState_STATUS_Succeeded = SubscriptionAliasResponseProperties_ProvisioningState_STATUS("Succeeded") ) +// Mapping from string to SubscriptionAliasResponseProperties_ProvisioningState_STATUS +var subscriptionAliasResponseProperties_ProvisioningState_STATUS_Values = map[string]SubscriptionAliasResponseProperties_ProvisioningState_STATUS{ + "accepted": SubscriptionAliasResponseProperties_ProvisioningState_STATUS_Accepted, + "failed": SubscriptionAliasResponseProperties_ProvisioningState_STATUS_Failed, + "succeeded": SubscriptionAliasResponseProperties_ProvisioningState_STATUS_Succeeded, +} + type SystemData_CreatedByType_STATUS string const ( @@ -104,6 +118,14 @@ const ( SystemData_CreatedByType_STATUS_User = SystemData_CreatedByType_STATUS("User") ) +// Mapping from string to SystemData_CreatedByType_STATUS +var systemData_CreatedByType_STATUS_Values = map[string]SystemData_CreatedByType_STATUS{ + "application": SystemData_CreatedByType_STATUS_Application, + "key": SystemData_CreatedByType_STATUS_Key, + "managedidentity": SystemData_CreatedByType_STATUS_ManagedIdentity, + "user": SystemData_CreatedByType_STATUS_User, +} + type SystemData_LastModifiedByType_STATUS string const ( @@ -113,6 +135,14 @@ const ( SystemData_LastModifiedByType_STATUS_User = SystemData_LastModifiedByType_STATUS("User") ) +// Mapping from string to SystemData_LastModifiedByType_STATUS +var systemData_LastModifiedByType_STATUS_Values = map[string]SystemData_LastModifiedByType_STATUS{ + "application": SystemData_LastModifiedByType_STATUS_Application, + "key": SystemData_LastModifiedByType_STATUS_Key, + "managedidentity": SystemData_LastModifiedByType_STATUS_ManagedIdentity, + "user": SystemData_LastModifiedByType_STATUS_User, +} + // The workload type of the subscription. It can be either Production or DevTest. type Workload_STATUS string @@ -120,3 +150,9 @@ const ( Workload_STATUS_DevTest = Workload_STATUS("DevTest") Workload_STATUS_Production = Workload_STATUS("Production") ) + +// Mapping from string to Workload_STATUS +var workload_STATUS_Values = map[string]Workload_STATUS{ + "devtest": Workload_STATUS_DevTest, + "production": Workload_STATUS_Production, +} diff --git a/v2/api/subscription/v1api20211001/alias_types_gen.go b/v2/api/subscription/v1api20211001/alias_types_gen.go index 9a588ca94db..524183d754e 100644 --- a/v2/api/subscription/v1api20211001/alias_types_gen.go +++ b/v2/api/subscription/v1api20211001/alias_types_gen.go @@ -896,8 +896,9 @@ func (properties *PutAliasRequestProperties) AssignProperties_From_PutAliasReque // Workload if source.Workload != nil { - workload := Workload(*source.Workload) - properties.Workload = &workload + workload := *source.Workload + workloadTemp := genruntime.ToEnum(workload, workload_Values) + properties.Workload = &workloadTemp } else { properties.Workload = nil } @@ -1115,8 +1116,9 @@ func (properties *SubscriptionAliasResponseProperties_STATUS) AssignProperties_F // AcceptOwnershipState if source.AcceptOwnershipState != nil { - acceptOwnershipState := AcceptOwnershipState_STATUS(*source.AcceptOwnershipState) - properties.AcceptOwnershipState = &acceptOwnershipState + acceptOwnershipState := *source.AcceptOwnershipState + acceptOwnershipStateTemp := genruntime.ToEnum(acceptOwnershipState, acceptOwnershipState_STATUS_Values) + properties.AcceptOwnershipState = &acceptOwnershipStateTemp } else { properties.AcceptOwnershipState = nil } @@ -1138,8 +1140,9 @@ func (properties *SubscriptionAliasResponseProperties_STATUS) AssignProperties_F // ProvisioningState if source.ProvisioningState != nil { - provisioningState := SubscriptionAliasResponseProperties_ProvisioningState_STATUS(*source.ProvisioningState) - properties.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, subscriptionAliasResponseProperties_ProvisioningState_STATUS_Values) + properties.ProvisioningState = &provisioningStateTemp } else { properties.ProvisioningState = nil } @@ -1158,8 +1161,9 @@ func (properties *SubscriptionAliasResponseProperties_STATUS) AssignProperties_F // Workload if source.Workload != nil { - workload := Workload_STATUS(*source.Workload) - properties.Workload = &workload + workload := *source.Workload + workloadTemp := genruntime.ToEnum(workload, workload_STATUS_Values) + properties.Workload = &workloadTemp } else { properties.Workload = nil } @@ -1321,8 +1325,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // CreatedByType if source.CreatedByType != nil { - createdByType := SystemData_CreatedByType_STATUS(*source.CreatedByType) - data.CreatedByType = &createdByType + createdByType := *source.CreatedByType + createdByTypeTemp := genruntime.ToEnum(createdByType, systemData_CreatedByType_STATUS_Values) + data.CreatedByType = &createdByTypeTemp } else { data.CreatedByType = nil } @@ -1335,8 +1340,9 @@ func (data *SystemData_STATUS) AssignProperties_From_SystemData_STATUS(source *v // LastModifiedByType if source.LastModifiedByType != nil { - lastModifiedByType := SystemData_LastModifiedByType_STATUS(*source.LastModifiedByType) - data.LastModifiedByType = &lastModifiedByType + lastModifiedByType := *source.LastModifiedByType + lastModifiedByTypeTemp := genruntime.ToEnum(lastModifiedByType, systemData_LastModifiedByType_STATUS_Values) + data.LastModifiedByType = &lastModifiedByTypeTemp } else { data.LastModifiedByType = nil } diff --git a/v2/api/synapse/v1api20210601/workspace_spec_arm_types_gen.go b/v2/api/synapse/v1api20210601/workspace_spec_arm_types_gen.go index b3b91c234ec..fb0664deb7a 100644 --- a/v2/api/synapse/v1api20210601/workspace_spec_arm_types_gen.go +++ b/v2/api/synapse/v1api20210601/workspace_spec_arm_types_gen.go @@ -129,6 +129,13 @@ const ( ManagedIdentity_Type_SystemAssignedUserAssigned = ManagedIdentity_Type("SystemAssigned,UserAssigned") ) +// Mapping from string to ManagedIdentity_Type +var managedIdentity_Type_Values = map[string]ManagedIdentity_Type{ + "none": ManagedIdentity_Type_None, + "systemassigned": ManagedIdentity_Type_SystemAssigned, + "systemassigned,userassigned": ManagedIdentity_Type_SystemAssignedUserAssigned, +} + // Managed Virtual Network Settings type ManagedVirtualNetworkSettings_ARM struct { // AllowedAadTenantIdsForLinking: Allowed Aad Tenant Ids For Linking diff --git a/v2/api/synapse/v1api20210601/workspace_status_arm_types_gen.go b/v2/api/synapse/v1api20210601/workspace_status_arm_types_gen.go index 75da3f3a432..53da9ed2ab9 100644 --- a/v2/api/synapse/v1api20210601/workspace_status_arm_types_gen.go +++ b/v2/api/synapse/v1api20210601/workspace_status_arm_types_gen.go @@ -149,6 +149,13 @@ const ( ManagedIdentity_Type_STATUS_SystemAssignedUserAssigned = ManagedIdentity_Type_STATUS("SystemAssigned,UserAssigned") ) +// Mapping from string to ManagedIdentity_Type_STATUS +var managedIdentity_Type_STATUS_Values = map[string]ManagedIdentity_Type_STATUS{ + "none": ManagedIdentity_Type_STATUS_None, + "systemassigned": ManagedIdentity_Type_STATUS_SystemAssigned, + "systemassigned,userassigned": ManagedIdentity_Type_STATUS_SystemAssignedUserAssigned, +} + // Managed Virtual Network Settings type ManagedVirtualNetworkSettings_STATUS_ARM struct { // AllowedAadTenantIdsForLinking: Allowed Aad Tenant Ids For Linking diff --git a/v2/api/synapse/v1api20210601/workspace_types_gen.go b/v2/api/synapse/v1api20210601/workspace_types_gen.go index 011a20f01aa..dcc18f3fc5f 100644 --- a/v2/api/synapse/v1api20210601/workspace_types_gen.go +++ b/v2/api/synapse/v1api20210601/workspace_types_gen.go @@ -900,8 +900,9 @@ func (workspace *Workspace_Spec) AssignProperties_From_Workspace_Spec(source *v2 // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := WorkspaceProperties_PublicNetworkAccess(*source.PublicNetworkAccess) - workspace.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, workspaceProperties_PublicNetworkAccess_Values) + workspace.PublicNetworkAccess = &publicNetworkAccessTemp } else { workspace.PublicNetworkAccess = nil } @@ -1848,8 +1849,9 @@ func (workspace *Workspace_STATUS) AssignProperties_From_Workspace_STATUS(source // PublicNetworkAccess if source.PublicNetworkAccess != nil { - publicNetworkAccess := WorkspaceProperties_PublicNetworkAccess_STATUS(*source.PublicNetworkAccess) - workspace.PublicNetworkAccess = &publicNetworkAccess + publicNetworkAccess := *source.PublicNetworkAccess + publicNetworkAccessTemp := genruntime.ToEnum(publicNetworkAccess, workspaceProperties_PublicNetworkAccess_STATUS_Values) + workspace.PublicNetworkAccess = &publicNetworkAccessTemp } else { workspace.PublicNetworkAccess = nil } @@ -2911,8 +2913,9 @@ func (identity *ManagedIdentity) AssignProperties_From_ManagedIdentity(source *v // Type if source.Type != nil { - typeVar := ManagedIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3083,8 +3086,9 @@ func (identity *ManagedIdentity_STATUS) AssignProperties_From_ManagedIdentity_ST // Type if source.Type != nil { - typeVar := ManagedIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -3796,6 +3800,12 @@ const ( WorkspaceProperties_PublicNetworkAccess_Enabled = WorkspaceProperties_PublicNetworkAccess("Enabled") ) +// Mapping from string to WorkspaceProperties_PublicNetworkAccess +var workspaceProperties_PublicNetworkAccess_Values = map[string]WorkspaceProperties_PublicNetworkAccess{ + "disabled": WorkspaceProperties_PublicNetworkAccess_Disabled, + "enabled": WorkspaceProperties_PublicNetworkAccess_Enabled, +} + type WorkspaceProperties_PublicNetworkAccess_STATUS string const ( @@ -3803,6 +3813,12 @@ const ( WorkspaceProperties_PublicNetworkAccess_STATUS_Enabled = WorkspaceProperties_PublicNetworkAccess_STATUS("Enabled") ) +// Mapping from string to WorkspaceProperties_PublicNetworkAccess_STATUS +var workspaceProperties_PublicNetworkAccess_STATUS_Values = map[string]WorkspaceProperties_PublicNetworkAccess_STATUS{ + "disabled": WorkspaceProperties_PublicNetworkAccess_STATUS_Disabled, + "enabled": WorkspaceProperties_PublicNetworkAccess_STATUS_Enabled, +} + // Git integration settings type WorkspaceRepositoryConfiguration struct { // AccountName: Account name diff --git a/v2/api/synapse/v1api20210601/workspaces_big_data_pool_types_gen.go b/v2/api/synapse/v1api20210601/workspaces_big_data_pool_types_gen.go index c569469638e..479dab69d1b 100644 --- a/v2/api/synapse/v1api20210601/workspaces_big_data_pool_types_gen.go +++ b/v2/api/synapse/v1api20210601/workspaces_big_data_pool_types_gen.go @@ -907,16 +907,18 @@ func (pool *Workspaces_BigDataPool_Spec) AssignProperties_From_Workspaces_BigDat // NodeSize if source.NodeSize != nil { - nodeSize := BigDataPoolResourceProperties_NodeSize(*source.NodeSize) - pool.NodeSize = &nodeSize + nodeSize := *source.NodeSize + nodeSizeTemp := genruntime.ToEnum(nodeSize, bigDataPoolResourceProperties_NodeSize_Values) + pool.NodeSize = &nodeSizeTemp } else { pool.NodeSize = nil } // NodeSizeFamily if source.NodeSizeFamily != nil { - nodeSizeFamily := BigDataPoolResourceProperties_NodeSizeFamily(*source.NodeSizeFamily) - pool.NodeSizeFamily = &nodeSizeFamily + nodeSizeFamily := *source.NodeSizeFamily + nodeSizeFamilyTemp := genruntime.ToEnum(nodeSizeFamily, bigDataPoolResourceProperties_NodeSizeFamily_Values) + pool.NodeSizeFamily = &nodeSizeFamilyTemp } else { pool.NodeSizeFamily = nil } @@ -1788,16 +1790,18 @@ func (pool *Workspaces_BigDataPool_STATUS) AssignProperties_From_Workspaces_BigD // NodeSize if source.NodeSize != nil { - nodeSize := BigDataPoolResourceProperties_NodeSize_STATUS(*source.NodeSize) - pool.NodeSize = &nodeSize + nodeSize := *source.NodeSize + nodeSizeTemp := genruntime.ToEnum(nodeSize, bigDataPoolResourceProperties_NodeSize_STATUS_Values) + pool.NodeSize = &nodeSizeTemp } else { pool.NodeSize = nil } // NodeSizeFamily if source.NodeSizeFamily != nil { - nodeSizeFamily := BigDataPoolResourceProperties_NodeSizeFamily_STATUS(*source.NodeSizeFamily) - pool.NodeSizeFamily = &nodeSizeFamily + nodeSizeFamily := *source.NodeSizeFamily + nodeSizeFamilyTemp := genruntime.ToEnum(nodeSizeFamily, bigDataPoolResourceProperties_NodeSizeFamily_STATUS_Values) + pool.NodeSizeFamily = &nodeSizeFamilyTemp } else { pool.NodeSizeFamily = nil } @@ -2483,6 +2487,17 @@ const ( BigDataPoolResourceProperties_NodeSize_XXXLarge = BigDataPoolResourceProperties_NodeSize("XXXLarge") ) +// Mapping from string to BigDataPoolResourceProperties_NodeSize +var bigDataPoolResourceProperties_NodeSize_Values = map[string]BigDataPoolResourceProperties_NodeSize{ + "large": BigDataPoolResourceProperties_NodeSize_Large, + "medium": BigDataPoolResourceProperties_NodeSize_Medium, + "none": BigDataPoolResourceProperties_NodeSize_None, + "small": BigDataPoolResourceProperties_NodeSize_Small, + "xlarge": BigDataPoolResourceProperties_NodeSize_XLarge, + "xxlarge": BigDataPoolResourceProperties_NodeSize_XXLarge, + "xxxlarge": BigDataPoolResourceProperties_NodeSize_XXXLarge, +} + type BigDataPoolResourceProperties_NodeSize_STATUS string const ( @@ -2495,6 +2510,17 @@ const ( BigDataPoolResourceProperties_NodeSize_STATUS_XXXLarge = BigDataPoolResourceProperties_NodeSize_STATUS("XXXLarge") ) +// Mapping from string to BigDataPoolResourceProperties_NodeSize_STATUS +var bigDataPoolResourceProperties_NodeSize_STATUS_Values = map[string]BigDataPoolResourceProperties_NodeSize_STATUS{ + "large": BigDataPoolResourceProperties_NodeSize_STATUS_Large, + "medium": BigDataPoolResourceProperties_NodeSize_STATUS_Medium, + "none": BigDataPoolResourceProperties_NodeSize_STATUS_None, + "small": BigDataPoolResourceProperties_NodeSize_STATUS_Small, + "xlarge": BigDataPoolResourceProperties_NodeSize_STATUS_XLarge, + "xxlarge": BigDataPoolResourceProperties_NodeSize_STATUS_XXLarge, + "xxxlarge": BigDataPoolResourceProperties_NodeSize_STATUS_XXXLarge, +} + // +kubebuilder:validation:Enum={"HardwareAcceleratedFPGA","HardwareAcceleratedGPU","MemoryOptimized","None"} type BigDataPoolResourceProperties_NodeSizeFamily string @@ -2505,6 +2531,14 @@ const ( BigDataPoolResourceProperties_NodeSizeFamily_None = BigDataPoolResourceProperties_NodeSizeFamily("None") ) +// Mapping from string to BigDataPoolResourceProperties_NodeSizeFamily +var bigDataPoolResourceProperties_NodeSizeFamily_Values = map[string]BigDataPoolResourceProperties_NodeSizeFamily{ + "hardwareacceleratedfpga": BigDataPoolResourceProperties_NodeSizeFamily_HardwareAcceleratedFPGA, + "hardwareacceleratedgpu": BigDataPoolResourceProperties_NodeSizeFamily_HardwareAcceleratedGPU, + "memoryoptimized": BigDataPoolResourceProperties_NodeSizeFamily_MemoryOptimized, + "none": BigDataPoolResourceProperties_NodeSizeFamily_None, +} + type BigDataPoolResourceProperties_NodeSizeFamily_STATUS string const ( @@ -2514,6 +2548,14 @@ const ( BigDataPoolResourceProperties_NodeSizeFamily_STATUS_None = BigDataPoolResourceProperties_NodeSizeFamily_STATUS("None") ) +// Mapping from string to BigDataPoolResourceProperties_NodeSizeFamily_STATUS +var bigDataPoolResourceProperties_NodeSizeFamily_STATUS_Values = map[string]BigDataPoolResourceProperties_NodeSizeFamily_STATUS{ + "hardwareacceleratedfpga": BigDataPoolResourceProperties_NodeSizeFamily_STATUS_HardwareAcceleratedFPGA, + "hardwareacceleratedgpu": BigDataPoolResourceProperties_NodeSizeFamily_STATUS_HardwareAcceleratedGPU, + "memoryoptimized": BigDataPoolResourceProperties_NodeSizeFamily_STATUS_MemoryOptimized, + "none": BigDataPoolResourceProperties_NodeSizeFamily_STATUS_None, +} + // Dynamic Executor Allocation Properties type DynamicExecutorAllocation struct { // Enabled: Indicates whether Dynamic Executor Allocation is enabled or not. @@ -3342,8 +3384,9 @@ func (properties *SparkConfigProperties) AssignProperties_From_SparkConfigProper // ConfigurationType if source.ConfigurationType != nil { - configurationType := SparkConfigProperties_ConfigurationType(*source.ConfigurationType) - properties.ConfigurationType = &configurationType + configurationType := *source.ConfigurationType + configurationTypeTemp := genruntime.ToEnum(configurationType, sparkConfigProperties_ConfigurationType_Values) + properties.ConfigurationType = &configurationTypeTemp } else { properties.ConfigurationType = nil } @@ -3471,8 +3514,9 @@ func (properties *SparkConfigProperties_STATUS) AssignProperties_From_SparkConfi // ConfigurationType if source.ConfigurationType != nil { - configurationType := SparkConfigProperties_ConfigurationType_STATUS(*source.ConfigurationType) - properties.ConfigurationType = &configurationType + configurationType := *source.ConfigurationType + configurationTypeTemp := genruntime.ToEnum(configurationType, sparkConfigProperties_ConfigurationType_STATUS_Values) + properties.ConfigurationType = &configurationTypeTemp } else { properties.ConfigurationType = nil } @@ -3531,6 +3575,12 @@ const ( SparkConfigProperties_ConfigurationType_File = SparkConfigProperties_ConfigurationType("File") ) +// Mapping from string to SparkConfigProperties_ConfigurationType +var sparkConfigProperties_ConfigurationType_Values = map[string]SparkConfigProperties_ConfigurationType{ + "artifact": SparkConfigProperties_ConfigurationType_Artifact, + "file": SparkConfigProperties_ConfigurationType_File, +} + type SparkConfigProperties_ConfigurationType_STATUS string const ( @@ -3538,6 +3588,12 @@ const ( SparkConfigProperties_ConfigurationType_STATUS_File = SparkConfigProperties_ConfigurationType_STATUS("File") ) +// Mapping from string to SparkConfigProperties_ConfigurationType_STATUS +var sparkConfigProperties_ConfigurationType_STATUS_Values = map[string]SparkConfigProperties_ConfigurationType_STATUS{ + "artifact": SparkConfigProperties_ConfigurationType_STATUS_Artifact, + "file": SparkConfigProperties_ConfigurationType_STATUS_File, +} + func init() { SchemeBuilder.Register(&WorkspacesBigDataPool{}, &WorkspacesBigDataPoolList{}) } diff --git a/v2/api/web/v1api20220301/server_farm_types_gen.go b/v2/api/web/v1api20220301/server_farm_types_gen.go index 3707f474922..82003189e28 100644 --- a/v2/api/web/v1api20220301/server_farm_types_gen.go +++ b/v2/api/web/v1api20220301/server_farm_types_gen.go @@ -1826,8 +1826,9 @@ func (serverfarm *Serverfarm_STATUS) AssignProperties_From_Serverfarm_STATUS(sou // ProvisioningState if source.ProvisioningState != nil { - provisioningState := Serverfarm_Properties_ProvisioningState_STATUS(*source.ProvisioningState) - serverfarm.ProvisioningState = &provisioningState + provisioningState := *source.ProvisioningState + provisioningStateTemp := genruntime.ToEnum(provisioningState, serverfarm_Properties_ProvisioningState_STATUS_Values) + serverfarm.ProvisioningState = &provisioningStateTemp } else { serverfarm.ProvisioningState = nil } @@ -1860,8 +1861,9 @@ func (serverfarm *Serverfarm_STATUS) AssignProperties_From_Serverfarm_STATUS(sou // Status if source.Status != nil { - status := Serverfarm_Properties_Status_STATUS(*source.Status) - serverfarm.Status = &status + status := *source.Status + statusTemp := genruntime.ToEnum(status, serverfarm_Properties_Status_STATUS_Values) + serverfarm.Status = &statusTemp } else { serverfarm.Status = nil } @@ -2633,6 +2635,15 @@ const ( Serverfarm_Properties_ProvisioningState_STATUS_Succeeded = Serverfarm_Properties_ProvisioningState_STATUS("Succeeded") ) +// Mapping from string to Serverfarm_Properties_ProvisioningState_STATUS +var serverfarm_Properties_ProvisioningState_STATUS_Values = map[string]Serverfarm_Properties_ProvisioningState_STATUS{ + "canceled": Serverfarm_Properties_ProvisioningState_STATUS_Canceled, + "deleting": Serverfarm_Properties_ProvisioningState_STATUS_Deleting, + "failed": Serverfarm_Properties_ProvisioningState_STATUS_Failed, + "inprogress": Serverfarm_Properties_ProvisioningState_STATUS_InProgress, + "succeeded": Serverfarm_Properties_ProvisioningState_STATUS_Succeeded, +} + type Serverfarm_Properties_Status_STATUS string const ( @@ -2641,6 +2652,13 @@ const ( Serverfarm_Properties_Status_STATUS_Ready = Serverfarm_Properties_Status_STATUS("Ready") ) +// Mapping from string to Serverfarm_Properties_Status_STATUS +var serverfarm_Properties_Status_STATUS_Values = map[string]Serverfarm_Properties_Status_STATUS{ + "creating": Serverfarm_Properties_Status_STATUS_Creating, + "pending": Serverfarm_Properties_Status_STATUS_Pending, + "ready": Serverfarm_Properties_Status_STATUS_Ready, +} + // Description of a SKU for a scalable resource. type SkuDescription struct { // Capabilities: Capabilities of the SKU, e.g., is traffic manager enabled? diff --git a/v2/api/web/v1api20220301/site_spec_arm_types_gen.go b/v2/api/web/v1api20220301/site_spec_arm_types_gen.go index 0cc6d9294c1..e4506a6a876 100644 --- a/v2/api/web/v1api20220301/site_spec_arm_types_gen.go +++ b/v2/api/web/v1api20220301/site_spec_arm_types_gen.go @@ -208,6 +208,14 @@ const ( ManagedServiceIdentity_Type_UserAssigned = ManagedServiceIdentity_Type("UserAssigned") ) +// Mapping from string to ManagedServiceIdentity_Type +var managedServiceIdentity_Type_Values = map[string]ManagedServiceIdentity_Type{ + "none": ManagedServiceIdentity_Type_None, + "systemassigned": ManagedServiceIdentity_Type_SystemAssigned, + "systemassigned, userassigned": ManagedServiceIdentity_Type_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentity_Type_UserAssigned, +} + // Configuration of an App Service app. type SiteConfig_ARM struct { // AcrUseManagedIdentityCreds: Flag to use Managed Identity Creds for ACR pull diff --git a/v2/api/web/v1api20220301/site_status_arm_types_gen.go b/v2/api/web/v1api20220301/site_status_arm_types_gen.go index a6c1ec02d20..57c367d32a8 100644 --- a/v2/api/web/v1api20220301/site_status_arm_types_gen.go +++ b/v2/api/web/v1api20220301/site_status_arm_types_gen.go @@ -283,6 +283,14 @@ const ( ManagedServiceIdentity_Type_STATUS_UserAssigned = ManagedServiceIdentity_Type_STATUS("UserAssigned") ) +// Mapping from string to ManagedServiceIdentity_Type_STATUS +var managedServiceIdentity_Type_STATUS_Values = map[string]ManagedServiceIdentity_Type_STATUS{ + "none": ManagedServiceIdentity_Type_STATUS_None, + "systemassigned": ManagedServiceIdentity_Type_STATUS_SystemAssigned, + "systemassigned, userassigned": ManagedServiceIdentity_Type_STATUS_SystemAssignedUserAssigned, + "userassigned": ManagedServiceIdentity_Type_STATUS_UserAssigned, +} + // Configuration of an App Service app. type SiteConfig_STATUS_ARM struct { // AcrUseManagedIdentityCreds: Flag to use Managed Identity Creds for ACR pull diff --git a/v2/api/web/v1api20220301/site_types_gen.go b/v2/api/web/v1api20220301/site_types_gen.go index a178f0db46d..7eaf6fe6df2 100644 --- a/v2/api/web/v1api20220301/site_types_gen.go +++ b/v2/api/web/v1api20220301/site_types_gen.go @@ -1057,8 +1057,9 @@ func (site *Site_Spec) AssignProperties_From_Site_Spec(source *v20220301s.Site_S // ClientCertMode if source.ClientCertMode != nil { - clientCertMode := Site_Properties_ClientCertMode_Spec(*source.ClientCertMode) - site.ClientCertMode = &clientCertMode + clientCertMode := *source.ClientCertMode + clientCertModeTemp := genruntime.ToEnum(clientCertMode, site_Properties_ClientCertMode_Spec_Values) + site.ClientCertMode = &clientCertModeTemp } else { site.ClientCertMode = nil } @@ -1200,8 +1201,9 @@ func (site *Site_Spec) AssignProperties_From_Site_Spec(source *v20220301s.Site_S // RedundancyMode if source.RedundancyMode != nil { - redundancyMode := Site_Properties_RedundancyMode_Spec(*source.RedundancyMode) - site.RedundancyMode = &redundancyMode + redundancyMode := *source.RedundancyMode + redundancyModeTemp := genruntime.ToEnum(redundancyMode, site_Properties_RedundancyMode_Spec_Values) + site.RedundancyMode = &redundancyModeTemp } else { site.RedundancyMode = nil } @@ -2562,8 +2564,9 @@ func (site *Site_STATUS) AssignProperties_From_Site_STATUS(source *v20220301s.Si // AvailabilityState if source.AvailabilityState != nil { - availabilityState := Site_Properties_AvailabilityState_STATUS(*source.AvailabilityState) - site.AvailabilityState = &availabilityState + availabilityState := *source.AvailabilityState + availabilityStateTemp := genruntime.ToEnum(availabilityState, site_Properties_AvailabilityState_STATUS_Values) + site.AvailabilityState = &availabilityStateTemp } else { site.AvailabilityState = nil } @@ -2589,8 +2592,9 @@ func (site *Site_STATUS) AssignProperties_From_Site_STATUS(source *v20220301s.Si // ClientCertMode if source.ClientCertMode != nil { - clientCertMode := Site_Properties_ClientCertMode_STATUS(*source.ClientCertMode) - site.ClientCertMode = &clientCertMode + clientCertMode := *source.ClientCertMode + clientCertModeTemp := genruntime.ToEnum(clientCertMode, site_Properties_ClientCertMode_STATUS_Values) + site.ClientCertMode = &clientCertModeTemp } else { site.ClientCertMode = nil } @@ -2765,8 +2769,9 @@ func (site *Site_STATUS) AssignProperties_From_Site_STATUS(source *v20220301s.Si // RedundancyMode if source.RedundancyMode != nil { - redundancyMode := Site_Properties_RedundancyMode_STATUS(*source.RedundancyMode) - site.RedundancyMode = &redundancyMode + redundancyMode := *source.RedundancyMode + redundancyModeTemp := genruntime.ToEnum(redundancyMode, site_Properties_RedundancyMode_STATUS_Values) + site.RedundancyMode = &redundancyModeTemp } else { site.RedundancyMode = nil } @@ -2848,8 +2853,9 @@ func (site *Site_STATUS) AssignProperties_From_Site_STATUS(source *v20220301s.Si // UsageState if source.UsageState != nil { - usageState := Site_Properties_UsageState_STATUS(*source.UsageState) - site.UsageState = &usageState + usageState := *source.UsageState + usageStateTemp := genruntime.ToEnum(usageState, site_Properties_UsageState_STATUS_Values) + site.UsageState = &usageStateTemp } else { site.UsageState = nil } @@ -4053,8 +4059,9 @@ func (state *HostNameSslState) AssignProperties_From_HostNameSslState(source *v2 // HostType if source.HostType != nil { - hostType := HostNameSslState_HostType(*source.HostType) - state.HostType = &hostType + hostType := *source.HostType + hostTypeTemp := genruntime.ToEnum(hostType, hostNameSslState_HostType_Values) + state.HostType = &hostTypeTemp } else { state.HostType = nil } @@ -4064,8 +4071,9 @@ func (state *HostNameSslState) AssignProperties_From_HostNameSslState(source *v2 // SslState if source.SslState != nil { - sslState := HostNameSslState_SslState(*source.SslState) - state.SslState = &sslState + sslState := *source.SslState + sslStateTemp := genruntime.ToEnum(sslState, hostNameSslState_SslState_Values) + state.SslState = &sslStateTemp } else { state.SslState = nil } @@ -4257,8 +4265,9 @@ func (state *HostNameSslState_STATUS) AssignProperties_From_HostNameSslState_STA // HostType if source.HostType != nil { - hostType := HostNameSslState_HostType_STATUS(*source.HostType) - state.HostType = &hostType + hostType := *source.HostType + hostTypeTemp := genruntime.ToEnum(hostType, hostNameSslState_HostType_STATUS_Values) + state.HostType = &hostTypeTemp } else { state.HostType = nil } @@ -4268,8 +4277,9 @@ func (state *HostNameSslState_STATUS) AssignProperties_From_HostNameSslState_STA // SslState if source.SslState != nil { - sslState := HostNameSslState_SslState_STATUS(*source.SslState) - state.SslState = &sslState + sslState := *source.SslState + sslStateTemp := genruntime.ToEnum(sslState, hostNameSslState_SslState_STATUS_Values) + state.SslState = &sslStateTemp } else { state.SslState = nil } @@ -4409,8 +4419,9 @@ func (identity *ManagedServiceIdentity) AssignProperties_From_ManagedServiceIden // Type if source.Type != nil { - typeVar := ManagedServiceIdentity_Type(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentity_Type_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -4583,8 +4594,9 @@ func (identity *ManagedServiceIdentity_STATUS) AssignProperties_From_ManagedServ // Type if source.Type != nil { - typeVar := ManagedServiceIdentity_Type_STATUS(*source.Type) - identity.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, managedServiceIdentity_Type_STATUS_Values) + identity.Type = &typeTemp } else { identity.Type = nil } @@ -4667,6 +4679,13 @@ const ( Site_Properties_AvailabilityState_STATUS_Normal = Site_Properties_AvailabilityState_STATUS("Normal") ) +// Mapping from string to Site_Properties_AvailabilityState_STATUS +var site_Properties_AvailabilityState_STATUS_Values = map[string]Site_Properties_AvailabilityState_STATUS{ + "disasterrecoverymode": Site_Properties_AvailabilityState_STATUS_DisasterRecoveryMode, + "limited": Site_Properties_AvailabilityState_STATUS_Limited, + "normal": Site_Properties_AvailabilityState_STATUS_Normal, +} + // +kubebuilder:validation:Enum={"Optional","OptionalInteractiveUser","Required"} type Site_Properties_ClientCertMode_Spec string @@ -4676,6 +4695,13 @@ const ( Site_Properties_ClientCertMode_Spec_Required = Site_Properties_ClientCertMode_Spec("Required") ) +// Mapping from string to Site_Properties_ClientCertMode_Spec +var site_Properties_ClientCertMode_Spec_Values = map[string]Site_Properties_ClientCertMode_Spec{ + "optional": Site_Properties_ClientCertMode_Spec_Optional, + "optionalinteractiveuser": Site_Properties_ClientCertMode_Spec_OptionalInteractiveUser, + "required": Site_Properties_ClientCertMode_Spec_Required, +} + type Site_Properties_ClientCertMode_STATUS string const ( @@ -4684,6 +4710,13 @@ const ( Site_Properties_ClientCertMode_STATUS_Required = Site_Properties_ClientCertMode_STATUS("Required") ) +// Mapping from string to Site_Properties_ClientCertMode_STATUS +var site_Properties_ClientCertMode_STATUS_Values = map[string]Site_Properties_ClientCertMode_STATUS{ + "optional": Site_Properties_ClientCertMode_STATUS_Optional, + "optionalinteractiveuser": Site_Properties_ClientCertMode_STATUS_OptionalInteractiveUser, + "required": Site_Properties_ClientCertMode_STATUS_Required, +} + // +kubebuilder:validation:Enum={"ActiveActive","Failover","GeoRedundant","Manual","None"} type Site_Properties_RedundancyMode_Spec string @@ -4695,6 +4728,15 @@ const ( Site_Properties_RedundancyMode_Spec_None = Site_Properties_RedundancyMode_Spec("None") ) +// Mapping from string to Site_Properties_RedundancyMode_Spec +var site_Properties_RedundancyMode_Spec_Values = map[string]Site_Properties_RedundancyMode_Spec{ + "activeactive": Site_Properties_RedundancyMode_Spec_ActiveActive, + "failover": Site_Properties_RedundancyMode_Spec_Failover, + "georedundant": Site_Properties_RedundancyMode_Spec_GeoRedundant, + "manual": Site_Properties_RedundancyMode_Spec_Manual, + "none": Site_Properties_RedundancyMode_Spec_None, +} + type Site_Properties_RedundancyMode_STATUS string const ( @@ -4705,6 +4747,15 @@ const ( Site_Properties_RedundancyMode_STATUS_None = Site_Properties_RedundancyMode_STATUS("None") ) +// Mapping from string to Site_Properties_RedundancyMode_STATUS +var site_Properties_RedundancyMode_STATUS_Values = map[string]Site_Properties_RedundancyMode_STATUS{ + "activeactive": Site_Properties_RedundancyMode_STATUS_ActiveActive, + "failover": Site_Properties_RedundancyMode_STATUS_Failover, + "georedundant": Site_Properties_RedundancyMode_STATUS_GeoRedundant, + "manual": Site_Properties_RedundancyMode_STATUS_Manual, + "none": Site_Properties_RedundancyMode_STATUS_None, +} + type Site_Properties_UsageState_STATUS string const ( @@ -4712,6 +4763,12 @@ const ( Site_Properties_UsageState_STATUS_Normal = Site_Properties_UsageState_STATUS("Normal") ) +// Mapping from string to Site_Properties_UsageState_STATUS +var site_Properties_UsageState_STATUS_Values = map[string]Site_Properties_UsageState_STATUS{ + "exceeded": Site_Properties_UsageState_STATUS_Exceeded, + "normal": Site_Properties_UsageState_STATUS_Normal, +} + // Configuration of an App Service app. type SiteConfig struct { // AcrUseManagedIdentityCreds: Flag to use Managed Identity Creds for ACR pull @@ -6030,8 +6087,9 @@ func (config *SiteConfig) AssignProperties_From_SiteConfig(source *v20220301s.Si // FtpsState if source.FtpsState != nil { - ftpsState := SiteConfig_FtpsState(*source.FtpsState) - config.FtpsState = &ftpsState + ftpsState := *source.FtpsState + ftpsStateTemp := genruntime.ToEnum(ftpsState, siteConfig_FtpsState_Values) + config.FtpsState = &ftpsStateTemp } else { config.FtpsState = nil } @@ -6136,8 +6194,9 @@ func (config *SiteConfig) AssignProperties_From_SiteConfig(source *v20220301s.Si // LoadBalancing if source.LoadBalancing != nil { - loadBalancing := SiteConfig_LoadBalancing(*source.LoadBalancing) - config.LoadBalancing = &loadBalancing + loadBalancing := *source.LoadBalancing + loadBalancingTemp := genruntime.ToEnum(loadBalancing, siteConfig_LoadBalancing_Values) + config.LoadBalancing = &loadBalancingTemp } else { config.LoadBalancing = nil } @@ -6155,8 +6214,9 @@ func (config *SiteConfig) AssignProperties_From_SiteConfig(source *v20220301s.Si // ManagedPipelineMode if source.ManagedPipelineMode != nil { - managedPipelineMode := SiteConfig_ManagedPipelineMode(*source.ManagedPipelineMode) - config.ManagedPipelineMode = &managedPipelineMode + managedPipelineMode := *source.ManagedPipelineMode + managedPipelineModeTemp := genruntime.ToEnum(managedPipelineMode, siteConfig_ManagedPipelineMode_Values) + config.ManagedPipelineMode = &managedPipelineModeTemp } else { config.ManagedPipelineMode = nil } @@ -6166,8 +6226,9 @@ func (config *SiteConfig) AssignProperties_From_SiteConfig(source *v20220301s.Si // MinTlsVersion if source.MinTlsVersion != nil { - minTlsVersion := SiteConfig_MinTlsVersion(*source.MinTlsVersion) - config.MinTlsVersion = &minTlsVersion + minTlsVersion := *source.MinTlsVersion + minTlsVersionTemp := genruntime.ToEnum(minTlsVersion, siteConfig_MinTlsVersion_Values) + config.MinTlsVersion = &minTlsVersionTemp } else { config.MinTlsVersion = nil } @@ -6274,16 +6335,18 @@ func (config *SiteConfig) AssignProperties_From_SiteConfig(source *v20220301s.Si // ScmMinTlsVersion if source.ScmMinTlsVersion != nil { - scmMinTlsVersion := SiteConfig_ScmMinTlsVersion(*source.ScmMinTlsVersion) - config.ScmMinTlsVersion = &scmMinTlsVersion + scmMinTlsVersion := *source.ScmMinTlsVersion + scmMinTlsVersionTemp := genruntime.ToEnum(scmMinTlsVersion, siteConfig_ScmMinTlsVersion_Values) + config.ScmMinTlsVersion = &scmMinTlsVersionTemp } else { config.ScmMinTlsVersion = nil } // ScmType if source.ScmType != nil { - scmType := SiteConfig_ScmType(*source.ScmType) - config.ScmType = &scmType + scmType := *source.ScmType + scmTypeTemp := genruntime.ToEnum(scmType, siteConfig_ScmType_Values) + config.ScmType = &scmTypeTemp } else { config.ScmType = nil } @@ -8208,8 +8271,9 @@ func (config *SiteConfig_STATUS) AssignProperties_From_SiteConfig_STATUS(source // FtpsState if source.FtpsState != nil { - ftpsState := SiteConfig_FtpsState_STATUS(*source.FtpsState) - config.FtpsState = &ftpsState + ftpsState := *source.FtpsState + ftpsStateTemp := genruntime.ToEnum(ftpsState, siteConfig_FtpsState_STATUS_Values) + config.FtpsState = &ftpsStateTemp } else { config.FtpsState = nil } @@ -8309,8 +8373,9 @@ func (config *SiteConfig_STATUS) AssignProperties_From_SiteConfig_STATUS(source // LoadBalancing if source.LoadBalancing != nil { - loadBalancing := SiteConfig_LoadBalancing_STATUS(*source.LoadBalancing) - config.LoadBalancing = &loadBalancing + loadBalancing := *source.LoadBalancing + loadBalancingTemp := genruntime.ToEnum(loadBalancing, siteConfig_LoadBalancing_STATUS_Values) + config.LoadBalancing = &loadBalancingTemp } else { config.LoadBalancing = nil } @@ -8340,8 +8405,9 @@ func (config *SiteConfig_STATUS) AssignProperties_From_SiteConfig_STATUS(source // ManagedPipelineMode if source.ManagedPipelineMode != nil { - managedPipelineMode := SiteConfig_ManagedPipelineMode_STATUS(*source.ManagedPipelineMode) - config.ManagedPipelineMode = &managedPipelineMode + managedPipelineMode := *source.ManagedPipelineMode + managedPipelineModeTemp := genruntime.ToEnum(managedPipelineMode, siteConfig_ManagedPipelineMode_STATUS_Values) + config.ManagedPipelineMode = &managedPipelineModeTemp } else { config.ManagedPipelineMode = nil } @@ -8351,8 +8417,9 @@ func (config *SiteConfig_STATUS) AssignProperties_From_SiteConfig_STATUS(source // MinTlsVersion if source.MinTlsVersion != nil { - minTlsVersion := SiteConfig_MinTlsVersion_STATUS(*source.MinTlsVersion) - config.MinTlsVersion = &minTlsVersion + minTlsVersion := *source.MinTlsVersion + minTlsVersionTemp := genruntime.ToEnum(minTlsVersion, siteConfig_MinTlsVersion_STATUS_Values) + config.MinTlsVersion = &minTlsVersionTemp } else { config.MinTlsVersion = nil } @@ -8449,16 +8516,18 @@ func (config *SiteConfig_STATUS) AssignProperties_From_SiteConfig_STATUS(source // ScmMinTlsVersion if source.ScmMinTlsVersion != nil { - scmMinTlsVersion := SiteConfig_ScmMinTlsVersion_STATUS(*source.ScmMinTlsVersion) - config.ScmMinTlsVersion = &scmMinTlsVersion + scmMinTlsVersion := *source.ScmMinTlsVersion + scmMinTlsVersionTemp := genruntime.ToEnum(scmMinTlsVersion, siteConfig_ScmMinTlsVersion_STATUS_Values) + config.ScmMinTlsVersion = &scmMinTlsVersionTemp } else { config.ScmMinTlsVersion = nil } // ScmType if source.ScmType != nil { - scmType := SiteConfig_ScmType_STATUS(*source.ScmType) - config.ScmType = &scmType + scmType := *source.ScmType + scmTypeTemp := genruntime.ToEnum(scmType, siteConfig_ScmType_STATUS_Values) + config.ScmType = &scmTypeTemp } else { config.ScmType = nil } @@ -9838,8 +9907,9 @@ func (value *AzureStorageInfoValue) AssignProperties_From_AzureStorageInfoValue( // Type if source.Type != nil { - typeVar := AzureStorageInfoValue_Type(*source.Type) - value.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, azureStorageInfoValue_Type_Values) + value.Type = &typeTemp } else { value.Type = nil } @@ -9993,16 +10063,18 @@ func (value *AzureStorageInfoValue_STATUS) AssignProperties_From_AzureStorageInf // State if source.State != nil { - state := AzureStorageInfoValue_State_STATUS(*source.State) - value.State = &state + state := *source.State + stateTemp := genruntime.ToEnum(state, azureStorageInfoValue_State_STATUS_Values) + value.State = &stateTemp } else { value.State = nil } // Type if source.Type != nil { - typeVar := AzureStorageInfoValue_Type_STATUS(*source.Type) - value.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, azureStorageInfoValue_Type_STATUS_Values) + value.Type = &typeTemp } else { value.Type = nil } @@ -10138,8 +10210,9 @@ func (info *ConnStringInfo) AssignProperties_From_ConnStringInfo(source *v202203 // Type if source.Type != nil { - typeVar := ConnStringInfo_Type(*source.Type) - info.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, connStringInfo_Type_Values) + info.Type = &typeTemp } else { info.Type = nil } @@ -10258,8 +10331,9 @@ func (info *ConnStringInfo_STATUS) AssignProperties_From_ConnStringInfo_STATUS(s // Type if source.Type != nil { - typeVar := ConnStringInfo_Type_STATUS(*source.Type) - info.Type = &typeVar + typeVar := *source.Type + typeTemp := genruntime.ToEnum(typeVar, connStringInfo_Type_STATUS_Values) + info.Type = &typeTemp } else { info.Type = nil } @@ -10970,6 +11044,12 @@ const ( HostNameSslState_HostType_Standard = HostNameSslState_HostType("Standard") ) +// Mapping from string to HostNameSslState_HostType +var hostNameSslState_HostType_Values = map[string]HostNameSslState_HostType{ + "repository": HostNameSslState_HostType_Repository, + "standard": HostNameSslState_HostType_Standard, +} + type HostNameSslState_HostType_STATUS string const ( @@ -10977,6 +11057,12 @@ const ( HostNameSslState_HostType_STATUS_Standard = HostNameSslState_HostType_STATUS("Standard") ) +// Mapping from string to HostNameSslState_HostType_STATUS +var hostNameSslState_HostType_STATUS_Values = map[string]HostNameSslState_HostType_STATUS{ + "repository": HostNameSslState_HostType_STATUS_Repository, + "standard": HostNameSslState_HostType_STATUS_Standard, +} + // +kubebuilder:validation:Enum={"Disabled","IpBasedEnabled","SniEnabled"} type HostNameSslState_SslState string @@ -10986,6 +11072,13 @@ const ( HostNameSslState_SslState_SniEnabled = HostNameSslState_SslState("SniEnabled") ) +// Mapping from string to HostNameSslState_SslState +var hostNameSslState_SslState_Values = map[string]HostNameSslState_SslState{ + "disabled": HostNameSslState_SslState_Disabled, + "ipbasedenabled": HostNameSslState_SslState_IpBasedEnabled, + "snienabled": HostNameSslState_SslState_SniEnabled, +} + type HostNameSslState_SslState_STATUS string const ( @@ -10994,6 +11087,13 @@ const ( HostNameSslState_SslState_STATUS_SniEnabled = HostNameSslState_SslState_STATUS("SniEnabled") ) +// Mapping from string to HostNameSslState_SslState_STATUS +var hostNameSslState_SslState_STATUS_Values = map[string]HostNameSslState_SslState_STATUS{ + "disabled": HostNameSslState_SslState_STATUS_Disabled, + "ipbasedenabled": HostNameSslState_SslState_STATUS_IpBasedEnabled, + "snienabled": HostNameSslState_SslState_STATUS_SniEnabled, +} + // IP security restriction on an app. type IpSecurityRestriction struct { // Action: Allow or Deny access for this IP range. @@ -11257,8 +11357,9 @@ func (restriction *IpSecurityRestriction) AssignProperties_From_IpSecurityRestri // Tag if source.Tag != nil { - tag := IpSecurityRestriction_Tag(*source.Tag) - restriction.Tag = &tag + tag := *source.Tag + tagTemp := genruntime.ToEnum(tag, ipSecurityRestriction_Tag_Values) + restriction.Tag = &tagTemp } else { restriction.Tag = nil } @@ -11589,8 +11690,9 @@ func (restriction *IpSecurityRestriction_STATUS) AssignProperties_From_IpSecurit // Tag if source.Tag != nil { - tag := IpSecurityRestriction_Tag_STATUS(*source.Tag) - restriction.Tag = &tag + tag := *source.Tag + tagTemp := genruntime.ToEnum(tag, ipSecurityRestriction_Tag_STATUS_Values) + restriction.Tag = &tagTemp } else { restriction.Tag = nil } @@ -12266,6 +12368,13 @@ const ( SiteConfig_FtpsState_FtpsOnly = SiteConfig_FtpsState("FtpsOnly") ) +// Mapping from string to SiteConfig_FtpsState +var siteConfig_FtpsState_Values = map[string]SiteConfig_FtpsState{ + "allallowed": SiteConfig_FtpsState_AllAllowed, + "disabled": SiteConfig_FtpsState_Disabled, + "ftpsonly": SiteConfig_FtpsState_FtpsOnly, +} + type SiteConfig_FtpsState_STATUS string const ( @@ -12274,6 +12383,13 @@ const ( SiteConfig_FtpsState_STATUS_FtpsOnly = SiteConfig_FtpsState_STATUS("FtpsOnly") ) +// Mapping from string to SiteConfig_FtpsState_STATUS +var siteConfig_FtpsState_STATUS_Values = map[string]SiteConfig_FtpsState_STATUS{ + "allallowed": SiteConfig_FtpsState_STATUS_AllAllowed, + "disabled": SiteConfig_FtpsState_STATUS_Disabled, + "ftpsonly": SiteConfig_FtpsState_STATUS_FtpsOnly, +} + // +kubebuilder:validation:Enum={"LeastRequests","LeastResponseTime","PerSiteRoundRobin","RequestHash","WeightedRoundRobin","WeightedTotalTraffic"} type SiteConfig_LoadBalancing string @@ -12286,6 +12402,16 @@ const ( SiteConfig_LoadBalancing_WeightedTotalTraffic = SiteConfig_LoadBalancing("WeightedTotalTraffic") ) +// Mapping from string to SiteConfig_LoadBalancing +var siteConfig_LoadBalancing_Values = map[string]SiteConfig_LoadBalancing{ + "leastrequests": SiteConfig_LoadBalancing_LeastRequests, + "leastresponsetime": SiteConfig_LoadBalancing_LeastResponseTime, + "persiteroundrobin": SiteConfig_LoadBalancing_PerSiteRoundRobin, + "requesthash": SiteConfig_LoadBalancing_RequestHash, + "weightedroundrobin": SiteConfig_LoadBalancing_WeightedRoundRobin, + "weightedtotaltraffic": SiteConfig_LoadBalancing_WeightedTotalTraffic, +} + type SiteConfig_LoadBalancing_STATUS string const ( @@ -12297,6 +12423,16 @@ const ( SiteConfig_LoadBalancing_STATUS_WeightedTotalTraffic = SiteConfig_LoadBalancing_STATUS("WeightedTotalTraffic") ) +// Mapping from string to SiteConfig_LoadBalancing_STATUS +var siteConfig_LoadBalancing_STATUS_Values = map[string]SiteConfig_LoadBalancing_STATUS{ + "leastrequests": SiteConfig_LoadBalancing_STATUS_LeastRequests, + "leastresponsetime": SiteConfig_LoadBalancing_STATUS_LeastResponseTime, + "persiteroundrobin": SiteConfig_LoadBalancing_STATUS_PerSiteRoundRobin, + "requesthash": SiteConfig_LoadBalancing_STATUS_RequestHash, + "weightedroundrobin": SiteConfig_LoadBalancing_STATUS_WeightedRoundRobin, + "weightedtotaltraffic": SiteConfig_LoadBalancing_STATUS_WeightedTotalTraffic, +} + // +kubebuilder:validation:Enum={"Classic","Integrated"} type SiteConfig_ManagedPipelineMode string @@ -12305,6 +12441,12 @@ const ( SiteConfig_ManagedPipelineMode_Integrated = SiteConfig_ManagedPipelineMode("Integrated") ) +// Mapping from string to SiteConfig_ManagedPipelineMode +var siteConfig_ManagedPipelineMode_Values = map[string]SiteConfig_ManagedPipelineMode{ + "classic": SiteConfig_ManagedPipelineMode_Classic, + "integrated": SiteConfig_ManagedPipelineMode_Integrated, +} + type SiteConfig_ManagedPipelineMode_STATUS string const ( @@ -12312,6 +12454,12 @@ const ( SiteConfig_ManagedPipelineMode_STATUS_Integrated = SiteConfig_ManagedPipelineMode_STATUS("Integrated") ) +// Mapping from string to SiteConfig_ManagedPipelineMode_STATUS +var siteConfig_ManagedPipelineMode_STATUS_Values = map[string]SiteConfig_ManagedPipelineMode_STATUS{ + "classic": SiteConfig_ManagedPipelineMode_STATUS_Classic, + "integrated": SiteConfig_ManagedPipelineMode_STATUS_Integrated, +} + // +kubebuilder:validation:Enum={"1.0","1.1","1.2"} type SiteConfig_MinTlsVersion string @@ -12321,6 +12469,13 @@ const ( SiteConfig_MinTlsVersion_12 = SiteConfig_MinTlsVersion("1.2") ) +// Mapping from string to SiteConfig_MinTlsVersion +var siteConfig_MinTlsVersion_Values = map[string]SiteConfig_MinTlsVersion{ + "1.0": SiteConfig_MinTlsVersion_10, + "1.1": SiteConfig_MinTlsVersion_11, + "1.2": SiteConfig_MinTlsVersion_12, +} + type SiteConfig_MinTlsVersion_STATUS string const ( @@ -12329,6 +12484,13 @@ const ( SiteConfig_MinTlsVersion_STATUS_12 = SiteConfig_MinTlsVersion_STATUS("1.2") ) +// Mapping from string to SiteConfig_MinTlsVersion_STATUS +var siteConfig_MinTlsVersion_STATUS_Values = map[string]SiteConfig_MinTlsVersion_STATUS{ + "1.0": SiteConfig_MinTlsVersion_STATUS_10, + "1.1": SiteConfig_MinTlsVersion_STATUS_11, + "1.2": SiteConfig_MinTlsVersion_STATUS_12, +} + // +kubebuilder:validation:Enum={"1.0","1.1","1.2"} type SiteConfig_ScmMinTlsVersion string @@ -12338,6 +12500,13 @@ const ( SiteConfig_ScmMinTlsVersion_12 = SiteConfig_ScmMinTlsVersion("1.2") ) +// Mapping from string to SiteConfig_ScmMinTlsVersion +var siteConfig_ScmMinTlsVersion_Values = map[string]SiteConfig_ScmMinTlsVersion{ + "1.0": SiteConfig_ScmMinTlsVersion_10, + "1.1": SiteConfig_ScmMinTlsVersion_11, + "1.2": SiteConfig_ScmMinTlsVersion_12, +} + type SiteConfig_ScmMinTlsVersion_STATUS string const ( @@ -12346,6 +12515,13 @@ const ( SiteConfig_ScmMinTlsVersion_STATUS_12 = SiteConfig_ScmMinTlsVersion_STATUS("1.2") ) +// Mapping from string to SiteConfig_ScmMinTlsVersion_STATUS +var siteConfig_ScmMinTlsVersion_STATUS_Values = map[string]SiteConfig_ScmMinTlsVersion_STATUS{ + "1.0": SiteConfig_ScmMinTlsVersion_STATUS_10, + "1.1": SiteConfig_ScmMinTlsVersion_STATUS_11, + "1.2": SiteConfig_ScmMinTlsVersion_STATUS_12, +} + // +kubebuilder:validation:Enum={"BitbucketGit","BitbucketHg","CodePlexGit","CodePlexHg","Dropbox","ExternalGit","ExternalHg","GitHub","LocalGit","None","OneDrive","Tfs","VSO","VSTSRM"} type SiteConfig_ScmType string @@ -12366,6 +12542,24 @@ const ( SiteConfig_ScmType_VSTSRM = SiteConfig_ScmType("VSTSRM") ) +// Mapping from string to SiteConfig_ScmType +var siteConfig_ScmType_Values = map[string]SiteConfig_ScmType{ + "bitbucketgit": SiteConfig_ScmType_BitbucketGit, + "bitbuckethg": SiteConfig_ScmType_BitbucketHg, + "codeplexgit": SiteConfig_ScmType_CodePlexGit, + "codeplexhg": SiteConfig_ScmType_CodePlexHg, + "dropbox": SiteConfig_ScmType_Dropbox, + "externalgit": SiteConfig_ScmType_ExternalGit, + "externalhg": SiteConfig_ScmType_ExternalHg, + "github": SiteConfig_ScmType_GitHub, + "localgit": SiteConfig_ScmType_LocalGit, + "none": SiteConfig_ScmType_None, + "onedrive": SiteConfig_ScmType_OneDrive, + "tfs": SiteConfig_ScmType_Tfs, + "vso": SiteConfig_ScmType_VSO, + "vstsrm": SiteConfig_ScmType_VSTSRM, +} + type SiteConfig_ScmType_STATUS string const ( @@ -12385,6 +12579,24 @@ const ( SiteConfig_ScmType_STATUS_VSTSRM = SiteConfig_ScmType_STATUS("VSTSRM") ) +// Mapping from string to SiteConfig_ScmType_STATUS +var siteConfig_ScmType_STATUS_Values = map[string]SiteConfig_ScmType_STATUS{ + "bitbucketgit": SiteConfig_ScmType_STATUS_BitbucketGit, + "bitbuckethg": SiteConfig_ScmType_STATUS_BitbucketHg, + "codeplexgit": SiteConfig_ScmType_STATUS_CodePlexGit, + "codeplexhg": SiteConfig_ScmType_STATUS_CodePlexHg, + "dropbox": SiteConfig_ScmType_STATUS_Dropbox, + "externalgit": SiteConfig_ScmType_STATUS_ExternalGit, + "externalhg": SiteConfig_ScmType_STATUS_ExternalHg, + "github": SiteConfig_ScmType_STATUS_GitHub, + "localgit": SiteConfig_ScmType_STATUS_LocalGit, + "none": SiteConfig_ScmType_STATUS_None, + "onedrive": SiteConfig_ScmType_STATUS_OneDrive, + "tfs": SiteConfig_ScmType_STATUS_Tfs, + "vso": SiteConfig_ScmType_STATUS_VSO, + "vstsrm": SiteConfig_ScmType_STATUS_VSTSRM, +} + // Metric limits set on an app. type SiteLimits struct { // MaxDiskSizeInMb: Maximum allowed disk size usage in MB. @@ -13304,8 +13516,9 @@ func (actions *AutoHealActions) AssignProperties_From_AutoHealActions(source *v2 // ActionType if source.ActionType != nil { - actionType := AutoHealActions_ActionType(*source.ActionType) - actions.ActionType = &actionType + actionType := *source.ActionType + actionTypeTemp := genruntime.ToEnum(actionType, autoHealActions_ActionType_Values) + actions.ActionType = &actionTypeTemp } else { actions.ActionType = nil } @@ -13457,8 +13670,9 @@ func (actions *AutoHealActions_STATUS) AssignProperties_From_AutoHealActions_STA // ActionType if source.ActionType != nil { - actionType := AutoHealActions_ActionType_STATUS(*source.ActionType) - actions.ActionType = &actionType + actionType := *source.ActionType + actionTypeTemp := genruntime.ToEnum(actionType, autoHealActions_ActionType_STATUS_Values) + actions.ActionType = &actionTypeTemp } else { actions.ActionType = nil } @@ -14244,6 +14458,14 @@ const ( AzureStorageInfoValue_State_STATUS_Ok = AzureStorageInfoValue_State_STATUS("Ok") ) +// Mapping from string to AzureStorageInfoValue_State_STATUS +var azureStorageInfoValue_State_STATUS_Values = map[string]AzureStorageInfoValue_State_STATUS{ + "invalidcredentials": AzureStorageInfoValue_State_STATUS_InvalidCredentials, + "invalidshare": AzureStorageInfoValue_State_STATUS_InvalidShare, + "notvalidated": AzureStorageInfoValue_State_STATUS_NotValidated, + "ok": AzureStorageInfoValue_State_STATUS_Ok, +} + // +kubebuilder:validation:Enum={"AzureBlob","AzureFiles"} type AzureStorageInfoValue_Type string @@ -14252,6 +14474,12 @@ const ( AzureStorageInfoValue_Type_AzureFiles = AzureStorageInfoValue_Type("AzureFiles") ) +// Mapping from string to AzureStorageInfoValue_Type +var azureStorageInfoValue_Type_Values = map[string]AzureStorageInfoValue_Type{ + "azureblob": AzureStorageInfoValue_Type_AzureBlob, + "azurefiles": AzureStorageInfoValue_Type_AzureFiles, +} + type AzureStorageInfoValue_Type_STATUS string const ( @@ -14259,6 +14487,12 @@ const ( AzureStorageInfoValue_Type_STATUS_AzureFiles = AzureStorageInfoValue_Type_STATUS("AzureFiles") ) +// Mapping from string to AzureStorageInfoValue_Type_STATUS +var azureStorageInfoValue_Type_STATUS_Values = map[string]AzureStorageInfoValue_Type_STATUS{ + "azureblob": AzureStorageInfoValue_Type_STATUS_AzureBlob, + "azurefiles": AzureStorageInfoValue_Type_STATUS_AzureFiles, +} + // +kubebuilder:validation:Enum={"ApiHub","Custom","DocDb","EventHub","MySql","NotificationHub","PostgreSQL","RedisCache","SQLAzure","SQLServer","ServiceBus"} type ConnStringInfo_Type string @@ -14276,6 +14510,21 @@ const ( ConnStringInfo_Type_ServiceBus = ConnStringInfo_Type("ServiceBus") ) +// Mapping from string to ConnStringInfo_Type +var connStringInfo_Type_Values = map[string]ConnStringInfo_Type{ + "apihub": ConnStringInfo_Type_ApiHub, + "custom": ConnStringInfo_Type_Custom, + "docdb": ConnStringInfo_Type_DocDb, + "eventhub": ConnStringInfo_Type_EventHub, + "mysql": ConnStringInfo_Type_MySql, + "notificationhub": ConnStringInfo_Type_NotificationHub, + "postgresql": ConnStringInfo_Type_PostgreSQL, + "rediscache": ConnStringInfo_Type_RedisCache, + "sqlazure": ConnStringInfo_Type_SQLAzure, + "sqlserver": ConnStringInfo_Type_SQLServer, + "servicebus": ConnStringInfo_Type_ServiceBus, +} + type ConnStringInfo_Type_STATUS string const ( @@ -14292,6 +14541,21 @@ const ( ConnStringInfo_Type_STATUS_ServiceBus = ConnStringInfo_Type_STATUS("ServiceBus") ) +// Mapping from string to ConnStringInfo_Type_STATUS +var connStringInfo_Type_STATUS_Values = map[string]ConnStringInfo_Type_STATUS{ + "apihub": ConnStringInfo_Type_STATUS_ApiHub, + "custom": ConnStringInfo_Type_STATUS_Custom, + "docdb": ConnStringInfo_Type_STATUS_DocDb, + "eventhub": ConnStringInfo_Type_STATUS_EventHub, + "mysql": ConnStringInfo_Type_STATUS_MySql, + "notificationhub": ConnStringInfo_Type_STATUS_NotificationHub, + "postgresql": ConnStringInfo_Type_STATUS_PostgreSQL, + "rediscache": ConnStringInfo_Type_STATUS_RedisCache, + "sqlazure": ConnStringInfo_Type_STATUS_SQLAzure, + "sqlserver": ConnStringInfo_Type_STATUS_SQLServer, + "servicebus": ConnStringInfo_Type_STATUS_ServiceBus, +} + // +kubebuilder:validation:Enum={"Default","ServiceTag","XffProxy"} type IpSecurityRestriction_Tag string @@ -14301,6 +14565,13 @@ const ( IpSecurityRestriction_Tag_XffProxy = IpSecurityRestriction_Tag("XffProxy") ) +// Mapping from string to IpSecurityRestriction_Tag +var ipSecurityRestriction_Tag_Values = map[string]IpSecurityRestriction_Tag{ + "default": IpSecurityRestriction_Tag_Default, + "servicetag": IpSecurityRestriction_Tag_ServiceTag, + "xffproxy": IpSecurityRestriction_Tag_XffProxy, +} + type IpSecurityRestriction_Tag_STATUS string const ( @@ -14309,6 +14580,13 @@ const ( IpSecurityRestriction_Tag_STATUS_XffProxy = IpSecurityRestriction_Tag_STATUS("XffProxy") ) +// Mapping from string to IpSecurityRestriction_Tag_STATUS +var ipSecurityRestriction_Tag_STATUS_Values = map[string]IpSecurityRestriction_Tag_STATUS{ + "default": IpSecurityRestriction_Tag_STATUS_Default, + "servicetag": IpSecurityRestriction_Tag_STATUS_ServiceTag, + "xffproxy": IpSecurityRestriction_Tag_STATUS_XffProxy, +} + // Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually change // routing % based on performance. type RampUpRule struct { @@ -15034,6 +15312,13 @@ const ( AutoHealActions_ActionType_Recycle = AutoHealActions_ActionType("Recycle") ) +// Mapping from string to AutoHealActions_ActionType +var autoHealActions_ActionType_Values = map[string]AutoHealActions_ActionType{ + "customaction": AutoHealActions_ActionType_CustomAction, + "logevent": AutoHealActions_ActionType_LogEvent, + "recycle": AutoHealActions_ActionType_Recycle, +} + type AutoHealActions_ActionType_STATUS string const ( @@ -15042,6 +15327,13 @@ const ( AutoHealActions_ActionType_STATUS_Recycle = AutoHealActions_ActionType_STATUS("Recycle") ) +// Mapping from string to AutoHealActions_ActionType_STATUS +var autoHealActions_ActionType_STATUS_Values = map[string]AutoHealActions_ActionType_STATUS{ + "customaction": AutoHealActions_ActionType_STATUS_CustomAction, + "logevent": AutoHealActions_ActionType_STATUS_LogEvent, + "recycle": AutoHealActions_ActionType_STATUS_Recycle, +} + // Custom action to be executed // when an auto heal rule is triggered. type AutoHealCustomAction struct { diff --git a/v2/pkg/genruntime/enum.go b/v2/pkg/genruntime/enum.go new file mode 100644 index 00000000000..6e0fd0efb68 --- /dev/null +++ b/v2/pkg/genruntime/enum.go @@ -0,0 +1,18 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package genruntime + +import "strings" + +// ToEnum does a case-insensitive conversion of a string to an enum using a provided conversion map. +// If the required value is not found, a literal cast will be used to return the enum. +func ToEnum[T ~string](str string, enumMap map[string]T) T { + if val, ok := enumMap[strings.ToLower(str)]; ok { + return val + } + + return T(str) +} diff --git a/v2/pkg/genruntime/enum_test.go b/v2/pkg/genruntime/enum_test.go new file mode 100644 index 00000000000..72b26c834e3 --- /dev/null +++ b/v2/pkg/genruntime/enum_test.go @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package genruntime + +import "testing" + +func Test_ToEnum_WhenCalled_ReturnsExpectedResult(t *testing.T) { + t.Parallel() + + type testResult string + + const ( + success = testResult("Success") + failure = testResult("Failure") + unknown = testResult("Unknown") + pending = testResult("Pending") + ) + + values := map[string]testResult{ + "success": success, + "failure": failure, + "unknown": unknown, + "pending": pending, + } + + cases := []struct { + str string + expected testResult + }{ + {"success", success}, + {"Failure", failure}, + {"UNKNOWN", unknown}, + {"fatal", testResult("fatal")}, + } + + for _, c := range cases { + c := c + t.Run( + c.str, + func(t *testing.T) { + t.Parallel() + actual := ToEnum(c.str, values) + if actual != c.expected { + t.Errorf("Expected %s, but got %s", c.expected, actual) + } + }) + } +} diff --git a/v2/tools/generator/internal/astbuilder/assert_test.go b/v2/tools/generator/internal/astbuilder/assert_test.go new file mode 100644 index 00000000000..a6785042e0b --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/assert_test.go @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package astbuilder + +import ( + "bytes" + "testing" + + . "github.com/onsi/gomega" + + "github.com/dave/dst" + "github.com/dave/dst/decorator" + "github.com/sebdah/goldie/v2" +) + +// assertExprExpected asserts the given expression generates the expected code, comparing it to a golden file +func assertExprExpected(t *testing.T, expr dst.Expr) { + t.Helper() + + stmt := &dst.ExprStmt{ + X: expr, + } + + assertStmtExpected(t, stmt) +} + +// assertDeclExpected asserts the given declaration generates the expected code, comparing it to a golden file +func assertDeclExpected(t *testing.T, decl dst.Decl) { + t.Helper() + + stmt := &dst.DeclStmt{ + Decl: decl, + } + + assertStmtExpected(t, stmt) +} + +// assertStmtExpected asserts the given statement generates the expected code, comparing it to a golden file +func assertStmtExpected(t *testing.T, stmt dst.Stmt) { + t.Helper() + g := NewGomegaWithT(t) + gold := goldie.New(t) + + stmt.Decorations().Before = dst.EmptyLine + stmt.Decorations().After = dst.EmptyLine + stmt.Decorations().Start = []string{"// Generated by " + t.Name()} + + block := &dst.BlockStmt{ + List: Statements(stmt), + } + + fn := &dst.FuncDecl{ + Name: dst.NewIdent("TestCase"), + Type: &dst.FuncType{}, + Body: block, + Decs: dst.FuncDeclDecorations{ + NodeDecs: dst.NodeDecs{ + Before: dst.EmptyLine, + }, + }, + } + + file := &dst.File{ + Decs: dst.FileDecorations{ + NodeDecs: dst.NodeDecs{ + After: dst.EmptyLine, + }, + }, + Name: dst.NewIdent("TestCase"), + Decls: []dst.Decl{fn}, + } + + var buffer bytes.Buffer + err := decorator.Fprint(&buffer, file) + g.Expect(err).To(Succeed()) + + gold.Assert(t, t.Name(), buffer.Bytes()) +} diff --git a/v2/tools/generator/internal/astbuilder/assignments.go b/v2/tools/generator/internal/astbuilder/assignments.go index 4cf7f0562ad..b3514f14a83 100644 --- a/v2/tools/generator/internal/astbuilder/assignments.go +++ b/v2/tools/generator/internal/astbuilder/assignments.go @@ -97,23 +97,37 @@ func SimpleAssignmentWithErr(lhs dst.Expr, tok token.Token, rhs dst.Expr) *dst.A // assertions on interface types). // // var interface{} = -func AssignToInterface(lhsVar string, rhs dst.Expr) dst.Stmt { +func AssignToInterface(lhsVar string, rhs dst.Expr) dst.Decl { return NewVariableAssignmentWithType(lhsVar, dst.NewIdent("any"), rhs) } -// NewVariableAssignmentWithType creates a new statement with a variable is declared: +// NewVariableAssignmentWithType creates a new statement where a variable is declared with an explicit type. // var = -func NewVariableAssignmentWithType(varName string, varType dst.Expr, value dst.Expr) dst.Stmt { - return &dst.DeclStmt{ - Decl: &dst.GenDecl{ - Tok: token.VAR, - Specs: []dst.Spec{ - &dst.ValueSpec{ - Names: []*dst.Ident{dst.NewIdent(varName)}, - Type: varType, - Values: []dst.Expr{ - dst.Clone(value).(dst.Expr), - }, +func NewVariableAssignmentWithType(varName string, varType dst.Expr, value dst.Expr) dst.Decl { + return &dst.GenDecl{ + Tok: token.VAR, + Specs: []dst.Spec{ + &dst.ValueSpec{ + Names: []*dst.Ident{dst.NewIdent(varName)}, + Type: varType, + Values: []dst.Expr{ + dst.Clone(value).(dst.Expr), + }, + }, + }, + } +} + +// NewVariableAssignmentWithType creates a new statement where a variable is declared with an implicit type. +// var = +func NewVariableAssignment(varName string, value dst.Expr) dst.Decl { + return &dst.GenDecl{ + Tok: token.VAR, + Specs: []dst.Spec{ + &dst.ValueSpec{ + Names: []*dst.Ident{dst.NewIdent(varName)}, + Values: []dst.Expr{ + dst.Clone(value).(dst.Expr), }, }, }, diff --git a/v2/tools/generator/internal/astbuilder/assignments_test.go b/v2/tools/generator/internal/astbuilder/assignments_test.go new file mode 100644 index 00000000000..bc90095cae1 --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/assignments_test.go @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package astbuilder + +import ( + "testing" +) + +func Test_NewVariableAssignment_WhenCalled_ReturnsExpectedCode(t *testing.T) { + t.Parallel() + + helloWorld := StringLiteral("Hello, World!") + + actual := NewVariableAssignment( + "myVar", + helloWorld, + ) + + assertDeclExpected(t, actual) +} diff --git a/v2/tools/generator/internal/astbuilder/conditions.go b/v2/tools/generator/internal/astbuilder/conditions.go index 47c7ed55c3b..c65936c9347 100644 --- a/v2/tools/generator/internal/astbuilder/conditions.go +++ b/v2/tools/generator/internal/astbuilder/conditions.go @@ -120,3 +120,33 @@ func IfType(expr dst.Expr, typeExpr dst.Expr, local string, statements ...dst.St Body: StatementBlock(statements...), } } + +// IfExprOk evaluates an expression returning two values and executes the provided statements if +// the second value is true +// varName is the name of the variable to assign the first value to; +// okName is the name of the variable to assign the second value to; +// expr is the expression to evaluate; +// statements form the body of the if statement +func IfExprOk( + varName string, + okName string, + expr dst.Expr, + statements ...dst.Stmt, +) *dst.IfStmt { + init := &dst.AssignStmt{ + Lhs: []dst.Expr{ + dst.NewIdent(varName), + dst.NewIdent(okName), + }, + Tok: token.DEFINE, + Rhs: []dst.Expr{ + expr, + }, + } + + return &dst.IfStmt{ + Init: init, + Cond: dst.NewIdent(okName), + Body: StatementBlock(statements...), + } +} diff --git a/v2/tools/generator/internal/astbuilder/conditions_test.go b/v2/tools/generator/internal/astbuilder/conditions_test.go new file mode 100644 index 00000000000..6fdc2be4f61 --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/conditions_test.go @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package astbuilder + +import "testing" + +func Test_IfExprOk_WhenCalled_ReturnsExpectedCode(t *testing.T) { + t.Parallel() + + actual := IfExprOk( + "monster", + "ok", + CallQualifiedFunc("doctor", "NewMonster", StringLiteral("godzilla")), + CallQualifiedFuncAsStmt("monster", "Roar"), + ) + + assertStmtExpected(t, actual) +} diff --git a/v2/tools/generator/internal/astbuilder/map_literals.go b/v2/tools/generator/internal/astbuilder/map_literals.go new file mode 100644 index 00000000000..5d0cf16dfe7 --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/map_literals.go @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package astbuilder + +import "github.com/dave/dst" + +type mapPair struct { + Key dst.Expr + Value dst.Expr +} + +type MapLiteral struct { + mapPair + content []mapPair +} + +func NewMapLiteral(key dst.Expr, value dst.Expr) *MapLiteral { + return &MapLiteral{ + mapPair: mapPair{ + Key: key, + Value: value, + }, + } +} + +func (m *MapLiteral) Add(key dst.Expr, value dst.Expr) { + m.content = append(m.content, mapPair{ + Key: key, + Value: value, + }) +} + +func (m *MapLiteral) AsExpr() dst.Expr { + elements := make([]dst.Expr, 0, len(m.content)) + for _, p := range m.content { + element := &dst.KeyValueExpr{ + Key: p.Key, + Value: p.Value, + Decs: dst.KeyValueExprDecorations{ + NodeDecs: dst.NodeDecs{ + Before: dst.NewLine, + After: dst.NewLine, + }, + }, + } + + elements = append(elements, element) + } + + return &dst.CompositeLit{ + Type: &dst.MapType{ + Key: m.Key, + Value: m.Value, + }, + Elts: elements, + } +} diff --git a/v2/tools/generator/internal/astbuilder/map_literals_test.go b/v2/tools/generator/internal/astbuilder/map_literals_test.go new file mode 100644 index 00000000000..a5518cdd1c3 --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/map_literals_test.go @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package astbuilder + +import ( + "testing" + + "github.com/dave/dst" +) + +func Test_MapLiteral_AsExpr_GeneratesExpectedDeclaration(t *testing.T) { + t.Parallel() + + stringType := dst.NewIdent("string") + intType := dst.NewIdent("int") + + content := []string{ + "alpha", + "bravo", + "charlie", + "delta", + } + + mapLiteral := NewMapLiteral(stringType, intType) + for _, c := range content { + mapLiteral.Add(StringLiteral(c), IntLiteral(len(c))) + } + + assertExprExpected(t, mapLiteral.AsExpr()) +} diff --git a/v2/tools/generator/internal/astbuilder/maps_test.go b/v2/tools/generator/internal/astbuilder/maps_test.go new file mode 100644 index 00000000000..efcc6f5d6cf --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/maps_test.go @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package astbuilder + +import ( + "testing" + + "github.com/dave/dst" +) + +func TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode(t *testing.T) { + t.Parallel() + + cases := []struct { + key string + val string + }{ + {"string", "int"}, + {"int", "string"}, + {"string", "string"}, + {"int", "int"}, + } + + for _, c := range cases { + c := c + name := c.key + "_" + c.val + t.Run( + name, + func(t *testing.T) { + t.Parallel() + + key := dst.NewIdent(c.key) + val := dst.NewIdent(c.val) + + call := MakeMap(key, val) + assertExprExpected(t, call) + }) + } +} diff --git a/v2/tools/generator/internal/astbuilder/statements.go b/v2/tools/generator/internal/astbuilder/statements.go index 353b1b5c067..d55de41cb21 100644 --- a/v2/tools/generator/internal/astbuilder/statements.go +++ b/v2/tools/generator/internal/astbuilder/statements.go @@ -7,6 +7,7 @@ package astbuilder import ( "fmt" + "github.com/dave/dst" ) @@ -25,8 +26,10 @@ func Statements(statements ...any) []dst.Stmt { size++ case []dst.Stmt: size += len(s) + case dst.Decl: + size++ default: - panic(fmt.Sprintf("expected dst.Stmt or []dst.Stmt, but found %T", s)) + panic(fmt.Sprintf("expected dst.Stmt, []dst.Stmt, or dst.Decl but found %T", s)) } } @@ -43,8 +46,12 @@ func Statements(statements ...any) []dst.Stmt { case []dst.Stmt: // Add many statements stmts = append(stmts, s...) + case dst.Decl: + // Convert declaration to statement + stmt := &dst.DeclStmt{Decl: s} + stmts = append(stmts, stmt) default: - panic(fmt.Sprintf("expected dst.Stmt or []dst.Stmt, but found %T", s)) + panic(fmt.Sprintf("expected dst.Stmt, []dst.Stmt, or dst.Decl but found %T", s)) } } diff --git a/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/int_int.golden b/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/int_int.golden new file mode 100644 index 00000000000..a73306fb85a --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/int_int.golden @@ -0,0 +1,8 @@ +package TestCase + +func TestCase() { + + // Generated by TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/int_int + make(map[int]int) + +} diff --git a/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/int_string.golden b/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/int_string.golden new file mode 100644 index 00000000000..74306f0c5d1 --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/int_string.golden @@ -0,0 +1,8 @@ +package TestCase + +func TestCase() { + + // Generated by TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/int_string + make(map[int]string) + +} diff --git a/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/string_int.golden b/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/string_int.golden new file mode 100644 index 00000000000..30562ee0e4f --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/string_int.golden @@ -0,0 +1,8 @@ +package TestCase + +func TestCase() { + + // Generated by TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/string_int + make(map[string]int) + +} diff --git a/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/string_string.golden b/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/string_string.golden new file mode 100644 index 00000000000..7d5c8b6a0ec --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/testdata/TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/string_string.golden @@ -0,0 +1,8 @@ +package TestCase + +func TestCase() { + + // Generated by TestGolden_MakeMap_GivenKeyAndValueTypes_GeneratesExpectedCode/string_string + make(map[string]string) + +} diff --git a/v2/tools/generator/internal/astbuilder/testdata/Test_IfExprOk_WhenCalled_ReturnsExpectedCode.golden b/v2/tools/generator/internal/astbuilder/testdata/Test_IfExprOk_WhenCalled_ReturnsExpectedCode.golden new file mode 100644 index 00000000000..327c7dd1872 --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/testdata/Test_IfExprOk_WhenCalled_ReturnsExpectedCode.golden @@ -0,0 +1,10 @@ +package TestCase + +func TestCase() { + + // Generated by Test_IfExprOk_WhenCalled_ReturnsExpectedCode + if monster, ok := doctor.NewMonster("godzilla"); ok { + monster.Roar() + } + +} diff --git a/v2/tools/generator/internal/astbuilder/testdata/Test_MapLiteral_AsExpr_GeneratesExpectedDeclaration.golden b/v2/tools/generator/internal/astbuilder/testdata/Test_MapLiteral_AsExpr_GeneratesExpectedDeclaration.golden new file mode 100644 index 00000000000..63cfc1b66bc --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/testdata/Test_MapLiteral_AsExpr_GeneratesExpectedDeclaration.golden @@ -0,0 +1,13 @@ +package TestCase + +func TestCase() { + + // Generated by Test_MapLiteral_AsExpr_GeneratesExpectedDeclaration + map[string]int{ + "alpha": 5, + "bravo": 5, + "charlie": 7, + "delta": 5, + } + +} diff --git a/v2/tools/generator/internal/astbuilder/testdata/Test_NewVariableAssignment_WhenCalled_ReturnsExpectedCode.golden b/v2/tools/generator/internal/astbuilder/testdata/Test_NewVariableAssignment_WhenCalled_ReturnsExpectedCode.golden new file mode 100644 index 00000000000..8e90bc79b3e --- /dev/null +++ b/v2/tools/generator/internal/astbuilder/testdata/Test_NewVariableAssignment_WhenCalled_ReturnsExpectedCode.golden @@ -0,0 +1,8 @@ +package TestCase + +func TestCase() { + + // Generated by Test_NewVariableAssignment_WhenCalled_ReturnsExpectedCode + var myVar = "Hello, World!" + +} diff --git a/v2/tools/generator/internal/astmodel/enum_type.go b/v2/tools/generator/internal/astmodel/enum_type.go index 5835995e35e..bc595ae2364 100644 --- a/v2/tools/generator/internal/astmodel/enum_type.go +++ b/v2/tools/generator/internal/astmodel/enum_type.go @@ -10,12 +10,14 @@ import ( "go/token" "strconv" "strings" + "unicode" "github.com/pkg/errors" "golang.org/x/exp/slices" "github.com/dave/dst" + "github.com/Azure/azure-service-operator/v2/internal/set" "github.com/Azure/azure-service-operator/v2/tools/generator/internal/astbuilder" ) @@ -85,25 +87,24 @@ func (enum *EnumType) WithValidation() *EnumType { } // AsDeclarations converts the EnumType to a series of Go AST Decls -func (enum *EnumType) AsDeclarations(codeGenerationContext *CodeGenerationContext, declContext DeclarationContext) ([]dst.Decl, error) { - result := []dst.Decl{enum.createBaseDeclaration(codeGenerationContext, declContext.Name, declContext.Description, declContext.Validations)} - - specs := make([]dst.Spec, 0, len(enum.options)) - for _, v := range enum.options { - s := enum.createValueDeclaration(declContext.Name, v) - specs = append(specs, s) - } - - if len(specs) > 0 { - declaration := &dst.GenDecl{ - Tok: token.CONST, - Specs: specs, - } - - result = append(result, declaration) - } - - return result, nil +func (enum *EnumType) AsDeclarations( + codeGenerationContext *CodeGenerationContext, + declContext DeclarationContext, +) ([]dst.Decl, error) { + declareEnum := enum.createBaseDeclaration( + codeGenerationContext, + declContext.Name, + declContext.Description, + declContext.Validations) + + valuesDeclaration := enum.createValuesDeclaration(declContext) + mapperDeclaration := enum.createMappingDeclaration(declContext.Name, codeGenerationContext) + + return astbuilder.Declarations( + declareEnum, + valuesDeclaration, + mapperDeclaration, + ), nil } func (enum *EnumType) createBaseDeclaration( @@ -140,6 +141,57 @@ func (enum *EnumType) createBaseDeclaration( return declaration } +func (enum *EnumType) createValuesDeclaration( + declContext DeclarationContext, +) dst.Decl { + values := make([]dst.Spec, 0, len(enum.options)) + for _, v := range enum.options { + value := enum.createValueDeclaration(declContext.Name, v) + values = append(values, value) + } + + if len(values) == 0 { + return nil + } + + return &dst.GenDecl{ + Tok: token.CONST, + Specs: values, + } +} + +func (enum *EnumType) createMappingDeclaration( + name InternalTypeName, + codeGenerationContext *CodeGenerationContext, +) dst.Decl { + if !enum.NeedsMappingConversion(name) { + // We don't need a mapping conversion map for this enum + return nil + } + + literal := astbuilder.NewMapLiteral( + enum.baseType.AsType(codeGenerationContext), + name.AsType(codeGenerationContext)) + + for _, v := range enum.options { + key := astbuilder.TextLiteral(strings.ToLower(v.Value)) + value := dst.NewIdent(GetEnumValueId(name.Name(), v)) + literal.Add(key, value) + } + + decl := astbuilder.NewVariableAssignment( + enum.MapperVariableName(name), + literal.AsExpr(), + ) + + decl.Decorations().Before = dst.EmptyLine + decl.Decorations().Start = append( + decl.Decorations().Start, + fmt.Sprintf("// Mapping from string to %s", name.Name())) + + return decl +} + func (enum *EnumType) createValueDeclaration(name TypeName, value EnumValue) dst.Spec { valueSpec := &dst.ValueSpec{ Names: []*dst.Ident{dst.NewIdent(GetEnumValueId(name.Name(), value))}, @@ -263,8 +315,41 @@ func (enum *EnumType) WriteDebugDescription(builder *strings.Builder, currentPac if i > 0 { builder.WriteString("|") } + builder.WriteString(v.Identifier) } + builder.WriteString("]") } } + +var availableMapperSuffixes = []string{"Values", "Cache", "Mapping", "Mapper"} + +// MapperVariableName returns the name of the variable used to map enum values to strings. +// We check the values of the enum to ensure we don't have a name collision. +func (enum *EnumType) MapperVariableName(name InternalTypeName) string { + used := set.Make[string]() + for _, v := range enum.options { + used.Add(v.Identifier) + } + + for _, suffix := range availableMapperSuffixes { + if !used.Contains(suffix) { + name := fmt.Sprintf("%s_%s", name.Name(), suffix) + // Force the name to an internal one + runes := []rune(name) + runes[0] = unicode.ToLower(runes[0]) + return string(runes) + } + } + + panic("No available suffix for enum mapper variable name") +} + +// NeedsMappingConversion returns true if the enum needs a mapping conversion. +// A mapping conversion is needed if the base type is a string and the enum is +// *not* APIVersion (that enum isn't actually used on Spec or Status types). +func (enum *EnumType) NeedsMappingConversion(name InternalTypeName) bool { + return enum.baseType == StringType && + name.Name() != "APIVersion" +} diff --git a/v2/tools/generator/internal/astmodel/file_definition.go b/v2/tools/generator/internal/astmodel/file_definition.go index 80b1a9798ff..0fcfa36d7e3 100644 --- a/v2/tools/generator/internal/astmodel/file_definition.go +++ b/v2/tools/generator/internal/astmodel/file_definition.go @@ -160,7 +160,10 @@ func (file *FileDefinition) generateImports() *PackageImportSet { // AsAst generates an AST node representing this file func (file *FileDefinition) AsAst() (result *dst.File, err error) { // Create context from imports - codeGenContext := NewCodeGenerationContext(file.packageReference, file.generateImports(), file.generatedPackages) + codeGenContext := NewCodeGenerationContext( + file.packageReference, + file.generateImports(), + file.generatedPackages) // Create all definitions: var declarations []dst.Decl diff --git a/v2/tools/generator/internal/astmodel/std_references.go b/v2/tools/generator/internal/astmodel/std_references.go index 58039bb7a77..52e7f37fc1d 100644 --- a/v2/tools/generator/internal/astmodel/std_references.go +++ b/v2/tools/generator/internal/astmodel/std_references.go @@ -17,6 +17,7 @@ var ( JsonReference = MakeExternalPackageReference("encoding/json") OSReference = MakeExternalPackageReference("os") ReflectReference = MakeExternalPackageReference("reflect") + StringsReference = MakeExternalPackageReference("strings") TestingReference = MakeExternalPackageReference("testing") ContextReference = MakeExternalPackageReference("context") diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateARMTypeWithConfigMap_CreatesExpectedConversions/person-v20200101-arm.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateARMTypeWithConfigMap_CreatesExpectedConversions/person-v20200101-arm.golden new file mode 100644 index 00000000000..ef5dd954664 --- /dev/null +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateARMTypeWithConfigMap_CreatesExpectedConversions/person-v20200101-arm.golden @@ -0,0 +1,48 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type Person_Spec_BOOMBABOOMBA struct { + // Name: The name of the resource + Name string `json:"name,omitempty"` + Properties *PersonProperties_BOOMBABOOMBA `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{} + +// GetAPIVersion returns the ARM API version of the resource. This is always v2020 +func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string { + return string(APIVersion_v2020) +} + +// GetName returns the Name of the resource +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string { + return boombaboomba.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string { + return "" +} + +type Person_STATUS_BOOMBABOOMBA struct { + // Status: Current status + Status string `json:"status,omitempty"` +} + +type PersonProperties_BOOMBABOOMBA struct { + // FamilyName: Shared name of the family + FamilyName *string `json:"familyName,omitempty" optionalConfigMapPair:"FamilyName"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` + + // RestrictedName: The name of the resource, restricted to max 25 character length + RestrictedName *string `json:"restrictedName,omitempty" optionalConfigMapPair:"RestrictedName"` +} diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateARMTypeWithSecret_CreatesExpectedConversions/person-v20200101-arm.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateARMTypeWithSecret_CreatesExpectedConversions/person-v20200101-arm.golden new file mode 100644 index 00000000000..a24ba0b5b0e --- /dev/null +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateARMTypeWithSecret_CreatesExpectedConversions/person-v20200101-arm.golden @@ -0,0 +1,51 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type Person_Spec_BOOMBABOOMBA struct { + // Name: The name of the resource + Name string `json:"name,omitempty"` + Properties *PersonProperties_BOOMBABOOMBA `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{} + +// GetAPIVersion returns the ARM API version of the resource. This is always v2020 +func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string { + return string(APIVersion_v2020) +} + +// GetName returns the Name of the resource +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string { + return boombaboomba.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string { + return "" +} + +type Person_STATUS_BOOMBABOOMBA struct { + // Status: Current status + Status string `json:"status,omitempty"` +} + +type PersonProperties_BOOMBABOOMBA struct { + // FamilyName: Shared name of the family + FamilyName string `json:"familyName,omitempty"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` + + // SecretData: Secret data + SecretData map[string]string `json:"secretData,omitempty"` + + // SecretSlice: Secret data + SecretSlice []string `json:"secretSlice,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMTypeWithConfigMap_CreatesExpectedConversions/person-v20200101-arm.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMTypeWithConfigMap_CreatesExpectedConversions/person-v20200101-arm.golden new file mode 100644 index 00000000000..e06f3476a9c --- /dev/null +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMTypeWithConfigMap_CreatesExpectedConversions/person-v20200101-arm.golden @@ -0,0 +1,45 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type Person_Spec_BOOMBABOOMBA struct { + // Name: The name of the resource + Name string `json:"name,omitempty"` + Properties *PersonProperties_BOOMBABOOMBA `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{} + +// GetAPIVersion returns the ARM API version of the resource. This is always v2020 +func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string { + return string(APIVersion_v2020) +} + +// GetName returns the Name of the resource +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string { + return boombaboomba.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string { + return "" +} + +type Person_STATUS_BOOMBABOOMBA struct { + // Status: Current status + Status string `json:"status,omitempty"` +} + +type PersonProperties_BOOMBABOOMBA struct { + // FamilyName: Shared name of the family + FamilyName *string `json:"familyName,omitempty" optionalConfigMapPair:"FamilyName"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMTypeWithResourceRef_CreatesExpectedConversions/person-v20200101-arm.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMTypeWithResourceRef_CreatesExpectedConversions/person-v20200101-arm.golden new file mode 100644 index 00000000000..b247ecfe928 --- /dev/null +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMTypeWithResourceRef_CreatesExpectedConversions/person-v20200101-arm.golden @@ -0,0 +1,44 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type Person_Spec_BOOMBABOOMBA struct { + // Name: The name of the resource + Name string `json:"name,omitempty"` + Properties *PersonProperties_BOOMBABOOMBA `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{} + +// GetAPIVersion returns the ARM API version of the resource. This is always v2020 +func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string { + return string(APIVersion_v2020) +} + +// GetName returns the Name of the resource +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string { + return boombaboomba.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string { + return "" +} + +type Person_STATUS_BOOMBABOOMBA struct { + // Status: Current status + Status string `json:"status,omitempty"` +} + +type PersonProperties_BOOMBABOOMBA struct { + FamilyName *string `json:"familyName,omitempty"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMType_CreatesExpectedConversions/person-v20200101-arm.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMType_CreatesExpectedConversions/person-v20200101-arm.golden new file mode 100644 index 00000000000..213b18767d4 --- /dev/null +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestCreateFlattenedARMType_CreatesExpectedConversions/person-v20200101-arm.golden @@ -0,0 +1,45 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + +type Person_Spec_BOOMBABOOMBA struct { + // Name: The name of the resource + Name string `json:"name,omitempty"` + Properties *PersonProperties_BOOMBABOOMBA `json:"properties,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{} + +// GetAPIVersion returns the ARM API version of the resource. This is always v2020 +func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string { + return string(APIVersion_v2020) +} + +// GetName returns the Name of the resource +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string { + return boombaboomba.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string { + return "" +} + +type Person_STATUS_BOOMBABOOMBA struct { + // Status: Current status + Status string `json:"status,omitempty"` +} + +type PersonProperties_BOOMBABOOMBA struct { + // FamilyName: Shared name of the family + FamilyName string `json:"familyName,omitempty"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResourceWithCyclesAndResourceLookalikes_RemovesCycles/lions-v20200601.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResourceWithCyclesAndResourceLookalikes_RemovesCycles/lions-v20200601.golden index 6238514540c..21bbe6031c5 100644 --- a/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResourceWithCyclesAndResourceLookalikes_RemovesCycles/lions-v20200601.golden +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResourceWithCyclesAndResourceLookalikes_RemovesCycles/lions-v20200601.golden @@ -101,6 +101,11 @@ type LionPrideType string const LionPrideType_type = LionPrideType(Microsoft.Lions/lionPride) +// Mapping from string to LionPrideType +var lionPrideType_Values = map[string]LionPrideType{ + microsoft.lions/lionpride: LionPrideType_type, +} + type LionProperties struct { Left Left `json:"left,omitempty"` Right Right `json:"right,omitempty"` @@ -111,6 +116,11 @@ type LionType string const LionType_type = LionType(Microsoft.Lions/lion) +// Mapping from string to LionType +var lionType_Values = map[string]LionType{ + microsoft.lions/lion: LionType_type, +} + type Left struct { // +kubebuilder:validation:Required Name *string `json:"name,omitempty"` diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResource_IsRemovedRetainsId/lions-v20200601.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResource_IsRemovedRetainsId/lions-v20200601.golden index 12133755c67..614cb7dbc68 100644 --- a/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResource_IsRemovedRetainsId/lions-v20200601.golden +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResource_IsRemovedRetainsId/lions-v20200601.golden @@ -100,6 +100,11 @@ type LionPrideType string const LionPrideType_type = LionPrideType(Microsoft.Lions/lionPride) +// Mapping from string to LionPrideType +var lionPrideType_Values = map[string]LionPrideType{ + microsoft.lions/lionpride: LionPrideType_type, +} + type LionProperties struct { RoarVolumeDecibels int `json:"roarVolumeDecibels,omitempty"` } @@ -109,6 +114,11 @@ type LionType string const LionType_type = LionType(Microsoft.Lions/lion) +// Mapping from string to LionType +var lionType_Values = map[string]LionType{ + microsoft.lions/lion: LionType_type, +} + type LionRef struct { Id armid `json:"id,omitempty"` } diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResourcesWithMultipleEmbeddings_AllEmbeddingsAreRemovedAndRetainOnlyId/lions-v20200601.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResourcesWithMultipleEmbeddings_AllEmbeddingsAreRemovedAndRetainOnlyId/lions-v20200601.golden index dbbb9a827be..ff4ec27b8bb 100644 --- a/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResourcesWithMultipleEmbeddings_AllEmbeddingsAreRemovedAndRetainOnlyId/lions-v20200601.golden +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedResourcesWithMultipleEmbeddings_AllEmbeddingsAreRemovedAndRetainOnlyId/lions-v20200601.golden @@ -139,6 +139,11 @@ type LionCubType string const LionCubType_type = LionCubType(Microsoft.Lions/cub) +// Mapping from string to LionCubType +var lionCubType_Values = map[string]LionCubType{ + microsoft.lions/cub: LionCubType_type, +} + type LionPrideProperties struct { Hunts int `json:"hunts,omitempty"` Lions []LionRef `json:"lions,omitempty"` @@ -149,6 +154,11 @@ type LionPrideType string const LionPrideType_type = LionPrideType(Microsoft.Lions/lionPride) +// Mapping from string to LionPrideType +var lionPrideType_Values = map[string]LionPrideType{ + microsoft.lions/lionpride: LionPrideType_type, +} + type LionProperties struct { Cubs []LionCubRef `json:"cubs,omitempty"` RoarVolumeDecibels int `json:"roarVolumeDecibels,omitempty"` @@ -159,6 +169,11 @@ type LionType string const LionType_type = LionType(Microsoft.Lions/lion) +// Mapping from string to LionType +var lionType_Values = map[string]LionType{ + microsoft.lions/lion: LionType_type, +} + type LionCubRef struct { Id armid `json:"id,omitempty"` } diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedSubresource_IsRemoved/lions-v20200601.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedSubresource_IsRemoved/lions-v20200601.golden index 59bc2a8a521..61eaf488270 100644 --- a/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedSubresource_IsRemoved/lions-v20200601.golden +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/TestGolden_EmbeddedSubresource_IsRemoved/lions-v20200601.golden @@ -99,6 +99,11 @@ type LionPrideType string const LionPrideType_type = LionPrideType(Microsoft.Lions/lionPride) +// Mapping from string to LionPrideType +var lionPrideType_Values = map[string]LionPrideType{ + microsoft.lions/lionpride: LionPrideType_type, +} + type LionProperties struct { RoarVolumeDecibels int `json:"roarVolumeDecibels,omitempty"` } @@ -108,6 +113,11 @@ type LionType string const LionType_type = LionType(Microsoft.Lions/lion) +// Mapping from string to LionType +var lionType_Values = map[string]LionType{ + microsoft.lions/lion: LionType_type, +} + func init() { SchemeBuilder.Register(&Lion{}, &LionList{}, &LionPride{}, &LionPrideList{}) } diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/Test_RenameProperties_PopulatesExpectedARMProperty/person-v20200101-arm.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/Test_RenameProperties_PopulatesExpectedARMProperty/person-v20200101-arm.golden new file mode 100644 index 00000000000..1be55394534 --- /dev/null +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/Test_RenameProperties_PopulatesExpectedARMProperty/person-v20200101-arm.golden @@ -0,0 +1,59 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/person/v20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type Person_Spec_BOOMBABOOMBA struct { + APIVersion *v20200101.APIVersion `json:"apiVersion,omitempty"` + + // FamilyName: Shared name of the family + FamilyName string `json:"familyName,omitempty"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` + + // Name: The name of the resource + Name string `json:"name,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{} + +// GetAPIVersion returns the ARM API version of the resource. This is always 2020-06-01 +func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string { + return string(APIVersion_apiVersion) +} + +// GetName returns the Name of the resource +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string { + return boombaboomba.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string { + return "" +} + +type Person_STATUS_BOOMBABOOMBA struct { + // FamilyName: Shared name of the family + FamilyName string `json:"familyName,omitempty"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` + + // Name: The name of the resource + Name string `json:"name,omitempty"` + + // Status: Current status + Status string `json:"status,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/pipeline/testdata/Test_RenameProperties_WhenFlattening_PopulatesExpectedARMProperty/person-v20200101-arm.golden b/v2/tools/generator/internal/codegen/pipeline/testdata/Test_RenameProperties_WhenFlattening_PopulatesExpectedARMProperty/person-v20200101-arm.golden new file mode 100644 index 00000000000..5b8fdce229f --- /dev/null +++ b/v2/tools/generator/internal/codegen/pipeline/testdata/Test_RenameProperties_WhenFlattening_PopulatesExpectedARMProperty/person-v20200101-arm.golden @@ -0,0 +1,68 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/person/v20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type Person_Spec_BOOMBABOOMBA struct { + APIVersion *v20200101.APIVersion `json:"apiVersion,omitempty"` + Address *Address_BOOMBABOOMBA `json:"address,omitempty"` + + // FamilyName: Shared name of the family + FamilyName string `json:"familyName,omitempty"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` + + // Name: The name of the resource + Name string `json:"name,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &Person_Spec_BOOMBABOOMBA{} + +// GetAPIVersion returns the ARM API version of the resource. This is always 2020-06-01 +func (boombaboomba Person_Spec_BOOMBABOOMBA) GetAPIVersion() string { + return string(APIVersion_apiVersion) +} + +// GetName returns the Name of the resource +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetName() string { + return boombaboomba.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (boombaboomba *Person_Spec_BOOMBABOOMBA) GetType() string { + return "" +} + +type Person_STATUS_BOOMBABOOMBA struct { + // FamilyName: Shared name of the family + FamilyName string `json:"familyName,omitempty"` + + // FullName: As would be used to address mail + FullName string `json:"fullName,omitempty"` + + // KnownAs: How the person is generally known + KnownAs string `json:"knownAs,omitempty"` + + // Name: The name of the resource + Name string `json:"name,omitempty"` + + // Status: Current status + Status string `json:"status,omitempty"` +} + +type Address_BOOMBABOOMBA struct { + // City: City or town (or nearest) + City string `json:"city,omitempty"` + + // FullAddress: Full written address for map or postal use + FullAddress string `json:"fullAddress,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure.golden index 9beb82cef6d..4ab7c9f0a46 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure.golden @@ -295,6 +295,11 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + type FakeResource_Spec struct { // +kubebuilder:validation:Required APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -419,7 +424,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -437,7 +443,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -497,6 +504,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + func init() { SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure_arm.golden new file mode 100644 index 00000000000..75f4800d90b --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure_arm.golden @@ -0,0 +1,32 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type FakeResource_Spec struct { + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure_v1api20200101.golden new file mode 100644 index 00000000000..6acf7c3be26 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_azure_v1api20200101.golden @@ -0,0 +1,480 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + resource.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = resource.AzureName + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_crossplane.golden index f2a9a511ae0..df60e3a3c0d 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_oneof_resource_conversion_on_arm_type_only_crossplane.golden @@ -57,11 +57,21 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + func init() { SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure.golden index 8bff5af0fed..0297ec57ce5 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure.golden @@ -1086,6 +1086,11 @@ type A_APIVersion_Spec string const A_APIVersion_Spec_20200601 = A_APIVersion_Spec("2020-06-01") +// Mapping from string to A_APIVersion_Spec +var a_APIVersion_Spec_Values = map[string]A_APIVersion_Spec{ + "2020-06-01": A_APIVersion_Spec_20200601, +} + type A_Spec struct { // +kubebuilder:validation:Required APIVersion A_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -1210,7 +1215,8 @@ func (a *A_Spec) AssignProperties_From_A_Spec(source *v20200101s.A_Spec) error { // APIVersion if source.APIVersion != nil { - a.APIVersion = A_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + a.APIVersion = genruntime.ToEnum(apiVersion, a_APIVersion_Spec_Values) } else { a.APIVersion = "" } @@ -1228,7 +1234,8 @@ func (a *A_Spec) AssignProperties_From_A_Spec(source *v20200101s.A_Spec) error { // Type if source.Type != nil { - a.Type = A_Type_Spec(*source.Type) + typeVar := *source.Type + a.Type = genruntime.ToEnum(typeVar, a_Type_Spec_Values) } else { a.Type = "" } @@ -1288,6 +1295,11 @@ type A_Type_Spec string const A_Type_Spec_MicrosoftAzureA = A_Type_Spec("Microsoft.Azure/A") +// Mapping from string to A_Type_Spec +var a_Type_Spec_Values = map[string]A_Type_Spec{ + "microsoft.azure/a": A_Type_Spec_MicrosoftAzureA, +} + // +kubebuilder:validation:Enum={"2020-01-01"} type APIVersion string @@ -1298,6 +1310,11 @@ type B_APIVersion_Spec string const B_APIVersion_Spec_20200601 = B_APIVersion_Spec("2020-06-01") +// Mapping from string to B_APIVersion_Spec +var b_APIVersion_Spec_Values = map[string]B_APIVersion_Spec{ + "2020-06-01": B_APIVersion_Spec_20200601, +} + type B_Spec struct { // +kubebuilder:validation:Required APIVersion B_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -1422,7 +1439,8 @@ func (b *B_Spec) AssignProperties_From_B_Spec(source *v20200101s.B_Spec) error { // APIVersion if source.APIVersion != nil { - b.APIVersion = B_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + b.APIVersion = genruntime.ToEnum(apiVersion, b_APIVersion_Spec_Values) } else { b.APIVersion = "" } @@ -1440,7 +1458,8 @@ func (b *B_Spec) AssignProperties_From_B_Spec(source *v20200101s.B_Spec) error { // Type if source.Type != nil { - b.Type = B_Type_Spec(*source.Type) + typeVar := *source.Type + b.Type = genruntime.ToEnum(typeVar, b_Type_Spec_Values) } else { b.Type = "" } @@ -1500,11 +1519,21 @@ type B_Type_Spec string const B_Type_Spec_MicrosoftAzureB = B_Type_Spec("Microsoft.Azure/B") +// Mapping from string to B_Type_Spec +var b_Type_Spec_Values = map[string]B_Type_Spec{ + "microsoft.azure/b": B_Type_Spec_MicrosoftAzureB, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type C_APIVersion_Spec string const C_APIVersion_Spec_20200601 = C_APIVersion_Spec("2020-06-01") +// Mapping from string to C_APIVersion_Spec +var c_APIVersion_Spec_Values = map[string]C_APIVersion_Spec{ + "2020-06-01": C_APIVersion_Spec_20200601, +} + type C_Spec struct { // +kubebuilder:validation:Required APIVersion C_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -1629,7 +1658,8 @@ func (c *C_Spec) AssignProperties_From_C_Spec(source *v20200101s.C_Spec) error { // APIVersion if source.APIVersion != nil { - c.APIVersion = C_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + c.APIVersion = genruntime.ToEnum(apiVersion, c_APIVersion_Spec_Values) } else { c.APIVersion = "" } @@ -1647,7 +1677,8 @@ func (c *C_Spec) AssignProperties_From_C_Spec(source *v20200101s.C_Spec) error { // Type if source.Type != nil { - c.Type = C_Type_Spec(*source.Type) + typeVar := *source.Type + c.Type = genruntime.ToEnum(typeVar, c_Type_Spec_Values) } else { c.Type = "" } @@ -1707,11 +1738,21 @@ type C_Type_Spec string const C_Type_Spec_MicrosoftAzureC = C_Type_Spec("Microsoft.Azure/C") +// Mapping from string to C_Type_Spec +var c_Type_Spec_Values = map[string]C_Type_Spec{ + "microsoft.azure/c": C_Type_Spec_MicrosoftAzureC, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type D_APIVersion_Spec string const D_APIVersion_Spec_20200601 = D_APIVersion_Spec("2020-06-01") +// Mapping from string to D_APIVersion_Spec +var d_APIVersion_Spec_Values = map[string]D_APIVersion_Spec{ + "2020-06-01": D_APIVersion_Spec_20200601, +} + type D_Spec struct { // +kubebuilder:validation:Required APIVersion D_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -1836,7 +1877,8 @@ func (d *D_Spec) AssignProperties_From_D_Spec(source *v20200101s.D_Spec) error { // APIVersion if source.APIVersion != nil { - d.APIVersion = D_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + d.APIVersion = genruntime.ToEnum(apiVersion, d_APIVersion_Spec_Values) } else { d.APIVersion = "" } @@ -1854,7 +1896,8 @@ func (d *D_Spec) AssignProperties_From_D_Spec(source *v20200101s.D_Spec) error { // Type if source.Type != nil { - d.Type = D_Type_Spec(*source.Type) + typeVar := *source.Type + d.Type = genruntime.ToEnum(typeVar, d_Type_Spec_Values) } else { d.Type = "" } @@ -1914,6 +1957,11 @@ type D_Type_Spec string const D_Type_Spec_MicrosoftAzureD = D_Type_Spec("Microsoft.Azure/D") +// Mapping from string to D_Type_Spec +var d_Type_Spec_Values = map[string]D_Type_Spec{ + "microsoft.azure/d": D_Type_Spec_MicrosoftAzureD, +} + func init() { SchemeBuilder.Register(&A{}, &AList{}, &B{}, &BList{}, &C{}, &CList{}, &D{}, &DList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure_arm.golden new file mode 100644 index 00000000000..8b60ea22846 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure_arm.golden @@ -0,0 +1,101 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type A_Spec struct { + APIVersion v20200101.A_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.A_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &A_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (a A_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (a *A_Spec) GetName() string { + return a.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (a *A_Spec) GetType() string { + return "" +} + +type B_Spec struct { + APIVersion v20200101.B_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.B_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &B_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (b B_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (b *B_Spec) GetName() string { + return b.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (b *B_Spec) GetType() string { + return "" +} + +type C_Spec struct { + APIVersion v20200101.C_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.C_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &C_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (c C_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (c *C_Spec) GetName() string { + return c.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (c *C_Spec) GetType() string { + return "" +} + +type D_Spec struct { + APIVersion v20200101.D_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.D_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &D_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (d D_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (d *D_Spec) GetName() string { + return d.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (d *D_Spec) GetType() string { + return "" +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure_v1api20200101.golden new file mode 100644 index 00000000000..144ae829ec5 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_azure_v1api20200101.golden @@ -0,0 +1,1828 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/A +type A struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec A_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &A{} + +// GetConditions returns the conditions of the resource +func (a *A) GetConditions() conditions.Conditions { + return a.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (a *A) SetConditions(conditions conditions.Conditions) { a.Status.Conditions = conditions } + +var _ conversion.Convertible = &A{} + +// ConvertFrom populates our A from the provided hub A +func (a *A) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.A) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/A but received %T instead", hub) + } + + return a.AssignProperties_From_A(source) +} + +// ConvertTo populates the provided hub A from our A +func (a *A) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.A) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/A but received %T instead", hub) + } + + return a.AssignProperties_To_A(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-a,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=as,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.as.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &A{} + +// Default applies defaults to the A resource +func (a *A) Default() { + a.defaultImpl() + var temp any = a + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (a *A) defaultAzureName() { + if a.Spec.AzureName == "" { + a.Spec.AzureName = a.Name + } +} + +// defaultImpl applies the code generated defaults to the A resource +func (a *A) defaultImpl() { a.defaultAzureName() } + +var _ genruntime.KubernetesResource = &A{} + +// AzureName returns the Azure name of the resource +func (a *A) AzureName() string { + return a.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (a A) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (a *A) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (a *A) GetSpec() genruntime.ConvertibleSpec { + return &a.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (a *A) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (a *A) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (a *A) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(a.Spec) + return a.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-a,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=as,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.as.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &A{} + +// ValidateCreate validates the creation of the resource +func (a *A) ValidateCreate() (admission.Warnings, error) { + validations := a.createValidations() + var temp any = a + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (a *A) ValidateDelete() (admission.Warnings, error) { + validations := a.deleteValidations() + var temp any = a + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (a *A) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := a.updateValidations() + var temp any = a + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (a *A) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){a.validateResourceReferences, a.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (a *A) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (a *A) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return a.validateResourceReferences() + }, + a.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return a.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (a *A) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(a) +} + +// validateResourceReferences validates all resource references +func (a *A) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&a.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (a *A) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*A) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, a) +} + +// AssignProperties_From_A populates our A from the provided source A +func (a *A) AssignProperties_From_A(source *v20200101s.A) error { + + // ObjectMeta + a.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec A_Spec + err := spec.AssignProperties_From_A_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_A_Spec() to populate field Spec") + } + a.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_A populates the provided destination A from our A +func (a *A) AssignProperties_To_A(destination *v20200101s.A) error { + + // ObjectMeta + destination.ObjectMeta = *a.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.A_Spec + err := a.Spec.AssignProperties_To_A_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_A_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (a *A) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: a.Spec.OriginalVersion(), + Kind: "A", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/A +type AList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []A `json:"items"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/B +type B struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec B_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &B{} + +// GetConditions returns the conditions of the resource +func (b *B) GetConditions() conditions.Conditions { + return b.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (b *B) SetConditions(conditions conditions.Conditions) { b.Status.Conditions = conditions } + +var _ conversion.Convertible = &B{} + +// ConvertFrom populates our B from the provided hub B +func (b *B) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.B) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/B but received %T instead", hub) + } + + return b.AssignProperties_From_B(source) +} + +// ConvertTo populates the provided hub B from our B +func (b *B) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.B) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/B but received %T instead", hub) + } + + return b.AssignProperties_To_B(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-b,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=bs,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.bs.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &B{} + +// Default applies defaults to the B resource +func (b *B) Default() { + b.defaultImpl() + var temp any = b + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (b *B) defaultAzureName() { + if b.Spec.AzureName == "" { + b.Spec.AzureName = b.Name + } +} + +// defaultImpl applies the code generated defaults to the B resource +func (b *B) defaultImpl() { b.defaultAzureName() } + +var _ genruntime.KubernetesResource = &B{} + +// AzureName returns the Azure name of the resource +func (b *B) AzureName() string { + return b.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (b B) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (b *B) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (b *B) GetSpec() genruntime.ConvertibleSpec { + return &b.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (b *B) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (b *B) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (b *B) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(b.Spec) + return b.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-b,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=bs,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.bs.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &B{} + +// ValidateCreate validates the creation of the resource +func (b *B) ValidateCreate() (admission.Warnings, error) { + validations := b.createValidations() + var temp any = b + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (b *B) ValidateDelete() (admission.Warnings, error) { + validations := b.deleteValidations() + var temp any = b + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (b *B) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := b.updateValidations() + var temp any = b + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (b *B) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){b.validateResourceReferences, b.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (b *B) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (b *B) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return b.validateResourceReferences() + }, + b.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return b.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (b *B) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(b) +} + +// validateResourceReferences validates all resource references +func (b *B) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&b.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (b *B) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*B) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, b) +} + +// AssignProperties_From_B populates our B from the provided source B +func (b *B) AssignProperties_From_B(source *v20200101s.B) error { + + // ObjectMeta + b.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec B_Spec + err := spec.AssignProperties_From_B_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_B_Spec() to populate field Spec") + } + b.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_B populates the provided destination B from our B +func (b *B) AssignProperties_To_B(destination *v20200101s.B) error { + + // ObjectMeta + destination.ObjectMeta = *b.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.B_Spec + err := b.Spec.AssignProperties_To_B_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_B_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (b *B) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: b.Spec.OriginalVersion(), + Kind: "B", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/B +type BList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []B `json:"items"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/C +type C struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec C_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &C{} + +// GetConditions returns the conditions of the resource +func (c *C) GetConditions() conditions.Conditions { + return c.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (c *C) SetConditions(conditions conditions.Conditions) { c.Status.Conditions = conditions } + +var _ conversion.Convertible = &C{} + +// ConvertFrom populates our C from the provided hub C +func (c *C) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.C) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/C but received %T instead", hub) + } + + return c.AssignProperties_From_C(source) +} + +// ConvertTo populates the provided hub C from our C +func (c *C) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.C) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/C but received %T instead", hub) + } + + return c.AssignProperties_To_C(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-c,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=cs,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.cs.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &C{} + +// Default applies defaults to the C resource +func (c *C) Default() { + c.defaultImpl() + var temp any = c + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (c *C) defaultAzureName() { + if c.Spec.AzureName == "" { + c.Spec.AzureName = c.Name + } +} + +// defaultImpl applies the code generated defaults to the C resource +func (c *C) defaultImpl() { c.defaultAzureName() } + +var _ genruntime.KubernetesResource = &C{} + +// AzureName returns the Azure name of the resource +func (c *C) AzureName() string { + return c.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (c C) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (c *C) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (c *C) GetSpec() genruntime.ConvertibleSpec { + return &c.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (c *C) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (c *C) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (c *C) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(c.Spec) + return c.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-c,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=cs,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.cs.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &C{} + +// ValidateCreate validates the creation of the resource +func (c *C) ValidateCreate() (admission.Warnings, error) { + validations := c.createValidations() + var temp any = c + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (c *C) ValidateDelete() (admission.Warnings, error) { + validations := c.deleteValidations() + var temp any = c + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (c *C) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := c.updateValidations() + var temp any = c + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (c *C) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){c.validateResourceReferences, c.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (c *C) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (c *C) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return c.validateResourceReferences() + }, + c.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return c.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (c *C) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(c) +} + +// validateResourceReferences validates all resource references +func (c *C) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&c.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (c *C) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*C) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, c) +} + +// AssignProperties_From_C populates our C from the provided source C +func (c *C) AssignProperties_From_C(source *v20200101s.C) error { + + // ObjectMeta + c.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec C_Spec + err := spec.AssignProperties_From_C_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_C_Spec() to populate field Spec") + } + c.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_C populates the provided destination C from our C +func (c *C) AssignProperties_To_C(destination *v20200101s.C) error { + + // ObjectMeta + destination.ObjectMeta = *c.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.C_Spec + err := c.Spec.AssignProperties_To_C_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_C_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (c *C) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: c.Spec.OriginalVersion(), + Kind: "C", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/C +type CList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []C `json:"items"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/D +type D struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec D_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &D{} + +// GetConditions returns the conditions of the resource +func (d *D) GetConditions() conditions.Conditions { + return d.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (d *D) SetConditions(conditions conditions.Conditions) { d.Status.Conditions = conditions } + +var _ conversion.Convertible = &D{} + +// ConvertFrom populates our D from the provided hub D +func (d *D) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.D) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/D but received %T instead", hub) + } + + return d.AssignProperties_From_D(source) +} + +// ConvertTo populates the provided hub D from our D +func (d *D) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.D) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/D but received %T instead", hub) + } + + return d.AssignProperties_To_D(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-d,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=ds,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.ds.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &D{} + +// Default applies defaults to the D resource +func (d *D) Default() { + d.defaultImpl() + var temp any = d + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (d *D) defaultAzureName() { + if d.Spec.AzureName == "" { + d.Spec.AzureName = d.Name + } +} + +// defaultImpl applies the code generated defaults to the D resource +func (d *D) defaultImpl() { d.defaultAzureName() } + +var _ genruntime.KubernetesResource = &D{} + +// AzureName returns the Azure name of the resource +func (d *D) AzureName() string { + return d.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (d D) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (d *D) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (d *D) GetSpec() genruntime.ConvertibleSpec { + return &d.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (d *D) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (d *D) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (d *D) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(d.Spec) + return d.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-d,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=ds,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.ds.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &D{} + +// ValidateCreate validates the creation of the resource +func (d *D) ValidateCreate() (admission.Warnings, error) { + validations := d.createValidations() + var temp any = d + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (d *D) ValidateDelete() (admission.Warnings, error) { + validations := d.deleteValidations() + var temp any = d + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (d *D) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := d.updateValidations() + var temp any = d + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (d *D) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){d.validateResourceReferences, d.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (d *D) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (d *D) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return d.validateResourceReferences() + }, + d.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return d.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (d *D) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(d) +} + +// validateResourceReferences validates all resource references +func (d *D) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&d.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (d *D) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*D) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, d) +} + +// AssignProperties_From_D populates our D from the provided source D +func (d *D) AssignProperties_From_D(source *v20200101s.D) error { + + // ObjectMeta + d.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec D_Spec + err := spec.AssignProperties_From_D_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_D_Spec() to populate field Spec") + } + d.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_D populates the provided destination D from our D +func (d *D) AssignProperties_To_D(destination *v20200101s.D) error { + + // ObjectMeta + destination.ObjectMeta = *d.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.D_Spec + err := d.Spec.AssignProperties_To_D_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_D_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (d *D) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: d.Spec.OriginalVersion(), + Kind: "D", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/D +type DList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []D `json:"items"` +} + +type A_Spec struct { + // +kubebuilder:validation:Required + APIVersion A_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type A_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &A_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (a *A_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if a == nil { + return nil, nil + } + result := &A_Spec{} + + // Set property "APIVersion": + result.APIVersion = a.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = a.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (a *A_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.A_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (a *A_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(A_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected A_Spec, got %T", armInput) + } + + // Set property "APIVersion": + a.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + a.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + a.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + a.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &A_Spec{} + +// ConvertSpecFrom populates our A_Spec from the provided source +func (a *A_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.A_Spec) + if ok { + // Populate our instance from source + return a.AssignProperties_From_A_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.A_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = a.AssignProperties_From_A_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our A_Spec +func (a *A_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.A_Spec) + if ok { + // Populate destination from our instance + return a.AssignProperties_To_A_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.A_Spec{} + err := a.AssignProperties_To_A_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_A_Spec populates our A_Spec from the provided source A_Spec +func (a *A_Spec) AssignProperties_From_A_Spec(source *v20200101s.A_Spec) error { + + // APIVersion + if source.APIVersion != nil { + a.APIVersion = A_APIVersion_Spec(*source.APIVersion) + } else { + a.APIVersion = "" + } + + // AzureName + a.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + a.Owner = &owner + } else { + a.Owner = nil + } + + // Type + if source.Type != nil { + a.Type = A_Type_Spec(*source.Type) + } else { + a.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_A_Spec populates the provided destination A_Spec from our A_Spec +func (a *A_Spec) AssignProperties_To_A_Spec(destination *v20200101s.A_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(a.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = a.AzureName + + // OriginalVersion + destination.OriginalVersion = a.OriginalVersion() + + // Owner + if a.Owner != nil { + owner := a.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(a.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (a *A_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (a *A_Spec) SetAzureName(azureName string) { a.AzureName = azureName } + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type B_Spec struct { + // +kubebuilder:validation:Required + APIVersion B_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type B_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &B_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (b *B_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if b == nil { + return nil, nil + } + result := &B_Spec{} + + // Set property "APIVersion": + result.APIVersion = b.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = b.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (b *B_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.B_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (b *B_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(B_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected B_Spec, got %T", armInput) + } + + // Set property "APIVersion": + b.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + b.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + b.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + b.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &B_Spec{} + +// ConvertSpecFrom populates our B_Spec from the provided source +func (b *B_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.B_Spec) + if ok { + // Populate our instance from source + return b.AssignProperties_From_B_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.B_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = b.AssignProperties_From_B_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our B_Spec +func (b *B_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.B_Spec) + if ok { + // Populate destination from our instance + return b.AssignProperties_To_B_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.B_Spec{} + err := b.AssignProperties_To_B_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_B_Spec populates our B_Spec from the provided source B_Spec +func (b *B_Spec) AssignProperties_From_B_Spec(source *v20200101s.B_Spec) error { + + // APIVersion + if source.APIVersion != nil { + b.APIVersion = B_APIVersion_Spec(*source.APIVersion) + } else { + b.APIVersion = "" + } + + // AzureName + b.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + b.Owner = &owner + } else { + b.Owner = nil + } + + // Type + if source.Type != nil { + b.Type = B_Type_Spec(*source.Type) + } else { + b.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_B_Spec populates the provided destination B_Spec from our B_Spec +func (b *B_Spec) AssignProperties_To_B_Spec(destination *v20200101s.B_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(b.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = b.AzureName + + // OriginalVersion + destination.OriginalVersion = b.OriginalVersion() + + // Owner + if b.Owner != nil { + owner := b.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(b.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (b *B_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (b *B_Spec) SetAzureName(azureName string) { b.AzureName = azureName } + +type C_Spec struct { + // +kubebuilder:validation:Required + APIVersion C_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type C_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &C_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (c *C_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if c == nil { + return nil, nil + } + result := &C_Spec{} + + // Set property "APIVersion": + result.APIVersion = c.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = c.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (c *C_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.C_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (c *C_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(C_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected C_Spec, got %T", armInput) + } + + // Set property "APIVersion": + c.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + c.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + c.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + c.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &C_Spec{} + +// ConvertSpecFrom populates our C_Spec from the provided source +func (c *C_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.C_Spec) + if ok { + // Populate our instance from source + return c.AssignProperties_From_C_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.C_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = c.AssignProperties_From_C_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our C_Spec +func (c *C_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.C_Spec) + if ok { + // Populate destination from our instance + return c.AssignProperties_To_C_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.C_Spec{} + err := c.AssignProperties_To_C_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_C_Spec populates our C_Spec from the provided source C_Spec +func (c *C_Spec) AssignProperties_From_C_Spec(source *v20200101s.C_Spec) error { + + // APIVersion + if source.APIVersion != nil { + c.APIVersion = C_APIVersion_Spec(*source.APIVersion) + } else { + c.APIVersion = "" + } + + // AzureName + c.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + c.Owner = &owner + } else { + c.Owner = nil + } + + // Type + if source.Type != nil { + c.Type = C_Type_Spec(*source.Type) + } else { + c.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_C_Spec populates the provided destination C_Spec from our C_Spec +func (c *C_Spec) AssignProperties_To_C_Spec(destination *v20200101s.C_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(c.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = c.AzureName + + // OriginalVersion + destination.OriginalVersion = c.OriginalVersion() + + // Owner + if c.Owner != nil { + owner := c.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(c.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (c *C_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (c *C_Spec) SetAzureName(azureName string) { c.AzureName = azureName } + +type D_Spec struct { + // +kubebuilder:validation:Required + APIVersion D_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type D_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &D_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (d *D_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if d == nil { + return nil, nil + } + result := &D_Spec{} + + // Set property "APIVersion": + result.APIVersion = d.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = d.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (d *D_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.D_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (d *D_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(D_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected D_Spec, got %T", armInput) + } + + // Set property "APIVersion": + d.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + d.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + d.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + d.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &D_Spec{} + +// ConvertSpecFrom populates our D_Spec from the provided source +func (d *D_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.D_Spec) + if ok { + // Populate our instance from source + return d.AssignProperties_From_D_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.D_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = d.AssignProperties_From_D_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our D_Spec +func (d *D_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.D_Spec) + if ok { + // Populate destination from our instance + return d.AssignProperties_To_D_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.D_Spec{} + err := d.AssignProperties_To_D_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_D_Spec populates our D_Spec from the provided source D_Spec +func (d *D_Spec) AssignProperties_From_D_Spec(source *v20200101s.D_Spec) error { + + // APIVersion + if source.APIVersion != nil { + d.APIVersion = D_APIVersion_Spec(*source.APIVersion) + } else { + d.APIVersion = "" + } + + // AzureName + d.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + d.Owner = &owner + } else { + d.Owner = nil + } + + // Type + if source.Type != nil { + d.Type = D_Type_Spec(*source.Type) + } else { + d.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_D_Spec populates the provided destination D_Spec from our D_Spec +func (d *D_Spec) AssignProperties_To_D_Spec(destination *v20200101s.D_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(d.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = d.AzureName + + // OriginalVersion + destination.OriginalVersion = d.OriginalVersion() + + // Owner + if d.Owner != nil { + owner := d.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(d.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (d *D_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (d *D_Spec) SetAzureName(azureName string) { d.AzureName = azureName } + +// +kubebuilder:validation:Enum={"2020-06-01"} +type A_APIVersion_Spec string + +const A_APIVersion_Spec_20200601 = A_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/A"} +type A_Type_Spec string + +const A_Type_Spec_MicrosoftAzureA = A_Type_Spec("Microsoft.Azure/A") + +// +kubebuilder:validation:Enum={"2020-06-01"} +type B_APIVersion_Spec string + +const B_APIVersion_Spec_20200601 = B_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/B"} +type B_Type_Spec string + +const B_Type_Spec_MicrosoftAzureB = B_Type_Spec("Microsoft.Azure/B") + +// +kubebuilder:validation:Enum={"2020-06-01"} +type C_APIVersion_Spec string + +const C_APIVersion_Spec_20200601 = C_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/C"} +type C_Type_Spec string + +const C_Type_Spec_MicrosoftAzureC = C_Type_Spec("Microsoft.Azure/C") + +// +kubebuilder:validation:Enum={"2020-06-01"} +type D_APIVersion_Spec string + +const D_APIVersion_Spec_20200601 = D_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/D"} +type D_Type_Spec string + +const D_Type_Spec_MicrosoftAzureD = D_Type_Spec("Microsoft.Azure/D") + +func init() { + SchemeBuilder.Register(&A{}, &AList{}, &B{}, &BList{}, &C{}, &CList{}, &D{}, &DList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_crossplane.golden index 7e4a4588b33..0b777bd6021 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_dependent_resource_and_ownership_crossplane.golden @@ -174,41 +174,81 @@ type A_APIVersion_Spec string const A_APIVersion_Spec_20200601 = A_APIVersion_Spec("2020-06-01") +// Mapping from string to A_APIVersion_Spec +var a_APIVersion_Spec_Values = map[string]A_APIVersion_Spec{ + "2020-06-01": A_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/A"} type A_Type_Spec string const A_Type_Spec_MicrosoftAzureA = A_Type_Spec("Microsoft.Azure/A") +// Mapping from string to A_Type_Spec +var a_Type_Spec_Values = map[string]A_Type_Spec{ + "microsoft.azure/a": A_Type_Spec_MicrosoftAzureA, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type B_APIVersion_Spec string const B_APIVersion_Spec_20200601 = B_APIVersion_Spec("2020-06-01") +// Mapping from string to B_APIVersion_Spec +var b_APIVersion_Spec_Values = map[string]B_APIVersion_Spec{ + "2020-06-01": B_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/B"} type B_Type_Spec string const B_Type_Spec_MicrosoftAzureB = B_Type_Spec("Microsoft.Azure/B") +// Mapping from string to B_Type_Spec +var b_Type_Spec_Values = map[string]B_Type_Spec{ + "microsoft.azure/b": B_Type_Spec_MicrosoftAzureB, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type C_APIVersion_Spec string const C_APIVersion_Spec_20200601 = C_APIVersion_Spec("2020-06-01") +// Mapping from string to C_APIVersion_Spec +var c_APIVersion_Spec_Values = map[string]C_APIVersion_Spec{ + "2020-06-01": C_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/C"} type C_Type_Spec string const C_Type_Spec_MicrosoftAzureC = C_Type_Spec("Microsoft.Azure/C") +// Mapping from string to C_Type_Spec +var c_Type_Spec_Values = map[string]C_Type_Spec{ + "microsoft.azure/c": C_Type_Spec_MicrosoftAzureC, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type D_APIVersion_Spec string const D_APIVersion_Spec_20200601 = D_APIVersion_Spec("2020-06-01") +// Mapping from string to D_APIVersion_Spec +var d_APIVersion_Spec_Values = map[string]D_APIVersion_Spec{ + "2020-06-01": D_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/D"} type D_Type_Spec string const D_Type_Spec_MicrosoftAzureD = D_Type_Spec("Microsoft.Azure/D") +// Mapping from string to D_Type_Spec +var d_Type_Spec_Values = map[string]D_Type_Spec{ + "microsoft.azure/d": D_Type_Spec_MicrosoftAzureD, +} + func init() { SchemeBuilder.Register(&A{}, &AList{}, &B{}, &BList{}, &C{}, &CList{}, &D{}, &DList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure.golden index 5f5bb4fdca2..34234e84b08 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure.golden @@ -298,6 +298,11 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + type FakeResource_Spec struct { // +kubebuilder:validation:Required APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -446,7 +451,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -476,7 +482,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -548,6 +555,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties type FakeResourceProperties_ARM struct { Id *string `json:"id,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure_arm.golden new file mode 100644 index 00000000000..2b0bf3be46d --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure_arm.golden @@ -0,0 +1,43 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type FakeResource_Spec struct { + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + + // Properties: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties + Properties *FakeResourceProperties `json:"properties,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties +type FakeResourceProperties struct { + Id *string `json:"id,omitempty"` + NsgIds []string `json:"nsgIds,omitempty"` + NsgMap map[string]string `json:"nsgMap,omitempty"` + SubnetId *string `json:"subnetId,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure_v1api20200101.golden new file mode 100644 index 00000000000..8e09b4a0a64 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_azure_v1api20200101.golden @@ -0,0 +1,730 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // Properties: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties + Properties *FakeResourceProperties `json:"properties,omitempty"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if resource.Properties != nil { + properties_ARM, err := (*resource.Properties).ConvertToARM(resolved) + if err != nil { + return nil, err + } + properties := *properties_ARM.(*v20200101a.FakeResourceProperties) + result.Properties = &properties + } + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Properties": + if typedInput.Properties != nil { + var properties1 FakeResourceProperties + err := properties1.PopulateFromARM(owner, *typedInput.Properties) + if err != nil { + return err + } + properties := properties1 + resource.Properties = &properties + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + resource.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Properties + if source.Properties != nil { + var property FakeResourceProperties + err := property.AssignProperties_From_FakeResourceProperties(source.Properties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResourceProperties() to populate field Properties") + } + resource.Properties = &property + } else { + resource.Properties = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = resource.AzureName + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Properties + if resource.Properties != nil { + var property v20200101s.FakeResourceProperties + err := resource.Properties.AssignProperties_To_FakeResourceProperties(&property) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResourceProperties() to populate field Properties") + } + destination.Properties = &property + } else { + destination.Properties = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties +type FakeResourceProperties struct { + // NsgMapReferences: A map of NSG IDs of the form + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/networkSecurityGroups/{nsgName} + NsgMapReferences map[string]genruntime.ResourceReference `armReference:"NsgMap" json:"nsgMapReferences,omitempty"` + + // NsgReferences: A collection of NSG IDs of the form + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/networkSecurityGroups/{nsgName} + NsgReferences []genruntime.ResourceReference `armReference:"NsgIds" json:"nsgReferences,omitempty"` + + // Reference: A string of the form + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + Reference *genruntime.ResourceReference `armReference:"Id" json:"reference,omitempty"` + + // SubnetReference: A string of the form + // /SUBSCRIPTIONS/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + SubnetReference *genruntime.ResourceReference `armReference:"SubnetId" json:"subnetReference,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResourceProperties{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (properties *FakeResourceProperties) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if properties == nil { + return nil, nil + } + result := &FakeResourceProperties{} + + // Set property "Id": + if properties.Reference != nil { + referenceARMID, err := resolved.ResolvedReferences.Lookup(*properties.Reference) + if err != nil { + return nil, err + } + reference := referenceARMID + result.Id = &reference + } + + // Set property "NsgIds": + for _, item := range properties.NsgReferences { + itemARMID, err := resolved.ResolvedReferences.Lookup(item) + if err != nil { + return nil, err + } + result.NsgIds = append(result.NsgIds, itemARMID) + } + + // Set property "NsgMap": + if properties.NsgMapReferences != nil { + result.NsgMap = make(map[string]string, len(properties.NsgMapReferences)) + for key, value := range properties.NsgMapReferences { + valueARMID, err := resolved.ResolvedReferences.Lookup(value) + if err != nil { + return nil, err + } + result.NsgMap[key] = valueARMID + } + } + + // Set property "SubnetId": + if properties.SubnetReference != nil { + subnetReferenceARMID, err := resolved.ResolvedReferences.Lookup(*properties.SubnetReference) + if err != nil { + return nil, err + } + subnetReference := subnetReferenceARMID + result.SubnetId = &subnetReference + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *FakeResourceProperties) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResourceProperties{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *FakeResourceProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + _, ok := armInput.(FakeResourceProperties) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResourceProperties, got %T", armInput) + } + + // no assignment for property "NsgMapReferences" + + // no assignment for property "NsgReferences" + + // no assignment for property "Reference" + + // no assignment for property "SubnetReference" + + // No error + return nil +} + +// AssignProperties_From_FakeResourceProperties populates our FakeResourceProperties from the provided source FakeResourceProperties +func (properties *FakeResourceProperties) AssignProperties_From_FakeResourceProperties(source *v20200101s.FakeResourceProperties) error { + + // NsgMapReferences + if source.NsgMapReferences != nil { + nsgMapReferenceMap := make(map[string]genruntime.ResourceReference, len(source.NsgMapReferences)) + for nsgMapReferenceKey, nsgMapReferenceValue := range source.NsgMapReferences { + // Shadow the loop variable to avoid aliasing + nsgMapReferenceValue := nsgMapReferenceValue + nsgMapReferenceMap[nsgMapReferenceKey] = nsgMapReferenceValue.Copy() + } + properties.NsgMapReferences = nsgMapReferenceMap + } else { + properties.NsgMapReferences = nil + } + + // NsgReferences + if source.NsgReferences != nil { + nsgReferenceList := make([]genruntime.ResourceReference, len(source.NsgReferences)) + for nsgReferenceIndex, nsgReferenceItem := range source.NsgReferences { + // Shadow the loop variable to avoid aliasing + nsgReferenceItem := nsgReferenceItem + nsgReferenceList[nsgReferenceIndex] = nsgReferenceItem.Copy() + } + properties.NsgReferences = nsgReferenceList + } else { + properties.NsgReferences = nil + } + + // Reference + if source.Reference != nil { + reference := source.Reference.Copy() + properties.Reference = &reference + } else { + properties.Reference = nil + } + + // SubnetReference + if source.SubnetReference != nil { + subnetReference := source.SubnetReference.Copy() + properties.SubnetReference = &subnetReference + } else { + properties.SubnetReference = nil + } + + // No error + return nil +} + +// AssignProperties_To_FakeResourceProperties populates the provided destination FakeResourceProperties from our FakeResourceProperties +func (properties *FakeResourceProperties) AssignProperties_To_FakeResourceProperties(destination *v20200101s.FakeResourceProperties) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // NsgMapReferences + if properties.NsgMapReferences != nil { + nsgMapReferenceMap := make(map[string]genruntime.ResourceReference, len(properties.NsgMapReferences)) + for nsgMapReferenceKey, nsgMapReferenceValue := range properties.NsgMapReferences { + // Shadow the loop variable to avoid aliasing + nsgMapReferenceValue := nsgMapReferenceValue + nsgMapReferenceMap[nsgMapReferenceKey] = nsgMapReferenceValue.Copy() + } + destination.NsgMapReferences = nsgMapReferenceMap + } else { + destination.NsgMapReferences = nil + } + + // NsgReferences + if properties.NsgReferences != nil { + nsgReferenceList := make([]genruntime.ResourceReference, len(properties.NsgReferences)) + for nsgReferenceIndex, nsgReferenceItem := range properties.NsgReferences { + // Shadow the loop variable to avoid aliasing + nsgReferenceItem := nsgReferenceItem + nsgReferenceList[nsgReferenceIndex] = nsgReferenceItem.Copy() + } + destination.NsgReferences = nsgReferenceList + } else { + destination.NsgReferences = nil + } + + // Reference + if properties.Reference != nil { + reference := properties.Reference.Copy() + destination.Reference = &reference + } else { + destination.Reference = nil + } + + // SubnetReference + if properties.SubnetReference != nil { + subnetReference := properties.SubnetReference.Copy() + destination.SubnetReference = &subnetReference + } else { + destination.SubnetReference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_crossplane.golden index 7dff1b60b38..ac6c0cc4295 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_id_resource_reference_crossplane.golden @@ -60,11 +60,21 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties type FakeResourceProperties struct { // Id: A string of the form diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure.golden index 65fa6427fea..e3e1b09d1f5 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure.golden @@ -298,6 +298,11 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + type FakeResource_Spec struct { // +kubebuilder:validation:Required APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -446,7 +451,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -476,7 +482,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -548,6 +555,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties type FakeResourceProperties_ARM struct { OptionalVNet *string `json:"optionalVNet,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure_arm.golden new file mode 100644 index 00000000000..6646c1d3c02 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure_arm.golden @@ -0,0 +1,41 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type FakeResource_Spec struct { + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + + // Properties: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties + Properties *FakeResourceProperties `json:"properties,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties +type FakeResourceProperties struct { + OptionalVNet *string `json:"optionalVNet,omitempty"` + RequiredVNet *string `json:"requiredVNet,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure_v1api20200101.golden new file mode 100644 index 00000000000..4ddd74485fd --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_azure_v1api20200101.golden @@ -0,0 +1,646 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // Properties: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties + Properties *FakeResourceProperties `json:"properties,omitempty"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Properties": + if resource.Properties != nil { + properties_ARM, err := (*resource.Properties).ConvertToARM(resolved) + if err != nil { + return nil, err + } + properties := *properties_ARM.(*v20200101a.FakeResourceProperties) + result.Properties = &properties + } + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Properties": + if typedInput.Properties != nil { + var properties1 FakeResourceProperties + err := properties1.PopulateFromARM(owner, *typedInput.Properties) + if err != nil { + return err + } + properties := properties1 + resource.Properties = &properties + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + resource.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Properties + if source.Properties != nil { + var property FakeResourceProperties + err := property.AssignProperties_From_FakeResourceProperties(source.Properties) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResourceProperties() to populate field Properties") + } + resource.Properties = &property + } else { + resource.Properties = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = resource.AzureName + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Properties + if resource.Properties != nil { + var property v20200101s.FakeResourceProperties + err := resource.Properties.AssignProperties_To_FakeResourceProperties(&property) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResourceProperties() to populate field Properties") + } + destination.Properties = &property + } else { + destination.Properties = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties +type FakeResourceProperties struct { + // OptionalVNetReference: A string of the form + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + OptionalVNetReference *genruntime.ResourceReference `armReference:"OptionalVNet" json:"optionalVNetReference,omitempty"` + + // +kubebuilder:validation:Required + // RequiredVNetReference: A string of the form + // /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + RequiredVNetReference *genruntime.ResourceReference `armReference:"RequiredVNet" json:"requiredVNetReference,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResourceProperties{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (properties *FakeResourceProperties) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if properties == nil { + return nil, nil + } + result := &FakeResourceProperties{} + + // Set property "OptionalVNet": + if properties.OptionalVNetReference != nil { + optionalVNetReferenceARMID, err := resolved.ResolvedReferences.Lookup(*properties.OptionalVNetReference) + if err != nil { + return nil, err + } + optionalVNetReference := optionalVNetReferenceARMID + result.OptionalVNet = &optionalVNetReference + } + + // Set property "RequiredVNet": + if properties.RequiredVNetReference != nil { + requiredVNetReferenceARMID, err := resolved.ResolvedReferences.Lookup(*properties.RequiredVNetReference) + if err != nil { + return nil, err + } + requiredVNetReference := requiredVNetReferenceARMID + result.RequiredVNet = &requiredVNetReference + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (properties *FakeResourceProperties) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResourceProperties{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (properties *FakeResourceProperties) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + _, ok := armInput.(FakeResourceProperties) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResourceProperties, got %T", armInput) + } + + // no assignment for property "OptionalVNetReference" + + // no assignment for property "RequiredVNetReference" + + // No error + return nil +} + +// AssignProperties_From_FakeResourceProperties populates our FakeResourceProperties from the provided source FakeResourceProperties +func (properties *FakeResourceProperties) AssignProperties_From_FakeResourceProperties(source *v20200101s.FakeResourceProperties) error { + + // OptionalVNetReference + if source.OptionalVNetReference != nil { + optionalVNetReference := source.OptionalVNetReference.Copy() + properties.OptionalVNetReference = &optionalVNetReference + } else { + properties.OptionalVNetReference = nil + } + + // RequiredVNetReference + if source.RequiredVNetReference != nil { + requiredVNetReference := source.RequiredVNetReference.Copy() + properties.RequiredVNetReference = &requiredVNetReference + } else { + properties.RequiredVNetReference = nil + } + + // No error + return nil +} + +// AssignProperties_To_FakeResourceProperties populates the provided destination FakeResourceProperties from our FakeResourceProperties +func (properties *FakeResourceProperties) AssignProperties_To_FakeResourceProperties(destination *v20200101s.FakeResourceProperties) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // OptionalVNetReference + if properties.OptionalVNetReference != nil { + optionalVNetReference := properties.OptionalVNetReference.Copy() + destination.OptionalVNetReference = &optionalVNetReference + } else { + destination.OptionalVNetReference = nil + } + + // RequiredVNetReference + if properties.RequiredVNetReference != nil { + requiredVNetReference := properties.RequiredVNetReference.Copy() + destination.RequiredVNetReference = &requiredVNetReference + } else { + destination.RequiredVNetReference = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_crossplane.golden index 6c778446e45..8d265828e70 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_required_and_optional_resource_references_crossplane.golden @@ -60,11 +60,21 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/FakeResourceProperties type FakeResourceProperties struct { // OptionalVNet: A string of the form diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure.golden index f7fc3c56388..7f131988192 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure.golden @@ -305,11 +305,23 @@ const ( Color_Red = Color("red") ) +// Mapping from string to Color +var color_Values = map[string]Color{ + "blue": Color_Blue, + "green": Color_Green, + "red": Color_Red, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + type FakeResource_Spec struct { // +kubebuilder:validation:Required APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -563,7 +575,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -658,7 +671,7 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc for arrayOfEnumIndex, arrayOfEnumItem := range source.ArrayOfEnums { // Shadow the loop variable to avoid aliasing arrayOfEnumItem := arrayOfEnumItem - arrayOfEnumList[arrayOfEnumIndex] = Color(arrayOfEnumItem) + arrayOfEnumList[arrayOfEnumIndex] = genruntime.ToEnum(arrayOfEnumItem, color_Values) } resource.ArrayOfEnums = arrayOfEnumList } else { @@ -706,7 +719,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -891,6 +905,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo type Foo_ARM struct { Name *string `json:"name,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure_arm.golden new file mode 100644 index 00000000000..ba341f77ec1 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure_arm.golden @@ -0,0 +1,42 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type FakeResource_Spec struct { + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + ArrayFoo []Foo `json:"arrayFoo,omitempty"` + ArrayOfArrays [][]Foo `json:"arrayOfArrays,omitempty"` + ArrayOfArraysOfArrays [][][]Foo `json:"arrayOfArraysOfArrays,omitempty"` + ArrayOfEnums []v20200101.Color `json:"arrayOfEnums,omitempty"` + ArrayOfMaps []map[string]Foo `json:"arrayOfMaps,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo +type Foo struct { + Name *string `json:"name,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure_v1api20200101.golden new file mode 100644 index 00000000000..7ae99617063 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_azure_v1api20200101.golden @@ -0,0 +1,942 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // +kubebuilder:validation:Required + ArrayFoo []Foo `json:"arrayFoo,omitempty"` + ArrayOfArrays [][]Foo `json:"arrayOfArrays,omitempty"` + ArrayOfArraysOfArrays [][][]Foo `json:"arrayOfArraysOfArrays,omitempty"` + ArrayOfEnums []Color `json:"arrayOfEnums,omitempty"` + ArrayOfMaps []map[string]Foo `json:"arrayOfMaps,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "ArrayFoo": + for _, item := range resource.ArrayFoo { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.ArrayFoo = append(result.ArrayFoo, *item_ARM.(*v20200101a.Foo)) + } + + // Set property "ArrayOfArrays": + for _, item := range resource.ArrayOfArrays { + var itemTemp []v20200101a.Foo + for _, item1 := range item { + item1_ARM, err := item1.ConvertToARM(resolved) + if err != nil { + return nil, err + } + itemTemp = append(itemTemp, *item1_ARM.(*v20200101a.Foo)) + } + result.ArrayOfArrays = append(result.ArrayOfArrays, itemTemp) + } + + // Set property "ArrayOfArraysOfArrays": + for _, item := range resource.ArrayOfArraysOfArrays { + var itemTemp [][]v20200101a.Foo + for _, item1 := range item { + var item1Temp []v20200101a.Foo + for _, item2 := range item1 { + item2_ARM, err := item2.ConvertToARM(resolved) + if err != nil { + return nil, err + } + item1Temp = append(item1Temp, *item2_ARM.(*v20200101a.Foo)) + } + itemTemp = append(itemTemp, item1Temp) + } + result.ArrayOfArraysOfArrays = append(result.ArrayOfArraysOfArrays, itemTemp) + } + + // Set property "ArrayOfEnums": + for _, item := range resource.ArrayOfEnums { + result.ArrayOfEnums = append(result.ArrayOfEnums, item) + } + + // Set property "ArrayOfMaps": + for _, item := range resource.ArrayOfMaps { + if item != nil { + itemTemp := make(map[string]v20200101a.Foo, len(item)) + for key, value := range item { + value_ARM, err := value.ConvertToARM(resolved) + if err != nil { + return nil, err + } + itemTemp[key] = *value_ARM.(*v20200101a.Foo) + } + result.ArrayOfMaps = append(result.ArrayOfMaps, itemTemp) + } + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "ArrayFoo": + for _, item := range typedInput.ArrayFoo { + var item1 Foo + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + resource.ArrayFoo = append(resource.ArrayFoo, item1) + } + + // Set property "ArrayOfArrays": + for _, item := range typedInput.ArrayOfArrays { + var itemTemp []Foo + for _, item1 := range item { + var item2 Foo + err := item2.PopulateFromARM(owner, item1) + if err != nil { + return err + } + itemTemp = append(itemTemp, item2) + } + resource.ArrayOfArrays = append(resource.ArrayOfArrays, itemTemp) + } + + // Set property "ArrayOfArraysOfArrays": + for _, item := range typedInput.ArrayOfArraysOfArrays { + var itemTemp [][]Foo + for _, item1 := range item { + var item1Temp []Foo + for _, item2 := range item1 { + var item3 Foo + err := item3.PopulateFromARM(owner, item2) + if err != nil { + return err + } + item1Temp = append(item1Temp, item3) + } + itemTemp = append(itemTemp, item1Temp) + } + resource.ArrayOfArraysOfArrays = append(resource.ArrayOfArraysOfArrays, itemTemp) + } + + // Set property "ArrayOfEnums": + for _, item := range typedInput.ArrayOfEnums { + resource.ArrayOfEnums = append(resource.ArrayOfEnums, item) + } + + // Set property "ArrayOfMaps": + for _, item := range typedInput.ArrayOfMaps { + if item != nil { + itemTemp := make(map[string]Foo, len(item)) + for key, value := range item { + var value1 Foo + err := value1.PopulateFromARM(owner, value) + if err != nil { + return err + } + itemTemp[key] = value1 + } + resource.ArrayOfMaps = append(resource.ArrayOfMaps, itemTemp) + } + } + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // ArrayFoo + if source.ArrayFoo != nil { + arrayFooList := make([]Foo, len(source.ArrayFoo)) + for arrayFooIndex, arrayFooItem := range source.ArrayFoo { + // Shadow the loop variable to avoid aliasing + arrayFooItem := arrayFooItem + var arrayFoo Foo + err := arrayFoo.AssignProperties_From_Foo(&arrayFooItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field ArrayFoo") + } + arrayFooList[arrayFooIndex] = arrayFoo + } + resource.ArrayFoo = arrayFooList + } else { + resource.ArrayFoo = nil + } + + // ArrayOfArrays + if source.ArrayOfArrays != nil { + arrayOfArrayList := make([][]Foo, len(source.ArrayOfArrays)) + for arrayOfArrayIndex, arrayOfArrayItem := range source.ArrayOfArrays { + // Shadow the loop variable to avoid aliasing + arrayOfArrayItem := arrayOfArrayItem + if arrayOfArrayItem != nil { + arrayOfArrayList1 := make([]Foo, len(arrayOfArrayItem)) + for arrayOfArrayIndex1, arrayOfArrayItem1 := range arrayOfArrayItem { + // Shadow the loop variable to avoid aliasing + arrayOfArrayItem1 := arrayOfArrayItem1 + var arrayOfArray Foo + err := arrayOfArray.AssignProperties_From_Foo(&arrayOfArrayItem1) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field ArrayOfArrays") + } + arrayOfArrayList1[arrayOfArrayIndex1] = arrayOfArray + } + arrayOfArrayList[arrayOfArrayIndex] = arrayOfArrayList1 + } else { + arrayOfArrayList[arrayOfArrayIndex] = nil + } + } + resource.ArrayOfArrays = arrayOfArrayList + } else { + resource.ArrayOfArrays = nil + } + + // ArrayOfArraysOfArrays + if source.ArrayOfArraysOfArrays != nil { + arrayOfArraysOfArrayList := make([][][]Foo, len(source.ArrayOfArraysOfArrays)) + for arrayOfArraysOfArrayIndex, arrayOfArraysOfArrayItem := range source.ArrayOfArraysOfArrays { + // Shadow the loop variable to avoid aliasing + arrayOfArraysOfArrayItem := arrayOfArraysOfArrayItem + if arrayOfArraysOfArrayItem != nil { + arrayOfArraysOfArrayList1 := make([][]Foo, len(arrayOfArraysOfArrayItem)) + for arrayOfArraysOfArrayIndex1, arrayOfArraysOfArrayItem1 := range arrayOfArraysOfArrayItem { + // Shadow the loop variable to avoid aliasing + arrayOfArraysOfArrayItem1 := arrayOfArraysOfArrayItem1 + if arrayOfArraysOfArrayItem1 != nil { + arrayOfArraysOfArrayList2 := make([]Foo, len(arrayOfArraysOfArrayItem1)) + for arrayOfArraysOfArrayIndex2, arrayOfArraysOfArrayItem2 := range arrayOfArraysOfArrayItem1 { + // Shadow the loop variable to avoid aliasing + arrayOfArraysOfArrayItem2 := arrayOfArraysOfArrayItem2 + var arrayOfArraysOfArray Foo + err := arrayOfArraysOfArray.AssignProperties_From_Foo(&arrayOfArraysOfArrayItem2) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field ArrayOfArraysOfArrays") + } + arrayOfArraysOfArrayList2[arrayOfArraysOfArrayIndex2] = arrayOfArraysOfArray + } + arrayOfArraysOfArrayList1[arrayOfArraysOfArrayIndex1] = arrayOfArraysOfArrayList2 + } else { + arrayOfArraysOfArrayList1[arrayOfArraysOfArrayIndex1] = nil + } + } + arrayOfArraysOfArrayList[arrayOfArraysOfArrayIndex] = arrayOfArraysOfArrayList1 + } else { + arrayOfArraysOfArrayList[arrayOfArraysOfArrayIndex] = nil + } + } + resource.ArrayOfArraysOfArrays = arrayOfArraysOfArrayList + } else { + resource.ArrayOfArraysOfArrays = nil + } + + // ArrayOfEnums + if source.ArrayOfEnums != nil { + arrayOfEnumList := make([]Color, len(source.ArrayOfEnums)) + for arrayOfEnumIndex, arrayOfEnumItem := range source.ArrayOfEnums { + // Shadow the loop variable to avoid aliasing + arrayOfEnumItem := arrayOfEnumItem + arrayOfEnumList[arrayOfEnumIndex] = Color(arrayOfEnumItem) + } + resource.ArrayOfEnums = arrayOfEnumList + } else { + resource.ArrayOfEnums = nil + } + + // ArrayOfMaps + if source.ArrayOfMaps != nil { + arrayOfMapList := make([]map[string]Foo, len(source.ArrayOfMaps)) + for arrayOfMapIndex, arrayOfMapItem := range source.ArrayOfMaps { + // Shadow the loop variable to avoid aliasing + arrayOfMapItem := arrayOfMapItem + if arrayOfMapItem != nil { + arrayOfMap := make(map[string]Foo, len(arrayOfMapItem)) + for arrayOfMapKey, arrayOfMapValue := range arrayOfMapItem { + // Shadow the loop variable to avoid aliasing + arrayOfMapValue := arrayOfMapValue + var arrayOfMapLocal Foo + err := arrayOfMapLocal.AssignProperties_From_Foo(&arrayOfMapValue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field ArrayOfMaps") + } + arrayOfMap[arrayOfMapKey] = arrayOfMapLocal + } + arrayOfMapList[arrayOfMapIndex] = arrayOfMap + } else { + arrayOfMapList[arrayOfMapIndex] = nil + } + } + resource.ArrayOfMaps = arrayOfMapList + } else { + resource.ArrayOfMaps = nil + } + + // AzureName + resource.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // ArrayFoo + if resource.ArrayFoo != nil { + arrayFooList := make([]v20200101s.Foo, len(resource.ArrayFoo)) + for arrayFooIndex, arrayFooItem := range resource.ArrayFoo { + // Shadow the loop variable to avoid aliasing + arrayFooItem := arrayFooItem + var arrayFoo v20200101s.Foo + err := arrayFooItem.AssignProperties_To_Foo(&arrayFoo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field ArrayFoo") + } + arrayFooList[arrayFooIndex] = arrayFoo + } + destination.ArrayFoo = arrayFooList + } else { + destination.ArrayFoo = nil + } + + // ArrayOfArrays + if resource.ArrayOfArrays != nil { + arrayOfArrayList := make([][]v20200101s.Foo, len(resource.ArrayOfArrays)) + for arrayOfArrayIndex, arrayOfArrayItem := range resource.ArrayOfArrays { + // Shadow the loop variable to avoid aliasing + arrayOfArrayItem := arrayOfArrayItem + if arrayOfArrayItem != nil { + arrayOfArrayList1 := make([]v20200101s.Foo, len(arrayOfArrayItem)) + for arrayOfArrayIndex1, arrayOfArrayItem1 := range arrayOfArrayItem { + // Shadow the loop variable to avoid aliasing + arrayOfArrayItem1 := arrayOfArrayItem1 + var arrayOfArray v20200101s.Foo + err := arrayOfArrayItem1.AssignProperties_To_Foo(&arrayOfArray) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field ArrayOfArrays") + } + arrayOfArrayList1[arrayOfArrayIndex1] = arrayOfArray + } + arrayOfArrayList[arrayOfArrayIndex] = arrayOfArrayList1 + } else { + arrayOfArrayList[arrayOfArrayIndex] = nil + } + } + destination.ArrayOfArrays = arrayOfArrayList + } else { + destination.ArrayOfArrays = nil + } + + // ArrayOfArraysOfArrays + if resource.ArrayOfArraysOfArrays != nil { + arrayOfArraysOfArrayList := make([][][]v20200101s.Foo, len(resource.ArrayOfArraysOfArrays)) + for arrayOfArraysOfArrayIndex, arrayOfArraysOfArrayItem := range resource.ArrayOfArraysOfArrays { + // Shadow the loop variable to avoid aliasing + arrayOfArraysOfArrayItem := arrayOfArraysOfArrayItem + if arrayOfArraysOfArrayItem != nil { + arrayOfArraysOfArrayList1 := make([][]v20200101s.Foo, len(arrayOfArraysOfArrayItem)) + for arrayOfArraysOfArrayIndex1, arrayOfArraysOfArrayItem1 := range arrayOfArraysOfArrayItem { + // Shadow the loop variable to avoid aliasing + arrayOfArraysOfArrayItem1 := arrayOfArraysOfArrayItem1 + if arrayOfArraysOfArrayItem1 != nil { + arrayOfArraysOfArrayList2 := make([]v20200101s.Foo, len(arrayOfArraysOfArrayItem1)) + for arrayOfArraysOfArrayIndex2, arrayOfArraysOfArrayItem2 := range arrayOfArraysOfArrayItem1 { + // Shadow the loop variable to avoid aliasing + arrayOfArraysOfArrayItem2 := arrayOfArraysOfArrayItem2 + var arrayOfArraysOfArray v20200101s.Foo + err := arrayOfArraysOfArrayItem2.AssignProperties_To_Foo(&arrayOfArraysOfArray) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field ArrayOfArraysOfArrays") + } + arrayOfArraysOfArrayList2[arrayOfArraysOfArrayIndex2] = arrayOfArraysOfArray + } + arrayOfArraysOfArrayList1[arrayOfArraysOfArrayIndex1] = arrayOfArraysOfArrayList2 + } else { + arrayOfArraysOfArrayList1[arrayOfArraysOfArrayIndex1] = nil + } + } + arrayOfArraysOfArrayList[arrayOfArraysOfArrayIndex] = arrayOfArraysOfArrayList1 + } else { + arrayOfArraysOfArrayList[arrayOfArraysOfArrayIndex] = nil + } + } + destination.ArrayOfArraysOfArrays = arrayOfArraysOfArrayList + } else { + destination.ArrayOfArraysOfArrays = nil + } + + // ArrayOfEnums + if resource.ArrayOfEnums != nil { + arrayOfEnumList := make([]string, len(resource.ArrayOfEnums)) + for arrayOfEnumIndex, arrayOfEnumItem := range resource.ArrayOfEnums { + // Shadow the loop variable to avoid aliasing + arrayOfEnumItem := arrayOfEnumItem + arrayOfEnumList[arrayOfEnumIndex] = string(arrayOfEnumItem) + } + destination.ArrayOfEnums = arrayOfEnumList + } else { + destination.ArrayOfEnums = nil + } + + // ArrayOfMaps + if resource.ArrayOfMaps != nil { + arrayOfMapList := make([]map[string]v20200101s.Foo, len(resource.ArrayOfMaps)) + for arrayOfMapIndex, arrayOfMapItem := range resource.ArrayOfMaps { + // Shadow the loop variable to avoid aliasing + arrayOfMapItem := arrayOfMapItem + if arrayOfMapItem != nil { + arrayOfMap := make(map[string]v20200101s.Foo, len(arrayOfMapItem)) + for arrayOfMapKey, arrayOfMapValue := range arrayOfMapItem { + // Shadow the loop variable to avoid aliasing + arrayOfMapValue := arrayOfMapValue + var arrayOfMapLocal v20200101s.Foo + err := arrayOfMapValue.AssignProperties_To_Foo(&arrayOfMapLocal) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field ArrayOfMaps") + } + arrayOfMap[arrayOfMapKey] = arrayOfMapLocal + } + arrayOfMapList[arrayOfMapIndex] = arrayOfMap + } else { + arrayOfMapList[arrayOfMapIndex] = nil + } + } + destination.ArrayOfMaps = arrayOfMapList + } else { + destination.ArrayOfMaps = nil + } + + // AzureName + destination.AzureName = resource.AzureName + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Color +// +kubebuilder:validation:Enum={"blue","green","red"} +type Color string + +const ( + Color_Blue = Color("blue") + Color_Green = Color("green") + Color_Red = Color("red") +) + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo +type Foo struct { + Name *string `json:"name,omitempty"` +} + +var _ genruntime.ARMTransformer = &Foo{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (foo *Foo) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if foo == nil { + return nil, nil + } + result := &Foo{} + + // Set property "Name": + if foo.Name != nil { + name := *foo.Name + result.Name = &name + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (foo *Foo) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.Foo{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (foo *Foo) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Foo) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Foo, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + foo.Name = &name + } + + // No error + return nil +} + +// AssignProperties_From_Foo populates our Foo from the provided source Foo +func (foo *Foo) AssignProperties_From_Foo(source *v20200101s.Foo) error { + + // Name + foo.Name = genruntime.ClonePointerToString(source.Name) + + // No error + return nil +} + +// AssignProperties_To_Foo populates the provided destination Foo from our Foo +func (foo *Foo) AssignProperties_To_Foo(destination *v20200101s.Foo) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(foo.Name) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_crossplane.golden index ce23fa69cd0..4a6a580f799 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_array_properties_crossplane.golden @@ -69,16 +69,33 @@ const ( Color_Red = Color("red") ) +// Mapping from string to Color +var color_Values = map[string]Color{ + "blue": Color_Blue, + "green": Color_Green, + "red": Color_Red, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo type Foo struct { Name *string `json:"name,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure.golden index 23e3294d8c8..0128efd23bc 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure.golden @@ -302,6 +302,11 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"blue","green","red"} type FakeResource_Color_Spec string @@ -311,6 +316,13 @@ const ( FakeResource_Color_Spec_Red = FakeResource_Color_Spec("red") ) +// Mapping from string to FakeResource_Color_Spec +var fakeResource_Color_Spec_Values = map[string]FakeResource_Color_Spec{ + "blue": FakeResource_Color_Spec_Blue, + "green": FakeResource_Color_Spec_Green, + "red": FakeResource_Color_Spec_Red, +} + type FakeResource_Spec struct { // +kubebuilder:validation:Required APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -497,7 +509,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -507,8 +520,9 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Color if source.Color != nil { - color := FakeResource_Color_Spec(*source.Color) - resource.Color = &color + color := *source.Color + colorTemp := genruntime.ToEnum(color, fakeResource_Color_Spec_Values) + resource.Color = &colorTemp } else { resource.Color = nil } @@ -547,7 +561,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -639,6 +654,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo type Foo_ARM struct { Name *string `json:"name,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure_arm.golden new file mode 100644 index 00000000000..be4df33dd48 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure_arm.golden @@ -0,0 +1,44 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type FakeResource_Spec struct { + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + Color *v20200101.FakeResource_Color_Spec `json:"color,omitempty"` + + // Foo: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo + Foo *Foo `json:"foo,omitempty"` + Name string `json:"name,omitempty"` + + // OptionalFoo: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo + OptionalFoo *Foo `json:"optionalFoo,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo +type Foo struct { + Name *string `json:"name,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure_v1api20200101.golden new file mode 100644 index 00000000000..c79bc1476ca --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_azure_v1api20200101.golden @@ -0,0 +1,688 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + Color *FakeResource_Color_Spec `json:"color,omitempty"` + + // +kubebuilder:validation:Required + // Foo: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo + Foo *Foo `json:"foo,omitempty"` + + // OptionalFoo: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo + OptionalFoo *Foo `json:"optionalFoo,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "Color": + if resource.Color != nil { + color := *resource.Color + result.Color = &color + } + + // Set property "Foo": + if resource.Foo != nil { + foo_ARM, err := (*resource.Foo).ConvertToARM(resolved) + if err != nil { + return nil, err + } + foo := *foo_ARM.(*v20200101a.Foo) + result.Foo = &foo + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "OptionalFoo": + if resource.OptionalFoo != nil { + optionalFoo_ARM, err := (*resource.OptionalFoo).ConvertToARM(resolved) + if err != nil { + return nil, err + } + optionalFoo := *optionalFoo_ARM.(*v20200101a.Foo) + result.OptionalFoo = &optionalFoo + } + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Color": + if typedInput.Color != nil { + color := *typedInput.Color + resource.Color = &color + } + + // Set property "Foo": + if typedInput.Foo != nil { + var foo1 Foo + err := foo1.PopulateFromARM(owner, *typedInput.Foo) + if err != nil { + return err + } + foo := foo1 + resource.Foo = &foo + } + + // Set property "OptionalFoo": + if typedInput.OptionalFoo != nil { + var optionalFoo1 Foo + err := optionalFoo1.PopulateFromARM(owner, *typedInput.OptionalFoo) + if err != nil { + return err + } + optionalFoo := optionalFoo1 + resource.OptionalFoo = &optionalFoo + } + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + resource.AzureName = source.AzureName + + // Color + if source.Color != nil { + color := FakeResource_Color_Spec(*source.Color) + resource.Color = &color + } else { + resource.Color = nil + } + + // Foo + if source.Foo != nil { + var foo Foo + err := foo.AssignProperties_From_Foo(source.Foo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field Foo") + } + resource.Foo = &foo + } else { + resource.Foo = nil + } + + // OptionalFoo + if source.OptionalFoo != nil { + var optionalFoo Foo + err := optionalFoo.AssignProperties_From_Foo(source.OptionalFoo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field OptionalFoo") + } + resource.OptionalFoo = &optionalFoo + } else { + resource.OptionalFoo = nil + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = resource.AzureName + + // Color + if resource.Color != nil { + color := string(*resource.Color) + destination.Color = &color + } else { + destination.Color = nil + } + + // Foo + if resource.Foo != nil { + var foo v20200101s.Foo + err := resource.Foo.AssignProperties_To_Foo(&foo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field Foo") + } + destination.Foo = &foo + } else { + destination.Foo = nil + } + + // OptionalFoo + if resource.OptionalFoo != nil { + var optionalFoo v20200101s.Foo + err := resource.OptionalFoo.AssignProperties_To_Foo(&optionalFoo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field OptionalFoo") + } + destination.OptionalFoo = &optionalFoo + } else { + destination.OptionalFoo = nil + } + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"blue","green","red"} +type FakeResource_Color_Spec string + +const ( + FakeResource_Color_Spec_Blue = FakeResource_Color_Spec("blue") + FakeResource_Color_Spec_Green = FakeResource_Color_Spec("green") + FakeResource_Color_Spec_Red = FakeResource_Color_Spec("red") +) + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo +type Foo struct { + Name *string `json:"name,omitempty"` +} + +var _ genruntime.ARMTransformer = &Foo{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (foo *Foo) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if foo == nil { + return nil, nil + } + result := &Foo{} + + // Set property "Name": + if foo.Name != nil { + name := *foo.Name + result.Name = &name + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (foo *Foo) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.Foo{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (foo *Foo) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Foo) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Foo, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + foo.Name = &name + } + + // No error + return nil +} + +// AssignProperties_From_Foo populates our Foo from the provided source Foo +func (foo *Foo) AssignProperties_From_Foo(source *v20200101s.Foo) error { + + // Name + foo.Name = genruntime.ClonePointerToString(source.Name) + + // No error + return nil +} + +// AssignProperties_To_Foo populates the provided destination Foo from our Foo +func (foo *Foo) AssignProperties_To_Foo(destination *v20200101s.Foo) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(foo.Name) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_crossplane.golden index ace66cb08d9..27684103ce6 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_complex_properties_crossplane.golden @@ -65,6 +65,11 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"blue","green","red"} type FakeResource_Color_Spec string @@ -74,11 +79,23 @@ const ( FakeResource_Color_Spec_Red = FakeResource_Color_Spec("red") ) +// Mapping from string to FakeResource_Color_Spec +var fakeResource_Color_Spec_Values = map[string]FakeResource_Color_Spec{ + "blue": FakeResource_Color_Spec_Blue, + "green": FakeResource_Color_Spec_Green, + "red": FakeResource_Color_Spec_Red, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo type Foo struct { Name *string `json:"name,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure.golden index bc797902e9e..e8de287991b 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure.golden @@ -299,6 +299,11 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + type FakeResource_Spec struct { // +kubebuilder:validation:Required APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -470,7 +475,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -517,7 +523,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -606,6 +613,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + func init() { SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure_arm.golden new file mode 100644 index 00000000000..f0854c30657 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure_arm.golden @@ -0,0 +1,36 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" +) + +type FakeResource_Spec struct { + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + JsonObject map[string]v1.JSON `json:"jsonObject,omitempty"` + MandatoryJson *v1.JSON `json:"mandatoryJson,omitempty"` + Name string `json:"name,omitempty"` + OptionalJson *v1.JSON `json:"optionalJson,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure_v1api20200101.golden new file mode 100644 index 00000000000..03b5ee4412e --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_azure_v1api20200101.golden @@ -0,0 +1,586 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + JsonObject map[string]v1.JSON `json:"jsonObject,omitempty"` + + // +kubebuilder:validation:Required + MandatoryJson *v1.JSON `json:"mandatoryJson,omitempty"` + OptionalJson *v1.JSON `json:"optionalJson,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "JsonObject": + if resource.JsonObject != nil { + result.JsonObject = make(map[string]v1.JSON, len(resource.JsonObject)) + for key, value := range resource.JsonObject { + result.JsonObject[key] = *value.DeepCopy() + } + } + + // Set property "MandatoryJson": + if resource.MandatoryJson != nil { + mandatoryJson := *(*resource.MandatoryJson).DeepCopy() + result.MandatoryJson = &mandatoryJson + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "OptionalJson": + if resource.OptionalJson != nil { + optionalJson := *(*resource.OptionalJson).DeepCopy() + result.OptionalJson = &optionalJson + } + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "JsonObject": + if typedInput.JsonObject != nil { + resource.JsonObject = make(map[string]v1.JSON, len(typedInput.JsonObject)) + for key, value := range typedInput.JsonObject { + resource.JsonObject[key] = *value.DeepCopy() + } + } + + // Set property "MandatoryJson": + if typedInput.MandatoryJson != nil { + mandatoryJson := *(*typedInput.MandatoryJson).DeepCopy() + resource.MandatoryJson = &mandatoryJson + } + + // Set property "OptionalJson": + if typedInput.OptionalJson != nil { + optionalJson := *(*typedInput.OptionalJson).DeepCopy() + resource.OptionalJson = &optionalJson + } + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + resource.AzureName = source.AzureName + + // JsonObject + if source.JsonObject != nil { + jsonObjectMap := make(map[string]v1.JSON, len(source.JsonObject)) + for jsonObjectKey, jsonObjectValue := range source.JsonObject { + // Shadow the loop variable to avoid aliasing + jsonObjectValue := jsonObjectValue + jsonObjectMap[jsonObjectKey] = *jsonObjectValue.DeepCopy() + } + resource.JsonObject = jsonObjectMap + } else { + resource.JsonObject = nil + } + + // MandatoryJson + if source.MandatoryJson != nil { + mandatoryJson := *source.MandatoryJson.DeepCopy() + resource.MandatoryJson = &mandatoryJson + } else { + resource.MandatoryJson = nil + } + + // OptionalJson + if source.OptionalJson != nil { + optionalJson := *source.OptionalJson.DeepCopy() + resource.OptionalJson = &optionalJson + } else { + resource.OptionalJson = nil + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = resource.AzureName + + // JsonObject + if resource.JsonObject != nil { + jsonObjectMap := make(map[string]v1.JSON, len(resource.JsonObject)) + for jsonObjectKey, jsonObjectValue := range resource.JsonObject { + // Shadow the loop variable to avoid aliasing + jsonObjectValue := jsonObjectValue + jsonObjectMap[jsonObjectKey] = *jsonObjectValue.DeepCopy() + } + destination.JsonObject = jsonObjectMap + } else { + destination.JsonObject = nil + } + + // MandatoryJson + if resource.MandatoryJson != nil { + mandatoryJson := *resource.MandatoryJson.DeepCopy() + destination.MandatoryJson = &mandatoryJson + } else { + destination.MandatoryJson = nil + } + + // OptionalJson + if resource.OptionalJson != nil { + optionalJson := *resource.OptionalJson.DeepCopy() + destination.OptionalJson = &optionalJson + } else { + destination.OptionalJson = nil + } + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_crossplane.golden index af06303a660..b134efda55d 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_json_fields_crossplane.golden @@ -65,11 +65,21 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + func init() { SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure.golden index 15255e66317..b03316368c3 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure.golden @@ -307,11 +307,23 @@ const ( Color_Red = Color("red") ) +// Mapping from string to Color +var color_Values = map[string]Color{ + "blue": Color_Blue, + "green": Color_Green, + "red": Color_Red, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + type FakeResource_Spec struct { // +kubebuilder:validation:Required APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -661,7 +673,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -721,7 +734,7 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc for mapOfEnumKey, mapOfEnumValue := range source.MapOfEnums { // Shadow the loop variable to avoid aliasing mapOfEnumValue := mapOfEnumValue - mapOfEnumMap[mapOfEnumKey] = Color(mapOfEnumValue) + mapOfEnumMap[mapOfEnumKey] = genruntime.ToEnum(mapOfEnumValue, color_Values) } resource.MapOfEnums = mapOfEnumMap } else { @@ -830,7 +843,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -1041,6 +1055,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo type Foo_ARM struct { FooName *string `json:"fooName,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure_arm.golden new file mode 100644 index 00000000000..04c69ca2988 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure_arm.golden @@ -0,0 +1,44 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type FakeResource_Spec struct { + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + MapFoo map[string]Foo `json:"mapFoo,omitempty"` + MapOfArrays map[string][]Foo `json:"mapOfArrays,omitempty"` + MapOfEnums map[string]v20200101.Color `json:"mapOfEnums,omitempty"` + MapOfMaps map[string]map[string]Foo `json:"mapOfMaps,omitempty"` + MapOfMapsOfMaps map[string]map[string]map[string]Foo `json:"mapOfMapsOfMaps,omitempty"` + MapOfMapsOfMapsOfStrings map[string]map[string]map[string]string `json:"mapOfMapsOfMapsOfStrings,omitempty"` + MapOfStrings map[string]string `json:"mapOfStrings,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo +type Foo struct { + FooName *string `json:"fooName,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure_v1api20200101.golden new file mode 100644 index 00000000000..671ba6380e4 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_azure_v1api20200101.golden @@ -0,0 +1,1090 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + MapFoo map[string]Foo `json:"mapFoo,omitempty"` + MapOfArrays map[string][]Foo `json:"mapOfArrays,omitempty"` + MapOfEnums map[string]Color `json:"mapOfEnums,omitempty"` + MapOfMaps map[string]map[string]Foo `json:"mapOfMaps,omitempty"` + MapOfMapsOfMaps map[string]map[string]map[string]Foo `json:"mapOfMapsOfMaps,omitempty"` + MapOfMapsOfMapsOfStrings map[string]map[string]map[string]string `json:"mapOfMapsOfMapsOfStrings,omitempty"` + MapOfStrings map[string]string `json:"mapOfStrings,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "MapFoo": + if resource.MapFoo != nil { + result.MapFoo = make(map[string]v20200101a.Foo, len(resource.MapFoo)) + for key, value := range resource.MapFoo { + value_ARM, err := value.ConvertToARM(resolved) + if err != nil { + return nil, err + } + result.MapFoo[key] = *value_ARM.(*v20200101a.Foo) + } + } + + // Set property "MapOfArrays": + if resource.MapOfArrays != nil { + result.MapOfArrays = make(map[string][]v20200101a.Foo, len(resource.MapOfArrays)) + for key, value := range resource.MapOfArrays { + var valueTemp []v20200101a.Foo + for _, item := range value { + item_ARM, err := item.ConvertToARM(resolved) + if err != nil { + return nil, err + } + valueTemp = append(valueTemp, *item_ARM.(*v20200101a.Foo)) + } + result.MapOfArrays[key] = valueTemp + } + } + + // Set property "MapOfEnums": + if resource.MapOfEnums != nil { + result.MapOfEnums = make(map[string]Color, len(resource.MapOfEnums)) + for key, value := range resource.MapOfEnums { + result.MapOfEnums[key] = value + } + } + + // Set property "MapOfMaps": + if resource.MapOfMaps != nil { + result.MapOfMaps = make(map[string]map[string]v20200101a.Foo, len(resource.MapOfMaps)) + for key, value := range resource.MapOfMaps { + if value != nil { + valueTemp := make(map[string]v20200101a.Foo, len(value)) + for valueKey, value1 := range value { + value1_ARM, err := value1.ConvertToARM(resolved) + if err != nil { + return nil, err + } + valueTemp[valueKey] = *value1_ARM.(*v20200101a.Foo) + } + result.MapOfMaps[key] = valueTemp + } + } + } + + // Set property "MapOfMapsOfMaps": + if resource.MapOfMapsOfMaps != nil { + result.MapOfMapsOfMaps = make(map[string]map[string]map[string]v20200101a.Foo, len(resource.MapOfMapsOfMaps)) + for key, value := range resource.MapOfMapsOfMaps { + if value != nil { + valueTemp := make(map[string]map[string]v20200101a.Foo, len(value)) + for valueKey, value1 := range value { + if value1 != nil { + value1Temp := make(map[string]v20200101a.Foo, len(value1)) + for valueKey1, value2 := range value1 { + value2_ARM, err := value2.ConvertToARM(resolved) + if err != nil { + return nil, err + } + value1Temp[valueKey1] = *value2_ARM.(*v20200101a.Foo) + } + valueTemp[valueKey] = value1Temp + } + } + result.MapOfMapsOfMaps[key] = valueTemp + } + } + } + + // Set property "MapOfMapsOfMapsOfStrings": + if resource.MapOfMapsOfMapsOfStrings != nil { + result.MapOfMapsOfMapsOfStrings = make(map[string]map[string]map[string]string, len(resource.MapOfMapsOfMapsOfStrings)) + for key, value := range resource.MapOfMapsOfMapsOfStrings { + if value != nil { + valueTemp := make(map[string]map[string]string, len(value)) + for valueKey, value1 := range value { + if value1 != nil { + value1Temp := make(map[string]string, len(value1)) + for valueKey1, value2 := range value1 { + value1Temp[valueKey1] = value2 + } + valueTemp[valueKey] = value1Temp + } + } + result.MapOfMapsOfMapsOfStrings[key] = valueTemp + } + } + } + + // Set property "MapOfStrings": + if resource.MapOfStrings != nil { + result.MapOfStrings = make(map[string]string, len(resource.MapOfStrings)) + for key, value := range resource.MapOfStrings { + result.MapOfStrings[key] = value + } + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "MapFoo": + if typedInput.MapFoo != nil { + resource.MapFoo = make(map[string]Foo, len(typedInput.MapFoo)) + for key, value := range typedInput.MapFoo { + var value1 Foo + err := value1.PopulateFromARM(owner, value) + if err != nil { + return err + } + resource.MapFoo[key] = value1 + } + } + + // Set property "MapOfArrays": + if typedInput.MapOfArrays != nil { + resource.MapOfArrays = make(map[string][]Foo, len(typedInput.MapOfArrays)) + for key, value := range typedInput.MapOfArrays { + var valueTemp []Foo + for _, item := range value { + var item1 Foo + err := item1.PopulateFromARM(owner, item) + if err != nil { + return err + } + valueTemp = append(valueTemp, item1) + } + resource.MapOfArrays[key] = valueTemp + } + } + + // Set property "MapOfEnums": + if typedInput.MapOfEnums != nil { + resource.MapOfEnums = make(map[string]Color, len(typedInput.MapOfEnums)) + for key, value := range typedInput.MapOfEnums { + resource.MapOfEnums[key] = value + } + } + + // Set property "MapOfMaps": + if typedInput.MapOfMaps != nil { + resource.MapOfMaps = make(map[string]map[string]Foo, len(typedInput.MapOfMaps)) + for key, value := range typedInput.MapOfMaps { + if value != nil { + valueTemp := make(map[string]Foo, len(value)) + for valueKey, value1 := range value { + var value2 Foo + err := value2.PopulateFromARM(owner, value1) + if err != nil { + return err + } + valueTemp[valueKey] = value2 + } + resource.MapOfMaps[key] = valueTemp + } + } + } + + // Set property "MapOfMapsOfMaps": + if typedInput.MapOfMapsOfMaps != nil { + resource.MapOfMapsOfMaps = make(map[string]map[string]map[string]Foo, len(typedInput.MapOfMapsOfMaps)) + for key, value := range typedInput.MapOfMapsOfMaps { + if value != nil { + valueTemp := make(map[string]map[string]Foo, len(value)) + for valueKey, value1 := range value { + if value1 != nil { + value1Temp := make(map[string]Foo, len(value1)) + for valueKey1, value2 := range value1 { + var value3 Foo + err := value3.PopulateFromARM(owner, value2) + if err != nil { + return err + } + value1Temp[valueKey1] = value3 + } + valueTemp[valueKey] = value1Temp + } + } + resource.MapOfMapsOfMaps[key] = valueTemp + } + } + } + + // Set property "MapOfMapsOfMapsOfStrings": + if typedInput.MapOfMapsOfMapsOfStrings != nil { + resource.MapOfMapsOfMapsOfStrings = make(map[string]map[string]map[string]string, len(typedInput.MapOfMapsOfMapsOfStrings)) + for key, value := range typedInput.MapOfMapsOfMapsOfStrings { + if value != nil { + valueTemp := make(map[string]map[string]string, len(value)) + for valueKey, value1 := range value { + if value1 != nil { + value1Temp := make(map[string]string, len(value1)) + for valueKey1, value2 := range value1 { + value1Temp[valueKey1] = value2 + } + valueTemp[valueKey] = value1Temp + } + } + resource.MapOfMapsOfMapsOfStrings[key] = valueTemp + } + } + } + + // Set property "MapOfStrings": + if typedInput.MapOfStrings != nil { + resource.MapOfStrings = make(map[string]string, len(typedInput.MapOfStrings)) + for key, value := range typedInput.MapOfStrings { + resource.MapOfStrings[key] = value + } + } + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + resource.AzureName = source.AzureName + + // MapFoo + if source.MapFoo != nil { + mapFooMap := make(map[string]Foo, len(source.MapFoo)) + for mapFooKey, mapFooValue := range source.MapFoo { + // Shadow the loop variable to avoid aliasing + mapFooValue := mapFooValue + var mapFoo Foo + err := mapFoo.AssignProperties_From_Foo(&mapFooValue) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field MapFoo") + } + mapFooMap[mapFooKey] = mapFoo + } + resource.MapFoo = mapFooMap + } else { + resource.MapFoo = nil + } + + // MapOfArrays + if source.MapOfArrays != nil { + mapOfArrayMap := make(map[string][]Foo, len(source.MapOfArrays)) + for mapOfArrayKey, mapOfArrayValue := range source.MapOfArrays { + // Shadow the loop variable to avoid aliasing + mapOfArrayValue := mapOfArrayValue + if mapOfArrayValue != nil { + mapOfArrayList := make([]Foo, len(mapOfArrayValue)) + for mapOfArrayIndex, mapOfArrayItem := range mapOfArrayValue { + // Shadow the loop variable to avoid aliasing + mapOfArrayItem := mapOfArrayItem + var mapOfArray Foo + err := mapOfArray.AssignProperties_From_Foo(&mapOfArrayItem) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field MapOfArrays") + } + mapOfArrayList[mapOfArrayIndex] = mapOfArray + } + mapOfArrayMap[mapOfArrayKey] = mapOfArrayList + } else { + mapOfArrayMap[mapOfArrayKey] = nil + } + } + resource.MapOfArrays = mapOfArrayMap + } else { + resource.MapOfArrays = nil + } + + // MapOfEnums + if source.MapOfEnums != nil { + mapOfEnumMap := make(map[string]Color, len(source.MapOfEnums)) + for mapOfEnumKey, mapOfEnumValue := range source.MapOfEnums { + // Shadow the loop variable to avoid aliasing + mapOfEnumValue := mapOfEnumValue + mapOfEnumMap[mapOfEnumKey] = Color(mapOfEnumValue) + } + resource.MapOfEnums = mapOfEnumMap + } else { + resource.MapOfEnums = nil + } + + // MapOfMaps + if source.MapOfMaps != nil { + mapOfMap := make(map[string]map[string]Foo, len(source.MapOfMaps)) + for mapOfMapKey, mapOfMapValue := range source.MapOfMaps { + // Shadow the loop variable to avoid aliasing + mapOfMapValue := mapOfMapValue + if mapOfMapValue != nil { + mapOfMap1 := make(map[string]Foo, len(mapOfMapValue)) + for mapOfMapKey1, mapOfMapValue1 := range mapOfMapValue { + // Shadow the loop variable to avoid aliasing + mapOfMapValue1 := mapOfMapValue1 + var mapOfMapLocal Foo + err := mapOfMapLocal.AssignProperties_From_Foo(&mapOfMapValue1) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field MapOfMaps") + } + mapOfMap1[mapOfMapKey1] = mapOfMapLocal + } + mapOfMap[mapOfMapKey] = mapOfMap1 + } else { + mapOfMap[mapOfMapKey] = nil + } + } + resource.MapOfMaps = mapOfMap + } else { + resource.MapOfMaps = nil + } + + // MapOfMapsOfMaps + if source.MapOfMapsOfMaps != nil { + mapOfMapsOfMap := make(map[string]map[string]map[string]Foo, len(source.MapOfMapsOfMaps)) + for mapOfMapsOfMapKey, mapOfMapsOfMapValue := range source.MapOfMapsOfMaps { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapValue := mapOfMapsOfMapValue + if mapOfMapsOfMapValue != nil { + mapOfMapsOfMap1 := make(map[string]map[string]Foo, len(mapOfMapsOfMapValue)) + for mapOfMapsOfMapKey1, mapOfMapsOfMapValue1 := range mapOfMapsOfMapValue { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapValue1 := mapOfMapsOfMapValue1 + if mapOfMapsOfMapValue1 != nil { + mapOfMapsOfMap2 := make(map[string]Foo, len(mapOfMapsOfMapValue1)) + for mapOfMapsOfMapKey2, mapOfMapsOfMapValue2 := range mapOfMapsOfMapValue1 { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapValue2 := mapOfMapsOfMapValue2 + var mapOfMapsOfMapLocal Foo + err := mapOfMapsOfMapLocal.AssignProperties_From_Foo(&mapOfMapsOfMapValue2) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field MapOfMapsOfMaps") + } + mapOfMapsOfMap2[mapOfMapsOfMapKey2] = mapOfMapsOfMapLocal + } + mapOfMapsOfMap1[mapOfMapsOfMapKey1] = mapOfMapsOfMap2 + } else { + mapOfMapsOfMap1[mapOfMapsOfMapKey1] = nil + } + } + mapOfMapsOfMap[mapOfMapsOfMapKey] = mapOfMapsOfMap1 + } else { + mapOfMapsOfMap[mapOfMapsOfMapKey] = nil + } + } + resource.MapOfMapsOfMaps = mapOfMapsOfMap + } else { + resource.MapOfMapsOfMaps = nil + } + + // MapOfMapsOfMapsOfStrings + if source.MapOfMapsOfMapsOfStrings != nil { + mapOfMapsOfMapsOfStringMap := make(map[string]map[string]map[string]string, len(source.MapOfMapsOfMapsOfStrings)) + for mapOfMapsOfMapsOfStringKey, mapOfMapsOfMapsOfStringValue := range source.MapOfMapsOfMapsOfStrings { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapsOfStringValue := mapOfMapsOfMapsOfStringValue + if mapOfMapsOfMapsOfStringValue != nil { + mapOfMapsOfMapsOfStringMap1 := make(map[string]map[string]string, len(mapOfMapsOfMapsOfStringValue)) + for mapOfMapsOfMapsOfStringKey1, mapOfMapsOfMapsOfStringValue1 := range mapOfMapsOfMapsOfStringValue { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapsOfStringValue1 := mapOfMapsOfMapsOfStringValue1 + mapOfMapsOfMapsOfStringMap1[mapOfMapsOfMapsOfStringKey1] = genruntime.CloneMapOfStringToString(mapOfMapsOfMapsOfStringValue1) + } + mapOfMapsOfMapsOfStringMap[mapOfMapsOfMapsOfStringKey] = mapOfMapsOfMapsOfStringMap1 + } else { + mapOfMapsOfMapsOfStringMap[mapOfMapsOfMapsOfStringKey] = nil + } + } + resource.MapOfMapsOfMapsOfStrings = mapOfMapsOfMapsOfStringMap + } else { + resource.MapOfMapsOfMapsOfStrings = nil + } + + // MapOfStrings + resource.MapOfStrings = genruntime.CloneMapOfStringToString(source.MapOfStrings) + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = resource.AzureName + + // MapFoo + if resource.MapFoo != nil { + mapFooMap := make(map[string]v20200101s.Foo, len(resource.MapFoo)) + for mapFooKey, mapFooValue := range resource.MapFoo { + // Shadow the loop variable to avoid aliasing + mapFooValue := mapFooValue + var mapFoo v20200101s.Foo + err := mapFooValue.AssignProperties_To_Foo(&mapFoo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field MapFoo") + } + mapFooMap[mapFooKey] = mapFoo + } + destination.MapFoo = mapFooMap + } else { + destination.MapFoo = nil + } + + // MapOfArrays + if resource.MapOfArrays != nil { + mapOfArrayMap := make(map[string][]v20200101s.Foo, len(resource.MapOfArrays)) + for mapOfArrayKey, mapOfArrayValue := range resource.MapOfArrays { + // Shadow the loop variable to avoid aliasing + mapOfArrayValue := mapOfArrayValue + if mapOfArrayValue != nil { + mapOfArrayList := make([]v20200101s.Foo, len(mapOfArrayValue)) + for mapOfArrayIndex, mapOfArrayItem := range mapOfArrayValue { + // Shadow the loop variable to avoid aliasing + mapOfArrayItem := mapOfArrayItem + var mapOfArray v20200101s.Foo + err := mapOfArrayItem.AssignProperties_To_Foo(&mapOfArray) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field MapOfArrays") + } + mapOfArrayList[mapOfArrayIndex] = mapOfArray + } + mapOfArrayMap[mapOfArrayKey] = mapOfArrayList + } else { + mapOfArrayMap[mapOfArrayKey] = nil + } + } + destination.MapOfArrays = mapOfArrayMap + } else { + destination.MapOfArrays = nil + } + + // MapOfEnums + if resource.MapOfEnums != nil { + mapOfEnumMap := make(map[string]string, len(resource.MapOfEnums)) + for mapOfEnumKey, mapOfEnumValue := range resource.MapOfEnums { + // Shadow the loop variable to avoid aliasing + mapOfEnumValue := mapOfEnumValue + mapOfEnumMap[mapOfEnumKey] = string(mapOfEnumValue) + } + destination.MapOfEnums = mapOfEnumMap + } else { + destination.MapOfEnums = nil + } + + // MapOfMaps + if resource.MapOfMaps != nil { + mapOfMap := make(map[string]map[string]v20200101s.Foo, len(resource.MapOfMaps)) + for mapOfMapKey, mapOfMapValue := range resource.MapOfMaps { + // Shadow the loop variable to avoid aliasing + mapOfMapValue := mapOfMapValue + if mapOfMapValue != nil { + mapOfMap1 := make(map[string]v20200101s.Foo, len(mapOfMapValue)) + for mapOfMapKey1, mapOfMapValue1 := range mapOfMapValue { + // Shadow the loop variable to avoid aliasing + mapOfMapValue1 := mapOfMapValue1 + var mapOfMapLocal v20200101s.Foo + err := mapOfMapValue1.AssignProperties_To_Foo(&mapOfMapLocal) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field MapOfMaps") + } + mapOfMap1[mapOfMapKey1] = mapOfMapLocal + } + mapOfMap[mapOfMapKey] = mapOfMap1 + } else { + mapOfMap[mapOfMapKey] = nil + } + } + destination.MapOfMaps = mapOfMap + } else { + destination.MapOfMaps = nil + } + + // MapOfMapsOfMaps + if resource.MapOfMapsOfMaps != nil { + mapOfMapsOfMap := make(map[string]map[string]map[string]v20200101s.Foo, len(resource.MapOfMapsOfMaps)) + for mapOfMapsOfMapKey, mapOfMapsOfMapValue := range resource.MapOfMapsOfMaps { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapValue := mapOfMapsOfMapValue + if mapOfMapsOfMapValue != nil { + mapOfMapsOfMap1 := make(map[string]map[string]v20200101s.Foo, len(mapOfMapsOfMapValue)) + for mapOfMapsOfMapKey1, mapOfMapsOfMapValue1 := range mapOfMapsOfMapValue { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapValue1 := mapOfMapsOfMapValue1 + if mapOfMapsOfMapValue1 != nil { + mapOfMapsOfMap2 := make(map[string]v20200101s.Foo, len(mapOfMapsOfMapValue1)) + for mapOfMapsOfMapKey2, mapOfMapsOfMapValue2 := range mapOfMapsOfMapValue1 { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapValue2 := mapOfMapsOfMapValue2 + var mapOfMapsOfMapLocal v20200101s.Foo + err := mapOfMapsOfMapValue2.AssignProperties_To_Foo(&mapOfMapsOfMapLocal) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field MapOfMapsOfMaps") + } + mapOfMapsOfMap2[mapOfMapsOfMapKey2] = mapOfMapsOfMapLocal + } + mapOfMapsOfMap1[mapOfMapsOfMapKey1] = mapOfMapsOfMap2 + } else { + mapOfMapsOfMap1[mapOfMapsOfMapKey1] = nil + } + } + mapOfMapsOfMap[mapOfMapsOfMapKey] = mapOfMapsOfMap1 + } else { + mapOfMapsOfMap[mapOfMapsOfMapKey] = nil + } + } + destination.MapOfMapsOfMaps = mapOfMapsOfMap + } else { + destination.MapOfMapsOfMaps = nil + } + + // MapOfMapsOfMapsOfStrings + if resource.MapOfMapsOfMapsOfStrings != nil { + mapOfMapsOfMapsOfStringMap := make(map[string]map[string]map[string]string, len(resource.MapOfMapsOfMapsOfStrings)) + for mapOfMapsOfMapsOfStringKey, mapOfMapsOfMapsOfStringValue := range resource.MapOfMapsOfMapsOfStrings { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapsOfStringValue := mapOfMapsOfMapsOfStringValue + if mapOfMapsOfMapsOfStringValue != nil { + mapOfMapsOfMapsOfStringMap1 := make(map[string]map[string]string, len(mapOfMapsOfMapsOfStringValue)) + for mapOfMapsOfMapsOfStringKey1, mapOfMapsOfMapsOfStringValue1 := range mapOfMapsOfMapsOfStringValue { + // Shadow the loop variable to avoid aliasing + mapOfMapsOfMapsOfStringValue1 := mapOfMapsOfMapsOfStringValue1 + mapOfMapsOfMapsOfStringMap1[mapOfMapsOfMapsOfStringKey1] = genruntime.CloneMapOfStringToString(mapOfMapsOfMapsOfStringValue1) + } + mapOfMapsOfMapsOfStringMap[mapOfMapsOfMapsOfStringKey] = mapOfMapsOfMapsOfStringMap1 + } else { + mapOfMapsOfMapsOfStringMap[mapOfMapsOfMapsOfStringKey] = nil + } + } + destination.MapOfMapsOfMapsOfStrings = mapOfMapsOfMapsOfStringMap + } else { + destination.MapOfMapsOfMapsOfStrings = nil + } + + // MapOfStrings + destination.MapOfStrings = genruntime.CloneMapOfStringToString(resource.MapOfStrings) + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Color +// +kubebuilder:validation:Enum={"blue","green","red"} +type Color string + +const ( + Color_Blue = Color("blue") + Color_Green = Color("green") + Color_Red = Color("red") +) + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo +type Foo struct { + FooName *string `json:"fooName,omitempty"` +} + +var _ genruntime.ARMTransformer = &Foo{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (foo *Foo) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if foo == nil { + return nil, nil + } + result := &Foo{} + + // Set property "FooName": + if foo.FooName != nil { + fooName := *foo.FooName + result.FooName = &fooName + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (foo *Foo) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.Foo{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (foo *Foo) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Foo) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Foo, got %T", armInput) + } + + // Set property "FooName": + if typedInput.FooName != nil { + fooName := *typedInput.FooName + foo.FooName = &fooName + } + + // No error + return nil +} + +// AssignProperties_From_Foo populates our Foo from the provided source Foo +func (foo *Foo) AssignProperties_From_Foo(source *v20200101s.Foo) error { + + // FooName + foo.FooName = genruntime.ClonePointerToString(source.FooName) + + // No error + return nil +} + +// AssignProperties_To_Foo populates the provided destination Foo from our Foo +func (foo *Foo) AssignProperties_To_Foo(destination *v20200101s.Foo) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // FooName + destination.FooName = genruntime.ClonePointerToString(foo.FooName) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_crossplane.golden index bf495f9d114..b1dd10932e4 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_map_properties_crossplane.golden @@ -71,16 +71,33 @@ const ( Color_Red = Color("red") ) +// Mapping from string to Color +var color_Values = map[string]Color{ + "blue": Color_Blue, + "green": Color_Green, + "red": Color_Red, +} + // +kubebuilder:validation:Enum={"2020-06-01"} type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo type Foo struct { FooName *string `json:"fooName,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure.golden index 9beb82cef6d..4ab7c9f0a46 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure.golden @@ -295,6 +295,11 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + type FakeResource_Spec struct { // +kubebuilder:validation:Required APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -419,7 +424,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -437,7 +443,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -497,6 +504,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + func init() { SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure_arm.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure_arm.golden new file mode 100644 index 00000000000..75f4800d90b --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure_arm.golden @@ -0,0 +1,32 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type FakeResource_Spec struct { + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure_v1api20200101.golden new file mode 100644 index 00000000000..6acf7c3be26 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_azure_v1api20200101.golden @@ -0,0 +1,480 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + resource.AzureName = source.AzureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = resource.AzureName + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_crossplane.golden b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_crossplane.golden index f2a9a511ae0..df60e3a3c0d 100644 --- a/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_crossplane.golden +++ b/v2/tools/generator/internal/codegen/testdata/ArmResource/Arm_test_simple_resource_renders_spec_crossplane.golden @@ -57,11 +57,21 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + func init() { SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource.golden b/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource.golden index 982edf370f7..3d4cefff244 100644 --- a/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource.golden +++ b/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource.golden @@ -307,6 +307,11 @@ type FakeResource_APIVersion_Spec string const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") +// Mapping from string to FakeResource_APIVersion_Spec +var fakeResource_APIVersion_Spec_Values = map[string]FakeResource_APIVersion_Spec{ + "2020-06-01": FakeResource_APIVersion_Spec_20200601, +} + // +kubebuilder:validation:Enum={"blue","green","red"} type FakeResource_Color_Spec string @@ -316,6 +321,13 @@ const ( FakeResource_Color_Spec_Red = FakeResource_Color_Spec("red") ) +// Mapping from string to FakeResource_Color_Spec +var fakeResource_Color_Spec_Values = map[string]FakeResource_Color_Spec{ + "blue": FakeResource_Color_Spec_Blue, + "green": FakeResource_Color_Spec_Green, + "red": FakeResource_Color_Spec_Red, +} + type FakeResource_Spec struct { EmbeddedTestType `json:",inline,omitempty"` @@ -504,7 +516,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // APIVersion if source.APIVersion != nil { - resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, fakeResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -514,8 +527,9 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Color if source.Color != nil { - color := FakeResource_Color_Spec(*source.Color) - resource.Color = &color + color := *source.Color + colorTemp := genruntime.ToEnum(color, fakeResource_Color_Spec_Values) + resource.Color = &colorTemp } else { resource.Color = nil } @@ -554,7 +568,8 @@ func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(sourc // Type if source.Type != nil { - resource.Type = FakeResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, fakeResource_Type_Spec_Values) } else { resource.Type = "" } @@ -646,6 +661,11 @@ type FakeResource_Type_Spec string const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") +// Mapping from string to FakeResource_Type_Spec +var fakeResource_Type_Spec_Values = map[string]FakeResource_Type_Spec{ + "microsoft.azure/fakeresource": FakeResource_Type_Spec_MicrosoftAzureFakeResource, +} + // Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo type Foo_ARM struct { EmbeddedTestType_ARM `json:",inline,omitempty"` diff --git a/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource_arm.golden b/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource_arm.golden new file mode 100644 index 00000000000..9174afa5912 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource_arm.golden @@ -0,0 +1,50 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type FakeResource_Spec struct { + EmbeddedTestType `json:",inline,omitempty"` + APIVersion v20200101.FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + Color *v20200101.FakeResource_Color_Spec `json:"color,omitempty"` + + // Foo: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo + Foo *Foo `json:"foo,omitempty"` + Name string `json:"name,omitempty"` + + // OptionalFoo: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo + OptionalFoo *Foo `json:"optionalFoo,omitempty"` + Type v20200101.FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &FakeResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *FakeResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource_Spec) GetType() string { + return "" +} + +type EmbeddedTestType struct { + FancyProp int `json:"fancyProp,omitempty"` +} + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo +type Foo struct { + EmbeddedTestType `json:",inline,omitempty"` + Name *string `json:"name,omitempty"` +} diff --git a/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource_v1api20200101.golden new file mode 100644 index 00000000000..daee86c2c88 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/EmbeddedTypes/Embedded_type_simple_resource_v1api20200101.golden @@ -0,0 +1,758 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec FakeResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &FakeResource{} + +// GetConditions returns the conditions of the resource +func (resource *FakeResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *FakeResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &FakeResource{} + +// ConvertFrom populates our FakeResource from the provided hub FakeResource +func (resource *FakeResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_From_FakeResource(source) +} + +// ConvertTo populates the provided hub FakeResource from our FakeResource +func (resource *FakeResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.FakeResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/FakeResource but received %T instead", hub) + } + + return resource.AssignProperties_To_FakeResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-fakeresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &FakeResource{} + +// Default applies defaults to the FakeResource resource +func (resource *FakeResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *FakeResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the FakeResource resource +func (resource *FakeResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &FakeResource{} + +// AzureName returns the Azure name of the resource +func (resource *FakeResource) AzureName() string { + return resource.Spec.AzureName +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource FakeResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *FakeResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *FakeResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *FakeResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *FakeResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *FakeResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-fakeresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=fakeresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.fakeresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &FakeResource{} + +// ValidateCreate validates the creation of the resource +func (resource *FakeResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *FakeResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *FakeResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *FakeResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *FakeResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *FakeResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *FakeResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *FakeResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *FakeResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*FakeResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_FakeResource populates our FakeResource from the provided source FakeResource +func (resource *FakeResource) AssignProperties_From_FakeResource(source *v20200101s.FakeResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec FakeResource_Spec + err := spec.AssignProperties_From_FakeResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_FakeResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_FakeResource populates the provided destination FakeResource from our FakeResource +func (resource *FakeResource) AssignProperties_To_FakeResource(destination *v20200101s.FakeResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.FakeResource_Spec + err := resource.Spec.AssignProperties_To_FakeResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_FakeResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *FakeResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "FakeResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/FakeResource +type FakeResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FakeResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type FakeResource_Spec struct { + EmbeddedTestType `json:",inline,omitempty"` + + // +kubebuilder:validation:Required + APIVersion FakeResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName string `json:"azureName,omitempty"` + Color *FakeResource_Color_Spec `json:"color,omitempty"` + + // +kubebuilder:validation:Required + // Foo: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo + Foo *Foo `json:"foo,omitempty"` + + // OptionalFoo: Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo + OptionalFoo *Foo `json:"optionalFoo,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type FakeResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &FakeResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *FakeResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &FakeResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "Color": + if resource.Color != nil { + color := *resource.Color + result.Color = &color + } + + // Set property "Foo": + if resource.Foo != nil { + foo_ARM, err := (*resource.Foo).ConvertToARM(resolved) + if err != nil { + return nil, err + } + foo := *foo_ARM.(*v20200101a.Foo) + result.Foo = &foo + } + + // Set property "Name": + result.Name = resolved.Name + + // Set property "OptionalFoo": + if resource.OptionalFoo != nil { + optionalFoo_ARM, err := (*resource.OptionalFoo).ConvertToARM(resolved) + if err != nil { + return nil, err + } + optionalFoo := *optionalFoo_ARM.(*v20200101a.Foo) + result.OptionalFoo = &optionalFoo + } + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *FakeResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.FakeResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *FakeResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(FakeResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected FakeResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Color": + if typedInput.Color != nil { + color := *typedInput.Color + resource.Color = &color + } + + // Set property "Foo": + if typedInput.Foo != nil { + var foo1 Foo + err := foo1.PopulateFromARM(owner, *typedInput.Foo) + if err != nil { + return err + } + foo := foo1 + resource.Foo = &foo + } + + // Set property "OptionalFoo": + if typedInput.OptionalFoo != nil { + var optionalFoo1 Foo + err := optionalFoo1.PopulateFromARM(owner, *typedInput.OptionalFoo) + if err != nil { + return err + } + optionalFoo := optionalFoo1 + resource.OptionalFoo = &optionalFoo + } + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &FakeResource_Spec{} + +// ConvertSpecFrom populates our FakeResource_Spec from the provided source +func (resource *FakeResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.FakeResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_FakeResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.FakeResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_FakeResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our FakeResource_Spec +func (resource *FakeResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.FakeResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_FakeResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.FakeResource_Spec{} + err := resource.AssignProperties_To_FakeResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_FakeResource_Spec populates our FakeResource_Spec from the provided source FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_From_FakeResource_Spec(source *v20200101s.FakeResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = FakeResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + resource.AzureName = source.AzureName + + // Color + if source.Color != nil { + color := FakeResource_Color_Spec(*source.Color) + resource.Color = &color + } else { + resource.Color = nil + } + + // Foo + if source.Foo != nil { + var foo Foo + err := foo.AssignProperties_From_Foo(source.Foo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field Foo") + } + resource.Foo = &foo + } else { + resource.Foo = nil + } + + // OptionalFoo + if source.OptionalFoo != nil { + var optionalFoo Foo + err := optionalFoo.AssignProperties_From_Foo(source.OptionalFoo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_Foo() to populate field OptionalFoo") + } + resource.OptionalFoo = &optionalFoo + } else { + resource.OptionalFoo = nil + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = FakeResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_FakeResource_Spec populates the provided destination FakeResource_Spec from our FakeResource_Spec +func (resource *FakeResource_Spec) AssignProperties_To_FakeResource_Spec(destination *v20200101s.FakeResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + destination.AzureName = resource.AzureName + + // Color + if resource.Color != nil { + color := string(*resource.Color) + destination.Color = &color + } else { + destination.Color = nil + } + + // Foo + if resource.Foo != nil { + var foo v20200101s.Foo + err := resource.Foo.AssignProperties_To_Foo(&foo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field Foo") + } + destination.Foo = &foo + } else { + destination.Foo = nil + } + + // OptionalFoo + if resource.OptionalFoo != nil { + var optionalFoo v20200101s.Foo + err := resource.OptionalFoo.AssignProperties_To_Foo(&optionalFoo) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_Foo() to populate field OptionalFoo") + } + destination.OptionalFoo = &optionalFoo + } else { + destination.OptionalFoo = nil + } + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *FakeResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name of the resource +func (resource *FakeResource_Spec) SetAzureName(azureName string) { resource.AzureName = azureName } + +type EmbeddedTestType struct { + FancyProp int `json:"fancyProp,omitempty"` +} + +var _ genruntime.ARMTransformer = &EmbeddedTestType{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (testType *EmbeddedTestType) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if testType == nil { + return nil, nil + } + result := &EmbeddedTestType{} + + // Set property "FancyProp": + result.FancyProp = testType.FancyProp + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (testType *EmbeddedTestType) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.EmbeddedTestType{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (testType *EmbeddedTestType) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(EmbeddedTestType) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected EmbeddedTestType, got %T", armInput) + } + + // Set property "FancyProp": + testType.FancyProp = typedInput.FancyProp + + // No error + return nil +} + +// AssignProperties_From_EmbeddedTestType populates our EmbeddedTestType from the provided source EmbeddedTestType +func (testType *EmbeddedTestType) AssignProperties_From_EmbeddedTestType(source *v20200101s.EmbeddedTestType) error { + + // FancyProp + testType.FancyProp = genruntime.GetOptionalIntValue(source.FancyProp) + + // No error + return nil +} + +// AssignProperties_To_EmbeddedTestType populates the provided destination EmbeddedTestType from our EmbeddedTestType +func (testType *EmbeddedTestType) AssignProperties_To_EmbeddedTestType(destination *v20200101s.EmbeddedTestType) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // FancyProp + fancyProp := testType.FancyProp + destination.FancyProp = &fancyProp + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// +kubebuilder:validation:Enum={"2020-06-01"} +type FakeResource_APIVersion_Spec string + +const FakeResource_APIVersion_Spec_20200601 = FakeResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"blue","green","red"} +type FakeResource_Color_Spec string + +const ( + FakeResource_Color_Spec_Blue = FakeResource_Color_Spec("blue") + FakeResource_Color_Spec_Green = FakeResource_Color_Spec("green") + FakeResource_Color_Spec_Red = FakeResource_Color_Spec("red") +) + +// +kubebuilder:validation:Enum={"Microsoft.Azure/FakeResource"} +type FakeResource_Type_Spec string + +const FakeResource_Type_Spec_MicrosoftAzureFakeResource = FakeResource_Type_Spec("Microsoft.Azure/FakeResource") + +// Generated from: https://test.test/schemas/2020-01-01/test.json#/definitions/Foo +type Foo struct { + EmbeddedTestType `json:",inline,omitempty"` + Name *string `json:"name,omitempty"` +} + +var _ genruntime.ARMTransformer = &Foo{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (foo *Foo) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if foo == nil { + return nil, nil + } + result := &Foo{} + + // Set property "Name": + if foo.Name != nil { + name := *foo.Name + result.Name = &name + } + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (foo *Foo) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.Foo{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (foo *Foo) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(Foo) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected Foo, got %T", armInput) + } + + // Set property "Name": + if typedInput.Name != nil { + name := *typedInput.Name + foo.Name = &name + } + + // No error + return nil +} + +// AssignProperties_From_Foo populates our Foo from the provided source Foo +func (foo *Foo) AssignProperties_From_Foo(source *v20200101s.Foo) error { + + // Name + foo.Name = genruntime.ClonePointerToString(source.Name) + + // No error + return nil +} + +// AssignProperties_To_Foo populates the provided destination Foo from our Foo +func (foo *Foo) AssignProperties_To_Foo(destination *v20200101s.Foo) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Name + destination.Name = genruntime.ClonePointerToString(foo.Name) + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +func init() { + SchemeBuilder.Register(&FakeResource{}, &FakeResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/Enum/Enum_with_star_value.golden b/v2/tools/generator/internal/codegen/testdata/Enum/Enum_with_star_value.golden index 296c52db43b..846860cdd96 100644 --- a/v2/tools/generator/internal/codegen/testdata/Enum/Enum_with_star_value.golden +++ b/v2/tools/generator/internal/codegen/testdata/Enum/Enum_with_star_value.golden @@ -18,8 +18,9 @@ func (test *Test) AssignProperties_From_Test(source *v20200101s.Test) error { // MyEnum if source.MyEnum != nil { - myEnum := Test_MyEnum(*source.MyEnum) - test.MyEnum = &myEnum + myEnum := *source.MyEnum + myEnumTemp := genruntime.ToEnum(myEnum, test_MyEnum_Values) + test.MyEnum = &myEnumTemp } else { test.MyEnum = nil } @@ -60,3 +61,10 @@ const ( Test_MyEnum_B = Test_MyEnum("b") Test_MyEnum_Star = Test_MyEnum("*") ) + +// Mapping from string to Test_MyEnum +var test_MyEnum_Values = map[string]Test_MyEnum{ + "a": Test_MyEnum_A, + "b": Test_MyEnum_B, + "*": Test_MyEnum_Star, +} diff --git a/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name.golden b/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name.golden index 1d9af8344b6..d65733826eb 100644 --- a/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name.golden +++ b/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name.golden @@ -295,6 +295,11 @@ type AResource_APIVersion_Spec string const AResource_APIVersion_Spec_20200601 = AResource_APIVersion_Spec("2020-06-01") +// Mapping from string to AResource_APIVersion_Spec +var aResource_APIVersion_Spec_Values = map[string]AResource_APIVersion_Spec{ + "2020-06-01": AResource_APIVersion_Spec_20200601, +} + type AResource_Spec struct { // +kubebuilder:validation:Required APIVersion AResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -419,7 +424,8 @@ func (resource *AResource_Spec) AssignProperties_From_AResource_Spec(source *v20 // APIVersion if source.APIVersion != nil { - resource.APIVersion = AResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, aResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -438,7 +444,8 @@ func (resource *AResource_Spec) AssignProperties_From_AResource_Spec(source *v20 // Type if source.Type != nil { - resource.Type = AResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, aResource_Type_Spec_Values) } else { resource.Type = "" } @@ -501,6 +508,11 @@ type AResource_Type_Spec string const AResource_Type_Spec_MicrosoftAzureAResource = AResource_Type_Spec("Microsoft.Azure/AResource") +// Mapping from string to AResource_Type_Spec +var aResource_Type_Spec_Values = map[string]AResource_Type_Spec{ + "microsoft.azure/aresource": AResource_Type_Spec_MicrosoftAzureAResource, +} + // +kubebuilder:validation:Enum={"one","three","two"} type AResource_Name_Spec string @@ -510,6 +522,13 @@ const ( AResource_Name_Spec_Two = AResource_Name_Spec("two") ) +// Mapping from string to AResource_Name_Spec +var aResource_Name_Spec_Values = map[string]AResource_Name_Spec{ + "one": AResource_Name_Spec_One, + "three": AResource_Name_Spec_Three, + "two": AResource_Name_Spec_Two, +} + func init() { SchemeBuilder.Register(&AResource{}, &AResourceList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name_arm.golden b/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name_arm.golden new file mode 100644 index 00000000000..dccc3255883 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name_arm.golden @@ -0,0 +1,32 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type AResource_Spec struct { + APIVersion v20200101.AResource_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.AResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &AResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource AResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *AResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *AResource_Spec) GetType() string { + return "" +} diff --git a/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name_v1api20200101.golden new file mode 100644 index 00000000000..df6f29ff1ba --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/EnumNames/Multi_valued_enum_name_v1api20200101.golden @@ -0,0 +1,493 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/AResource +type AResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec AResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &AResource{} + +// GetConditions returns the conditions of the resource +func (resource *AResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *AResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &AResource{} + +// ConvertFrom populates our AResource from the provided hub AResource +func (resource *AResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.AResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/AResource but received %T instead", hub) + } + + return resource.AssignProperties_From_AResource(source) +} + +// ConvertTo populates the provided hub AResource from our AResource +func (resource *AResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.AResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/AResource but received %T instead", hub) + } + + return resource.AssignProperties_To_AResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-aresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=aresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.aresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &AResource{} + +// Default applies defaults to the AResource resource +func (resource *AResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultAzureName defaults the Azure name of the resource to the Kubernetes name +func (resource *AResource) defaultAzureName() { + if resource.Spec.AzureName == "" { + resource.Spec.AzureName = resource.Name + } +} + +// defaultImpl applies the code generated defaults to the AResource resource +func (resource *AResource) defaultImpl() { resource.defaultAzureName() } + +var _ genruntime.KubernetesResource = &AResource{} + +// AzureName returns the Azure name of the resource (string representation of github.com/Azure/azure-service-operator/testing/test/v1api20200101/AResource_Name_Spec) +func (resource *AResource) AzureName() string { + return string(resource.Spec.AzureName) +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource AResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *AResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *AResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *AResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *AResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *AResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-aresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=aresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.aresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &AResource{} + +// ValidateCreate validates the creation of the resource +func (resource *AResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *AResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *AResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *AResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *AResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *AResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *AResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *AResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *AResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*AResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_AResource populates our AResource from the provided source AResource +func (resource *AResource) AssignProperties_From_AResource(source *v20200101s.AResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec AResource_Spec + err := spec.AssignProperties_From_AResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_AResource populates the provided destination AResource from our AResource +func (resource *AResource) AssignProperties_To_AResource(destination *v20200101s.AResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.AResource_Spec + err := resource.Spec.AssignProperties_To_AResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *AResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "AResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/AResource +type AResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []AResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type AResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion AResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it + // doesn't have to be. + AzureName AResource_Name_Spec `json:"azureName,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type AResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &AResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *AResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &AResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *AResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.AResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *AResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(AResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "AzureName": + resource.SetAzureName(genruntime.ExtractKubernetesResourceNameFromARMName(typedInput.Name)) + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &AResource_Spec{} + +// ConvertSpecFrom populates our AResource_Spec from the provided source +func (resource *AResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.AResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_AResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.AResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_AResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our AResource_Spec +func (resource *AResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.AResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_AResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.AResource_Spec{} + err := resource.AssignProperties_To_AResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_AResource_Spec populates our AResource_Spec from the provided source AResource_Spec +func (resource *AResource_Spec) AssignProperties_From_AResource_Spec(source *v20200101s.AResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = AResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // AzureName + azureName := AResource_Name_Spec(source.AzureName) + resource.AzureName = azureName + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = AResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_AResource_Spec populates the provided destination AResource_Spec from our AResource_Spec +func (resource *AResource_Spec) AssignProperties_To_AResource_Spec(destination *v20200101s.AResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // AzureName + azureName := AResource_Name_Spec(resource.AzureName) + destination.AzureName = azureName + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *AResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// SetAzureName sets the Azure name from the given github.com/Azure/azure-service-operator/testing/test/v1api20200101/AResource_Name_Spec value +func (resource *AResource_Spec) SetAzureName(azureName string) { + resource.AzureName = AResource_Name_Spec(azureName) +} + +// +kubebuilder:validation:Enum={"2020-06-01"} +type AResource_APIVersion_Spec string + +const AResource_APIVersion_Spec_20200601 = AResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"one","three","two"} +type AResource_Name_Spec string + +const ( + AResource_Name_Spec_One = AResource_Name_Spec("one") + AResource_Name_Spec_Three = AResource_Name_Spec("three") + AResource_Name_Spec_Two = AResource_Name_Spec("two") +) + +// +kubebuilder:validation:Enum={"Microsoft.Azure/AResource"} +type AResource_Type_Spec string + +const AResource_Type_Spec_MicrosoftAzureAResource = AResource_Type_Spec("Microsoft.Azure/AResource") + +func init() { + SchemeBuilder.Register(&AResource{}, &AResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name.golden b/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name.golden index 9df69911184..702cf6c6e06 100644 --- a/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name.golden +++ b/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name.golden @@ -288,6 +288,11 @@ type AResource_APIVersion_Spec string const AResource_APIVersion_Spec_20200601 = AResource_APIVersion_Spec("2020-06-01") +// Mapping from string to AResource_APIVersion_Spec +var aResource_APIVersion_Spec_Values = map[string]AResource_APIVersion_Spec{ + "2020-06-01": AResource_APIVersion_Spec_20200601, +} + type AResource_Spec struct { // +kubebuilder:validation:Required APIVersion AResource_APIVersion_Spec `json:"apiVersion,omitempty"` @@ -405,7 +410,8 @@ func (resource *AResource_Spec) AssignProperties_From_AResource_Spec(source *v20 // APIVersion if source.APIVersion != nil { - resource.APIVersion = AResource_APIVersion_Spec(*source.APIVersion) + apiVersion := *source.APIVersion + resource.APIVersion = genruntime.ToEnum(apiVersion, aResource_APIVersion_Spec_Values) } else { resource.APIVersion = "" } @@ -420,7 +426,8 @@ func (resource *AResource_Spec) AssignProperties_From_AResource_Spec(source *v20 // Type if source.Type != nil { - resource.Type = AResource_Type_Spec(*source.Type) + typeVar := *source.Type + resource.Type = genruntime.ToEnum(typeVar, aResource_Type_Spec_Values) } else { resource.Type = "" } @@ -474,6 +481,11 @@ type AResource_Type_Spec string const AResource_Type_Spec_MicrosoftAzureAResource = AResource_Type_Spec("Microsoft.Azure/AResource") +// Mapping from string to AResource_Type_Spec +var aResource_Type_Spec_Values = map[string]AResource_Type_Spec{ + "microsoft.azure/aresource": AResource_Type_Spec_MicrosoftAzureAResource, +} + func init() { SchemeBuilder.Register(&AResource{}, &AResourceList{}) } diff --git a/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name_arm.golden b/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name_arm.golden new file mode 100644 index 00000000000..dccc3255883 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name_arm.golden @@ -0,0 +1,32 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package arm + +import ( + v20200101 "github.com/Azure/azure-service-operator/testing/test/v1api20200101" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) + +type AResource_Spec struct { + APIVersion v20200101.AResource_APIVersion_Spec `json:"apiVersion,omitempty"` + Name string `json:"name,omitempty"` + Type v20200101.AResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMResourceSpec = &AResource_Spec{} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource AResource_Spec) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetName returns the Name of the resource +func (resource *AResource_Spec) GetName() string { + return resource.Name +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *AResource_Spec) GetType() string { + return "" +} diff --git a/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name_v1api20200101.golden b/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name_v1api20200101.golden new file mode 100644 index 00000000000..74e1321d282 --- /dev/null +++ b/v2/tools/generator/internal/codegen/testdata/EnumNames/Single_valued_enum_name_v1api20200101.golden @@ -0,0 +1,457 @@ +// Code generated by azure-service-operator-codegen. DO NOT EDIT. +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package v1api20200101 + +import ( + "fmt" + v20200101a "github.com/Azure/azure-service-operator/testing/test/v1api20200101/arm" + v20200101s "github.com/Azure/azure-service-operator/testing/test/v1api20200101/storage" + "github.com/Azure/azure-service-operator/v2/internal/reflecthelpers" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions" + "github.com/pkg/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// +kubebuilder:object:root=true +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +// +kubebuilder:printcolumn:name="Severity",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].severity" +// +kubebuilder:printcolumn:name="Reason",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].reason" +// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/AResource +type AResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec AResource_Spec `json:"spec,omitempty"` +} + +var _ conditions.Conditioner = &AResource{} + +// GetConditions returns the conditions of the resource +func (resource *AResource) GetConditions() conditions.Conditions { + return resource.Status.Conditions +} + +// SetConditions sets the conditions on the resource status +func (resource *AResource) SetConditions(conditions conditions.Conditions) { + resource.Status.Conditions = conditions +} + +var _ conversion.Convertible = &AResource{} + +// ConvertFrom populates our AResource from the provided hub AResource +func (resource *AResource) ConvertFrom(hub conversion.Hub) error { + source, ok := hub.(*v20200101s.AResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/AResource but received %T instead", hub) + } + + return resource.AssignProperties_From_AResource(source) +} + +// ConvertTo populates the provided hub AResource from our AResource +func (resource *AResource) ConvertTo(hub conversion.Hub) error { + destination, ok := hub.(*v20200101s.AResource) + if !ok { + return fmt.Errorf("expected test/v1api20200101/storage/AResource but received %T instead", hub) + } + + return resource.AssignProperties_To_AResource(destination) +} + +// +kubebuilder:webhook:path=/mutate-test-azure-com-v1api20200101-aresource,mutating=true,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=aresources,verbs=create;update,versions=v1api20200101,name=default.v1api20200101.aresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Defaulter = &AResource{} + +// Default applies defaults to the AResource resource +func (resource *AResource) Default() { + resource.defaultImpl() + var temp any = resource + if runtimeDefaulter, ok := temp.(genruntime.Defaulter); ok { + runtimeDefaulter.CustomDefault() + } +} + +// defaultImpl applies the code generated defaults to the AResource resource +func (resource *AResource) defaultImpl() {} + +var _ genruntime.KubernetesResource = &AResource{} + +// AzureName returns the Azure name of the resource (always "onlyonevalue") +func (resource *AResource) AzureName() string { + return "onlyonevalue" +} + +// GetAPIVersion returns the ARM API version of the resource. This is always "2020-01-01" +func (resource AResource) GetAPIVersion() string { + return string(APIVersion_Value) +} + +// GetResourceScope returns the scope of the resource +func (resource *AResource) GetResourceScope() genruntime.ResourceScope { + return genruntime.ResourceScopeResourceGroup +} + +// GetSpec returns the specification of this resource +func (resource *AResource) GetSpec() genruntime.ConvertibleSpec { + return &resource.Spec +} + +// GetSupportedOperations returns the operations supported by the resource +func (resource *AResource) GetSupportedOperations() []genruntime.ResourceOperation { + return []genruntime.ResourceOperation{ + genruntime.ResourceOperationDelete, + genruntime.ResourceOperationGet, + genruntime.ResourceOperationPut, + } +} + +// GetType returns the ARM Type of the resource. This is always "" +func (resource *AResource) GetType() string { + return "" +} + +// Owner returns the ResourceReference of the owner +func (resource *AResource) Owner() *genruntime.ResourceReference { + group, kind := genruntime.LookupOwnerGroupKind(resource.Spec) + return resource.Spec.Owner.AsResourceReference(group, kind) +} + +// +kubebuilder:webhook:path=/validate-test-azure-com-v1api20200101-aresource,mutating=false,sideEffects=None,matchPolicy=Exact,failurePolicy=fail,groups=test.azure.com,resources=aresources,verbs=create;update,versions=v1api20200101,name=validate.v1api20200101.aresources.test.azure.com,admissionReviewVersions=v1 + +var _ admission.Validator = &AResource{} + +// ValidateCreate validates the creation of the resource +func (resource *AResource) ValidateCreate() (admission.Warnings, error) { + validations := resource.createValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.CreateValidations()...) + } + return genruntime.ValidateCreate(validations) +} + +// ValidateDelete validates the deletion of the resource +func (resource *AResource) ValidateDelete() (admission.Warnings, error) { + validations := resource.deleteValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.DeleteValidations()...) + } + return genruntime.ValidateDelete(validations) +} + +// ValidateUpdate validates an update of the resource +func (resource *AResource) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + validations := resource.updateValidations() + var temp any = resource + if runtimeValidator, ok := temp.(genruntime.Validator); ok { + validations = append(validations, runtimeValidator.UpdateValidations()...) + } + return genruntime.ValidateUpdate(old, validations) +} + +// createValidations validates the creation of the resource +func (resource *AResource) createValidations() []func() (admission.Warnings, error) { + return []func() (admission.Warnings, error){resource.validateResourceReferences, resource.validateOwnerReference} +} + +// deleteValidations validates the deletion of the resource +func (resource *AResource) deleteValidations() []func() (admission.Warnings, error) { + return nil +} + +// updateValidations validates the update of the resource +func (resource *AResource) updateValidations() []func(old runtime.Object) (admission.Warnings, error) { + return []func(old runtime.Object) (admission.Warnings, error){ + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateResourceReferences() + }, + resource.validateWriteOnceProperties, + func(old runtime.Object) (admission.Warnings, error) { + return resource.validateOwnerReference() + }, + } +} + +// validateOwnerReference validates the owner field +func (resource *AResource) validateOwnerReference() (admission.Warnings, error) { + return genruntime.ValidateOwner(resource) +} + +// validateResourceReferences validates all resource references +func (resource *AResource) validateResourceReferences() (admission.Warnings, error) { + refs, err := reflecthelpers.FindResourceReferences(&resource.Spec) + if err != nil { + return nil, err + } + return genruntime.ValidateResourceReferences(refs) +} + +// validateWriteOnceProperties validates all WriteOnce properties +func (resource *AResource) validateWriteOnceProperties(old runtime.Object) (admission.Warnings, error) { + oldObj, ok := old.(*AResource) + if !ok { + return nil, nil + } + + return genruntime.ValidateWriteOnceProperties(oldObj, resource) +} + +// AssignProperties_From_AResource populates our AResource from the provided source AResource +func (resource *AResource) AssignProperties_From_AResource(source *v20200101s.AResource) error { + + // ObjectMeta + resource.ObjectMeta = *source.ObjectMeta.DeepCopy() + + // Spec + var spec AResource_Spec + err := spec.AssignProperties_From_AResource_Spec(&source.Spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_From_AResource_Spec() to populate field Spec") + } + resource.Spec = spec + + // No error + return nil +} + +// AssignProperties_To_AResource populates the provided destination AResource from our AResource +func (resource *AResource) AssignProperties_To_AResource(destination *v20200101s.AResource) error { + + // ObjectMeta + destination.ObjectMeta = *resource.ObjectMeta.DeepCopy() + + // Spec + var spec v20200101s.AResource_Spec + err := resource.Spec.AssignProperties_To_AResource_Spec(&spec) + if err != nil { + return errors.Wrap(err, "calling AssignProperties_To_AResource_Spec() to populate field Spec") + } + destination.Spec = spec + + // No error + return nil +} + +// OriginalGVK returns a GroupValueKind for the original API version used to create the resource +func (resource *AResource) OriginalGVK() *schema.GroupVersionKind { + return &schema.GroupVersionKind{ + Group: GroupVersion.Group, + Version: resource.Spec.OriginalVersion(), + Kind: "AResource", + } +} + +// +kubebuilder:object:root=true +// Generated from: https://test.test/schemas/2020-01-01/test.json#/resourceDefinitions/AResource +type AResourceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []AResource `json:"items"` +} + +// +kubebuilder:validation:Enum={"2020-01-01"} +type APIVersion string + +const APIVersion_Value = APIVersion("2020-01-01") + +type AResource_Spec struct { + // +kubebuilder:validation:Required + APIVersion AResource_APIVersion_Spec `json:"apiVersion,omitempty"` + + // +kubebuilder:validation:Required + // Owner: The owner of the resource. The owner controls where the resource goes when it is deployed. The owner also + // controls the resources lifecycle. When the owner is deleted the resource will also be deleted. Owner is expected to be a + // reference to a resources.azure.com/ResourceGroup resource + Owner *genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner,omitempty" kind:"ResourceGroup"` + + // +kubebuilder:validation:Required + Type AResource_Type_Spec `json:"type,omitempty"` +} + +var _ genruntime.ARMTransformer = &AResource_Spec{} + +// ConvertToARM converts from a Kubernetes CRD object to an ARM object +func (resource *AResource_Spec) ConvertToARM(resolved genruntime.ConvertToARMResolvedDetails) (interface{}, error) { + if resource == nil { + return nil, nil + } + result := &AResource_Spec{} + + // Set property "APIVersion": + result.APIVersion = resource.APIVersion + + // Set property "Name": + result.Name = resolved.Name + + // Set property "Type": + result.Type = resource.Type + return result, nil +} + +// NewEmptyARMValue returns an empty ARM value suitable for deserializing into +func (resource *AResource_Spec) NewEmptyARMValue() genruntime.ARMResourceStatus { + return &v20200101a.AResource_Spec{} +} + +// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object +func (resource *AResource_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { + typedInput, ok := armInput.(AResource_Spec) + if !ok { + return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected AResource_Spec, got %T", armInput) + } + + // Set property "APIVersion": + resource.APIVersion = typedInput.APIVersion + + // Set property "Owner": + resource.Owner = &genruntime.KnownResourceReference{ + Name: owner.Name, + ARMID: owner.ARMID, + } + + // Set property "Type": + resource.Type = typedInput.Type + + // No error + return nil +} + +var _ genruntime.ConvertibleSpec = &AResource_Spec{} + +// ConvertSpecFrom populates our AResource_Spec from the provided source +func (resource *AResource_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error { + src, ok := source.(*v20200101s.AResource_Spec) + if ok { + // Populate our instance from source + return resource.AssignProperties_From_AResource_Spec(src) + } + + // Convert to an intermediate form + src = &v20200101s.AResource_Spec{} + err := src.ConvertSpecFrom(source) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecFrom()") + } + + // Update our instance from src + err = resource.AssignProperties_From_AResource_Spec(src) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecFrom()") + } + + return nil +} + +// ConvertSpecTo populates the provided destination from our AResource_Spec +func (resource *AResource_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error { + dst, ok := destination.(*v20200101s.AResource_Spec) + if ok { + // Populate destination from our instance + return resource.AssignProperties_To_AResource_Spec(dst) + } + + // Convert to an intermediate form + dst = &v20200101s.AResource_Spec{} + err := resource.AssignProperties_To_AResource_Spec(dst) + if err != nil { + return errors.Wrap(err, "initial step of conversion in ConvertSpecTo()") + } + + // Update dst from our instance + err = dst.ConvertSpecTo(destination) + if err != nil { + return errors.Wrap(err, "final step of conversion in ConvertSpecTo()") + } + + return nil +} + +// AssignProperties_From_AResource_Spec populates our AResource_Spec from the provided source AResource_Spec +func (resource *AResource_Spec) AssignProperties_From_AResource_Spec(source *v20200101s.AResource_Spec) error { + + // APIVersion + if source.APIVersion != nil { + resource.APIVersion = AResource_APIVersion_Spec(*source.APIVersion) + } else { + resource.APIVersion = "" + } + + // Owner + if source.Owner != nil { + owner := source.Owner.Copy() + resource.Owner = &owner + } else { + resource.Owner = nil + } + + // Type + if source.Type != nil { + resource.Type = AResource_Type_Spec(*source.Type) + } else { + resource.Type = "" + } + + // No error + return nil +} + +// AssignProperties_To_AResource_Spec populates the provided destination AResource_Spec from our AResource_Spec +func (resource *AResource_Spec) AssignProperties_To_AResource_Spec(destination *v20200101s.AResource_Spec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // APIVersion + apiVersion := string(resource.APIVersion) + destination.APIVersion = &apiVersion + + // OriginalVersion + destination.OriginalVersion = resource.OriginalVersion() + + // Owner + if resource.Owner != nil { + owner := resource.Owner.Copy() + destination.Owner = &owner + } else { + destination.Owner = nil + } + + // Type + typeVar := string(resource.Type) + destination.Type = &typeVar + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + +// OriginalVersion returns the original API version used to create the resource. +func (resource *AResource_Spec) OriginalVersion() string { + return GroupVersion.Version +} + +// +kubebuilder:validation:Enum={"2020-06-01"} +type AResource_APIVersion_Spec string + +const AResource_APIVersion_Spec_20200601 = AResource_APIVersion_Spec("2020-06-01") + +// +kubebuilder:validation:Enum={"Microsoft.Azure/AResource"} +type AResource_Type_Spec string + +const AResource_Type_Spec_MicrosoftAzureAResource = AResource_Type_Spec("Microsoft.Azure/AResource") + +func init() { + SchemeBuilder.Register(&AResource{}, &AResourceList{}) +} diff --git a/v2/tools/generator/internal/codegen/testdata/Validations/Enums_have_required_validation.golden b/v2/tools/generator/internal/codegen/testdata/Validations/Enums_have_required_validation.golden index be6c638537e..580e781572d 100644 --- a/v2/tools/generator/internal/codegen/testdata/Validations/Enums_have_required_validation.golden +++ b/v2/tools/generator/internal/codegen/testdata/Validations/Enums_have_required_validation.golden @@ -19,8 +19,9 @@ func (test *Test) AssignProperties_From_Test(source *v20200101s.Test) error { // Color if source.Color != nil { - color := Test_Color(*source.Color) - test.Color = &color + color := *source.Color + colorTemp := genruntime.ToEnum(color, test_Color_Values) + test.Color = &colorTemp } else { test.Color = nil } @@ -61,3 +62,10 @@ const ( Test_Color_Green = Test_Color("green") Test_Color_Red = Test_Color("red") ) + +// Mapping from string to Test_Color +var test_Color_Values = map[string]Test_Color{ + "blue": Test_Color_Blue, + "green": Test_Color_Green, + "red": Test_Color_Red, +} diff --git a/v2/tools/generator/internal/conversions/property_conversions.go b/v2/tools/generator/internal/conversions/property_conversions.go index 6f49603808f..5d379df79d9 100644 --- a/v2/tools/generator/internal/conversions/property_conversions.go +++ b/v2/tools/generator/internal/conversions/property_conversions.go @@ -726,13 +726,69 @@ func assignToEnumeration( return nil, nil } + conversionContext.AddPackageReference(astmodel.StringsReference) + return func( reader dst.Expr, writer func(dst.Expr) []dst.Stmt, knownLocals *astmodel.KnownLocalsSet, generationContext *astmodel.CodeGenerationContext, ) ([]dst.Stmt, error) { - convertingWriter := func(expr dst.Expr) []dst.Stmt { + // If the enum is NOT based on a string, we can just do a direct cast and keep things simple + if dstEnum.BaseType() != astmodel.StringType { + return writer(astbuilder.CallFunc(dstName.Name(), reader)), nil + } + + var cacheOriginal dst.Stmt + var actualReader dst.Expr + + // If the value we're reading is a local or a field, it's cheap to read and we can skip + // using a local (which makes the generated code easier to read). In other cases, we want + // to cache the value in a local to avoid repeating any expensive conversion. + + switch reader.(type) { + case *dst.Ident, *dst.SelectorExpr: + // reading a local variable or a field + cacheOriginal = nil + actualReader = reader + default: + // Something else, so we cache the original + local := knownLocals.CreateSingularLocal(sourceEndpoint.Name(), "", "Value", "Cache") + cacheOriginal = astbuilder.ShortDeclaration(local, reader) + actualReader = dst.NewIdent(local) + } + + if dstEnum.NeedsMappingConversion(dstName) { + // We need to use the values mapping to convert the value in a case insensitive way + + mapperId := dstEnum.MapperVariableName(dstName) + genruntimePkg := generationContext.MustGetImportedPackageName(astmodel.GenRuntimeReference) + + // genruntime.ToEnum(, ) + toEnum := astbuilder.CallQualifiedFunc( + genruntimePkg, + "ToEnum", + actualReader, + dst.NewIdent(mapperId)) + + convert, err := conversion( + toEnum, + writer, + knownLocals, + generationContext) + if err != nil { + return nil, errors.Wrapf( + err, + "unable to convert %s to %s", + sourceEndpoint.Name(), + destinationEndpoint.Name()) + } + + return astbuilder.Statements(cacheOriginal, convert), nil + } + + // Otherwise we just do a direct cast + castingWriter := func(expr dst.Expr) []dst.Stmt { cast := &dst.CallExpr{ Fun: dstName.AsType(generationContext), Args: []dst.Expr{expr}, @@ -742,7 +798,7 @@ func assignToEnumeration( return conversion( reader, - convertingWriter, + castingWriter, knownLocals, generationContext) }, nil diff --git a/v2/tools/generator/internal/functions/kubernetes_admissions_defaulter.go b/v2/tools/generator/internal/functions/kubernetes_admissions_defaulter.go index 7619e852fef..9aeac5d282f 100644 --- a/v2/tools/generator/internal/functions/kubernetes_admissions_defaulter.go +++ b/v2/tools/generator/internal/functions/kubernetes_admissions_defaulter.go @@ -149,7 +149,7 @@ func (d *DefaulterBuilder) defaultFunction( Name: methodName, ReceiverIdent: receiverIdent, ReceiverType: astbuilder.PointerTo(receiverType), - Body: []dst.Stmt{ + Body: astbuilder.Statements( astbuilder.CallQualifiedFuncAsStmt(receiverIdent, "defaultImpl"), // TODO: This part should maybe be conditional if there are no defaults to define? astbuilder.AssignToInterface(tempVarIdent, dst.NewIdent(receiverIdent)), astbuilder.IfType( @@ -157,7 +157,7 @@ func (d *DefaulterBuilder) defaultFunction( overrideInterfaceType, runtimeDefaulterIdent, astbuilder.CallQualifiedFuncAsStmt(runtimeDefaulterIdent, "CustomDefault")), - }, + ), } fn.AddComments(fmt.Sprintf("applies defaults to the %s resource", receiver.Name())) diff --git a/v2/tools/generator/internal/functions/kubernetes_admissions_validator.go b/v2/tools/generator/internal/functions/kubernetes_admissions_validator.go index 07d5cd37e7f..c3262b94737 100644 --- a/v2/tools/generator/internal/functions/kubernetes_admissions_validator.go +++ b/v2/tools/generator/internal/functions/kubernetes_admissions_validator.go @@ -274,7 +274,7 @@ func (v *ValidatorBuilder) validateBody( appendFuncCall := astbuilder.CallFunc("append", dst.NewIdent(validationsIdent), astbuilder.CallQualifiedFunc(runtimeValidatorIdent, overrideFunctionName)) appendFuncCall.Ellipsis = true - body := []dst.Stmt{ + body := astbuilder.Statements( astbuilder.ShortDeclaration( validationsIdent, astbuilder.CallQualifiedFunc(receiverIdent, implFunctionName)), @@ -286,7 +286,7 @@ func (v *ValidatorBuilder) validateBody( // Not using astbuilder.AppendList here as we want to tack on a "..." at the end astbuilder.SimpleAssignment(dst.NewIdent(validationsIdent), appendFuncCall)), astbuilder.Returns(astbuilder.CallQualifiedFunc(astmodel.GenRuntimeReference.PackageName(), validationFunctionName, args...)), - } + ) return body } diff --git a/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenEnumAndBaseType.golden b/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenEnumAndBaseType.golden index f4483ba3922..cee478fbd88 100644 --- a/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenEnumAndBaseType.golden +++ b/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenEnumAndBaseType.golden @@ -3,7 +3,10 @@ // Licensed under the MIT license. package vcurrent -import vnext "github.com/Azure/azure-service-operator/testing/verification/vnext" +import ( + vnext "github.com/Azure/azure-service-operator/testing/verification/vnext" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) type Person struct { Sku string `json:"sku,omitempty"` @@ -23,7 +26,7 @@ func (person *Person) AssignProperties_From_Person(source *vnext.Person) error { func (person *Person) AssignProperties_To_Person(destination *vnext.Person) error { // Sku - destination.Sku = vnext.Bucket(person.Sku) + destination.Sku = genruntime.ToEnum(person.Sku, bucket_Values) // No error return nil diff --git a/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenEnumAndOptionalBaseType.golden b/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenEnumAndOptionalBaseType.golden index 453d0634e81..7c989d6d2d9 100644 --- a/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenEnumAndOptionalBaseType.golden +++ b/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenEnumAndOptionalBaseType.golden @@ -3,7 +3,10 @@ // Licensed under the MIT license. package vcurrent -import vnext "github.com/Azure/azure-service-operator/testing/verification/vnext" +import ( + vnext "github.com/Azure/azure-service-operator/testing/verification/vnext" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) type Person struct { Sku *string `json:"sku,omitempty"` @@ -25,7 +28,8 @@ func (person *Person) AssignProperties_To_Person(destination *vnext.Person) erro // Sku if person.Sku != nil { - destination.Sku = vnext.Bucket(*person.Sku) + sku := *person.Sku + destination.Sku = genruntime.ToEnum(sku, bucket_Values) } else { destination.Sku = "" } diff --git a/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenOptionalEnumAndBaseType.golden b/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenOptionalEnumAndBaseType.golden index c8291e413cc..1d0a872c922 100644 --- a/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenOptionalEnumAndBaseType.golden +++ b/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenOptionalEnumAndBaseType.golden @@ -3,7 +3,10 @@ // Licensed under the MIT license. package vcurrent -import vnext "github.com/Azure/azure-service-operator/testing/verification/vnext" +import ( + vnext "github.com/Azure/azure-service-operator/testing/verification/vnext" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) type Person struct { Sku string `json:"sku,omitempty"` @@ -27,7 +30,7 @@ func (person *Person) AssignProperties_From_Person(source *vnext.Person) error { func (person *Person) AssignProperties_To_Person(destination *vnext.Person) error { // Sku - sku := vnext.Bucket(person.Sku) + sku := genruntime.ToEnum(person.Sku, bucket_Values) destination.Sku = &sku // No error diff --git a/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenOptionalEnumAndOptionalBaseType.golden b/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenOptionalEnumAndOptionalBaseType.golden index b9f226e1f9e..b948ab4b3bb 100644 --- a/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenOptionalEnumAndOptionalBaseType.golden +++ b/v2/tools/generator/internal/functions/testdata/TestGolden_PropertyAssignmentFunction_AsFunc/ConvertBetweenOptionalEnumAndOptionalBaseType.golden @@ -3,7 +3,10 @@ // Licensed under the MIT license. package vcurrent -import vnext "github.com/Azure/azure-service-operator/testing/verification/vnext" +import ( + vnext "github.com/Azure/azure-service-operator/testing/verification/vnext" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" +) type Person struct { Sku *string `json:"sku,omitempty"` @@ -29,8 +32,9 @@ func (person *Person) AssignProperties_To_Person(destination *vnext.Person) erro // Sku if person.Sku != nil { - sku := vnext.Bucket(*person.Sku) - destination.Sku = &sku + sku := *person.Sku + skuTemp := genruntime.ToEnum(sku, bucket_Values) + destination.Sku = &skuTemp } else { destination.Sku = nil }