// Code generated by "go run clone_generate.go"; DO NOT EDIT.

package dns

import (
	"slices"

	"codeberg.org/miekg/dns/deleg"
	"codeberg.org/miekg/dns/rdata"
	"codeberg.org/miekg/dns/svcb"
)

func (rr *NULL) Clone() RR {
	return &NULL{
		Hdr: rr.Hdr,
		NULL: rdata.NULL{
			Null: rr.Null,
		},
	}
}

func (rr *CNAME) Clone() RR {
	return &CNAME{
		Hdr: rr.Hdr,
		CNAME: rdata.CNAME{
			Target: rr.Target,
		},
	}
}

func (rr *HINFO) Clone() RR {
	return &HINFO{
		Hdr: rr.Hdr,
		HINFO: rdata.HINFO{
			Cpu: rr.Cpu,
			Os:  rr.Os,
		},
	}
}

func (rr *MB) Clone() RR {
	return &MB{
		Hdr: rr.Hdr,
		MB: rdata.MB{
			Mb: rr.Mb,
		},
	}
}

func (rr *MG) Clone() RR {
	return &MG{
		Hdr: rr.Hdr,
		MG: rdata.MG{
			Mg: rr.Mg,
		},
	}
}

func (rr *MINFO) Clone() RR {
	return &MINFO{
		Hdr: rr.Hdr,
		MINFO: rdata.MINFO{
			Rmail: rr.Rmail,
			Email: rr.Email,
		},
	}
}

func (rr *MR) Clone() RR {
	return &MR{
		Hdr: rr.Hdr,
		MR: rdata.MR{
			Mr: rr.Mr,
		},
	}
}

func (rr *MF) Clone() RR {
	return &MF{
		Hdr: rr.Hdr,
		MF: rdata.MF{
			Mf: rr.Mf,
		},
	}
}

func (rr *MD) Clone() RR {
	return &MD{
		Hdr: rr.Hdr,
		MD: rdata.MD{
			Md: rr.Md,
		},
	}
}

func (rr *MX) Clone() RR {
	return &MX{
		Hdr: rr.Hdr,
		MX: rdata.MX{
			Preference: rr.Preference,
			Mx:         rr.Mx,
		},
	}
}

func (rr *AFSDB) Clone() RR {
	return &AFSDB{
		Hdr: rr.Hdr,
		AFSDB: rdata.AFSDB{
			Subtype:  rr.Subtype,
			Hostname: rr.Hostname,
		},
	}
}

func (rr *X25) Clone() RR {
	return &X25{
		Hdr: rr.Hdr,
		X25: rdata.X25{
			PSDNAddress: rr.PSDNAddress,
		},
	}
}

func (rr *ISDN) Clone() RR {
	return &ISDN{
		Hdr: rr.Hdr,
		ISDN: rdata.ISDN{
			Address:    rr.Address,
			SubAddress: rr.SubAddress,
		},
	}
}

func (rr *RT) Clone() RR {
	return &RT{
		Hdr: rr.Hdr,
		RT: rdata.RT{
			Preference: rr.Preference,
			Host:       rr.Host,
		},
	}
}

func (rr *NS) Clone() RR {
	return &NS{
		Hdr: rr.Hdr,
		NS: rdata.NS{
			Ns: rr.Ns,
		},
	}
}

func (rr *PTR) Clone() RR {
	return &PTR{
		Hdr: rr.Hdr,
		PTR: rdata.PTR{
			Ptr: rr.Ptr,
		},
	}
}

func (rr *RP) Clone() RR {
	return &RP{
		Hdr: rr.Hdr,
		RP: rdata.RP{
			Mbox: rr.Mbox,
			Txt:  rr.Txt,
		},
	}
}

func (rr *SOA) Clone() RR {
	return &SOA{
		Hdr: rr.Hdr,
		SOA: rdata.SOA{
			Ns:      rr.Ns,
			Mbox:    rr.Mbox,
			Serial:  rr.Serial,
			Refresh: rr.Refresh,
			Retry:   rr.Retry,
			Expire:  rr.Expire,
			Minttl:  rr.Minttl,
		},
	}
}

