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

	if len(fields) == 0 {
		// nolint: goimports
		return &SparsePCSearchResult{
			InternalEdges:        &o.InternalEdges,
			Items:                o.Items,
			NextPageToken:        &o.NextPageToken,
			Nodes:                &o.Nodes,
			PublicEdges:          &o.PublicEdges,
			SourceDestinationMap: &o.SourceDestinationMap,
			TotalRows:            &o.TotalRows,
		}
	}

	sp := &SparsePCSearchResult{}
	for _, f := range fields {
		switch f {
		case "internalEdges":
			sp.InternalEdges = &(o.InternalEdges)
		case "items":
			sp.Items = o.Items
		case "nextPageToken":
			sp.NextPageToken = &(o.NextPageToken)
		case "nodes":
			sp.Nodes = &(o.Nodes)
		case "publicEdges":
			sp.PublicEdges = &(o.PublicEdges)
		case "sourceDestinationMap":
			sp.SourceDestinationMap = &(o.SourceDestinationMap)
		case "totalRows":
			sp.TotalRows = &(o.TotalRows)
		}
	}

	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 *PCSearchResult) ToSparse(fields ...string) elemental.SparseIdentifiable {
	if len(fields) == 0 {
		return &SparsePCSearchResult{
			InternalEdges:        &o.InternalEdges,
			Items:                o.Items,
			NextPageToken:        &o.NextPageToken,
			Nodes:                &o.Nodes,
			PublicEdges:          &o.PublicEdges,
			SourceDestinationMap: &o.SourceDestinationMap,
			TotalRows:            &o.TotalRows,
		}
	}
	sp := &SparsePCSearchResult{}
	for _, f := range fields {
		switch f {
		case "internalEdges":
			sp.InternalEdges = &(o.InternalEdges)
		case "items":
			sp.Items = o.Items
		case "nextPageToken":
			sp.NextPageToken = &(o.NextPageToken)
		case "nodes":
			sp.Nodes = &(o.Nodes)
		case "publicEdges":
			sp.PublicEdges = &(o.PublicEdges)
		case "sourceDestinationMap":
			sp.SourceDestinationMap = &(o.SourceDestinationMap)
		case "totalRows":
			sp.TotalRows = &(o.TotalRows)
		}
	}
	return sp
}
func ( o * PCSearchResult ) ToSparse ( fields ... string ) elemental . SparseIdentifiable { if len ( fields ) == 0 { return & SparsePCSearchResult { InternalEdges : & o . InternalEdges , Items : o . Items , NextPageToken : & o . NextPageToken , Nodes : & o . Nodes , PublicEdges : & o . PublicEdges , SourceDestinationMap : & o . SourceDestinationMap , TotalRows : & o . TotalRows , } } sp := & SparsePCSearchResult { } for _ , f := range fields { switch f { case " " : sp . InternalEdges = & ( o . InternalEdges ) case " " : sp . Items = o . Items case " " : sp . NextPageToken = & ( o . NextPageToken ) case " " : sp . Nodes = & ( o . Nodes ) case " " : sp . PublicEdges = & ( o . PublicEdges ) case " " : sp . SourceDestinationMap = & ( o . SourceDestinationMap ) case " " : sp . TotalRows = & ( o . TotalRows ) } } return sp }
ToSparse returns the sparse version of the model.
ToSparse returns the sparse version of the model .
// nolint: goimports