Class OpenRtb.BidResponse.Builder

  • All Implemented Interfaces:
    OpenRtb.BidResponseOrBuilder, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<OpenRtb.BidResponse>, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    OpenRtb.BidResponse

    public static final class OpenRtb.BidResponse.Builder
    extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<OpenRtb.BidResponse,​OpenRtb.BidResponse.Builder>
    implements OpenRtb.BidResponseOrBuilder
     OpenRTB 2.0: This object is the top-level bid response object (i.e., the
     unnamed outer JSON object). The id attribute is a reflection of the bid
     request ID for logging purposes. Similarly, bidid is an optional response
     tracking ID for bidders. If specified, it can be included in the subsequent
     win notice call if the bidder wins. At least one seatbid object is required,
     which contains at least one bid for an impression. Other attributes are
     optional. To express a "no-bid", the options are to return an empty response
     with HTTP 204. Alternately if the bidder wishes to convey to the exchange a
     reason for not bidding, just a BidResponse object is returned with a
     reason code in the nbr attribute.
     
    Protobuf type com.google.openrtb.BidResponse
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<OpenRtb.BidResponse.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<OpenRtb.BidResponse.Builder>
      • getDefaultInstanceForType

        public OpenRtb.BidResponse getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<OpenRtb.BidResponse>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public OpenRtb.BidResponse build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public OpenRtb.BidResponse buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public OpenRtb.BidResponse.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<OpenRtb.BidResponse.Builder>
      • clearOneof

        public OpenRtb.BidResponse.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<OpenRtb.BidResponse.Builder>
      • mergeFrom

        public OpenRtb.BidResponse.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OpenRtb.BidResponse.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<OpenRtb.BidResponse,​OpenRtb.BidResponse.Builder>
      • mergeFrom

        public OpenRtb.BidResponse.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OpenRtb.BidResponse.Builder>
        Throws:
        IOException
      • hasId

        public boolean hasId()
         ID of the bid request to which this is a response.
         REQUIRED by the OpenRTB specification.
         
        required string id = 1;
        Specified by:
        hasId in interface OpenRtb.BidResponseOrBuilder
        Returns:
        Whether the id field is set.
      • getId

        public String getId()
         ID of the bid request to which this is a response.
         REQUIRED by the OpenRTB specification.
         
        required string id = 1;
        Specified by:
        getId in interface OpenRtb.BidResponseOrBuilder
        Returns:
        The id.
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         ID of the bid request to which this is a response.
         REQUIRED by the OpenRTB specification.
         
        required string id = 1;
        Specified by:
        getIdBytes in interface OpenRtb.BidResponseOrBuilder
        Returns:
        The bytes for id.
      • setId

        public OpenRtb.BidResponse.Builder setId​(String value)
         ID of the bid request to which this is a response.
         REQUIRED by the OpenRTB specification.
         
        required string id = 1;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public OpenRtb.BidResponse.Builder clearId()
         ID of the bid request to which this is a response.
         REQUIRED by the OpenRTB specification.
         
        required string id = 1;
        Returns:
        This builder for chaining.
      • setIdBytes

        public OpenRtb.BidResponse.Builder setIdBytes​(com.google.protobuf.ByteString value)
         ID of the bid request to which this is a response.
         REQUIRED by the OpenRTB specification.
         
        required string id = 1;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getSeatbidCount

        public int getSeatbidCount()
         Array of seatbid objects; 1+ required if a bid is to be made.
         
        repeated .com.google.openrtb.BidResponse.SeatBid seatbid = 2;
        Specified by:
        getSeatbidCount in interface OpenRtb.BidResponseOrBuilder
      • clearSeatbid

        public OpenRtb.BidResponse.Builder clearSeatbid()
         Array of seatbid objects; 1+ required if a bid is to be made.
         
        repeated .com.google.openrtb.BidResponse.SeatBid seatbid = 2;
      • removeSeatbid

        public OpenRtb.BidResponse.Builder removeSeatbid​(int index)
         Array of seatbid objects; 1+ required if a bid is to be made.
         
        repeated .com.google.openrtb.BidResponse.SeatBid seatbid = 2;
      • getSeatbidBuilder

        public OpenRtb.BidResponse.SeatBid.Builder getSeatbidBuilder​(int index)
         Array of seatbid objects; 1+ required if a bid is to be made.
         
        repeated .com.google.openrtb.BidResponse.SeatBid seatbid = 2;
      • addSeatbidBuilder

        public OpenRtb.BidResponse.SeatBid.Builder addSeatbidBuilder()
         Array of seatbid objects; 1+ required if a bid is to be made.
         
        repeated .com.google.openrtb.BidResponse.SeatBid seatbid = 2;
      • addSeatbidBuilder

        public OpenRtb.BidResponse.SeatBid.Builder addSeatbidBuilder​(int index)
         Array of seatbid objects; 1+ required if a bid is to be made.
         
        repeated .com.google.openrtb.BidResponse.SeatBid seatbid = 2;
      • getSeatbidBuilderList

        public List<OpenRtb.BidResponse.SeatBid.Builder> getSeatbidBuilderList()
         Array of seatbid objects; 1+ required if a bid is to be made.
         
        repeated .com.google.openrtb.BidResponse.SeatBid seatbid = 2;
      • hasBidid

        public boolean hasBidid()
         Bidder generated response ID to assist with logging/tracking.
         
        optional string bidid = 3;
        Specified by:
        hasBidid in interface OpenRtb.BidResponseOrBuilder
        Returns:
        Whether the bidid field is set.
      • getBidid

        public String getBidid()
         Bidder generated response ID to assist with logging/tracking.
         
        optional string bidid = 3;
        Specified by:
        getBidid in interface OpenRtb.BidResponseOrBuilder
        Returns:
        The bidid.
      • getBididBytes

        public com.google.protobuf.ByteString getBididBytes()
         Bidder generated response ID to assist with logging/tracking.
         
        optional string bidid = 3;
        Specified by:
        getBididBytes in interface OpenRtb.BidResponseOrBuilder
        Returns:
        The bytes for bidid.
      • setBidid

        public OpenRtb.BidResponse.Builder setBidid​(String value)
         Bidder generated response ID to assist with logging/tracking.
         
        optional string bidid = 3;
        Parameters:
        value - The bidid to set.
        Returns:
        This builder for chaining.
      • clearBidid

        public OpenRtb.BidResponse.Builder clearBidid()
         Bidder generated response ID to assist with logging/tracking.
         
        optional string bidid = 3;
        Returns:
        This builder for chaining.
      • setBididBytes

        public OpenRtb.BidResponse.Builder setBididBytes​(com.google.protobuf.ByteString value)
         Bidder generated response ID to assist with logging/tracking.
         
        optional string bidid = 3;
        Parameters:
        value - The bytes for bidid to set.
        Returns:
        This builder for chaining.
      • hasCur

        public boolean hasCur()
         Bid currency using ISO-4217 alpha codes. This field will be required
         starting in Q4 2022. If this field is populated and differs from the
         bidding currency, the bid will be filtered. If this field is not populated,
         the currency will be assumed to be the bidding currency. The bidding
         currency is determined by:
         1. The bidder-level currency, if configured in RTB account settings.
         2. Otherwise, the currency of the buyer account indicated by the
         billing ID in the cid field of the bid response.
         3. Otherwise, if cid is not populated in the bid response, the
         currency of the buyer account indicated by the sole billing ID in the
         bid request.
         The currency of the buyer account is set on account creation and can be
         checked by contacting a Technical Account Manager.
         
        optional string cur = 4;
        Specified by:
        hasCur in interface OpenRtb.BidResponseOrBuilder
        Returns:
        Whether the cur field is set.
      • getCur

        public String getCur()
         Bid currency using ISO-4217 alpha codes. This field will be required
         starting in Q4 2022. If this field is populated and differs from the
         bidding currency, the bid will be filtered. If this field is not populated,
         the currency will be assumed to be the bidding currency. The bidding
         currency is determined by:
         1. The bidder-level currency, if configured in RTB account settings.
         2. Otherwise, the currency of the buyer account indicated by the
         billing ID in the cid field of the bid response.
         3. Otherwise, if cid is not populated in the bid response, the
         currency of the buyer account indicated by the sole billing ID in the
         bid request.
         The currency of the buyer account is set on account creation and can be
         checked by contacting a Technical Account Manager.
         
        optional string cur = 4;
        Specified by:
        getCur in interface OpenRtb.BidResponseOrBuilder
        Returns:
        The cur.
      • getCurBytes

        public com.google.protobuf.ByteString getCurBytes()
         Bid currency using ISO-4217 alpha codes. This field will be required
         starting in Q4 2022. If this field is populated and differs from the
         bidding currency, the bid will be filtered. If this field is not populated,
         the currency will be assumed to be the bidding currency. The bidding
         currency is determined by:
         1. The bidder-level currency, if configured in RTB account settings.
         2. Otherwise, the currency of the buyer account indicated by the
         billing ID in the cid field of the bid response.
         3. Otherwise, if cid is not populated in the bid response, the
         currency of the buyer account indicated by the sole billing ID in the
         bid request.
         The currency of the buyer account is set on account creation and can be
         checked by contacting a Technical Account Manager.
         
        optional string cur = 4;
        Specified by:
        getCurBytes in interface OpenRtb.BidResponseOrBuilder
        Returns:
        The bytes for cur.
      • setCur

        public OpenRtb.BidResponse.Builder setCur​(String value)
         Bid currency using ISO-4217 alpha codes. This field will be required
         starting in Q4 2022. If this field is populated and differs from the
         bidding currency, the bid will be filtered. If this field is not populated,
         the currency will be assumed to be the bidding currency. The bidding
         currency is determined by:
         1. The bidder-level currency, if configured in RTB account settings.
         2. Otherwise, the currency of the buyer account indicated by the
         billing ID in the cid field of the bid response.
         3. Otherwise, if cid is not populated in the bid response, the
         currency of the buyer account indicated by the sole billing ID in the
         bid request.
         The currency of the buyer account is set on account creation and can be
         checked by contacting a Technical Account Manager.
         
        optional string cur = 4;
        Parameters:
        value - The cur to set.
        Returns:
        This builder for chaining.
      • clearCur

        public OpenRtb.BidResponse.Builder clearCur()
         Bid currency using ISO-4217 alpha codes. This field will be required
         starting in Q4 2022. If this field is populated and differs from the
         bidding currency, the bid will be filtered. If this field is not populated,
         the currency will be assumed to be the bidding currency. The bidding
         currency is determined by:
         1. The bidder-level currency, if configured in RTB account settings.
         2. Otherwise, the currency of the buyer account indicated by the
         billing ID in the cid field of the bid response.
         3. Otherwise, if cid is not populated in the bid response, the
         currency of the buyer account indicated by the sole billing ID in the
         bid request.
         The currency of the buyer account is set on account creation and can be
         checked by contacting a Technical Account Manager.
         
        optional string cur = 4;
        Returns:
        This builder for chaining.
      • setCurBytes

        public OpenRtb.BidResponse.Builder setCurBytes​(com.google.protobuf.ByteString value)
         Bid currency using ISO-4217 alpha codes. This field will be required
         starting in Q4 2022. If this field is populated and differs from the
         bidding currency, the bid will be filtered. If this field is not populated,
         the currency will be assumed to be the bidding currency. The bidding
         currency is determined by:
         1. The bidder-level currency, if configured in RTB account settings.
         2. Otherwise, the currency of the buyer account indicated by the
         billing ID in the cid field of the bid response.
         3. Otherwise, if cid is not populated in the bid response, the
         currency of the buyer account indicated by the sole billing ID in the
         bid request.
         The currency of the buyer account is set on account creation and can be
         checked by contacting a Technical Account Manager.
         
        optional string cur = 4;
        Parameters:
        value - The bytes for cur to set.
        Returns:
        This builder for chaining.
      • hasCustomdata

        public boolean hasCustomdata()
         Optional feature to allow a bidder to set data in the exchange's cookie.
         The string must be in base85 cookie safe characters and be in any format.
         Proper JSON encoding must be used to include "escaped" quotation marks.
         
        optional string customdata = 5;
        Specified by:
        hasCustomdata in interface OpenRtb.BidResponseOrBuilder
        Returns:
        Whether the customdata field is set.
      • getCustomdata

        public String getCustomdata()
         Optional feature to allow a bidder to set data in the exchange's cookie.
         The string must be in base85 cookie safe characters and be in any format.
         Proper JSON encoding must be used to include "escaped" quotation marks.
         
        optional string customdata = 5;
        Specified by:
        getCustomdata in interface OpenRtb.BidResponseOrBuilder
        Returns:
        The customdata.
      • getCustomdataBytes

        public com.google.protobuf.ByteString getCustomdataBytes()
         Optional feature to allow a bidder to set data in the exchange's cookie.
         The string must be in base85 cookie safe characters and be in any format.
         Proper JSON encoding must be used to include "escaped" quotation marks.
         
        optional string customdata = 5;
        Specified by:
        getCustomdataBytes in interface OpenRtb.BidResponseOrBuilder
        Returns:
        The bytes for customdata.
      • setCustomdata

        public OpenRtb.BidResponse.Builder setCustomdata​(String value)
         Optional feature to allow a bidder to set data in the exchange's cookie.
         The string must be in base85 cookie safe characters and be in any format.
         Proper JSON encoding must be used to include "escaped" quotation marks.
         
        optional string customdata = 5;
        Parameters:
        value - The customdata to set.
        Returns:
        This builder for chaining.
      • clearCustomdata

        public OpenRtb.BidResponse.Builder clearCustomdata()
         Optional feature to allow a bidder to set data in the exchange's cookie.
         The string must be in base85 cookie safe characters and be in any format.
         Proper JSON encoding must be used to include "escaped" quotation marks.
         
        optional string customdata = 5;
        Returns:
        This builder for chaining.
      • setCustomdataBytes

        public OpenRtb.BidResponse.Builder setCustomdataBytes​(com.google.protobuf.ByteString value)
         Optional feature to allow a bidder to set data in the exchange's cookie.
         The string must be in base85 cookie safe characters and be in any format.
         Proper JSON encoding must be used to include "escaped" quotation marks.
         
        optional string customdata = 5;
        Parameters:
        value - The bytes for customdata to set.
        Returns:
        This builder for chaining.
      • hasNbr

        public boolean hasNbr()
         Reason for not bidding.
         
        optional .com.google.openrtb.NoBidReason nbr = 6;
        Specified by:
        hasNbr in interface OpenRtb.BidResponseOrBuilder
        Returns:
        Whether the nbr field is set.
      • clearNbr

        public OpenRtb.BidResponse.Builder clearNbr()
         Reason for not bidding.
         
        optional .com.google.openrtb.NoBidReason nbr = 6;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final OpenRtb.BidResponse.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<OpenRtb.BidResponse.Builder>
      • mergeUnknownFields

        public final OpenRtb.BidResponse.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<OpenRtb.BidResponse.Builder>