func (rr *TXT) Clone() RR {
	return &TXT{
		Hdr: rr.Hdr,
		TXT: rdata.TXT{
			Txt: slices.Clone(rr.Txt),
		},
	}
}

func (rr *IPN) Clone() RR {
	return &IPN{
		Hdr: rr.Hdr,
		IPN: rdata.IPN{
			Node: rr.Node,
		},
	}
}

func (rr *SRV) Clone() RR {
	return &SRV{
		Hdr: rr.Hdr,
		SRV: rdata.SRV{
			Priority: rr.Priority,
			Weight:   rr.Weight,
			Port:     rr.Port,
			Target:   rr.Target,
		},
	}
}

func (rr *NAPTR) Clone() RR {
	return &NAPTR{
		Hdr: rr.Hdr,
		NAPTR: rdata.NAPTR{
			Order:       rr.Order,
			Preference:  rr.Preference,
			Flags:       rr.Flags,
			Service:     rr.Service,
			Regexp:      rr.Regexp,
			Replacement: rr.Replacement,
		},
	}
}

func (rr *CERT) Clone() RR {
	return &CERT{
		Hdr: rr.Hdr,
		CERT: rdata.CERT{
			Type:        rr.Type,
			KeyTag:      rr.KeyTag,
			Algorithm:   rr.Algorithm,
			Certificate: rr.Certificate,
		},
	}
}

func (rr *DNAME) Clone() RR {
	return &DNAME{
		Hdr: rr.Hdr,
		DNAME: rdata.DNAME{
			Target: rr.Target,
		},
	}
}

func (rr *A) Clone() RR {
	return &A{
		Hdr: rr.Hdr,
		A: rdata.A{
			Addr: rr.Addr,
		},
	}
}

func (rr *AAAA) Clone() RR {
	return &AAAA{
		Hdr: rr.Hdr,
		AAAA: rdata.AAAA{
			Addr: rr.Addr,
		},
	}
}

func (rr *PX) Clone() RR {
	return &PX{
		Hdr: rr.Hdr,
		PX: rdata.PX{
			Preference: rr.Preference,
			Map822:     rr.Map822,
			Mapx400:    rr.Mapx400,
		},
	}
}

func (rr *GPOS) Clone() RR {
	return &GPOS{
		Hdr: rr.Hdr,
		GPOS: rdata.GPOS{
			Longitude: rr.Longitude,
			Latitude:  rr.Latitude,
			Altitude:  rr.Altitude,
		},
	}
}

func (rr *LOC) Clone() RR {
	return &LOC{
		Hdr: rr.Hdr,
		LOC: rdata.LOC{
			Version:   rr.Version,
			Size:      rr.Size,
			HorizPre:  rr.HorizPre,
			VertPre:   rr.VertPre,
			Latitude:  rr.Latitude,
			Longitude: rr.Longitude,
			Altitude:  rr.Altitude,
		},
	}
}

func (rr *RRSIG) Clone() RR {
	return &RRSIG{
		Hdr: rr.Hdr,
		RRSIG: rdata.RRSIG{
			TypeCovered: rr.TypeCovered,
			Algorithm:   rr.Algorithm,
			Labels:      rr.Labels,
			OrigTTL:     rr.OrigTTL,
			Expiration:  rr.Expiration,
			Inception:   rr.Inception,
			KeyTag:      rr.KeyTag,
			SignerName:  rr.SignerName,
			Signature:   rr.Signature,
		},
	}
}

func (rr *NSEC) Clone() RR {
	return &NSEC{
		Hdr: rr.Hdr,
		NSEC: rdata.NSEC{
			NextDomain: rr.NextDomain,
			TypeBitMap: slices.Clone(rr.TypeBitMap),
		},
	}
}

func (rr *DS) Clone() RR {
	return &DS{
		Hdr: rr.Hdr,
		DS: rdata.DS{
			KeyTag:     rr.KeyTag,
			Algorithm:  rr.Algorithm,
			DigestType: rr.DigestType,
			Digest:     rr.Digest,
		},
	}
}

