// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package storage

import (
	storage "github.com/Azure/azure-service-operator/v2/api/network/v1api20200601/storage"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/conditions"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/configmaps"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
	"github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets"
	"github.com/rotisserie/eris"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)

// +kubebuilder:rbac:groups=network.azure.com,resources=dnszonesaaaarecords,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=network.azure.com,resources={dnszonesaaaarecords/status,dnszonesaaaarecords/finalizers},verbs=get;update;patch

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={azure,network}
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +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"
// Storage version of v1api20180501.DnsZonesAAAARecord
// Generator information:
// - Generated from: /dns/resource-manager/Microsoft.Network/Dns/stable/2018-05-01/dns.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}
type DnsZonesAAAARecord struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              DnsZonesAAAARecord_Spec   `json:"spec,omitempty"`
	Status            DnsZonesAAAARecord_STATUS `json:"status,omitempty"`
}

var _ conditions.Conditioner = &DnsZonesAAAARecord{}

// GetConditions returns the conditions of the resource
func (record *DnsZonesAAAARecord) GetConditions() conditions.Conditions {
	return record.Status.Conditions
}

// SetConditions sets the conditions on the resource status
func (record *DnsZonesAAAARecord) SetConditions(conditions conditions.Conditions) {
	record.Status.Conditions = conditions
}

var _ configmaps.Exporter = &DnsZonesAAAARecord{}

// ConfigMapDestinationExpressions returns the Spec.OperatorSpec.ConfigMapExpressions property
func (record *DnsZonesAAAARecord) ConfigMapDestinationExpressions() []*core.DestinationExpression {
	if record.Spec.OperatorSpec == nil {
		return nil
	}
	return record.Spec.OperatorSpec.ConfigMapExpressions
}

var _ secrets.Exporter = &DnsZonesAAAARecord{}

// SecretDestinationExpressions returns the Spec.OperatorSpec.SecretExpressions property
func (record *DnsZonesAAAARecord) SecretDestinationExpressions() []*core.DestinationExpression {
	if record.Spec.OperatorSpec == nil {
		return nil
	}
	return record.Spec.OperatorSpec.SecretExpressions
}

var _ genruntime.KubernetesResource = &DnsZonesAAAARecord{}

// AzureName returns the Azure name of the resource
func (record *DnsZonesAAAARecord) AzureName() string {
	return record.Spec.AzureName
}

// GetAPIVersion returns the ARM API version of the resource. This is always "2018-05-01"
func (record DnsZonesAAAARecord) GetAPIVersion() string {
	return "2018-05-01"
}

// GetResourceScope returns the scope of the resource
func (record *DnsZonesAAAARecord) GetResourceScope() genruntime.ResourceScope {
	return genruntime.ResourceScopeResourceGroup
}

// GetSpec returns the specification of this resource
func (record *DnsZonesAAAARecord) GetSpec() genruntime.ConvertibleSpec {
	return &record.Spec
}

// GetStatus returns the status of this resource
func (record *DnsZonesAAAARecord) GetStatus() genruntime.ConvertibleStatus {
	return &record.Status
}

// GetSupportedOperations returns the operations supported by the resource
func (record *DnsZonesAAAARecord) GetSupportedOperations() []genruntime.ResourceOperation {
	return []genruntime.ResourceOperation{
		genruntime.ResourceOperationDelete,
		genruntime.ResourceOperationGet,
		genruntime.ResourceOperationPut,
	}
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.Network/dnsZones/AAAA"
func (record *DnsZonesAAAARecord) GetType() string {
	return "Microsoft.Network/dnsZones/AAAA"
}

// NewEmptyStatus returns a new empty (blank) status
func (record *DnsZonesAAAARecord) NewEmptyStatus() genruntime.ConvertibleStatus {
	return &DnsZonesAAAARecord_STATUS{}
}

// Owner returns the ResourceReference of the owner
func (record *DnsZonesAAAARecord) Owner() *genruntime.ResourceReference {
	if record.Spec.Owner == nil {
		return nil
	}

	group, kind := genruntime.LookupOwnerGroupKind(record.Spec)
	return record.Spec.Owner.AsResourceReference(group, kind)
}

// SetStatus sets the status of this resource
func (record *DnsZonesAAAARecord) SetStatus(status genruntime.ConvertibleStatus) error {
	// If we have exactly the right type of status, assign it
	if st, ok := status.(*DnsZonesAAAARecord_STATUS); ok {
		record.Status = *st
		return nil
	}

	// Convert status to required version
	var st DnsZonesAAAARecord_STATUS
	err := status.ConvertStatusTo(&st)
	if err != nil {
		return eris.Wrap(err, "failed to convert status")
	}

	record.Status = st
	return nil
}

// Hub marks that this DnsZonesAAAARecord is the hub type for conversion
func (record *DnsZonesAAAARecord) Hub() {}

// OriginalGVK returns a GroupValueKind for the original API version used to create the resource
func (record *DnsZonesAAAARecord) OriginalGVK() *schema.GroupVersionKind {
	return &schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: record.Spec.OriginalVersion,
		Kind:    "DnsZonesAAAARecord",
	}
}

