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

	if len(fields) == 0 {
		// nolint: goimports
		return &SparseCachedFlowReport{
			ID:                      &o.ID,
			Action:                  &o.Action,
			DestinationController:   &o.DestinationController,
			DestinationID:           &o.DestinationID,
			DestinationIP:           &o.DestinationIP,
			DestinationNamespace:    &o.DestinationNamespace,
			DestinationPlatform:     &o.DestinationPlatform,
			DestinationPort:         &o.DestinationPort,
			DestinationType:         &o.DestinationType,
			DropReason:              &o.DropReason,
			Encrypted:               &o.Encrypted,
			EnforcerID:              &o.EnforcerID,
			IsLocalDestinationID:    &o.IsLocalDestinationID,
			IsLocalSourceID:         &o.IsLocalSourceID,
			MigrationsLog:           &o.MigrationsLog,
			Namespace:               &o.Namespace,
			Observed:                &o.Observed,
			ObservedAction:          &o.ObservedAction,
			ObservedDropReason:      &o.ObservedDropReason,
			ObservedEncrypted:       &o.ObservedEncrypted,
			ObservedPolicyID:        &o.ObservedPolicyID,
			ObservedPolicyNamespace: &o.ObservedPolicyNamespace,
			PolicyID:                &o.PolicyID,
			PolicyNamespace:         &o.PolicyNamespace,
			Protocol:                &o.Protocol,
			RemoteNamespace:         &o.RemoteNamespace,
			RuleName:                &o.RuleName,
			ServiceClaimHash:        &o.ServiceClaimHash,
			ServiceID:               &o.ServiceID,
			ServiceNamespace:        &o.ServiceNamespace,
			ServiceType:             &o.ServiceType,
			ServiceURL:              &o.ServiceURL,
			SourceController:        &o.SourceController,
			SourceID:                &o.SourceID,
			SourceIP:                &o.SourceIP,
			SourceNamespace:         &o.SourceNamespace,
			SourcePlatform:          &o.SourcePlatform,
			SourceType:              &o.SourceType,
			Timestamp:               &o.Timestamp,
			Value:                   &o.Value,
			ZHash:                   &o.ZHash,
			Zone:                    &o.Zone,
		}
	}

	sp := &SparseCachedFlowReport{}
	for _, f := range fields {
		switch f {
		case "ID":
			sp.ID = &(o.ID)
		case "action":
			sp.Action = &(o.Action)
		case "destinationController":
			sp.DestinationController = &(o.DestinationController)
		case "destinationID":
			sp.DestinationID = &(o.DestinationID)
		case "destinationIP":
			sp.DestinationIP = &(o.DestinationIP)
		case "destinationNamespace":
			sp.DestinationNamespace = &(o.DestinationNamespace)
		case "destinationPlatform":
			sp.DestinationPlatform = &(o.DestinationPlatform)
		case "destinationPort":
			sp.DestinationPort = &(o.DestinationPort)
		case "destinationType":
			sp.DestinationType = &(o.DestinationType)
		case "dropReason":
			sp.DropReason = &(o.DropReason)
		case "encrypted":
			sp.Encrypted = &(o.Encrypted)
		case "enforcerID":
			sp.EnforcerID = &(o.EnforcerID)
		case "isLocalDestinationID":
			sp.IsLocalDestinationID = &(o.IsLocalDestinationID)
		case "isLocalSourceID":
			sp.IsLocalSourceID = &(o.IsLocalSourceID)
		case "migrationsLog":
			sp.MigrationsLog = &(o.MigrationsLog)
		case "namespace":
			sp.Namespace = &(o.Namespace)
		case "observed":
			sp.Observed = &(o.Observed)
		case "observedAction":
			sp.ObservedAction = &(o.ObservedAction)
		case "observedDropReason":
			sp.ObservedDropReason = &(o.ObservedDropReason)
		case "observedEncrypted":
			sp.ObservedEncrypted = &(o.ObservedEncrypted)
		case "observedPolicyID":
			sp.ObservedPolicyID = &(o.ObservedPolicyID)
		case "observedPolicyNamespace":
			sp.ObservedPolicyNamespace = &(o.ObservedPolicyNamespace)
		case "policyID":
			sp.PolicyID = &(o.PolicyID)
		case "policyNamespace":
			sp.PolicyNamespace = &(o.PolicyNamespace)
		case "protocol":
			sp.Protocol = &(o.Protocol)
		case "remoteNamespace":
			sp.RemoteNamespace = &(o.RemoteNamespace)
		case "ruleName":
			sp.RuleName = &(o.RuleName)
		case "serviceClaimHash":
			sp.ServiceClaimHash = &(o.ServiceClaimHash)
		case "serviceID":
			sp.ServiceID = &(o.ServiceID)
		case "serviceNamespace":
			sp.ServiceNamespace = &(o.ServiceNamespace)
		case "serviceType":
			sp.ServiceType = &(o.ServiceType)
		case "serviceURL":
			sp.ServiceURL = &(o.ServiceURL)
		case "sourceController":
			sp.SourceController = &(o.SourceController)
		case "sourceID":
			sp.SourceID = &(o.SourceID)
		case "sourceIP":
			sp.SourceIP = &(o.SourceIP)
		case "sourceNamespace":
			sp.SourceNamespace = &(o.SourceNamespace)
		case "sourcePlatform":
			sp.SourcePlatform = &(o.SourcePlatform)
		case "sourceType":
			sp.SourceType = &(o.SourceType)
		case "timestamp":
			sp.Timestamp = &(o.Timestamp)
		case "value":
			sp.Value = &(o.Value)
		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 *CachedFlowReport) ToSparse(fields ...string) elemental.SparseIdentifiable {
	if len(fields) == 0 {
		return &SparseCachedFlowReport{
			ID:                      &o.ID,
			Action:                  &o.Action,
			DestinationController:   &o.DestinationController,
			DestinationID:           &o.DestinationID,
			DestinationIP:           &o.DestinationIP,
			DestinationNamespace:    &o.DestinationNamespace,
			DestinationPlatform:     &o.DestinationPlatform,
			DestinationPort:         &o.DestinationPort,
			DestinationType:         &o.DestinationType,
			DropReason:              &o.DropReason,
			Encrypted:               &o.Encrypted,
			EnforcerID:              &o.EnforcerID,
			IsLocalDestinationID:    &o.IsLocalDestinationID,
			IsLocalSourceID:         &o.IsLocalSourceID,
			MigrationsLog:           &o.MigrationsLog,
			Namespace:               &o.Namespace,
			Observed:                &o.Observed,
			ObservedAction:          &o.ObservedAction,
			ObservedDropReason:      &o.ObservedDropReason,
			ObservedEncrypted:       &o.ObservedEncrypted,
			ObservedPolicyID:        &o.ObservedPolicyID,
			ObservedPolicyNamespace: &o.ObservedPolicyNamespace,
			PolicyID:                &o.PolicyID,
			PolicyNamespace:         &o.PolicyNamespace,
			Protocol:                &o.Protocol,
			RemoteNamespace:         &o.RemoteNamespace,
			RuleName:                &o.RuleName,
			ServiceClaimHash:        &o.ServiceClaimHash,
			ServiceID:               &o.ServiceID,
			ServiceNamespace:        &o.ServiceNamespace,
			ServiceType:             &o.ServiceType,
			ServiceURL:              &o.ServiceURL,
			SourceController:        &o.SourceController,
			SourceID:                &o.SourceID,
			SourceIP:                &o.SourceIP,
			SourceNamespace:         &o.SourceNamespace,
			SourcePlatform:          &o.SourcePlatform,
			SourceType:              &o.SourceType,
			Timestamp:               &o.Timestamp,
			Value:                   &o.Value,
			ZHash:                   &o.ZHash,
			Zone:                    &o.Zone,
		}
	}
	sp := &SparseCachedFlowReport{}
	for _, f := range fields {
		switch f {
		case "ID":
			sp.ID = &(o.ID)
		case "action":
			sp.Action = &(o.Action)
		case "destinationController":
			sp.DestinationController = &(o.DestinationController)
		case "destinationID":
			sp.DestinationID = &(o.DestinationID)
		case "destinationIP":
			sp.DestinationIP = &(o.DestinationIP)
		case "destinationNamespace":
			sp.DestinationNamespace = &(o.DestinationNamespace)
		case "destinationPlatform":
			sp.DestinationPlatform = &(o.DestinationPlatform)
		case "destinationPort":
			sp.DestinationPort = &(o.DestinationPort)
		case "destinationType":
			sp.DestinationType = &(o.DestinationType)
		case "dropReason":
			sp.DropReason = &(o.DropReason)
		case "encrypted":
			sp.Encrypted = &(o.Encrypted)
		case "enforcerID":
			sp.EnforcerID = &(o.EnforcerID)
		case "isLocalDestinationID":
			sp.IsLocalDestinationID = &(o.IsLocalDestinationID)
		case "isLocalSourceID":
			sp.IsLocalSourceID = &(o.IsLocalSourceID)
		case "migrationsLog":
			sp.MigrationsLog = &(o.MigrationsLog)
		case "namespace":
			sp.Namespace = &(o.Namespace)
		case "observed":
			sp.Observed = &(o.Observed)
		case "observedAction":
			sp.ObservedAction = &(o.ObservedAction)
		case "observedDropReason":
			sp.ObservedDropReason = &(o.ObservedDropReason)
		case "observedEncrypted":
			sp.ObservedEncrypted = &(o.ObservedEncrypted)
		case "observedPolicyID":
			sp.ObservedPolicyID = &(o.ObservedPolicyID)
		case "observedPolicyNamespace":
			sp.ObservedPolicyNamespace = &(o.ObservedPolicyNamespace)
		case "policyID":
			sp.PolicyID = &(o.PolicyID)
		case "policyNamespace":
			sp.PolicyNamespace = &(o.PolicyNamespace)
		case "protocol":
			sp.Protocol = &(o.Protocol)
		case "remoteNamespace":
			sp.RemoteNamespace = &(o.RemoteNamespace)
		case "ruleName":
			sp.RuleName = &(o.RuleName)
		case "serviceClaimHash":
			sp.ServiceClaimHash = &(o.ServiceClaimHash)
		case "serviceID":
			sp.ServiceID = &(o.ServiceID)
		case "serviceNamespace":
			sp.ServiceNamespace = &(o.ServiceNamespace)
		case "serviceType":
			sp.ServiceType = &(o.ServiceType)
		case "serviceURL":
			sp.ServiceURL = &(o.ServiceURL)
		case "sourceController":
			sp.SourceController = &(o.SourceController)
		case "sourceID":
			sp.SourceID = &(o.SourceID)
		case "sourceIP":
			sp.SourceIP = &(o.SourceIP)
		case "sourceNamespace":
			sp.SourceNamespace = &(o.SourceNamespace)
		case "sourcePlatform":
			sp.SourcePlatform = &(o.SourcePlatform)
		case "sourceType":
			sp.SourceType = &(o.SourceType)
		case "timestamp":
			sp.Timestamp = &(o.Timestamp)
		case "value":
			sp.Value = &(o.Value)
		case "zHash":
			sp.ZHash = &(o.ZHash)
		case "zone":
			sp.Zone = &(o.Zone)
		}
	}
	return sp
}
func ( o * CachedFlowReport ) ToSparse ( fields ... string ) elemental . SparseIdentifiable { if len ( fields ) == 0 { return & SparseCachedFlowReport { ID : & o . ID , Action : & o . Action , DestinationController : & o . DestinationController , DestinationID : & o . DestinationID , DestinationIP : & o . DestinationIP , DestinationNamespace : & o . DestinationNamespace , DestinationPlatform : & o . DestinationPlatform , DestinationPort : & o . DestinationPort , DestinationType : & o . DestinationType , DropReason : & o . DropReason , Encrypted : & o . Encrypted , EnforcerID : & o . EnforcerID , IsLocalDestinationID : & o . IsLocalDestinationID , IsLocalSourceID : & o . IsLocalSourceID , MigrationsLog : & o . MigrationsLog , Namespace : & o . Namespace , Observed : & o . Observed , ObservedAction : & o . ObservedAction , ObservedDropReason : & o . ObservedDropReason , ObservedEncrypted : & o . ObservedEncrypted , ObservedPolicyID : & o . ObservedPolicyID , ObservedPolicyNamespace : & o . ObservedPolicyNamespace , PolicyID : & o . PolicyID , PolicyNamespace : & o . PolicyNamespace , Protocol : & o . Protocol , RemoteNamespace : & o . RemoteNamespace , RuleName : & o . RuleName , ServiceClaimHash : & o . ServiceClaimHash , ServiceID : & o . ServiceID , ServiceNamespace : & o . ServiceNamespace , ServiceType : & o . ServiceType , ServiceURL : & o . ServiceURL , SourceController : & o . SourceController , SourceID : & o . SourceID , SourceIP : & o . SourceIP , SourceNamespace : & o . SourceNamespace , SourcePlatform : & o . SourcePlatform , SourceType : & o . SourceType , Timestamp : & o . Timestamp , Value : & o . Value , ZHash : & o . ZHash , Zone : & o . Zone , } } sp := & SparseCachedFlowReport { } for _ , f := range fields { switch f { case " " : sp . ID = & ( o . ID ) case " " : sp . Action = & ( o . Action ) case " " : sp . DestinationController = & ( o . DestinationController ) case " " : sp . DestinationID = & ( o . DestinationID ) case " " : sp . DestinationIP = & ( o . DestinationIP ) case " " : sp . DestinationNamespace = & ( o . DestinationNamespace ) case " " : sp . DestinationPlatform = & ( o . DestinationPlatform ) case " " : sp . DestinationPort = & ( o . DestinationPort ) case " " : sp . DestinationType = & ( o . DestinationType ) case " " : sp . DropReason = & ( o . DropReason ) case " " : sp . Encrypted = & ( o . Encrypted ) case " " : sp . EnforcerID = & ( o . EnforcerID ) case " " : sp . IsLocalDestinationID = & ( o . IsLocalDestinationID ) case " " : sp . IsLocalSourceID = & ( o . IsLocalSourceID ) case " " : sp . MigrationsLog = & ( o . MigrationsLog ) case " " : sp . Namespace = & ( o . Namespace ) case " " : sp . Observed = & ( o . Observed ) case " " : sp . ObservedAction = & ( o . ObservedAction ) case " " : sp . ObservedDropReason = & ( o . ObservedDropReason ) case " " : sp . ObservedEncrypted = & ( o . ObservedEncrypted ) case " " : sp . ObservedPolicyID = & ( o . ObservedPolicyID ) case " " : sp . ObservedPolicyNamespace = & ( o . ObservedPolicyNamespace ) case " " : sp . PolicyID = & ( o . PolicyID ) case " " : sp . PolicyNamespace = & ( o . PolicyNamespace ) case " " : sp . Protocol = & ( o . Protocol ) case " " : sp . RemoteNamespace = & ( o . RemoteNamespace ) case " " : sp . RuleName = & ( o . RuleName ) case " " : sp . ServiceClaimHash = & ( o . ServiceClaimHash ) case " " : sp . ServiceID = & ( o . ServiceID ) case " " : sp . ServiceNamespace = & ( o . ServiceNamespace ) case " " : sp . ServiceType = & ( o . ServiceType ) case " " : sp . ServiceURL = & ( o . ServiceURL ) case " " : sp . SourceController = & ( o . SourceController ) case " " : sp . SourceID = & ( o . SourceID ) case " " : sp . SourceIP = & ( o . SourceIP ) case " " : sp . SourceNamespace = & ( o . SourceNamespace ) case " " : sp . SourcePlatform = & ( o . SourcePlatform ) case " " : sp . SourceType = & ( o . SourceType ) case " " : sp . Timestamp = & ( o . Timestamp ) case " " : sp . Value = & ( o . Value ) 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