func (rr *KX) Clone() RR {
	return &KX{
		Hdr: rr.Hdr,
		KX: rdata.KX{
			Preference: rr.Preference,
			Exchanger:  rr.Exchanger,
		},
	}
}

func (rr *TA) Clone() RR {
	return &TA{
		Hdr: rr.Hdr,
		TA: rdata.TA{
			KeyTag:     rr.KeyTag,
			Algorithm:  rr.Algorithm,
			DigestType: rr.DigestType,
			Digest:     rr.Digest,
		},
	}
}

func (rr *TALINK) Clone() RR {
	return &TALINK{
		Hdr: rr.Hdr,
		TALINK: rdata.TALINK{
			PreviousName: rr.PreviousName,
			NextName:     rr.NextName,
		},
	}
}

func (rr *SSHFP) Clone() RR {
	return &SSHFP{
		Hdr: rr.Hdr,
		SSHFP: rdata.SSHFP{
			Algorithm:   rr.Algorithm,
			Type:        rr.Type,
			FingerPrint: rr.FingerPrint,
		},
	}
}

func (rr *DNSKEY) Clone() RR {
	return &DNSKEY{
		Hdr: rr.Hdr,
		DNSKEY: rdata.DNSKEY{
			Flags:     rr.Flags,
			Protocol:  rr.Protocol,
			Algorithm: rr.Algorithm,
			PublicKey: rr.PublicKey,
			Tag:       rr.Tag,
		},
	}
}

func (rr *RKEY) Clone() RR {
	return &RKEY{
		Hdr: rr.Hdr,
		RKEY: rdata.RKEY{
			Flags:     rr.Flags,
			Protocol:  rr.Protocol,
			Algorithm: rr.Algorithm,
			PublicKey: rr.PublicKey,
		},
	}
}

func (rr *NSAPPTR) Clone() RR {
	return &NSAPPTR{
		Hdr: rr.Hdr,
		NSAPPTR: rdata.NSAPPTR{
			Ptr: rr.Ptr,
		},
	}
}

func (rr *NSEC3) Clone() RR {
	return &NSEC3{
		Hdr: rr.Hdr,
		NSEC3: rdata.NSEC3{
			Hash:       rr.Hash,
			Flags:      rr.Flags,
			Iterations: rr.Iterations,
			SaltLength: rr.SaltLength,
			Salt:       rr.Salt,
			HashLength: rr.HashLength,
			NextDomain: rr.NextDomain,
			TypeBitMap: slices.Clone(rr.TypeBitMap),
		},
	}
}

func (rr *NSEC3PARAM) Clone() RR {
	return &NSEC3PARAM{
		Hdr: rr.Hdr,
		NSEC3PARAM: rdata.NSEC3PARAM{
			Hash:       rr.Hash,
			Flags:      rr.Flags,
			Iterations: rr.Iterations,
			SaltLength: rr.SaltLength,
			Salt:       rr.Salt,
		},
	}
}

func (rr *TKEY) Clone() RR {
	return &TKEY{
		Hdr: rr.Hdr,
		TKEY: rdata.TKEY{
			Algorithm:  rr.Algorithm,
			Inception:  rr.Inception,
			Expiration: rr.Expiration,
			Mode:       rr.Mode,
			Error:      rr.Error,
			KeySize:    rr.KeySize,
			Key:        rr.Key,
			OtherLen:   rr.OtherLen,
			OtherData:  rr.OtherData,
		},
	}
}

func (rr *RFC3597) Clone() RR {
	return &RFC3597{
		Hdr: rr.Hdr,
		RFC3597: rdata.RFC3597{
			RRType: rr.RRType,
			Data:   rr.RFC3597.Data,
		},
	}
}

func (rr *URI) Clone() RR {
	return &URI{
		Hdr: rr.Hdr,
		URI: rdata.URI{
			Priority: rr.Priority,
			Weight:   rr.Weight,
			Target:   rr.Target,
		},
	}
}

