in v2/api/storage/v1api20210401/storage/storage_account_types_gen.go [1524:1955]
func (account *StorageAccount_STATUS) AssignProperties_To_StorageAccount_STATUS(destination *storage.StorageAccount_STATUS) error {
// Clone the existing property bag
propertyBag := genruntime.NewPropertyBag(account.PropertyBag)
// AccessTier
destination.AccessTier = genruntime.ClonePointerToString(account.AccessTier)
// AllowBlobPublicAccess
if account.AllowBlobPublicAccess != nil {
allowBlobPublicAccess := *account.AllowBlobPublicAccess
destination.AllowBlobPublicAccess = &allowBlobPublicAccess
} else {
destination.AllowBlobPublicAccess = nil
}
// AllowCrossTenantReplication
if account.AllowCrossTenantReplication != nil {
allowCrossTenantReplication := *account.AllowCrossTenantReplication
destination.AllowCrossTenantReplication = &allowCrossTenantReplication
} else {
destination.AllowCrossTenantReplication = nil
}
// AllowSharedKeyAccess
if account.AllowSharedKeyAccess != nil {
allowSharedKeyAccess := *account.AllowSharedKeyAccess
destination.AllowSharedKeyAccess = &allowSharedKeyAccess
} else {
destination.AllowSharedKeyAccess = nil
}
// AllowedCopyScope
if propertyBag.Contains("AllowedCopyScope") {
var allowedCopyScope string
err := propertyBag.Pull("AllowedCopyScope", &allowedCopyScope)
if err != nil {
return eris.Wrap(err, "pulling 'AllowedCopyScope' from propertyBag")
}
destination.AllowedCopyScope = &allowedCopyScope
} else {
destination.AllowedCopyScope = nil
}
// AzureFilesIdentityBasedAuthentication
if account.AzureFilesIdentityBasedAuthentication != nil {
var azureFilesIdentityBasedAuthentication storage.AzureFilesIdentityBasedAuthentication_STATUS
err := account.AzureFilesIdentityBasedAuthentication.AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS(&azureFilesIdentityBasedAuthentication)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_AzureFilesIdentityBasedAuthentication_STATUS() to populate field AzureFilesIdentityBasedAuthentication")
}
destination.AzureFilesIdentityBasedAuthentication = &azureFilesIdentityBasedAuthentication
} else {
destination.AzureFilesIdentityBasedAuthentication = nil
}
// BlobRestoreStatus
if account.BlobRestoreStatus != nil {
var blobRestoreStatus storage.BlobRestoreStatus_STATUS
err := account.BlobRestoreStatus.AssignProperties_To_BlobRestoreStatus_STATUS(&blobRestoreStatus)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_BlobRestoreStatus_STATUS() to populate field BlobRestoreStatus")
}
destination.BlobRestoreStatus = &blobRestoreStatus
} else {
destination.BlobRestoreStatus = nil
}
// Conditions
destination.Conditions = genruntime.CloneSliceOfCondition(account.Conditions)
// CreationTime
destination.CreationTime = genruntime.ClonePointerToString(account.CreationTime)
// CustomDomain
if account.CustomDomain != nil {
var customDomain storage.CustomDomain_STATUS
err := account.CustomDomain.AssignProperties_To_CustomDomain_STATUS(&customDomain)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_CustomDomain_STATUS() to populate field CustomDomain")
}
destination.CustomDomain = &customDomain
} else {
destination.CustomDomain = nil
}
// DefaultToOAuthAuthentication
if propertyBag.Contains("DefaultToOAuthAuthentication") {
var defaultToOAuthAuthentication bool
err := propertyBag.Pull("DefaultToOAuthAuthentication", &defaultToOAuthAuthentication)
if err != nil {
return eris.Wrap(err, "pulling 'DefaultToOAuthAuthentication' from propertyBag")
}
destination.DefaultToOAuthAuthentication = &defaultToOAuthAuthentication
} else {
destination.DefaultToOAuthAuthentication = nil
}
// DnsEndpointType
if propertyBag.Contains("DnsEndpointType") {
var dnsEndpointType string
err := propertyBag.Pull("DnsEndpointType", &dnsEndpointType)
if err != nil {
return eris.Wrap(err, "pulling 'DnsEndpointType' from propertyBag")
}
destination.DnsEndpointType = &dnsEndpointType
} else {
destination.DnsEndpointType = nil
}
// Encryption
if account.Encryption != nil {
var encryption storage.Encryption_STATUS
err := account.Encryption.AssignProperties_To_Encryption_STATUS(&encryption)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_Encryption_STATUS() to populate field Encryption")
}
destination.Encryption = &encryption
} else {
destination.Encryption = nil
}
// ExtendedLocation
if account.ExtendedLocation != nil {
var extendedLocation storage.ExtendedLocation_STATUS
err := account.ExtendedLocation.AssignProperties_To_ExtendedLocation_STATUS(&extendedLocation)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_ExtendedLocation_STATUS() to populate field ExtendedLocation")
}
destination.ExtendedLocation = &extendedLocation
} else {
destination.ExtendedLocation = nil
}
// FailoverInProgress
if account.FailoverInProgress != nil {
failoverInProgress := *account.FailoverInProgress
destination.FailoverInProgress = &failoverInProgress
} else {
destination.FailoverInProgress = nil
}
// GeoReplicationStats
if account.GeoReplicationStats != nil {
var geoReplicationStat storage.GeoReplicationStats_STATUS
err := account.GeoReplicationStats.AssignProperties_To_GeoReplicationStats_STATUS(&geoReplicationStat)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_GeoReplicationStats_STATUS() to populate field GeoReplicationStats")
}
destination.GeoReplicationStats = &geoReplicationStat
} else {
destination.GeoReplicationStats = nil
}
// Id
destination.Id = genruntime.ClonePointerToString(account.Id)
// Identity
if account.Identity != nil {
var identity storage.Identity_STATUS
err := account.Identity.AssignProperties_To_Identity_STATUS(&identity)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_Identity_STATUS() to populate field Identity")
}
destination.Identity = &identity
} else {
destination.Identity = nil
}
// ImmutableStorageWithVersioning
if propertyBag.Contains("ImmutableStorageWithVersioning") {
var immutableStorageWithVersioning storage.ImmutableStorageAccount_STATUS
err := propertyBag.Pull("ImmutableStorageWithVersioning", &immutableStorageWithVersioning)
if err != nil {
return eris.Wrap(err, "pulling 'ImmutableStorageWithVersioning' from propertyBag")
}
destination.ImmutableStorageWithVersioning = &immutableStorageWithVersioning
} else {
destination.ImmutableStorageWithVersioning = nil
}
// IsHnsEnabled
if account.IsHnsEnabled != nil {
isHnsEnabled := *account.IsHnsEnabled
destination.IsHnsEnabled = &isHnsEnabled
} else {
destination.IsHnsEnabled = nil
}
// IsLocalUserEnabled
if propertyBag.Contains("IsLocalUserEnabled") {
var isLocalUserEnabled bool
err := propertyBag.Pull("IsLocalUserEnabled", &isLocalUserEnabled)
if err != nil {
return eris.Wrap(err, "pulling 'IsLocalUserEnabled' from propertyBag")
}
destination.IsLocalUserEnabled = &isLocalUserEnabled
} else {
destination.IsLocalUserEnabled = nil
}
// IsNfsV3Enabled
if account.IsNfsV3Enabled != nil {
isNfsV3Enabled := *account.IsNfsV3Enabled
destination.IsNfsV3Enabled = &isNfsV3Enabled
} else {
destination.IsNfsV3Enabled = nil
}
// IsSftpEnabled
if propertyBag.Contains("IsSftpEnabled") {
var isSftpEnabled bool
err := propertyBag.Pull("IsSftpEnabled", &isSftpEnabled)
if err != nil {
return eris.Wrap(err, "pulling 'IsSftpEnabled' from propertyBag")
}
destination.IsSftpEnabled = &isSftpEnabled
} else {
destination.IsSftpEnabled = nil
}
// KeyCreationTime
if account.KeyCreationTime != nil {
var keyCreationTime storage.KeyCreationTime_STATUS
err := account.KeyCreationTime.AssignProperties_To_KeyCreationTime_STATUS(&keyCreationTime)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_KeyCreationTime_STATUS() to populate field KeyCreationTime")
}
destination.KeyCreationTime = &keyCreationTime
} else {
destination.KeyCreationTime = nil
}
// KeyPolicy
if account.KeyPolicy != nil {
var keyPolicy storage.KeyPolicy_STATUS
err := account.KeyPolicy.AssignProperties_To_KeyPolicy_STATUS(&keyPolicy)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_KeyPolicy_STATUS() to populate field KeyPolicy")
}
destination.KeyPolicy = &keyPolicy
} else {
destination.KeyPolicy = nil
}
// Kind
destination.Kind = genruntime.ClonePointerToString(account.Kind)
// LargeFileSharesState
destination.LargeFileSharesState = genruntime.ClonePointerToString(account.LargeFileSharesState)
// LastGeoFailoverTime
destination.LastGeoFailoverTime = genruntime.ClonePointerToString(account.LastGeoFailoverTime)
// Location
destination.Location = genruntime.ClonePointerToString(account.Location)
// MinimumTlsVersion
destination.MinimumTlsVersion = genruntime.ClonePointerToString(account.MinimumTlsVersion)
// Name
destination.Name = genruntime.ClonePointerToString(account.Name)
// NetworkAcls
if account.NetworkAcls != nil {
var networkAcl storage.NetworkRuleSet_STATUS
err := account.NetworkAcls.AssignProperties_To_NetworkRuleSet_STATUS(&networkAcl)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_NetworkRuleSet_STATUS() to populate field NetworkAcls")
}
destination.NetworkAcls = &networkAcl
} else {
destination.NetworkAcls = nil
}
// PrimaryEndpoints
if account.PrimaryEndpoints != nil {
var primaryEndpoint storage.Endpoints_STATUS
err := account.PrimaryEndpoints.AssignProperties_To_Endpoints_STATUS(&primaryEndpoint)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_Endpoints_STATUS() to populate field PrimaryEndpoints")
}
destination.PrimaryEndpoints = &primaryEndpoint
} else {
destination.PrimaryEndpoints = nil
}
// PrimaryLocation
destination.PrimaryLocation = genruntime.ClonePointerToString(account.PrimaryLocation)
// PrivateEndpointConnections
if account.PrivateEndpointConnections != nil {
privateEndpointConnectionList := make([]storage.PrivateEndpointConnection_STATUS, len(account.PrivateEndpointConnections))
for privateEndpointConnectionIndex, privateEndpointConnectionItem := range account.PrivateEndpointConnections {
// Shadow the loop variable to avoid aliasing
privateEndpointConnectionItem := privateEndpointConnectionItem
var privateEndpointConnection storage.PrivateEndpointConnection_STATUS
err := privateEndpointConnectionItem.AssignProperties_To_PrivateEndpointConnection_STATUS(&privateEndpointConnection)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_PrivateEndpointConnection_STATUS() to populate field PrivateEndpointConnections")
}
privateEndpointConnectionList[privateEndpointConnectionIndex] = privateEndpointConnection
}
destination.PrivateEndpointConnections = privateEndpointConnectionList
} else {
destination.PrivateEndpointConnections = nil
}
// ProvisioningState
destination.ProvisioningState = genruntime.ClonePointerToString(account.ProvisioningState)
// PublicNetworkAccess
if propertyBag.Contains("PublicNetworkAccess") {
var publicNetworkAccess string
err := propertyBag.Pull("PublicNetworkAccess", &publicNetworkAccess)
if err != nil {
return eris.Wrap(err, "pulling 'PublicNetworkAccess' from propertyBag")
}
destination.PublicNetworkAccess = &publicNetworkAccess
} else {
destination.PublicNetworkAccess = nil
}
// RoutingPreference
if account.RoutingPreference != nil {
var routingPreference storage.RoutingPreference_STATUS
err := account.RoutingPreference.AssignProperties_To_RoutingPreference_STATUS(&routingPreference)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_RoutingPreference_STATUS() to populate field RoutingPreference")
}
destination.RoutingPreference = &routingPreference
} else {
destination.RoutingPreference = nil
}
// SasPolicy
if account.SasPolicy != nil {
var sasPolicy storage.SasPolicy_STATUS
err := account.SasPolicy.AssignProperties_To_SasPolicy_STATUS(&sasPolicy)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_SasPolicy_STATUS() to populate field SasPolicy")
}
destination.SasPolicy = &sasPolicy
} else {
destination.SasPolicy = nil
}
// SecondaryEndpoints
if account.SecondaryEndpoints != nil {
var secondaryEndpoint storage.Endpoints_STATUS
err := account.SecondaryEndpoints.AssignProperties_To_Endpoints_STATUS(&secondaryEndpoint)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_Endpoints_STATUS() to populate field SecondaryEndpoints")
}
destination.SecondaryEndpoints = &secondaryEndpoint
} else {
destination.SecondaryEndpoints = nil
}
// SecondaryLocation
destination.SecondaryLocation = genruntime.ClonePointerToString(account.SecondaryLocation)
// Sku
if account.Sku != nil {
var sku storage.Sku_STATUS
err := account.Sku.AssignProperties_To_Sku_STATUS(&sku)
if err != nil {
return eris.Wrap(err, "calling AssignProperties_To_Sku_STATUS() to populate field Sku")
}
destination.Sku = &sku
} else {
destination.Sku = nil
}
// StatusOfPrimary
destination.StatusOfPrimary = genruntime.ClonePointerToString(account.StatusOfPrimary)
// StatusOfSecondary
destination.StatusOfSecondary = genruntime.ClonePointerToString(account.StatusOfSecondary)
// StorageAccountSkuConversionStatus
if propertyBag.Contains("StorageAccountSkuConversionStatus") {
var storageAccountSkuConversionStatus storage.StorageAccountSkuConversionStatus_STATUS
err := propertyBag.Pull("StorageAccountSkuConversionStatus", &storageAccountSkuConversionStatus)
if err != nil {
return eris.Wrap(err, "pulling 'StorageAccountSkuConversionStatus' from propertyBag")
}
destination.StorageAccountSkuConversionStatus = &storageAccountSkuConversionStatus
} else {
destination.StorageAccountSkuConversionStatus = nil
}
// SupportsHttpsTrafficOnly
if account.SupportsHttpsTrafficOnly != nil {
supportsHttpsTrafficOnly := *account.SupportsHttpsTrafficOnly
destination.SupportsHttpsTrafficOnly = &supportsHttpsTrafficOnly
} else {
destination.SupportsHttpsTrafficOnly = nil
}
// Tags
destination.Tags = genruntime.CloneMapOfStringToString(account.Tags)
// Type
destination.Type = genruntime.ClonePointerToString(account.Type)
// Update the property bag
if len(propertyBag) > 0 {
destination.PropertyBag = propertyBag
} else {
destination.PropertyBag = nil
}
// Invoke the augmentConversionForStorageAccount_STATUS interface (if implemented) to customize the conversion
var accountAsAny any = account
if augmentedAccount, ok := accountAsAny.(augmentConversionForStorageAccount_STATUS); ok {
err := augmentedAccount.AssignPropertiesTo(destination)
if err != nil {
return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
}
}
// No error
return nil
}