// +kubebuilder:object:root=true
// Storage version of v1api20180501.DnsZonesAAAARecord
// Generator information:
// - Generated from: /dns/resource-manager/Microsoft.Network/Dns/stable/2018-05-01/dns.json
// - ARM URI: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}
type DnsZonesAAAARecordList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DnsZonesAAAARecord `json:"items"`
}

// Storage version of v1api20180501.DnsZonesAAAARecord_Spec
type DnsZonesAAAARecord_Spec struct {
	AAAARecords []AaaaRecord `json:"AAAARecords,omitempty"`
	ARecords    []ARecord    `json:"ARecords,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"`
	CNAMERecord     *CnameRecord                    `json:"CNAMERecord,omitempty"`
	CaaRecords      []CaaRecord                     `json:"caaRecords,omitempty"`
	MXRecords       []MxRecord                      `json:"MXRecords,omitempty"`
	Metadata        map[string]string               `json:"metadata,omitempty"`
	NSRecords       []NsRecord                      `json:"NSRecords,omitempty"`
	OperatorSpec    *DnsZonesAAAARecordOperatorSpec `json:"operatorSpec,omitempty"`
	OriginalVersion string                          `json:"originalVersion,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 network.azure.com/DnsZone resource
	Owner          *genruntime.KnownResourceReference `group:"network.azure.com" json:"owner,omitempty" kind:"DnsZone"`
	PTRRecords     []PtrRecord                        `json:"PTRRecords,omitempty"`
	PropertyBag    genruntime.PropertyBag             `json:"$propertyBag,omitempty"`
	SOARecord      *SoaRecord                         `json:"SOARecord,omitempty"`
	SRVRecords     []SrvRecord                        `json:"SRVRecords,omitempty"`
	TTL            *int                               `json:"TTL,omitempty"`
	TXTRecords     []TxtRecord                        `json:"TXTRecords,omitempty"`
	TargetResource *SubResource                       `json:"targetResource,omitempty"`
}

var _ genruntime.ConvertibleSpec = &DnsZonesAAAARecord_Spec{}

// ConvertSpecFrom populates our DnsZonesAAAARecord_Spec from the provided source
func (record *DnsZonesAAAARecord_Spec) ConvertSpecFrom(source genruntime.ConvertibleSpec) error {
	if source == record {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return source.ConvertSpecTo(record)
}

// ConvertSpecTo populates the provided destination from our DnsZonesAAAARecord_Spec
func (record *DnsZonesAAAARecord_Spec) ConvertSpecTo(destination genruntime.ConvertibleSpec) error {
	if destination == record {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleSpec")
	}

	return destination.ConvertSpecFrom(record)
}

// Storage version of v1api20180501.DnsZonesAAAARecord_STATUS
type DnsZonesAAAARecord_STATUS struct {
	AAAARecords       []AaaaRecord_STATUS    `json:"AAAARecords,omitempty"`
	ARecords          []ARecord_STATUS       `json:"ARecords,omitempty"`
	CNAMERecord       *CnameRecord_STATUS    `json:"CNAMERecord,omitempty"`
	CaaRecords        []CaaRecord_STATUS     `json:"caaRecords,omitempty"`
	Conditions        []conditions.Condition `json:"conditions,omitempty"`
	Etag              *string                `json:"etag,omitempty"`
	Fqdn              *string                `json:"fqdn,omitempty"`
	Id                *string                `json:"id,omitempty"`
	MXRecords         []MxRecord_STATUS      `json:"MXRecords,omitempty"`
	Metadata          map[string]string      `json:"metadata,omitempty"`
	NSRecords         []NsRecord_STATUS      `json:"NSRecords,omitempty"`
	Name              *string                `json:"name,omitempty"`
	PTRRecords        []PtrRecord_STATUS     `json:"PTRRecords,omitempty"`
	PropertyBag       genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	ProvisioningState *string                `json:"provisioningState,omitempty"`
	SOARecord         *SoaRecord_STATUS      `json:"SOARecord,omitempty"`
	SRVRecords        []SrvRecord_STATUS     `json:"SRVRecords,omitempty"`
	TTL               *int                   `json:"TTL,omitempty"`
	TXTRecords        []TxtRecord_STATUS     `json:"TXTRecords,omitempty"`
	TargetResource    *SubResource_STATUS    `json:"targetResource,omitempty"`
	Type              *string                `json:"type,omitempty"`
}

var _ genruntime.ConvertibleStatus = &DnsZonesAAAARecord_STATUS{}

// ConvertStatusFrom populates our DnsZonesAAAARecord_STATUS from the provided source
func (record *DnsZonesAAAARecord_STATUS) ConvertStatusFrom(source genruntime.ConvertibleStatus) error {
	if source == record {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return source.ConvertStatusTo(record)
}

// ConvertStatusTo populates the provided destination from our DnsZonesAAAARecord_STATUS
func (record *DnsZonesAAAARecord_STATUS) ConvertStatusTo(destination genruntime.ConvertibleStatus) error {
	if destination == record {
		return eris.New("attempted conversion between unrelated implementations of github.com/Azure/azure-service-operator/v2/pkg/genruntime/ConvertibleStatus")
	}

	return destination.ConvertStatusFrom(record)
}

// Storage version of v1api20180501.AaaaRecord
// An AAAA record.
type AaaaRecord struct {
	Ipv6Address *string                `json:"ipv6Address,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_AaaaRecord populates our AaaaRecord from the provided source AaaaRecord
func (record *AaaaRecord) AssignProperties_From_AaaaRecord(source *storage.AaaaRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Ipv6Address
	record.Ipv6Address = genruntime.ClonePointerToString(source.Ipv6Address)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForAaaaRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForAaaaRecord); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_AaaaRecord populates the provided destination AaaaRecord from our AaaaRecord
func (record *AaaaRecord) AssignProperties_To_AaaaRecord(destination *storage.AaaaRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Ipv6Address
	destination.Ipv6Address = genruntime.ClonePointerToString(record.Ipv6Address)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForAaaaRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForAaaaRecord); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.AaaaRecord_STATUS
// An AAAA record.
type AaaaRecord_STATUS struct {
	Ipv6Address *string                `json:"ipv6Address,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_AaaaRecord_STATUS populates our AaaaRecord_STATUS from the provided source AaaaRecord_STATUS
func (record *AaaaRecord_STATUS) AssignProperties_From_AaaaRecord_STATUS(source *storage.AaaaRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Ipv6Address
	record.Ipv6Address = genruntime.ClonePointerToString(source.Ipv6Address)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForAaaaRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForAaaaRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_AaaaRecord_STATUS populates the provided destination AaaaRecord_STATUS from our AaaaRecord_STATUS
func (record *AaaaRecord_STATUS) AssignProperties_To_AaaaRecord_STATUS(destination *storage.AaaaRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Ipv6Address
	destination.Ipv6Address = genruntime.ClonePointerToString(record.Ipv6Address)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForAaaaRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForAaaaRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.ARecord
// An A record.
type ARecord struct {
	Ipv4Address *string                `json:"ipv4Address,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_ARecord populates our ARecord from the provided source ARecord
func (record *ARecord) AssignProperties_From_ARecord(source *storage.ARecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Ipv4Address
	record.Ipv4Address = genruntime.ClonePointerToString(source.Ipv4Address)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForARecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForARecord); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_ARecord populates the provided destination ARecord from our ARecord
func (record *ARecord) AssignProperties_To_ARecord(destination *storage.ARecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Ipv4Address
	destination.Ipv4Address = genruntime.ClonePointerToString(record.Ipv4Address)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForARecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForARecord); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.ARecord_STATUS
// An A record.
type ARecord_STATUS struct {
	Ipv4Address *string                `json:"ipv4Address,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_ARecord_STATUS populates our ARecord_STATUS from the provided source ARecord_STATUS
func (record *ARecord_STATUS) AssignProperties_From_ARecord_STATUS(source *storage.ARecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Ipv4Address
	record.Ipv4Address = genruntime.ClonePointerToString(source.Ipv4Address)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForARecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForARecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_ARecord_STATUS populates the provided destination ARecord_STATUS from our ARecord_STATUS
func (record *ARecord_STATUS) AssignProperties_To_ARecord_STATUS(destination *storage.ARecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Ipv4Address
	destination.Ipv4Address = genruntime.ClonePointerToString(record.Ipv4Address)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForARecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForARecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.CaaRecord
// A CAA record.
type CaaRecord struct {
	Flags       *int                   `json:"flags,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tag         *string                `json:"tag,omitempty"`
	Value       *string                `json:"value,omitempty"`
}

// Storage version of v1api20180501.CaaRecord_STATUS
// A CAA record.
type CaaRecord_STATUS struct {
	Flags       *int                   `json:"flags,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Tag         *string                `json:"tag,omitempty"`
	Value       *string                `json:"value,omitempty"`
}

// Storage version of v1api20180501.CnameRecord
// A CNAME record.
type CnameRecord struct {
	Cname       *string                `json:"cname,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_CnameRecord populates our CnameRecord from the provided source CnameRecord
func (record *CnameRecord) AssignProperties_From_CnameRecord(source *storage.CnameRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Cname
	record.Cname = genruntime.ClonePointerToString(source.Cname)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForCnameRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForCnameRecord); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_CnameRecord populates the provided destination CnameRecord from our CnameRecord
func (record *CnameRecord) AssignProperties_To_CnameRecord(destination *storage.CnameRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Cname
	destination.Cname = genruntime.ClonePointerToString(record.Cname)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForCnameRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForCnameRecord); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.CnameRecord_STATUS
// A CNAME record.
type CnameRecord_STATUS struct {
	Cname       *string                `json:"cname,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_CnameRecord_STATUS populates our CnameRecord_STATUS from the provided source CnameRecord_STATUS
func (record *CnameRecord_STATUS) AssignProperties_From_CnameRecord_STATUS(source *storage.CnameRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Cname
	record.Cname = genruntime.ClonePointerToString(source.Cname)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForCnameRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForCnameRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_CnameRecord_STATUS populates the provided destination CnameRecord_STATUS from our CnameRecord_STATUS
func (record *CnameRecord_STATUS) AssignProperties_To_CnameRecord_STATUS(destination *storage.CnameRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Cname
	destination.Cname = genruntime.ClonePointerToString(record.Cname)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForCnameRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForCnameRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.DnsZonesAAAARecordOperatorSpec
// Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure
type DnsZonesAAAARecordOperatorSpec struct {
	ConfigMapExpressions []*core.DestinationExpression `json:"configMapExpressions,omitempty"`
	PropertyBag          genruntime.PropertyBag        `json:"$propertyBag,omitempty"`
	SecretExpressions    []*core.DestinationExpression `json:"secretExpressions,omitempty"`
}

// Storage version of v1api20180501.MxRecord
// An MX record.
type MxRecord struct {
	Exchange    *string                `json:"exchange,omitempty"`
	Preference  *int                   `json:"preference,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_MxRecord populates our MxRecord from the provided source MxRecord
func (record *MxRecord) AssignProperties_From_MxRecord(source *storage.MxRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Exchange
	record.Exchange = genruntime.ClonePointerToString(source.Exchange)

	// Preference
	record.Preference = genruntime.ClonePointerToInt(source.Preference)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForMxRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForMxRecord); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_MxRecord populates the provided destination MxRecord from our MxRecord
func (record *MxRecord) AssignProperties_To_MxRecord(destination *storage.MxRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Exchange
	destination.Exchange = genruntime.ClonePointerToString(record.Exchange)

	// Preference
	destination.Preference = genruntime.ClonePointerToInt(record.Preference)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForMxRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForMxRecord); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.MxRecord_STATUS
// An MX record.
type MxRecord_STATUS struct {
	Exchange    *string                `json:"exchange,omitempty"`
	Preference  *int                   `json:"preference,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// AssignProperties_From_MxRecord_STATUS populates our MxRecord_STATUS from the provided source MxRecord_STATUS
func (record *MxRecord_STATUS) AssignProperties_From_MxRecord_STATUS(source *storage.MxRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Exchange
	record.Exchange = genruntime.ClonePointerToString(source.Exchange)

	// Preference
	record.Preference = genruntime.ClonePointerToInt(source.Preference)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForMxRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForMxRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_MxRecord_STATUS populates the provided destination MxRecord_STATUS from our MxRecord_STATUS
func (record *MxRecord_STATUS) AssignProperties_To_MxRecord_STATUS(destination *storage.MxRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Exchange
	destination.Exchange = genruntime.ClonePointerToString(record.Exchange)

	// Preference
	destination.Preference = genruntime.ClonePointerToInt(record.Preference)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForMxRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForMxRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.NsRecord
// An NS record.
type NsRecord struct {
	Nsdname     *string                `json:"nsdname,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20180501.NsRecord_STATUS
// An NS record.
type NsRecord_STATUS struct {
	Nsdname     *string                `json:"nsdname,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
}

// Storage version of v1api20180501.PtrRecord
// A PTR record.
type PtrRecord struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Ptrdname    *string                `json:"ptrdname,omitempty"`
}

// AssignProperties_From_PtrRecord populates our PtrRecord from the provided source PtrRecord
func (record *PtrRecord) AssignProperties_From_PtrRecord(source *storage.PtrRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Ptrdname
	record.Ptrdname = genruntime.ClonePointerToString(source.Ptrdname)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForPtrRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForPtrRecord); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_PtrRecord populates the provided destination PtrRecord from our PtrRecord
func (record *PtrRecord) AssignProperties_To_PtrRecord(destination *storage.PtrRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Ptrdname
	destination.Ptrdname = genruntime.ClonePointerToString(record.Ptrdname)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForPtrRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForPtrRecord); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.PtrRecord_STATUS
// A PTR record.
type PtrRecord_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Ptrdname    *string                `json:"ptrdname,omitempty"`
}

// AssignProperties_From_PtrRecord_STATUS populates our PtrRecord_STATUS from the provided source PtrRecord_STATUS
func (record *PtrRecord_STATUS) AssignProperties_From_PtrRecord_STATUS(source *storage.PtrRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Ptrdname
	record.Ptrdname = genruntime.ClonePointerToString(source.Ptrdname)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForPtrRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForPtrRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_PtrRecord_STATUS populates the provided destination PtrRecord_STATUS from our PtrRecord_STATUS
func (record *PtrRecord_STATUS) AssignProperties_To_PtrRecord_STATUS(destination *storage.PtrRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Ptrdname
	destination.Ptrdname = genruntime.ClonePointerToString(record.Ptrdname)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForPtrRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForPtrRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.SoaRecord
// An SOA record.
type SoaRecord struct {
	Email        *string                `json:"email,omitempty"`
	ExpireTime   *int                   `json:"expireTime,omitempty"`
	Host         *string                `json:"host,omitempty"`
	MinimumTTL   *int                   `json:"minimumTTL,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RefreshTime  *int                   `json:"refreshTime,omitempty"`
	RetryTime    *int                   `json:"retryTime,omitempty"`
	SerialNumber *int                   `json:"serialNumber,omitempty"`
}

// AssignProperties_From_SoaRecord populates our SoaRecord from the provided source SoaRecord
func (record *SoaRecord) AssignProperties_From_SoaRecord(source *storage.SoaRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Email
	record.Email = genruntime.ClonePointerToString(source.Email)

	// ExpireTime
	record.ExpireTime = genruntime.ClonePointerToInt(source.ExpireTime)

	// Host
	record.Host = genruntime.ClonePointerToString(source.Host)

	// MinimumTTL
	if propertyBag.Contains("MinimumTTL") {
		var minimumTTL int
		err := propertyBag.Pull("MinimumTTL", &minimumTTL)
		if err != nil {
			return eris.Wrap(err, "pulling 'MinimumTTL' from propertyBag")
		}

		record.MinimumTTL = &minimumTTL
	} else {
		record.MinimumTTL = nil
	}

	// MinimumTtl
	if source.MinimumTtl != nil {
		propertyBag.Add("MinimumTtl", *source.MinimumTtl)
	} else {
		propertyBag.Remove("MinimumTtl")
	}

	// RefreshTime
	record.RefreshTime = genruntime.ClonePointerToInt(source.RefreshTime)

	// RetryTime
	record.RetryTime = genruntime.ClonePointerToInt(source.RetryTime)

	// SerialNumber
	record.SerialNumber = genruntime.ClonePointerToInt(source.SerialNumber)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForSoaRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForSoaRecord); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_SoaRecord populates the provided destination SoaRecord from our SoaRecord
func (record *SoaRecord) AssignProperties_To_SoaRecord(destination *storage.SoaRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Email
	destination.Email = genruntime.ClonePointerToString(record.Email)

	// ExpireTime
	destination.ExpireTime = genruntime.ClonePointerToInt(record.ExpireTime)

	// Host
	destination.Host = genruntime.ClonePointerToString(record.Host)

	// MinimumTTL
	if record.MinimumTTL != nil {
		propertyBag.Add("MinimumTTL", *record.MinimumTTL)
	} else {
		propertyBag.Remove("MinimumTTL")
	}

	// MinimumTtl
	if propertyBag.Contains("MinimumTtl") {
		var minimumTtl int
		err := propertyBag.Pull("MinimumTtl", &minimumTtl)
		if err != nil {
			return eris.Wrap(err, "pulling 'MinimumTtl' from propertyBag")
		}

		destination.MinimumTtl = &minimumTtl
	} else {
		destination.MinimumTtl = nil
	}

	// RefreshTime
	destination.RefreshTime = genruntime.ClonePointerToInt(record.RefreshTime)

	// RetryTime
	destination.RetryTime = genruntime.ClonePointerToInt(record.RetryTime)

	// SerialNumber
	destination.SerialNumber = genruntime.ClonePointerToInt(record.SerialNumber)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForSoaRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForSoaRecord); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.SoaRecord_STATUS
// An SOA record.
type SoaRecord_STATUS struct {
	Email        *string                `json:"email,omitempty"`
	ExpireTime   *int                   `json:"expireTime,omitempty"`
	Host         *string                `json:"host,omitempty"`
	MinimumTTL   *int                   `json:"minimumTTL,omitempty"`
	PropertyBag  genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	RefreshTime  *int                   `json:"refreshTime,omitempty"`
	RetryTime    *int                   `json:"retryTime,omitempty"`
	SerialNumber *int                   `json:"serialNumber,omitempty"`
}

// AssignProperties_From_SoaRecord_STATUS populates our SoaRecord_STATUS from the provided source SoaRecord_STATUS
func (record *SoaRecord_STATUS) AssignProperties_From_SoaRecord_STATUS(source *storage.SoaRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Email
	record.Email = genruntime.ClonePointerToString(source.Email)

	// ExpireTime
	record.ExpireTime = genruntime.ClonePointerToInt(source.ExpireTime)

	// Host
	record.Host = genruntime.ClonePointerToString(source.Host)

	// MinimumTTL
	if propertyBag.Contains("MinimumTTL") {
		var minimumTTL int
		err := propertyBag.Pull("MinimumTTL", &minimumTTL)
		if err != nil {
			return eris.Wrap(err, "pulling 'MinimumTTL' from propertyBag")
		}

		record.MinimumTTL = &minimumTTL
	} else {
		record.MinimumTTL = nil
	}

	// MinimumTtl
	if source.MinimumTtl != nil {
		propertyBag.Add("MinimumTtl", *source.MinimumTtl)
	} else {
		propertyBag.Remove("MinimumTtl")
	}

	// RefreshTime
	record.RefreshTime = genruntime.ClonePointerToInt(source.RefreshTime)

	// RetryTime
	record.RetryTime = genruntime.ClonePointerToInt(source.RetryTime)

	// SerialNumber
	record.SerialNumber = genruntime.ClonePointerToInt(source.SerialNumber)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForSoaRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForSoaRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_SoaRecord_STATUS populates the provided destination SoaRecord_STATUS from our SoaRecord_STATUS
func (record *SoaRecord_STATUS) AssignProperties_To_SoaRecord_STATUS(destination *storage.SoaRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Email
	destination.Email = genruntime.ClonePointerToString(record.Email)

	// ExpireTime
	destination.ExpireTime = genruntime.ClonePointerToInt(record.ExpireTime)

	// Host
	destination.Host = genruntime.ClonePointerToString(record.Host)

	// MinimumTTL
	if record.MinimumTTL != nil {
		propertyBag.Add("MinimumTTL", *record.MinimumTTL)
	} else {
		propertyBag.Remove("MinimumTTL")
	}

	// MinimumTtl
	if propertyBag.Contains("MinimumTtl") {
		var minimumTtl int
		err := propertyBag.Pull("MinimumTtl", &minimumTtl)
		if err != nil {
			return eris.Wrap(err, "pulling 'MinimumTtl' from propertyBag")
		}

		destination.MinimumTtl = &minimumTtl
	} else {
		destination.MinimumTtl = nil
	}

	// RefreshTime
	destination.RefreshTime = genruntime.ClonePointerToInt(record.RefreshTime)

	// RetryTime
	destination.RetryTime = genruntime.ClonePointerToInt(record.RetryTime)

	// SerialNumber
	destination.SerialNumber = genruntime.ClonePointerToInt(record.SerialNumber)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForSoaRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForSoaRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.SrvRecord
// An SRV record.
type SrvRecord struct {
	Port        *int                   `json:"port,omitempty"`
	Priority    *int                   `json:"priority,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Target      *string                `json:"target,omitempty"`
	Weight      *int                   `json:"weight,omitempty"`
}

// AssignProperties_From_SrvRecord populates our SrvRecord from the provided source SrvRecord
func (record *SrvRecord) AssignProperties_From_SrvRecord(source *storage.SrvRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Port
	record.Port = genruntime.ClonePointerToInt(source.Port)

	// Priority
	record.Priority = genruntime.ClonePointerToInt(source.Priority)

	// Target
	record.Target = genruntime.ClonePointerToString(source.Target)

	// Weight
	record.Weight = genruntime.ClonePointerToInt(source.Weight)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForSrvRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForSrvRecord); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_SrvRecord populates the provided destination SrvRecord from our SrvRecord
func (record *SrvRecord) AssignProperties_To_SrvRecord(destination *storage.SrvRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Port
	destination.Port = genruntime.ClonePointerToInt(record.Port)

	// Priority
	destination.Priority = genruntime.ClonePointerToInt(record.Priority)

	// Target
	destination.Target = genruntime.ClonePointerToString(record.Target)

	// Weight
	destination.Weight = genruntime.ClonePointerToInt(record.Weight)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForSrvRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForSrvRecord); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.SrvRecord_STATUS
// An SRV record.
type SrvRecord_STATUS struct {
	Port        *int                   `json:"port,omitempty"`
	Priority    *int                   `json:"priority,omitempty"`
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Target      *string                `json:"target,omitempty"`
	Weight      *int                   `json:"weight,omitempty"`
}

// AssignProperties_From_SrvRecord_STATUS populates our SrvRecord_STATUS from the provided source SrvRecord_STATUS
func (record *SrvRecord_STATUS) AssignProperties_From_SrvRecord_STATUS(source *storage.SrvRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Port
	record.Port = genruntime.ClonePointerToInt(source.Port)

	// Priority
	record.Priority = genruntime.ClonePointerToInt(source.Priority)

	// Target
	record.Target = genruntime.ClonePointerToString(source.Target)

	// Weight
	record.Weight = genruntime.ClonePointerToInt(source.Weight)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForSrvRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForSrvRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_SrvRecord_STATUS populates the provided destination SrvRecord_STATUS from our SrvRecord_STATUS
func (record *SrvRecord_STATUS) AssignProperties_To_SrvRecord_STATUS(destination *storage.SrvRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Port
	destination.Port = genruntime.ClonePointerToInt(record.Port)

	// Priority
	destination.Priority = genruntime.ClonePointerToInt(record.Priority)

	// Target
	destination.Target = genruntime.ClonePointerToString(record.Target)

	// Weight
	destination.Weight = genruntime.ClonePointerToInt(record.Weight)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForSrvRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForSrvRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.TxtRecord
// A TXT record.
type TxtRecord struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value       []string               `json:"value,omitempty"`
}

// AssignProperties_From_TxtRecord populates our TxtRecord from the provided source TxtRecord
func (record *TxtRecord) AssignProperties_From_TxtRecord(source *storage.TxtRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Value
	record.Value = genruntime.CloneSliceOfString(source.Value)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForTxtRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForTxtRecord); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_TxtRecord populates the provided destination TxtRecord from our TxtRecord
func (record *TxtRecord) AssignProperties_To_TxtRecord(destination *storage.TxtRecord) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Value
	destination.Value = genruntime.CloneSliceOfString(record.Value)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForTxtRecord interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForTxtRecord); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

// Storage version of v1api20180501.TxtRecord_STATUS
// A TXT record.
type TxtRecord_STATUS struct {
	PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"`
	Value       []string               `json:"value,omitempty"`
}

// AssignProperties_From_TxtRecord_STATUS populates our TxtRecord_STATUS from the provided source TxtRecord_STATUS
func (record *TxtRecord_STATUS) AssignProperties_From_TxtRecord_STATUS(source *storage.TxtRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(source.PropertyBag)

	// Value
	record.Value = genruntime.CloneSliceOfString(source.Value)

	// Update the property bag
	if len(propertyBag) > 0 {
		record.PropertyBag = propertyBag
	} else {
		record.PropertyBag = nil
	}

	// Invoke the augmentConversionForTxtRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForTxtRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesFrom(source)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesFrom() for conversion")
		}
	}

	// No error
	return nil
}

// AssignProperties_To_TxtRecord_STATUS populates the provided destination TxtRecord_STATUS from our TxtRecord_STATUS
func (record *TxtRecord_STATUS) AssignProperties_To_TxtRecord_STATUS(destination *storage.TxtRecord_STATUS) error {
	// Clone the existing property bag
	propertyBag := genruntime.NewPropertyBag(record.PropertyBag)

	// Value
	destination.Value = genruntime.CloneSliceOfString(record.Value)

	// Update the property bag
	if len(propertyBag) > 0 {
		destination.PropertyBag = propertyBag
	} else {
		destination.PropertyBag = nil
	}

	// Invoke the augmentConversionForTxtRecord_STATUS interface (if implemented) to customize the conversion
	var recordAsAny any = record
	if augmentedRecord, ok := recordAsAny.(augmentConversionForTxtRecord_STATUS); ok {
		err := augmentedRecord.AssignPropertiesTo(destination)
		if err != nil {
			return eris.Wrap(err, "calling augmented AssignPropertiesTo() for conversion")
		}
	}

	// No error
	return nil
}

type augmentConversionForAaaaRecord interface {
	AssignPropertiesFrom(src *storage.AaaaRecord) error
	AssignPropertiesTo(dst *storage.AaaaRecord) error
}

type augmentConversionForAaaaRecord_STATUS interface {
	AssignPropertiesFrom(src *storage.AaaaRecord_STATUS) error
	AssignPropertiesTo(dst *storage.AaaaRecord_STATUS) error
}

type augmentConversionForARecord interface {
	AssignPropertiesFrom(src *storage.ARecord) error
	AssignPropertiesTo(dst *storage.ARecord) error
}

type augmentConversionForARecord_STATUS interface {
	AssignPropertiesFrom(src *storage.ARecord_STATUS) error
	AssignPropertiesTo(dst *storage.ARecord_STATUS) error
}

type augmentConversionForCnameRecord interface {
	AssignPropertiesFrom(src *storage.CnameRecord) error
	AssignPropertiesTo(dst *storage.CnameRecord) error
}

type augmentConversionForCnameRecord_STATUS interface {
	AssignPropertiesFrom(src *storage.CnameRecord_STATUS) error
	AssignPropertiesTo(dst *storage.CnameRecord_STATUS) error
}

type augmentConversionForMxRecord interface {
	AssignPropertiesFrom(src *storage.MxRecord) error
	AssignPropertiesTo(dst *storage.MxRecord) error
}

type augmentConversionForMxRecord_STATUS interface {
	AssignPropertiesFrom(src *storage.MxRecord_STATUS) error
	AssignPropertiesTo(dst *storage.MxRecord_STATUS) error
}

type augmentConversionForPtrRecord interface {
	AssignPropertiesFrom(src *storage.PtrRecord) error
	AssignPropertiesTo(dst *storage.PtrRecord) error
}

type augmentConversionForPtrRecord_STATUS interface {
	AssignPropertiesFrom(src *storage.PtrRecord_STATUS) error
	AssignPropertiesTo(dst *storage.PtrRecord_STATUS) error
}

type augmentConversionForSoaRecord interface {
	AssignPropertiesFrom(src *storage.SoaRecord) error
	AssignPropertiesTo(dst *storage.SoaRecord) error
}

type augmentConversionForSoaRecord_STATUS interface {
	AssignPropertiesFrom(src *storage.SoaRecord_STATUS) error
	AssignPropertiesTo(dst *storage.SoaRecord_STATUS) error
}

type augmentConversionForSrvRecord interface {
	AssignPropertiesFrom(src *storage.SrvRecord) error
	AssignPropertiesTo(dst *storage.SrvRecord) error
}

type augmentConversionForSrvRecord_STATUS interface {
	AssignPropertiesFrom(src *storage.SrvRecord_STATUS) error
	AssignPropertiesTo(dst *storage.SrvRecord_STATUS) error
}

type augmentConversionForTxtRecord interface {
	AssignPropertiesFrom(src *storage.TxtRecord) error
	AssignPropertiesTo(dst *storage.TxtRecord) error
}

type augmentConversionForTxtRecord_STATUS interface {
	AssignPropertiesFrom(src *storage.TxtRecord_STATUS) error
	AssignPropertiesTo(dst *storage.TxtRecord_STATUS) error
}

func init() {
	SchemeBuilder.Register(&DnsZonesAAAARecord{}, &DnsZonesAAAARecordList{})
}