func (rr *DHCID) Clone() RR {
	return &DHCID{
		Hdr: rr.Hdr,
		DHCID: rdata.DHCID{
			Digest: rr.Digest,
		},
	}
}

func (rr *TLSA) Clone() RR {
	return &TLSA{
		Hdr: rr.Hdr,
		TLSA: rdata.TLSA{
			Usage:        rr.Usage,
			Selector:     rr.Selector,
			MatchingType: rr.MatchingType,
			Certificate:  rr.Certificate,
		},
	}
}

func (rr *SMIMEA) Clone() RR {
	return &SMIMEA{
		Hdr: rr.Hdr,
		SMIMEA: rdata.SMIMEA{
			Usage:        rr.Usage,
			Selector:     rr.Selector,
			MatchingType: rr.MatchingType,
			Certificate:  rr.Certificate,
		},
	}
}

func (rr *HIP) Clone() RR {
	return &HIP{
		Hdr: rr.Hdr,
		HIP: rdata.HIP{
			HitLength:          rr.HitLength,
			PublicKeyAlgorithm: rr.PublicKeyAlgorithm,
			PublicKeyLength:    rr.PublicKeyLength,
			Hit:                rr.Hit,
			PublicKey:          rr.PublicKey,
			RendezvousServers:  slices.Clone(rr.RendezvousServers),
		},
	}
}

func (rr *NINFO) Clone() RR {
	return &NINFO{
		Hdr: rr.Hdr,
		NINFO: rdata.NINFO{
			ZSData: slices.Clone(rr.ZSData),
		},
	}
}

func (rr *NID) Clone() RR {
	return &NID{
		Hdr: rr.Hdr,
		NID: rdata.NID{
			Preference: rr.Preference,
			NodeID:     rr.NodeID,
		},
	}
}

func (rr *L32) Clone() RR {
	return &L32{
		Hdr: rr.Hdr,
		L32: rdata.L32{
			Preference: rr.Preference,
			Locator32:  rr.Locator32,
		},
	}
}

func (rr *L64) Clone() RR {
	return &L64{
		Hdr: rr.Hdr,
		L64: rdata.L64{
			Preference: rr.Preference,
			Locator64:  rr.Locator64,
		},
	}
}

func (rr *LP) Clone() RR {
	return &LP{
		Hdr: rr.Hdr,
		LP: rdata.LP{
			Preference: rr.Preference,
			Fqdn:       rr.Fqdn,
		},
	}
}

func (rr *EUI48) Clone() RR {
	return &EUI48{
		Hdr: rr.Hdr,
		EUI48: rdata.EUI48{
			Address: rr.Address,
		},
	}
}

func (rr *EUI64) Clone() RR {
	return &EUI64{
		Hdr: rr.Hdr,
		EUI64: rdata.EUI64{
			Address: rr.Address,
		},
	}
}

func (rr *CAA) Clone() RR {
	return &CAA{
		Hdr: rr.Hdr,
		CAA: rdata.CAA{
			Flag:  rr.Flag,
			Tag:   rr.Tag,
			Value: rr.Value,
		},
	}
}

func (rr *UID) Clone() RR {
	return &UID{
		Hdr: rr.Hdr,
		UID: rdata.UID{
			Uid: rr.Uid,
		},
	}
}

func (rr *GID) Clone() RR {
	return &GID{
		Hdr: rr.Hdr,
		GID: rdata.GID{
			Gid: rr.Gid,
		},
	}
}

func (rr *UINFO) Clone() RR {
	return &UINFO{
		Hdr: rr.Hdr,
		UINFO: rdata.UINFO{
			Uinfo: rr.Uinfo,
		},
	}
}

func (rr *EID) Clone() RR {
	return &EID{
		Hdr: rr.Hdr,
		EID: rdata.EID{
			Endpoint: rr.Endpoint,
		},
	}
}

func (rr *NIMLOC) Clone() RR {
	return &NIMLOC{
		Hdr: rr.Hdr,
		NIMLOC: rdata.NIMLOC{
			Locator: rr.Locator,
		},
	}
}

