/* © 2024 Appstock */

/*   Copyright 2018-2021 Prebid.org, Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 */

/*
 CHANGE NOTICE: The file content was modified to rebrand the work, adapt the product for the new use case, and change the distribution license.
 The patch to the original code is available in the Appstock repository.
 All changes after applying the patch are made under the new license and copyrights mentioned at the beginning of this file.
*/

#import "APSORTBAbstractResponse.h"

@class APSORTBSeatBid<ExtType, BidExtType>;

NS_ASSUME_NONNULL_BEGIN

#pragma mark - 4.2.1: APSBidResponse

/// 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 `APSBidResponse` object is returned with a reason code in the `nbr`
/// attribute.
@interface APSORTBBidResponse<__covariant ExtType, __covariant SeatBidExtType, __covariant BidExtType> : APSORTBAbstractResponse<ExtType>

/// [Required]
/// ID of the bid request to which this is a response.
@property (nonatomic, copy) NSString *requestID;

/// Array of seatbid objects; 1+ required if a bid is to be made.
@property (nonatomic, copy, nullable) NSArray<APSORTBSeatBid<SeatBidExtType, BidExtType> *> *seatbid;

/// Bidder generated response ID to assist with logging/tracking.
@property (nonatomic, copy, nullable) NSString *bidid;

/// [Default = “USD”]
/// Bid currency using ISO-4217 alpha codes.
@property (nonatomic, copy, nullable) NSString *cur;

/// 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.
@property (nonatomic, copy, nullable) NSString *customdata;

/// [Integer]
/// Reason for not bidding. See `APSORTBNoBidReason`
@property (nonatomic, strong, nullable) NSNumber *nbr;

// Placeholder for bidder-specific extensions to OpenRTB.
// ext is stored in superclass

@end

NS_ASSUME_NONNULL_END
