github.com/prebid/prebid-server/v2@v2.18.0/exchange/auction_response.go (about)

     1  package exchange
     2  
     3  import (
     4  	"github.com/prebid/openrtb/v20/openrtb2"
     5  	"github.com/prebid/prebid-server/v2/openrtb_ext"
     6  )
     7  
     8  // AuctionResponse contains OpenRTB Bid Response object and its extension (un-marshalled) object
     9  type AuctionResponse struct {
    10  	*openrtb2.BidResponse
    11  	ExtBidResponse *openrtb_ext.ExtBidResponse
    12  }
    13  
    14  // GetSeatNonBid returns array of seat non-bid if present. nil otherwise
    15  func (ar *AuctionResponse) GetSeatNonBid() []openrtb_ext.SeatNonBid {
    16  	if ar != nil && ar.ExtBidResponse != nil && ar.ExtBidResponse.Prebid != nil {
    17  		return ar.ExtBidResponse.Prebid.SeatNonBid
    18  	}
    19  	return nil
    20  }