func (rr *OPENPGPKEY) Clone() RR {
	return &OPENPGPKEY{
		Hdr: rr.Hdr,
		OPENPGPKEY: rdata.OPENPGPKEY{
			PublicKey: rr.PublicKey,
		},
	}
}

func (rr *CSYNC) Clone() RR {
	return &CSYNC{
		Hdr: rr.Hdr,
		CSYNC: rdata.CSYNC{
			Serial:     rr.Serial,
			Flags:      rr.Flags,
			TypeBitMap: slices.Clone(rr.TypeBitMap),
		},
	}
}

func (rr *ZONEMD) Clone() RR {
	return &ZONEMD{
		Hdr: rr.Hdr,
		ZONEMD: rdata.ZONEMD{
			Serial: rr.Serial,
			Scheme: rr.Scheme,
			Hash:   rr.Hash,
			Digest: rr.Digest,
		},
	}
}

func (rr *SVCB) Clone() RR {
	return &SVCB{
		Hdr: rr.Hdr,
		SVCB: rdata.SVCB{
			Priority: rr.Priority,
			Target:   rr.Target,
			Value: func() []svcb.Pair {
				pairs := make([]svcb.Pair, len(rr.Value))
				for i, p := range rr.Value {
					pairs[i] = p.Clone()
				}
				return pairs
			}(),
		},
	}
}

func (rr *DELEG) Clone() RR {
	return &DELEG{
		Hdr: rr.Hdr,
		DELEG: rdata.DELEG{
			Value: func() []deleg.Info {
				infos := make([]deleg.Info, len(rr.Value))
				for i, p := range rr.Value {
					infos[i] = p.Clone()
				}
				return infos
			}(),
		},
	}
}

func (rr *DSYNC) Clone() RR {
	return &DSYNC{
		Hdr: rr.Hdr,
		DSYNC: rdata.DSYNC{
			Type:   rr.Type,
			Scheme: rr.Scheme,
			Port:   rr.Port,
			Target: rr.Target,
		},
	}
}

func (rr *TSIG) Clone() RR {
	return &TSIG{
		Hdr: rr.Hdr,
		TSIG: rdata.TSIG{
			Algorithm:  rr.Algorithm,
			TimeSigned: rr.TimeSigned,
			Fudge:      rr.Fudge,
			MACSize:    rr.MACSize,
			MAC:        rr.MAC,
			OrigID:     rr.OrigID,
			Error:      rr.Error,
			OtherLen:   rr.OtherLen,
			OtherData:  rr.OtherData,
		},
	}
}

func (rr *NXNAME) Clone() RR {
	return &NXNAME{
		Hdr: rr.Hdr,
	}
}

func (rr *SPF) Clone() RR {
	return &SPF{*rr.TXT.Clone().(*TXT)}
}
func (rr *AVC) Clone() RR {
	return &AVC{*rr.TXT.Clone().(*TXT)}
}
func (rr *WALLET) Clone() RR {
	return &WALLET{*rr.TXT.Clone().(*TXT)}
}
func (rr *CLA) Clone() RR {
	return &CLA{*rr.TXT.Clone().(*TXT)}
}
func (rr *SIG) Clone() RR {
	return &SIG{*rr.RRSIG.Clone().(*RRSIG)}
}
func (rr *NXT) Clone() RR {
	return &NXT{*rr.NSEC.Clone().(*NSEC)}
}
func (rr *DLV) Clone() RR {
	return &DLV{*rr.DS.Clone().(*DS)}
}
func (rr *CDS) Clone() RR {
	return &CDS{*rr.DS.Clone().(*DS)}
}
func (rr *KEY) Clone() RR {
	return &KEY{*rr.DNSKEY.Clone().(*DNSKEY)}
}
func (rr *CDNSKEY) Clone() RR {
	return &CDNSKEY{*rr.DNSKEY.Clone().(*DNSKEY)}
}
func (rr *OPT) Clone() RR {
	return &OPT{
		Hdr:     rr.Hdr,
		Options: slices.Clone(rr.Options),
	}
}

