func (o *PacketReport) ToSparse(fields ...string) elemental.SparseIdentifiable {

	if len(fields) == 0 {
		// nolint: goimports
		return &SparsePacketReport{
			ID:                &o.ID,
			TCPFlags:          &o.TCPFlags,
			Claims:            &o.Claims,
			DestinationIP:     &o.DestinationIP,
			DestinationPort:   &o.DestinationPort,
			DropReason:        &o.DropReason,
			Encrypt:           &o.Encrypt,
			EnforcerID:        &o.EnforcerID,
			EnforcerNamespace: &o.EnforcerNamespace,
			Event:             &o.Event,
			Length:            &o.Length,
			Mark:              &o.Mark,
			MigrationsLog:     &o.MigrationsLog,
			Namespace:         &o.Namespace,
			PacketID:          &o.PacketID,
			Protocol:          &o.Protocol,
			PuID:              &o.PuID,
			RawPacket:         &o.RawPacket,
			SourceIP:          &o.SourceIP,
			SourcePort:        &o.SourcePort,
			Timestamp:         &o.Timestamp,
			TriremePacket:     &o.TriremePacket,
			ZHash:             &o.ZHash,
			Zone:              &o.Zone,
		}
	}

	sp := &SparsePacketReport{}
	for _, f := range fields {
		switch f {
		case "ID":
			sp.ID = &(o.ID)
		case "TCPFlags":
			sp.TCPFlags = &(o.TCPFlags)
		case "claims":
			sp.Claims = &(o.Claims)
		case "destinationIP":
			sp.DestinationIP = &(o.DestinationIP)
		case "destinationPort":
			sp.DestinationPort = &(o.DestinationPort)
		case "dropReason":
			sp.DropReason = &(o.DropReason)
		case "encrypt":
			sp.Encrypt = &(o.Encrypt)
		case "enforcerID":
			sp.EnforcerID = &(o.EnforcerID)
		case "enforcerNamespace":
			sp.EnforcerNamespace = &(o.EnforcerNamespace)
		case "event":
			sp.Event = &(o.Event)
		case "length":
			sp.Length = &(o.Length)
		case "mark":
			sp.Mark = &(o.Mark)
		case "migrationsLog":
			sp.MigrationsLog = &(o.MigrationsLog)
		case "namespace":
			sp.Namespace = &(o.Namespace)
		case "packetID":
			sp.PacketID = &(o.PacketID)
		case "protocol":
			sp.Protocol = &(o.Protocol)
		case "puID":
			sp.PuID = &(o.PuID)
		case "rawPacket":
			sp.RawPacket = &(o.RawPacket)
		case "sourceIP":
			sp.SourceIP = &(o.SourceIP)
		case "sourcePort":
			sp.SourcePort = &(o.SourcePort)
		case "timestamp":
			sp.Timestamp = &(o.Timestamp)
		case "triremePacket":
			sp.TriremePacket = &(o.TriremePacket)
		case "zHash":
			sp.ZHash = &(o.ZHash)
		case "zone":
			sp.Zone = &(o.Zone)
		}
	}

	return sp
}
// ToSparse returns the sparse version of the model.
// The returned object will only contain the given fields. No field means entire field set.
ToSparse returns the sparse version of the model.
The returned object will only contain the given fields. No field means entire field set.
// ToSparse returns the sparse version of the model . // The returned object will only contain the given fields . No field means entire field set .
func (o *PacketReport) ToSparse(fields ...string) elemental.SparseIdentifiable {
	if len(fields) == 0 {
		return &SparsePacketReport{
			ID:                &o.ID,
			TCPFlags:          &o.TCPFlags,
			Claims:            &o.Claims,
			DestinationIP:     &o.DestinationIP,
			DestinationPort:   &o.DestinationPort,
			DropReason:        &o.DropReason,
			Encrypt:           &o.Encrypt,
			EnforcerID:        &o.EnforcerID,
			EnforcerNamespace: &o.EnforcerNamespace,
			Event:             &o.Event,
			Length:            &o.Length,
			Mark:              &o.Mark,
			MigrationsLog:     &o.MigrationsLog,
			Namespace:         &o.Namespace,
			PacketID:          &o.PacketID,
			Protocol:          &o.Protocol,
			PuID:              &o.PuID,
			RawPacket:         &o.RawPacket,
			SourceIP:          &o.SourceIP,
			SourcePort:        &o.SourcePort,
			Timestamp:         &o.Timestamp,
			TriremePacket:     &o.TriremePacket,
			ZHash:             &o.ZHash,
			Zone:              &o.Zone,
		}
	}
	sp := &SparsePacketReport{}
	for _, f := range fields {
		switch f {
		case "ID":
			sp.ID = &(o.ID)
		case "TCPFlags":
			sp.TCPFlags = &(o.TCPFlags)
		case "claims":
			sp.Claims = &(o.Claims)
		case "destinationIP":
			sp.DestinationIP = &(o.DestinationIP)
		case "destinationPort":
			sp.DestinationPort = &(o.DestinationPort)
		case "dropReason":
			sp.DropReason = &(o.DropReason)
		case "encrypt":
			sp.Encrypt = &(o.Encrypt)
		case "enforcerID":
			sp.EnforcerID = &(o.EnforcerID)
		case "enforcerNamespace":
			sp.EnforcerNamespace = &(o.EnforcerNamespace)
		case "event":
			sp.Event = &(o.Event)
		case "length":
			sp.Length = &(o.Length)
		case "mark":
			sp.Mark = &(o.Mark)
		case "migrationsLog":
			sp.MigrationsLog = &(o.MigrationsLog)
		case "namespace":
			sp.Namespace = &(o.Namespace)
		case "packetID":
			sp.PacketID = &(o.PacketID)
		case "protocol":
			sp.Protocol = &(o.Protocol)
		case "puID":
			sp.PuID = &(o.PuID)
		case "rawPacket":
			sp.RawPacket = &(o.RawPacket)
		case "sourceIP":
			sp.SourceIP = &(o.SourceIP)
		case "sourcePort":
			sp.SourcePort = &(o.SourcePort)
		case "timestamp":
			sp.Timestamp = &(o.Timestamp)
		case "triremePacket":
			sp.TriremePacket = &(o.TriremePacket)
		case "zHash":
			sp.ZHash = &(o.ZHash)
		case "zone":
			sp.Zone = &(o.Zone)
		}
	}
	return sp
}
func ( o * PacketReport ) ToSparse ( fields ... string ) elemental . SparseIdentifiable { if len ( fields ) == 0 { return & SparsePacketReport { ID : & o . ID , TCPFlags : & o . TCPFlags , Claims : & o . Claims , DestinationIP : & o . DestinationIP , DestinationPort : & o . DestinationPort , DropReason : & o . DropReason , Encrypt : & o . Encrypt , EnforcerID : & o . EnforcerID , EnforcerNamespace : & o . EnforcerNamespace , Event : & o . Event , Length : & o . Length , Mark : & o . Mark , MigrationsLog : & o . MigrationsLog , Namespace : & o . Namespace , PacketID : & o . PacketID , Protocol : & o . Protocol , PuID : & o . PuID , RawPacket : & o . RawPacket , SourceIP : & o . SourceIP , SourcePort : & o . SourcePort , Timestamp : & o . Timestamp , TriremePacket : & o . TriremePacket , ZHash : & o . ZHash , Zone : & o . Zone , } } sp := & SparsePacketReport { } for _ , f := range fields { switch f { case " " : sp . ID = & ( o . ID ) case " " : sp . TCPFlags = & ( o . TCPFlags ) case " " : sp . Claims = & ( o . Claims ) case " " : sp . DestinationIP = & ( o . DestinationIP ) case " " : sp . DestinationPort = & ( o . DestinationPort ) case " " : sp . DropReason = & ( o . DropReason ) case " " : sp . Encrypt = & ( o . Encrypt ) case " " : sp . EnforcerID = & ( o . EnforcerID ) case " " : sp . EnforcerNamespace = & ( o . EnforcerNamespace ) case " " : sp . Event = & ( o . Event ) case " " : sp . Length = & ( o . Length ) case " " : sp . Mark = & ( o . Mark ) case " " : sp . MigrationsLog = & ( o . MigrationsLog ) case " " : sp . Namespace = & ( o . Namespace ) case " " : sp . PacketID = & ( o . PacketID ) case " " : sp . Protocol = & ( o . Protocol ) case " " : sp . PuID = & ( o . PuID ) case " " : sp . RawPacket = & ( o . RawPacket ) case " " : sp . SourceIP = & ( o . SourceIP ) case " " : sp . SourcePort = & ( o . SourcePort ) case " " : sp . Timestamp = & ( o . Timestamp ) case " " : sp . TriremePacket = & ( o . TriremePacket ) case " " : sp . ZHash = & ( o . ZHash ) case " " : sp . Zone = & ( o . Zone ) } } return sp }
ToSparse returns the sparse version of the model.
ToSparse returns the sparse version of the model .
// nolint: goimports