func (rr *RESINFO) Clone() RR {
	return &RESINFO{*rr.TXT.Clone().(*TXT)}
}
func (rr *HTTPS) Clone() RR {
	return &HTTPS{*rr.SVCB.Clone().(*SVCB)}
}
func (rr *DELEGPARAM) Clone() RR {
	return &DELEGPARAM{*rr.DELEG.Clone().(*DELEG)}
}
func (rr *ANY) Clone() RR {
	return &ANY{
		Hdr: rr.Hdr,
	}
}

func (rr *AXFR) Clone() RR {
	return &AXFR{
		Hdr: rr.Hdr,
	}
}

func (rr *IXFR) Clone() RR {
	return &IXFR{
		Hdr: rr.Hdr,
	}
}

func (rr *LLQ) Clone() RR {
	return &LLQ{
		Version:   rr.Version,
		Opcode:    rr.Opcode,
		Error:     rr.Error,
		ID:        rr.ID,
		LeaseLife: rr.LeaseLife,
	}
}

func (rr *UPDATELEASE) Clone() RR {
	return &UPDATELEASE{
		Lease:    rr.Lease,
		KeyLease: rr.KeyLease,
	}
}

func (rr *REPORTING) Clone() RR {
	return &REPORTING{
		AgentDomain: rr.AgentDomain,
	}
}

func (rr *COOKIE) Clone() RR {
	return &COOKIE{
		Cookie: rr.Cookie,
	}
}

func (rr *NSID) Clone() RR {
	return &NSID{
		Nsid: rr.Nsid,
	}
}

func (rr *PADDING) Clone() RR {
	return &PADDING{
		Padding: rr.Padding,
	}
}

func (rr *EXPIRE) Clone() RR {
	return &EXPIRE{
		Expire: rr.Expire,
	}
}

func (rr *DAU) Clone() RR {
	return &DAU{
		AlgCode: slices.Clone(rr.AlgCode),
	}
}

func (rr *DHU) Clone() RR {
	return &DHU{
		AlgCode: slices.Clone(rr.AlgCode),
	}
}

func (rr *N3U) Clone() RR {
	return &N3U{
		AlgCode: slices.Clone(rr.AlgCode),
	}
}

func (rr *TCPKEEPALIVE) Clone() RR {
	return &TCPKEEPALIVE{
		Timeout: rr.Timeout,
	}
}

func (rr *EDE) Clone() RR {
	return &EDE{
		InfoCode:  rr.InfoCode,
		ExtraText: rr.ExtraText,
	}
}

func (rr *SUBNET) Clone() RR {
	return &SUBNET{
		Family:  rr.Family,
		Netmask: rr.Netmask,
		Scope:   rr.Scope,
		Address: rr.Address,
	}
}

func (rr *ESU) Clone() RR {
	return &ESU{
		URI: rr.URI,
	}
}

func (rr *ZONEVERSION) Clone() RR {
	return &ZONEVERSION{
		Labels:  rr.Labels,
		Type:    rr.Type,
		Version: slices.Clone(rr.Version),
	}
}

func (rr *MQQUERY) Clone() RR {
	return &MQQUERY{
		Types: slices.Clone(rr.Types),
	}
}

func (rr *MQRESPONSE) Clone() RR {
	return &MQRESPONSE{
		Types: slices.Clone(rr.Types),
	}
}

func (rr *KEYTAG) Clone() RR {
	return &KEYTAG{
		Types: slices.Clone(rr.Types),
	}
}

func (rr *ERFC3597) Clone() RR {
	return &ERFC3597{
		EDNS0Code: rr.EDNS0Code,
		Code:      rr.Code,
	}
}

func (rr *KEEPALIVE) Clone() RR {
	return &KEEPALIVE{
		Timeout:  rr.Timeout,
		Interval: rr.Interval,
	}
}

func (rr *RETRYDELAY) Clone() RR {
	return &RETRYDELAY{
		Delay: rr.Delay,
	}
}

func (rr *DPADDING) Clone() RR {
	return &DPADDING{
		Padding: rr.Padding,
	}
}
