// Copyright 2015, Beeswax.IO Inc.
// Author: ramr@beeswax.com
//
// OpenRTB Protocol Buffer Spec.
// Note: This file is derived from google/openrtb project.

syntax = "proto2";
package openrtb;

option java_package = "com.beeswax.openrtb";
option go_package = "github.com/Ogury/ms-auction/grpc/beeswax/openrtb";

import "beeswax/base/eventid.proto";

// OpenRTB extensions ("ext" fields in the spec & JSON representation)
// are represented here by Protocol Buffer extensions.

// Next available tag: 16 - Tag 19 is taken in order to match Google openrtb proto
/*
 * OpenRTB 3.3.1: The top-level bid request object.
 */
message BidRequest {
    /*
     * Unique ID of the bid request, provided by the exchange.
     */
    required string id = 1;
    /*
     * Multiple impression auctions may be specified in a single bid request.
     * At least one impression is required for a valid bid request.
     */
    repeated Impression imp = 2;
    /*
     * Information pertaining to a website.
     */
    optional Site site = 3;
    /*
     * Information pertaining to a mobile application.
     */
    optional App app = 4;
    /*
     * Information pertaining to the device.
     */
    optional Device device = 5;
    /*
     * Information known or derived about the human user of the device.
     */
    optional User user = 6;
    /**
     * Indicator of test mode in which auctions are not billable,
     * where 0 = live mode, 1 = test mode.
     */
    optional bool test = 15 [default = false];
    /*
     * Auction Type. If “1”, then first price auction. If “2”, then second price
     * auction.
     * Additional auction types can be defined as per the exchange’s business
     * rules.
     * Exchange specific rules should be numbered over 500.
     */
    optional int32 at = 7 [default = 2];
    /*
     * Maximum amount of time in milliseconds to submit a bid (e.g., 120 means the
     * bidder has 120ms to submit a bid before the auction is complete). If this
     * value never changes across an exchange, then the exchange can supply this
     * information offline.
     */
    optional int32 tmax = 8;
    /*
     * Array of buyer seats allowed to bid on this auction. Seats are an optional
     * feature of exchange. For example, [“4”,”34”,”82”,”A45”] indicates that only
     * advertisers using these exchange seats are allowed to bid on the
     * impressions in this auction.
     */
    repeated string wseat = 9;
    /*
     * Flag to indicate whether Exchange can verify that all impressions offered
     * represent all of the impressions available in context (e.g., all
     * impressions available on the web page; all impressions available for a
     * video [pre, mid and postroll spots], etc.) to support road-blocking. A true
     * value should only be passed if the exchange is aware of all impressions in
     * context for the publisher. NO means the exchange cannot verify, and YES
     * means that all impressions represent all impressions available.
     */
    optional Flag allimps = 10 [default = NO];
    /*
     * Array of allowed currencies for bids on this bid request using ISO-4217 alphabetic codes.
     * If only one currency is used by the exchange, this parameter is not required.
     */
    repeated string cur = 11;
    /*
     * Blocked Advertiser Categories. Note that there is no existing categorization / taxonomy of
     * advertiser industries. However, as a substitute exchanges may decide to use IAB categories
     * as an approximation.
     */
    repeated string bcat = 12;
    /*
     * Array of strings of blocked top-level domains of advertisers.
     * For example, {“company1.com”, “company2.com”}.
     */
    repeated string badv = 13;
    /*
     * Container for any legal, governmental or industry regulations in force for the request.
     */
    optional Regulations regs = 14;
    /*
     * A Source object (Section 3.2.2) that provides data about the
     * inventory source and which entity makes the final decision.
     */
    optional Source source = 19;

    optional BidRequestExtensions ext = 1000;

    // Next available tag: 4
    /*
     * OpenRTB 2.5: This object describes the nature and behavior of the entity
     * that is the source of the bid request upstream from the exchange.
     * The primary purpose of this object is to define post-auction or upstream
     * decisioning when the exchange itself does not control the final decision.
     * A common example of this is header bidding, but it can also apply to
     * upstream server entities such as another RTB exchange, a mediation
     * platform, or an ad server combines direct campaigns with 3rd party
     * demand in decisioning.
     */
    message Source {
        /*
         * Entity responsible for the final impression sale decision,
         * where 0 = exchange, 1 = upstream source
         * RECOMMENDED by the OpenRTB specification.
         */
        optional bool fd = 1;
        /*
         * Transaction ID that must be common across all participants in
         * this bid request (e.g., potentially multiple exchanges).
         * RECOMMENDED by the OpenRTB specification.
         */
        optional string tid = 2;
        /*
         * Payment ID chain string containing embedded syntax
         * described in the TAG Payment ID Protocol v1.0.
         * RECOMMENDED by the OpenRTB specification.
         */
        optional string pchain = 3;

        // ADV-9315 added manually
        optional SourceExtensions ext = 4;
        /*
         * Extensions.
         */
        extensions 100 to 9999;
    }

    // Next available tag: 15
    /*
     * OpenRTB 3.3.2: describes the ad position or impression being auctioned.
     * A single bid request can include multiple “imp” objects, a use case for which might be an
     * exchange that supports selling all ad positions on a given page as a bundle.
     * Each “imp” object has a required ID so that bids can reference them individually.
     * An exchange can also conduct private auctions by restricting involvement to specific
     * subsets of seats within bidders.
     */
    message Impression {
        /*
         * A unique identifier for this impression within the context of the bid request
         * (typically, value starts with 1, and increments up to n for n impressions).
         */
        required string id = 1;
        /*
         * Banner object. Either a banner or video object (or both if the impression could be either)
         * must be included in an impression object.
         */
        optional Banner banner = 2;
        /*
         * Video object. Either a banner or video object (or both if the impression could be either)
         * must be included in an impression object.
         */
        optional Video video = 3;
        /**
         * A Native object (Section 3.2.5); required if this impression is
         * offered as a native ad opportunity.
         */
        optional Native native = 13;
        /*
         * Name of ad mediation partner, SDK technology, or native player responsible for rendering
         * ad (typically video or mobile). Used by some ad servers to customize ad code by partner.
         */
        optional string displaymanager = 4;
        /*
         * Version of ad mediation partner, SDK technology, or native player responsible for rendering
         * ad (typically video or mobile). Used by some ad servers to customize ad code by partner.
         */
        optional string displaymanagerver = 5;
        /*
         * YES if the ad is interstitial or full screen; else NO.
         */
        optional Flag instl = 6 [default = NO];
        /*
         * Identifier for specific ad placement or ad tag that was used to initiate the auction.
         * This can be useful for debugging of any issues, or for optimization by the buyer.
         */
        optional string tagid = 7;
        /*
         * Bid floor for this impression (in CPM of bidfloorcur).
         */
        optional double bidfloor = 8 [default = 0];
        /*
         * If bid floor is specified and multiple currencies supported per bid request,
         * then currency should be specified here using ISO-4217 alphabetic codes.
         * Note, this may be different from bid currency returned by bidder,
         * if this is allowed on an exchange.
         */
        optional string bidfloorcur = 9 [default = "USD"];
        /*
         * Array of names for supported iframe busters. Exchange specific.
         */
        repeated string iframebuster = 10;
        /*
         * Contains any Deals eligible for this Impression.
         */
        optional PMP pmp = 11;
        /*
         * A flag to indicate if the impression requires secure HTTPS creative
         * assets and markup.
         * Value of 1 indicates that the impression requires secure creatives.
         * If the value is 0 or not set, then the impression allows non-secure
         * HTTP creatives.
         */
        optional int32 secure = 12;
        /*
         * Advisory as to the number of seconds that may elapse
         * between the auction and the actual impression.
         */
        optional int32 exp = 14;

        optional ImpressionExtensions ext = 1000;

        /*
         * OpenRTB 3.3.3: A banner object typically describes an ad impressions opportunity for banner,
         * rich media or in-banner video inventory.
         */
        message Banner {
            /*
             * Width of the impression in pixels. Since some ad types are not restricted by size
             * this field is not required, but it’s highly recommended.
             */
            optional int32 w = 1;
            /*
             * Height of the impression in pixels. Since some ad types are not restricted by size
             * this field is not required, but it’s highly recommended.
             */
            optional int32 h = 2;
            /**
             * Maximum width of the impression in pixels. If included, it indicates that a range
             * of sizes is allowed with this maximum width and "w" is taken as recommended.
             * If not included, then "w" should be considered an exact requirement.
             */
            optional int32 wmax = 11;
            /**
             * Maximum height of the impression in pixels. If included, it indicates that a range
             * of sizes is allowed with this maximum height and "h" is taken as recommended.
             * If not included, then "h" should be considered an exact requirement.
             */
            optional int32 hmax = 12;
            /**
             * Minimum width of the impression in pixels. If included, it indicates that a range
             * of sizes is allowed with this minimum width and "w" is taken as recommended.
             * If not included, then "w" should be considered an exact requirement.
             */
            optional int32 wmin = 13;
            /**
             * Minumum height of the impression in pixels. If included, it indicates
             * that a range of sizes is allowed with this minimum height and "h" is
             * taken as recommended.
             * If not included, then "h" should be considered an exact requirement.
             */
            optional int32 hmin = 14;
            /*
             * Unique identifier for this banner object. Useful for tracking multiple banner objects
             * (e.g., in companion banner array). Usually starts with 1, increasing with each object.
             * Combination of impression id X banner id should be unique.
             */
            optional string id = 3;
            /*
             * The position of the ad as a relative measure of visibility or
             * prominence.
             */
            optional Enums.BidRequest.Impression.AdPosition pos = 4 [default = POSITION_UNKNOWN];
            /*
             * Blocked creative types. If blank, assume all types are allowed.
             */
            repeated Enums.BidRequest.Impression.Banner.AdType btype = 5;
            /*
             * Blocked creative attributes. If blank assume all types are allowed.
             */
            repeated CreativeAttribute battr = 6;
            /*
             * Whitelist of content MIME types supported. Popular MIME types include,
             * but are not limited to “image/jpg”, “image/gif” and “application/x-shockwave-flash”.
             */
            repeated string mimes = 7;
            /*
             * Specify if the banner is delivered in the top frame (YES) or in an iframe (NO).
             */
            optional Flag topframe = 8 [default = NO];
            /*
             * Specify properties for an expandable ad.
             */
            repeated Enums.BidRequest.Impression.Banner.ExpandableDirection expdir = 9;
            /*
             * List of supported API frameworks for this banner. If an API is not explicitly listed
             * it is assumed not to be supported.
             */
            repeated Enums.BidRequest.Impression.ApiFramework api = 10;

            optional BannerExtensions ext = 1000;
        }

        // Next available tag: 21 - Tags 26, 27 taken in order to match Google openrtb proto
        /*
         * OpenRTB 3.3.4: A video object typically describes an ad opportunity for in-stream video
         * inventory (including linear pre-roll, mid-roll and post-roll, and non-linear overlays).
         * Please note, in-banner video is typically represented by the banner object.
         */
        message Video {
            /*
             * Whitelist of content MIME types supported. Popular MIME types include,
             * but are not limited to “image/jpg”, “image/gif” and “application/x-shockwave-flash”.
             */
            repeated string mimes = 1;
            /*
             * Indicates whether the ad impression is linear or non-linear.
             */
            optional Enums.BidRequest.Impression.Video.Linearity linearity = 2 [default = LINEAR];
            /*
             * Minimum video ad duration in seconds.
             */
            optional int32 minduration = 3;
            /*
             * Maximum video ad duration in seconds.
             */
            optional int32 maxduration = 4;
            /*
             * Video bid response protocols.
             */
            repeated Enums.BidRequest.Impression.Video.Protocol protocols = 5;
            /*
             * Width of the player in pixels. This field is not required, but it’s highly recommended.
             */
            optional int32 w = 6;
            /*
             * Height of the player in pixels. This field is not required, but it’s highly recommended.
             */
            optional int32 h = 7;
            /*
             * Indicates the start delay in seconds for preroll, midroll, or postroll ad placement.
             * Check the enum VideoStartDelay for special values.
             */
            optional int32 startdelay = 8 [default = -3];
            /*
             * If multiple ad impressions are offered in the same bid request, the sequence number
             * will allow for the coordinated delivery of multiple creatives.
             */
            optional int32 sequence = 9 [default = 1];
            /*
             * Blocked creative attributes. If blank assume all types are allowed.
             */
            repeated CreativeAttribute battr = 10;
            /*
             * Maximum extended video ad duration, if extension is allowed.
             * If blank or 0, extension is not allowed. If -1, extension is allowed, and there is
             * no time limit imposed. If greater than 0, then the value represents the number of
             * seconds of extended play supported beyond the maxduration value.
             */
            optional int32 maxextended = 11 [default = 0];
            /*
             * Minimum bit rate in Kbps. Exchange may set this dynamically,
             * or universally across their set of publishers.
             */
            optional int32 minbitrate = 12;
            /*
             * Maximum bit rate in Kbps. Exchange may set this dynamically,
             * or universally across their set of publishers.
             */
            optional int32 maxbitrate = 13;
            /*
             * If exchange publisher has rules preventing letter boxing of 4x3 content to play in a
             * 16x9 window, then this should be set to false. Default setting is true, which assumes
             * that boxing of content to fit into a window is allowed.
             */
            optional Flag boxingallowed = 14 [default = YES];
            /*
             * List of allowed playback methods. If blank, assume that all are allowed.
             */
            repeated Enums.BidRequest.Impression.Video.PlaybackMethod playbackmethod = 15;
            /*
             * List of supported delivery methods. If blank, assume all are supported.
             */
            repeated Enums.BidRequest.Impression.Video.ContentDelivery delivery = 16;
            /*
             * The position of the ad as a relative measure of visibility or prominence.
             */
            optional Enums.BidRequest.Impression.AdPosition pos = 17 [default = POSITION_UNKNOWN];
            /*
             * If companion ads are available, they can be listed as an array of banner objects.
             */
            repeated Banner companionad = 18;
            /*
             * List of supported API frameworks for this banner. If an API is not explicitly listed
             * it is assumed not to be supported.
             */
            repeated Enums.BidRequest.Impression.ApiFramework api = 19;
            /*
             * Recommended if companion objects are included.
             */
            repeated Enums.BidRequest.Impression.Video.CompanionType companiontype = 20;
            /*
             * Placement type for the impression.
             */
            optional Enums.BidRequest.Impression.Video.VideoPlacementType placement = 26;
            /*
             * The event that causes playback to end.
             */
            optional Enums.BidRequest.Impression.Video.PlaybackCessationMode playbackend = 27;

            optional VideoExtensions ext = 1000;
        }

        /**
         * OpenRTB 3.2.5: This object represents a native type impression.
         * Native ad units are intended to blend seamlessly into the surrounding content
         * (e.g., a sponsored Twitter or Facebook post). As such, the response must be
         * well-structured to afford the publisher fine-grained control over rendering.
         *
         * The Native Subcommittee has developed a companion specification to OpenRTB
         * called the Native Ad Specification. It defines the request parameters and response markup
         * structure of native ad units. This object provides the means of transporting request
         * parameters as an opaque string so that the specific parameters can evolve separately
         * under the auspices of the Native Ad Specification. Similarly, the ad markup served
         * will be structured according to that specification.
         *
         * The presence of a Native as a subordinate of the Imp object indicates that this
         * impression is offered as a native type impression. At the publisher's discretion,
         * that same impression may also be offered as banner and/or video by also including as
         * Imp subordinates the Banner and/or Video objects, respectively.
         * However, any given bid for the impression must conform to one of the offered types.
         */
        message Native {
            /**
             * Request payload complying with the Native Ad Specification.
             */
            required NativeRequest request = 1;
            /**
             * Version of the Native Ad Specification to which request complies;
             * highly recommended for efficient parsing.
             */
            optional string ver = 2;
            /**
             * List of supported API frameworks for this impression.  Refer to List 5.6.
             * If an API is not explicitly listed, it is assumed not to be supported.
             */
            repeated Enums.BidRequest.Impression.ApiFramework api = 3 [packed = true];
            /**
             * Blocked creative attributes. Refer to List 5.3.
             */
            repeated CreativeAttribute battr = 4 [packed = true];

            optional NativeExtensions ext = 1000;
        }

        /*
         * OpenRTB 3.3.16: contains a parent object for usage within the context of private
         * marketplaces and the use of the RTB protocol to execute Direct Deals.
         */
        message PMP {
            /*
             * Flag indicating that this impression is a private auction eligible only to seats named
             * in the DirectDeals object.
             */
            optional Flag private_auction = 1;
            /*
             * A collection of deal objects encapsulating a list of direct deals eligible for
             * this impression.
             */
            repeated DirectDeal deals = 2;

            optional PMPExtensions ext = 1000;

            /*
             * OpenRTB 3.3.17: constitutes a deal struck a priori between a buyer and a seller and
             * indicates that this impression is available under the terms of that deal.
             */
            message DirectDeal {
                /*
                 * A unique identifier for the direct deal.
                 */
                required string id = 1;
                /*
                 * Bid floor for this impression (in CPM of bidfloorcur).
                 */
                optional double bidfloor = 2 [default = 0];
                /*
                 * If bid floor is specified and multiple currencies supported per bid request,
                 * then currency should be specified here using ISO-4217 alphabetic codes. Notes.
                 * this may be different from bid currency returned by bidder, if this is allowed
                 * on an exchange.
                 */
                optional string bidfloorcur = 3 [default = "USD"];
                /*
                 * Array of buyer seats allowed to bid on this auction. Seats are an optional feature
                 * of exchange. For example, [“4”,”34”,”82”,”A45”] indicates that only advertisers
                 * using these exchange seats are allowed to bid on the impressions in this auction.
                 */
                repeated string wseat = 4;
                /*
                 * Array of advertiser domains allowed to bid on this Direct Deal. For example,
                 * [ "advertiser1.com", "advertiser2.com" ] indicates that only the listed
                 * advertisers are allowed to bid on this direct deal.
                 */
                repeated string wadomain = 5;
                /*
                 * Auction Type. If “1”, then first price auction. If “2”, then second price auction.
                 * Additional auction types can be defined as per the exchange’s business rules.
                 */
                optional int32 at = 6;

                optional double ogury_bidfloor = 7 [default = 0];

                optional DirectDealExtensions ext = 1000;
            }
        }
    }

    // Next available tag: 16
    /*
     * OpenRTB 3.3.5: should be included if the ad supported content is part of a website
     * (as opposed to an application).
     */
    message Site {
        /*
         * Site ID on the exchange.
         */
        optional string id = 1;
        /*
         * Site name (may be masked at publisher’s request).
         */
        optional string name = 2;
        /*
         * Domain of the site, used for advertiser side blocking. For example, “foo.com”.
         */
        optional string domain = 3;
        /*
         * Array of IAB content categories for the overall site.
         */
        repeated string cat = 4;
        /*
         * Array of IAB content categories for the current subsection of the site.
         */
        repeated string sectioncat = 5;
        /*
         * Array of IAB content categories for the current page.
         */
        repeated string pagecat = 6;
        /*
         * URL of the page where the impression will be shown.
         */
        optional string page = 7;
        /*
         * Specifies whether the site has a privacy policy.
         */
        optional Flag privacypolicy = 8;
        /*
         * Referrer URL that caused navigation to the current page.
         */
        optional string ref = 10;
        /*
         * Search string that caused navigation to the current page.
         */
        optional string search = 11;
        /*
         * Mobile-optimized signal, where 0 = no, 1 = yes.
         */
        optional bool mobile = 15;

        /*
         * Site's Publisher.
         */
        optional Publisher publisher = 12;
        /*
         * Site's Content.
         */
        optional Content content = 13;
        /*
         * List of keywords describing this site in a comma separated string.
         */
        optional string keywords = 14;

        optional SiteExtensions ext = 1000;
    }

    // Next available tag: 15
    /*
     * OpenRTB 3.3.6: should be included if the ad supported content is part of a mobile application
     * (as opposed to a mobile website).
     */
    message App {
        /*
         * Application ID on the exchange.
         */
        optional string id = 1 [default = "-1"];
        /*
         * Application name (may be masked at publisher’s request).
         */
        optional string name = 2 [default = "-1"];
        /*
         * Domain of the application. For example, “mygame.foo.com”.
         */
        optional string domain = 3;
        /*
         * Array of IAB content categories for the overall application.
         */
        repeated string cat = 4;
        /*
         * Array of IAB content categories for the current subsection of the application.
         */
        repeated string sectioncat = 5;
        /*
         * Array of IAB content categories for the current page/view of the app.
         */
        repeated string pagecat = 6;
        /*
         * Application version.
         */
        optional string ver = 7;
        /*
         * Application bundle or package name (e.g., com.foo.mygame). This is intended to be a
         * unique ID across multiple exchanges.
         */
        optional string bundle = 8 [default = "-1"];
        /*
         * Specifies whether the application has a privacy policy.
         */
        optional Flag privacypolicy = 9;
        /*
         * Application is a paid version or free.
         */
        optional Flag paid = 10;
        /*
         * Application's Publisher.
         */
        optional Publisher publisher = 11;
        /*
         * Application's Content.
         */
        optional Content content = 12;
        /*
         * List of keywords describing this site in a comma separated string.
         */
        optional string keywords = 13;
        /*
         * For QAG 1.5 compliance, an app store URL for an installed app
         * should be passed in the bid request.
         */
        optional string storeurl = 14;

        optional AppExtensions ext = 1000;
    }

    // Next available tag: 20
    /*
     * OpenRTB 3.3.7: describes the content of a site or app.
     * This object may be useful in the situation where syndicated content contains impressions and
     * does not necessarily match the publisher’s general content. The exchange might or might not
     * have knowledge of the page where the content is running, as a result of the syndication method.
     * (For example, video impressions embedded in an iframe on an unknown web property or device.)
     */
    message Content {
        /*
         * ID uniquely identifying the content.
         */
        optional string id = 1;
        /*
         * Content episode number (typically applies to video content).
         */
        optional int32 episode = 2;
        /*
         * Content title.
         */
        optional string title = 3;
        /*
         * Content series.
         */
        optional string series = 4;
        /*
         * Content season.
         */
        optional string season = 5;
        /*
         * Original URL of the content, for buy-side contextualization or review.
         */
        optional string url = 6;
        /*
         * Array of IAB content categories for the content.
         */
        repeated string cat = 7;
        /*
         * Video quality per the IAB’s classification.
         */
        optional Enums.BidRequest.Content.VideoQuality videoquality = 8;
        /*
         * Comma separated list of keywords describing the content.
         */
        optional string keywords = 9;
        /*
         * Content rating (e.g., MPAA).
         */
        optional string contentrating = 10;
        /*
         * User rating of the content (e.g., number of stars, likes, etc.).
         */
        optional string userrating = 11;
        /*
         * Specifies the type of content (game, video, text, etc.).
         */
        optional Enums.BidRequest.Content.Context context = 12;
        /*
         * Is content live?
         */
        optional Flag livestream = 13;
        /*
         * Direct or indirect.
         */
        optional Enums.BidRequest.Content.SourceRelationship sourcerelationship = 14;
        /*
         * Content's Producer.
         */
        optional Producer producer = 15;
        /*
         * Length of content (appropriate for video or audio) in seconds.
         */
        optional int32 len = 16;
        /*
         * Media rating of the content, per QAG guidelines.
         */
        optional Enums.BidRequest.Content.QAGMediaRating qagmediarating = 17 [default = UNKNOWN];

        /*
         * From QAG Video Addendum. If content can be embedded (such as an embeddable video player)
         * this value should be set to YES. If content cannot be embedded, this should be set to NO.
         */
        optional Flag embeddable = 18;
        /*
         * Language of the content. Use alpha-2/ISO 639-1 codes.
         */
        optional string language = 19;

        optional ContentExtensions ext = 1000;
    }

    // Next available tag: 29 - Tag 30 taken in order to match Google openrtb proto
    /*
     * OpenRTB 3.3.10: Provides information pertaining to the device including its hardware,
     * platform, location, and carrier. This device can refer to a mobile handset, a desktop
     * computer, set top box or other digital device. In general, the most essential fields are
     * either the IP address (to enable geo-lookup for the bidder), or providing geo information
     * directly in the geo object.
     */
    message Device {
        /*
         * Do Not Track.
         */
        optional Flag dnt = 1;
        /*
         * Browser user agent string.
         */
        optional string ua = 2;
        /*
         * IPv4 address closest to device.
         */
        optional string ip = 3 [default = "0.0.0.0"];
        /*
         * Geography as derived from the device’s location services (e.g., cell tower triangulation,
         * GPS) or IP address.
         */
        optional Geo geo = 4;
        /*
         * SHA1 hashed device ID; IMEI when available, else MEID or ESN.
         * OpenRTB’s preferred method for device ID hashing is SHA1.
         */
        optional string didsha1 = 5;
        /*
         * MD5 hashed device ID; IMEI when available, else MEID or ESN.
         * Should be interpreted as case insensitive.
         */
        optional string didmd5 = 6;
        /*
         * SHA1 hashed platform-specific ID (e.g., Android ID or UDID for iOS).
         * OpenRTB’s preferred method for device ID hash is SHA1.
         */
        optional string dpidsha1 = 7;
        /*
         * MD5 hashed platform-specific ID (e.g., Android ID or UDID for iOS).
         * Should be interpreted as case insensitive.
         */
        optional string dpidmd5 = 8;
        /*
         * IP address in IPv6.
         */
        optional string ipv6 = 9;
        /*
         * Carrier or ISP derived from the IP address.
         * Should be specified using Mobile Network Code (MNC).
         */
        optional string carrier = 10 [default = "-1"];
        /*
         * Browser language; use alpha-2/ISO 639-1 codes.
         */
        optional string language = 11;
        /*
         * Device make (e.g., “Apple”).
         */
        optional string make = 12 [default = "-1"];
        /*
         * Device model (e.g., “iPhone”).
         */
        optional string model = 13 [default = "-1"];
        /*
         * Device operating system (e.g., “iOS”).
         */
        optional string os = 14 [default = "-1"];
        /*
         * Device operating system version (e.g., “3.1.2”).
         */
        optional string osv = 15 [default = "-1"];
        /*
         * Device supports Javascript?
         */
        optional Flag js = 16 [default = YES];
        /*
         * Return the detected data connection type for the device.
         */
        optional Enums.BidRequest.Device.ConnectionType connectiontype = 17 [default = CONNECTION_UNKNOWN];
        /*
         * Return the device type being used.
         */
        optional Enums.BidRequest.Device.DeviceType devicetype = 18 [default = UNKNOWN];
        /*
         * Return the Flash version detected.
         */
        optional string flashver = 19;
        /*
         * "Limit Ad Tracking" signal commercially endorsed (e.g., iOS, Android),
         * where false = tracking is unrestricted,
         * true = tracking must be limited per commercial guidelines.
         */
        optional bool lmt = 20;
        /*
         * Hardware version of the device (e.g., "5S" for iPhone 5S).
         */
        optional string hwv = 21;
        /*
         * Physical width of the screen in pixels.
         */
        optional int32 w = 22;
        /*
         * Physical height of the screen in pixels.
         */
        optional int32 h = 23;
        /*
         * Screen size as pixels per linear inch.
         */
        optional int32 ppi = 24;
        /*
         * The ratio of physical pixels to device independent pixels.
         */
        optional double pxratio = 25;
        /*
         * ID sanctioned for advertiser use in the clear (i.e., not hashed).
         */
        optional string ifa = 26;
        /*
         * MAC address of the device; hashed via SHA1.
         */
        optional string macsha1 = 27;
        /**
         * MAC address of the device; hashed via MD5.
         */
        optional string macmd5 = 28;
        /*
         * Mobile carrier as the concatenated MCC-MNC code (e.g.,
         * "310-005" identifies Verizon Wireless CDMA in the USA).
         * Refer to https://en.wikipedia.org/wiki/Mobile_country_code
         * for further examples. Note that the dash between the MCC
         * and MNC parts is required to remove parsing ambiguity.
         */
        optional string mccmnc = 30;

        optional DeviceExtensions ext = 1000;
    }

    // Next available tag: 9
    /*
     * OpenRTB 3.3.12: contains information known or derived about the human user of the device.
     * Note that the user ID is an exchange artifact (refer to the “device” object for hardware or
     * platform derived IDs) and may be subject to rotation policies. However, this user ID must be
     * stable long enough to serve reasonably as the basis for frequency capping.
     * If device ID is used as a proxy for unique user ID, use the device object.
     */
    message User {
        /*
         * Unique consumer ID of this user on the exchange.
         */
        optional string id = 1;
        /*
         * Buyer’s user ID for this user as mapped by exchange for the buyer.
         */
        optional string buyeruid = 2;
        /*
         * Year of birth as a 4-digit integer.
         */
        optional int32 yob = 3;
        /*
         * Gender as “M” male, “F” female, “O” Other. (Null indicates unknown)
         */
        optional string gender = 4;
        /*
         * Comma separated list of keywords of consumer interests or intent.
         */
        optional string keywords = 5;
        /*
         * If supported by the exchange, this is custom data that the bidder had stored in the
         * exchange’s cookie. The string may be in base85 cookie safe characters, and be in any
         * format. This may useful for storing user features. Note: Proper JSON encoding must
         * be used to include “escaped” quotation marks.
         */
        optional string customdata = 6;
        /*
         * Home geo for the user (e.g., based off of registration data); this is different from the
         * current location of the access device (that is defined by the geo object embedded in the
         * Device Object).
         */
        optional Geo geo = 7;
        /*
         * User's custom Data.
         */
        repeated Data data = 8;

        optional UserExtensions ext = 1000;
    }

    // Next available tag: 5
    /*
     * OpenRTB 3.3.8: describes the publisher of a site or app.
     */
    message Publisher {
        /*
         * Publisher ID on the exchange.
         */
        optional string id = 1;
        /*
         * Publisher name (may be masked at publisher’s request).
         */
        optional string name = 2;
        /*
         * Array of IAB content categories for the publisher.
         */
        repeated string cat = 3;
        /*
         * Publisher’s highest level domain name, for example “foopub.com”.
         */
        optional string domain = 4;

        optional PublisherExtensions ext = 1000;
    }

    // Next available tag: 5
    /*
     * OpenRTB 3.3.9: describes the producer of content object, which might be different from the
     * publisher of the content of the page. This object is useful in the case of syndicated content,
     * such as embedded videos, for example.
     */
    message Producer {
        /*
         * Content producer or originator ID. Useful if content is syndicated,
         * and may be posted on a site using embed tags.
         */
        optional string id = 1;
        /*
         * Content producer or originator name (e.g., “Warner Bros”).
         */
        optional string name = 2;
        /*
         * Array of IAB content categories for the content producer.
         */
        repeated string cat = 3;
        /*
         * URL of the content producer.
         */
        optional string domain = 4;

        optional ProducerExtensions ext = 1000;
    }

    // Next available tag: 11
    /*
     * OpenRTB 3.3.11: describes the current geographic location of the Device (e.g., based on IP
     * address or GPS), or the home geo of the User (e.g., based on registration data).
     * If both the Device and User objects contain Geo objects with different information,
     * it’s up to the bidder to determine which Geo information to use.
     */
    message Geo {
        /*
         * Latitude from -90 to 90. South is negative. This should only be passed if known
         * to be accurate (For example, not the centroid of a postal code).
         */
        optional double lat = 1;
        /*
         * Longitude from -180 to 180. West is negative. This should only be passed if known
         * to be accurate (For example, not the centroid of a postal code).
         */
        optional double lon = 2;
        /*
         * Country using ISO-3166-1 Alpha-3.
         */
        optional string country = 3;
        /*
         * Region using ISO 3166-2
         */
        optional string region = 4;
        /*
         * Region of a country using fips 10-4 notation (alternative to ISO 3166-2).
         */
        optional string regionfips104 = 5;
        /*
         * Pass the metro code (see http://code.google.com/apis/adwords/docs/appendix/metrocodes.html).
         * Metro codes are similar to but not exactly the same as Nielsen DMAs.
         */
        optional string metro = 6;
        /*
         * City using United Nations Code for Trade and Transport Locations
         * (http://www.unece.org/cefact/locode/service/location.htm).
         */
        optional string city = 7;
        /*
         * Zip/postal code.
         */
        optional string zip = 8;
        /*
         * Indicate the source of the geo data (GPS, IP address, user provided).
         * Type should be provided when lat/lon is provided.
         */
        optional Enums.BidRequest.Geo.LocationType type = 9;
        /*
         * Local time as the number +/- of minutes from UTC.
         */
        optional int32 utcoffset = 10;

        optional GeoExtensions ext = 1000;
    }

    // Next available tag: 4
    /*
     * OpenRTB 3.3.13: The data and segment objects together allow data about the user to be passed
     * to bidders in the bid request. This data may be from multiple sources (e.g., the exchange
     * itself, third party providers) as specified by the data object ID field.
     * A bid request can mix data objects from multiple providers.
     */
    message Data {
        /*
         * Exchange specific ID for the data provider.
         */
        optional string id = 1;
        /*
         * Data provider name.
         */
        optional string name = 2;
        /*
         * Array of segment objects.
         */
        repeated Segment segment = 3;

        optional DataExtensions ext = 1000;

        /*
         * OpenRTB 3.3.14: convey specific units of information from the provider identified
         * in the parent data object.
         */
        message Segment {
            /*
             * ID of a data provider’s segment applicable to the user.
             */
            optional string id = 1;
            /*
             * Name of a data provider’s segment applicable to the user.
             */
            optional string name = 2;
            /*
             * String representing the value of the segment. The method for transmitting this data
             * should be negotiated offline with the data provider.
             * For example for gender, “male”, or “female”, for age, “30-40”).
             */
            optional string value = 3;

            optional SegmentExtensions ext = 1000;
        }
    }

    // Next available tag: 2
    /*
     * OpenRTB 3.3.15: Legal, governmental, or industry regulations that apply to the request.
     */
    message Regulations {
        /*
         * Indicated wether or not this request falls under the COPPA regulations
         * established by the USA FTC.
         */
        optional Flag coppa = 1;

        optional RegulationsExtensions ext = 1000;
    }
}

// Next available tag: 7
/*
 * OpenRTB 4.3.1: top-level bid response object.
 */
message BidResponse {
    /*
     * ID of the bid request.
     */
    optional string id = 1;
    /*
     * Array of seatbid objects.
     */
    repeated SeatBid seatbid = 2;
    /*
     * Bid response ID to assist tracking for bidders.
     * This value is chosen by the bidder for cross-reference.
     */
    optional string bidid = 3;
    /*
     * Bid currency using ISO-4217 alphabetic codes.
     */
    optional string cur = 4 [default = "USD"];
    /*
     * This is an optional feature, which allows a bidder to set data in the exchange’s cookie.
     * The string may be in base85 cookie safe characters, and be in any format.
     * This may be useful for storing user features.
     * Note: Proper JSON encoding must be used to include “escaped” quotation marks.
     */
    optional string customdata = 5;
    /*
     * Reason for not bidding.
     */
    optional Enums.BidResponse.NoBidReason nbr = 6;

    optional BidResponseExtensions ext = 1000;

    // Next available tag: 4
    /*
     * OpenRTB 4.3.2: A bid response can contain multiple “seatbid” objects, each on behalf of a
     * different bidder seat. Since a bid request can include multiple impressions, each “seatbid”
     * object can contain multiple bids each pertaining to a different impression on behalf of a seat.
     * Thus, each “bid” object must include the impression ID to which it pertains as well as
     * the bid price. The “group” attribute can be used to specify if a seat is willing to accept
     * any impressions that it can win (default) or if it is only interested in winning any if it
     * can win them all (i.e., all or nothing).
     */
    message SeatBid {
        /*
         * Array of bid objects; each bid object relates to an imp object in the bid request.
         * Note that, if supported by an exchange, one imp object can have many bid objects.
         */
        repeated Bid bid = 1;
        /*
         * ID of the bidder seat on whose behalf this bid is made.
         */
        optional string seat = 2;
        /*
         * Should impressions be won or lost as a group?
         */
        optional Flag group = 3;

        optional SeatBidExtensions ext = 1000;

        /*
         * OpenRTB 4.3.3: For each bid, the “nurl” attribute contains the win notice URL.
         * If the bidder wins the impression, the exchange calls this notice URL a) to inform the bidder
         * of the win and b) to convey certain information using substitution macros
         * (see Section 4.6 Substitution Macros). The “adomain” attribute can be used to check
         * advertiser block list compliance. The “iurl” attribute can provide a link to an image that
         * is representative of the campaign’s content (irrespective of whether the campaign may have
         * multiple creatives). This enables human review for spotting inappropriate content.
         * The “cid” attribute can be used to block ads that were previously identified as
         * inappropriate; essentially a safety net beyond the block lists.  The “crid” attribute
         * can be helpful in reporting creative issues back to bidders. Finally, the “attr” array
         * indicates the creative attributes that describe the ad to be served.
         */
        message Bid {
            /*
             * ID for the bid object chosen by the bidder for tracking and debugging purposes.
             * Useful when multiple bids are submitted for a single impression for a given seat.
             */
            required string id = 1;
            /*
             * ID of the impression object to which this bid applies.
             */
            required string impid = 2;
            /*
             * Bid price in CPM. WARNING/Best Practice Note: Although this value is a float,
             * OpenRTB strongly suggests using integer math for accounting to avoid rounding errors.
             */
            required double price = 3;
            /*
             * ID that references the ad to be served if the bid wins.
             */
            optional string adid = 4;
            /*
             * Win notice URL. Note that ad markup is also typically, but not necessarily,
             * returned via this URL.
             */
            optional string nurl = 5;
            /*
             * Actual ad markup. XHTML if a response to a banner object,
             * or VAST XML if a response to a video object.
             * <p>
             * Open Bidder macros are supported for this field.
             */
            optional string adm = 6;
            /*
             * Native ad response.
             * You can only set one of adm and adm_native; either will generate the "adm" field in JSON.
             */
            optional NativeResponse adm_native = 50;
            /*
             * Advertiser’s primary or top-level domain for advertiser checking.
             * This can be a list of domains if there is a rotating creative.
             * However, exchanges may mandate that only one landing domain is allowed.
             */
            repeated string adomain = 7;
            /**
             * Bundle or package name (e.g., com.foo.mygame) of the app being advertised, if applicable;
             * intended to be a unique ID across exchanges.
             */
            optional string bundle = 15;
            /*
             * Sample image URL (without cache busting) for content checking.
             */
            optional string iurl = 8;
            /*
             * Campaign ID or similar that appears within the ad markup.
             */
            optional string cid = 9;
            /*
             * Creative ID for reporting content issues or defects.
             * This could also be used as a reference to a creative ID that is posted with an exchange.
             * <p>
             * Open Bidder macros are supported for this field.
             */
            optional string crid = 10;
            /**
             * IAB content category of the creative.
             */
            repeated string cat = 16;
            /*
             * Array of creative attributes.
             */
            repeated CreativeAttribute attr = 11;
            /*
             * A unique identifier for the direct deal associated with the bid.
             */
            optional string dealid = 12;
            /**
             * Width of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin
             * optional fields it is recommended that the response bid contains this field to signal
             * the size of ad chosen.
             */
            optional int32 w = 13;
            /**
             * Height of the ad in pixels. If the bid request contained the wmax/hmax and wmin/hmin
             * optional fields it is recommended that the response bid contains this field to signal
             * the size of ad chosen.
             */
            optional int32 h = 14;

            optional BidExtensions ext = 1000;
        }
    }
}
/**
 * OpenRTB Native 4.1: The Native Object defines the native advertising opportunity
 * available for bid via this bid request. It must be included directly in the
 * impression object if the impression offered for auction is a native ad format.
 */
message NativeRequest {
    /**
     * Version of the Native Markup version in use.
     */
    optional string ver = 1;
    /**
     * The Layout ID of the native ad unit.
     * This field is not required, but it's highly recommended.
     */
    optional Enums.BidRequest.Impression.NativeRequest.LayoutId layout = 2;
    /**
     * The Ad unit ID of the native ad unit. This corresponds to one of IAB Core-6 native ad units.
     * This field is not required, but it's highly recommended.
     */
    optional Enums.BidRequest.Impression.NativeRequest.AdUnitId adunit = 3;
    /**
     * The number of identical placements in this Layout.
     */
    optional int32 plcmtcnt = 4 [default = 1];
    /**
     * 0 for the first ad, 1 for the second ad, and so on.
     * This is not the sequence number of the content in the stream.
     */
    optional int32 seq = 5 [default = 0];
    /**
     * Any bid must comply with the array of elements expressed by the Exchange.
     */
    repeated Asset assets = 6;
    /**
     * The context in which the ad appears.
     */
    optional Enums.BidRequest.Impression.NativeRequest.Context context = 7;
    /**
     * A more detailed context in which the ad appears.
     */
    optional Enums.BidRequest.Impression.NativeRequest.ContextSubtype contextsubtype = 8;
    /**
     * The design/format/layout of the ad unit being offered.
     */
    optional Enums.BidRequest.Impression.NativeRequest.PlacementType plcmttype = 9;
    /**
     * Extensions.
     */
    extensions 100 to 9999;

    /**
     * OpenRTB Native 4.2: The main container object for each asset requested or supported by
     * Exchange on behalf of the rendering client. Any object that is required
     * is to be flagged as such. Only one of the {title,img,video,data} objects should be
     * present in each object. All others should be null/absent. The id is to be unique within
     * the Asset array so that the response can be aligned.
     */
    message Asset {
        /**
         * Unique asset ID, assigned by exchange. Typically a counter for the array.
         */
        required int32 id = 1;
        /**
         * Set to true if asset is required (exchange will not accept a bid without it).
         */
        optional bool required = 2 [default = false];
        /**
         * Title object for title assets.
         */
        optional Title title = 3;
        /**
         * Image object for image assets.
         */
        optional Image img = 4;
        /**
         * Video object for video assets.
         * Note that in-stream video ads are not part of Native.  Native ads may contain a video
         * as the ad creative itself.
         */
        optional BidRequest.Impression.Video video = 5;
        /**
         * Data object for ratings, prices etc.
         */
        optional Data data = 6;
        /**
         * Extensions.
         */
        extensions 100 to 9999;

        /**
         * OpenRTB Native 4.3: The Title object is to be used for title element of the Native ad.
         */
        message Title {
            /**
             * Maximum length of the text in the title element.
             */
            required int32 len = 1;
            /**
             * Extensions.
             */
            extensions 100 to 9999;
        }

        /**
         * OpenRTB Native 4.4: The Image object to be used for all image elements of the
         * Native ad such as Icons, Main Image, etc.
         */
        message Image {
            /**
             * Type ID of the image element supported by the publisher.
             * The publisher can display this information in an appropriate format.
             */
            optional ImageAssetType type = 1;
            /**
             * Width of the image in pixels.
             */
            optional int32 w = 2;
            /**
             * Height of the image in pixels.
             */
            optional int32 h = 3;
            /**
             * The minimum requested width of the image in pixels. This option should be used for any
             * rescaling of images by the client. Either w or wmin should be transmitted.
             * If only w is included, it should be considered an exact requirement.
             */
            optional int32 wmin = 4;
            /**
             * The minimum requested height of the image in pixels. This option should be used for any
             * rescaling of images by the client. Either h or hmin should be transmitted.
             * If only h is included, it should be considered an exact requirement.
             */
            optional int32 hmin = 5;
            /**
             * Whitelist of content MIME types supported. Popular MIME types include, but are not
             * limited to "image/jpg" and "image/gif". Each implementing Exchange should have their
             * own list of supported types in the integration docs. See Wikipedia's MIME page for
             * more information and links to all IETF RFCs. If blank, assume all types are allowed.
             */
            repeated string mimes = 6;
            /**
             * Extensions.
             */
            extensions 100 to 9999;

            /**
             * OpenRTB Native 7.4: Common image asset element types of native advertising at
             * the time of writing this spec. This list is non-exhaustive and intended to be
             * extended by the buyers and sellers as the format evolves.
             */
            enum ImageAssetType {
                /** Icon image. */
                ICON = 1;
                /** Logo image for the brand/app. */
                LOGO = 2;
                /** Large image preview for the ad. */
                MAIN = 3;
                // Exchange-specific values above 500.
            }
        }

        /**
         * OpenRT Native 4.6: The Data Object is to be used for all non-core elements of the
         * native unit such as Ratings, Review Count, Stars, Download count, descriptions etc.
         * It is also generic for future of Native elements not contemplated at the time of the
         * writing of this document.
         */
        message Data {
            /**
             * Type ID of the element supported by the publisher. The publisher can display this
             * information in an appropriate format.
             */
            optional DataAssetType type = 1;
            /**
             * Maximum length of the text in the element's response.
             */
            optional int32 len = 2;
            /**
             * Extensions.
             */
            extensions 100 to 9999;

            /**
             * OpenRTB Native 7.3: Common asset element types of native advertising.
             * This list is non-exhaustive and intended to be extended by the buyers and sellers
             * as the format evolves. An implementing exchange may not support all asset variants
             * or introduce new ones unique to that system.
             */
            enum DataAssetType {
                /** Sponsored By message where response should contain the brand name of the sponsor. */
                SPONSORED = 1;
                /** Descriptive text associated with the product or service being advertised. */
                DESC = 2;
                /**
                 * Rating of the product being offered to the user.
                 * For example an app's rating in an app store from 0-5.
                 */
                RATING = 3;
                /** Number of social ratings or "likes" of the product being offered to the user. */
                LIKES = 4;
                /** Number downloads/installs of this product. */
                DOWNLOADS = 5;
                /**
                 * Price for product / app / in-app purchase.
                 * Value should include currency symbol in localised format.
                 */
                PRICE = 6;
                /**
                 * Sale price that can be used together with price to indicate a discounted price
                 * compared to a regular price. Value should include currency symbol in localised format.
                 */
                SALEPRICE = 7;
                /** Phone number. */
                PHONE = 8;
                /** Address. */
                ADDRESS = 9;
                /** Additional descriptive text associated with the product or service being advertised. */
                DESC2 = 10;
                /** Display URL for the text ad. */
                DISPLAYURL = 11;
                /** Text describing a "call to action" button for the destination URL. */
                CTATEXT = 12;
                // Exchange-specific values above 500.

                // STORE bit for ADX NativeAdTemplate
                STORE = 500;
            }
        }
    }
}

/**
 * OpenRTB Native 5.2: The native response object is the top level JSON object which identifies
 * an native response.
 */
message NativeResponse {
    /**
     * Version of the Native Markup version in use.
     */
    optional string ver = 1;
    /**
     * List of native ad's assets.
     */
    repeated Asset assets = 2;
    /**
     * Destination Link.
     */
    required Link link = 3;
    /**
     * Array of impression tracking URLs, expected to return a 1x1 image or 204 response -
     * typically only passed when using 3rd party trackers.
     */
    repeated string imptrackers = 4;
    /**
     * Optional javascript impression tracker. Contains <script> tags to be executed at
     * impression time where it can be supported.
     */
    optional string jstracker = 5;
    /**
     * Extensions.
     */
    extensions 100 to 9999;

    /**
     * OpenRTB Native 5.8: Used for "call to action" assets, or other links from the Native ad.
     * This Object should be associated to its peer object in the parent Asset Object.
     * When that peer object is activated (clicked) the action should take the user to the
     * location of the link.
     */
    message Link {
        /**
         * Landing URL of the clickable link.
         */
        optional string url = 1;
        /**
         * List of third-party tracker URLs to be fired on click of the URL.
         */
        repeated string clicktrackers = 2;
        /**
         * Fallback URL for deeplink. To be used if the URL given in url is not supported by the device.
         */
        optional string fallback = 3;
        /**
         * Extensions.
         */
        extensions 100 to 9999;
    }

    /**
     * OpenRTB Native 5.3: Corresponds to the Asset Object in the request.
     * The main container object for each asset requested or supported by Exchange on behalf
     * of the rendering client. Any object that is required is to be flagged as such.
     * Only one of the {title,img,video,data} objects should be present in each object.
     * All others should be null/absent. The id is to be unique within the Asset array
     * so that the response can be aligned.
     */
    message Asset {
        /**
         * Unique asset ID, assigned by exchange, must match one of the asset IDs in request.
         */
        required int32 id = 1;
        /**
         * Set to 1 if asset is required. (bidder requires it to be displayed).
         */
        optional bool required = 2 [default = false];
        /**
         * Title object for title assets.
         */
        optional Title title = 3;
        /**
         * Image object for image assets.
         */
        optional Image img = 4;
        /**
         * Video object for video assets.
         * Note that in-stream video ads are not part of Native. Native ads may contain a video
         * as the ad creative itself.
         */
        optional Video video = 5;
        /**
         * Data object for ratings, prices etc.
         */
        optional Data data = 6;
        /**
         * Link object for call to actions. This link is to associated to the other populated
         * field within the object.
         */
        optional Link link = 7;
        /**
         * Extensions.
         */
        extensions 100 to 9999;

        /**
         * OpenRTB Native 5.4: Corresponds to the Title Object in the request, with the value filled in.
         */
        message Title {
            /**
             * The text associated with the text element.
             */
            required string text = 1;
            /**
             * Extensions.
             */
            extensions 100 to 9999;
        }

        /**
         * OpenRTB Native 5.5: Corresponds to the Image Object in the request. The Image object
         * to be used for all image elements of the Native ad such as Icons, Main Image, etc.
         */
        message Image {
            /**
             * URL of the image asset.
             */
            optional string url = 1;
            /**
             * Width of the image in pixels.
             * This field is not required, but it's highly recommended.
             */
            optional int32 w = 2;
            /**
             * Height of the image in pixels.
             * This field is not required, but it's highly recommended.
             */
            optional int32 h = 3;
            /**
             * Extensions.
             */
            extensions 100 to 9999;
        }

        /**
         * OpenRTB Native 5.6: Corresponds to the Data Object in the request, with the value filled in.
         * The Data Object is to be used for all miscellaneous elements of the native unit such as
         * Ratings, Review Count, Stars, Downloads, Price count etc. It is also generic for future
         * of Native elements not contemplated at the time of the writing of this document.
         */
        message Data {
            /**
             * The optional formatted string name of the data type to be displayed.
             */
            optional string label = 1;
            /**
             * The formatted string of data to be displayed. Can contain a formatted value such as
             * "5 stars" or "$10" or "3.4 stars out of 5".
             */
            required string value = 2;
            /**
             * Extensions.
             */
            extensions 100 to 9999;
        }

        /**
         * OpenRTB Native 5.7: Corresponds to the Video Object in the request,
         * yet containing a value of a conforming VAST tag as a value.
         */
        message Video {
            /**
             * vast xml.
             */
            repeated string vasttag = 1;
            /**
             * Extensions.
             */
            extensions 100 to 9999;
        }
    }
}

// Next available tag: 5
// Refer to the documentation of BuyerPricingRule in adx.proto
// to understand the meaning of these fields.
message AdvertiserInfo {
    repeated int64 included_advertisers = 1;
    repeated int64 excluded_advertisers = 2;
    optional bool blocked = 3;
    // CPM micros in buyer currency i.e. USD
    optional int64 minimum_cpm_micros = 4;
}

// Next available tag: 3
// Used to represent <w,h> at various places in the
// extensions.
// For e.g. Additional ad sizes supported on an adslot.
message Dimension {
    optional int32 width = 1;
    optional int32 height = 2;
}

// Next available tag: 13
message BidRequestExtensions {
    optional Enums.Inventory.Source inventory_source = 1;
    optional base.EventId auction_id = 2;
    // The unique identifier of the auction per buzz_key.
    // Format: <auctionid.timestamp>.<auctionid.hostid>.<auctionid.tid>.<buzz_key>
    // auction_id_str contains buzz_key so it is populated in sbs.
    optional string auctionid_str = 8;
    // This field is used for Geo targeting.
    // It is populated by the LocalAugmentor in Stinger.
    optional TargetingGeoExtension targeting_geo = 3;

    // time_of_week is a stinger calculated field used for targetting
    optional int32 time_of_week = 4;

    // Used to identify Stinger.
    optional string buzz_key = 5;

    // Next available tag: 3
    message AugmentorData {

        // Next available tag: 3
        // Segment along with augmentor's ID allows augmentor based targeting
        message Segment {
            // ID of a augmentor’s segment
            optional string id = 1;

            // String representing the value of the segment.
            optional string value = 2;
        }

        // Augmentor identifier, used for targeting
        optional string id = 1;

        // Array of Augmentor segments
        repeated Segment segment = 2;
    }

    // This field is used by Augmentors like ManagedListAugmentor
    repeated AugmentorData augmentor_data = 6;

    // Determines how impression notifications will happen for this request. See
    // ImpressionTracker comments for more information.
    optional Enums.Inventory.ImpressionTracker imp_tracker = 10;

    // Determines how supplier click tracking will happen for this request. See
    // SupplierClickTracker for more information.
    optional Enums.Inventory.SupplierClickTracker supplier_click_tracker = 11;

    // Exchange specific extensions
    optional AppNexusBidRequestExtension appnexus = 7;
    optional AdxBidRequestExtension adx = 9;

    repeated string traffic_segments = 12;

    extensions 1000 to max;
}

// ADV-9315 added manually
message SourceExtensions {
    optional SupplyChain schain = 1;

    extensions 1000 to max;
}

// ADV-9315 added manually
message SupplyChain {
    // Array of objects in the order of placing in the chain.
    // The original source of the request is first and the final seller of the request last
    repeated SupplyChainNode nodes = 1;

    // Flag indicating whether the chain contains all nodes leading back to the source of the inventory
    // 0 = no, 1 = yes.
    required int32 complete = 2;

    // Version of the supply chain specification in use
    // Currently "1.0" is the only option
    required string version = 3;

    extensions 1000 to max;
}

// ADV-9315 added manually
message SupplyChainNode {
    // The canonical domain name of the SSP, Exchange, Header Wrapper, etc system that bidders connect to
    required string asi = 1;

    // The identifier associated with the seller or reseller account within the advertising system
    required string sid = 2;

    // Indicates whether this node will be involved in the flow of payment for the inventory.
    // For version 1.0 of SupplyChain, this property should always be 1
    required int32 hp = 3;

    // The OpenRTB RequestId of the request as issued by this seller
    optional string rid = 4;

    // The business name of the entity represented by this node
    optional string name = 5;

    // The business domain name of the entity represented by this node
    optional string domain = 6;

    extensions 1000 to max;
}

// Next available tag: 9
message ImpressionExtensions {
    optional Enums.Inventory.PlacementType placement_type = 2;
    optional Enums.Inventory.EnvironmentType environment_type = 3;
    repeated string placements = 5;
    repeated AdvertiserInfo advertiser_info = 4;

    optional ViewabilityExtensions viewability = 8;

    // Seat ids that the exchange considers eligible to serve on this impression.
    // This feature is currently only supported by Adx.
    repeated string eligible_seat_ids = 7;

    // Exchange specific extensions
    optional AdxImpressionExtension adx = 1;

    extensions 1000 to max;

    // Deprecated field. Use ViewabilityExtensions field instead.
    optional float exchange_predicted_view_rate = 6 [deprecated = true];
}

// Next available tag: 5
message BannerExtensions {
    // Blocked ApiFrameworks
    repeated Enums.BidRequest.Impression.ApiFramework bapis = 1;

    // Creative attributes that are required by the request.
    // For e.g. MoPub request have "AD_HAS_THUMBNAIL" for the creative
    //          to be returned in the response
    repeated CreativeAttribute required_attrs = 2;

    // Some exchanges such as Google Adx support multiple allowed sizes for
    // an impression.
    // In such cases, the additional dimensions (w, h) that are supported
    // are present in this field.
    // For example, if Adx supports 5 sets of allowed sizes in a request.
    // The first allowed size will be in banner.w and banner.h
    // The additional 4 sets will be in this field.
    repeated Dimension additional_dimensions = 3;

    // Some exchanges support "rewarded banners". This signifies that an end user
    // will recieve a reward for interacting with the ad. E.g. if the user plays
    // a game in a playable banner, they get game currency in a phone game.
    //
    // Two things to note:
    //   1. Protobufs sets bools false by default. Unless this field exists and
    //      is explicitly set to true, a banner is considered "nonrewarded".
    //   2. No exchange actually defines this field here, it is a generalization
    //      of the different ways that exchanges denote rewarded banners.
    optional bool rewarded = 4;

    extensions 1000 to max;
}

// Next available tag: 6
message VideoExtensions {
    // player_size can be one of ["S", "M"., "L", "XL", "NA"].
    // Added by augmentor in Beeswax Front End Server (FES)
    optional string player_size = 1;

    // Creative attributes that are required by the request.
    // For e.g. Adx requests that require skippable ads are modeled
    // as having required_attr = AD_CAN_BE_SKIPPED
    repeated CreativeAttribute required_attrs = 2;

    enum PlacementType {
        IN_BANNER = 0;
        IN_STREAM = 1;
    }
    optional PlacementType placement_type = 3 [default = IN_STREAM];

    // Number of seconds into the video ad when the skip button appears.
    // This is only applicable to skippable video ads.
    // Some inventory sources such as Google Ad Exchange do not specify
    // this skip offset explicity in the bid request.
    // For such sources, skip_offset of 5 seconds is a safe default.
    optional int32 skip_offset = 4 [default = 5];

    // Some exchanges support "rewarded videos". This signifies that an end user
    // will recieve a reward for interacting with the ad. E.g. if the user watches
    // the whole video, they get game currency in a phone game.
    //
    // Two things to note:
    //   1. Protobufs sets bools false by default. Unless this field exists and
    //      is explicitly set to true, a video is considered "nonrewarded".
    //   2. No exchange actually defines this field here, it is a generalization
    //      of the different ways that exchanges denote rewarded videos.
    optional bool rewarded = 5;

    extensions 1000 to max;
}

message NativeExtensions {
    extensions 1000 to max;
}

message PMPExtensions {
    extensions 1000 to max;
}

message DirectDealExtensions {
    repeated string buyer_wseat = 1;
    extensions 1000 to max;
}

message SiteExtensions {
    optional string bsw_uuid = 1;
    reserved 2; // deprecated field "tdd_uuid"
    optional string ttd_uuid = 3;
    extensions 1000 to max;
}

message AppExtensions {
    optional string xandr_id = 1;
    extensions 1000 to max;
}

message ContentExtensions {
    extensions 1000 to max;
}


message ProducerExtensions {
    extensions 1000 to max;
}

// Next available tag: 10
// Tag 1: idfa - Deprecated. Do not resuse.
message DeviceExtensions {
    // Device screen size. Valid values are "S", "M", "L", "XL", and "NA"
    // Added by augmentor in Beeswax Front End Server (FES)
    optional string augmented_device_screen_size = 2 [default = "NA"];

    // Added by augmentor in Beeswax Front End Server (FES)
    optional string augmented_browser = 3 [default = "-1"];

    // Added by augmentor in Beeswax Front End Server (FES)
    optional string augmented_browser_version = 4 [default = "-1"];

    // Added by augmentor in Beeswax Front End Server (FES)
    optional string augmented_os = 5 [default = "-1"];

    // Added by augmentor in Beeswax Front End Server (FES)
    optional string augmented_osv = 6 [default = "-1"];

    // Added by augmentor in Beeswax Front End Server (FES)
    optional string augmented_model = 7 [default = "-1"];

    // Added by augmentor in Beeswax Front End Server (FES)
    optional string augmented_make = 8 [default = "-1"];

    // Added by augmentor in Beeswax Front End Server (FES)
    optional Enums.BidRequest.Device.DeviceType augmented_devicetype = 9 [default = UNKNOWN];

    extensions 1000 to max;
}

// Next available tag: 4
message UserExtensions {
    // This field identifies the user of the bid request. It will be used
    // for user segment lookup and frequency cap.
    // For WEB request, its value is bito_id (user.id).
    // For APP request, its value is the first field which has value
    // in the following order:
    // device.ifa -> device.dpidsha1 -> device.dpidmd5
    // And the value is prefixed with the names in Enum.Bidrequest.User.UserIdType
    // (Except bito_id - we still use bito as prefix)
    optional string user_id = 1;
    optional Enums.BidRequest.User.UserIdType user_id_type = 2;

    // Number of days since the user cookie has been dropped, for example, 10
    optional int32 cookie_age = 3;
    optional string consent = 4;
    optional ConsentedProvidersSettings consented_providers_settings = 5;
    extensions 1000 to max;
}

message ConsentedProvidersSettings {
    repeated int32 consented_providers = 1;
}

message PublisherExtensions {
    extensions 1000 to max;
}

// Next available tag: 2
message GeoExtensions {
    optional AdxGeoExtension adx = 1;
    extensions 1000 to max;
}

// Next available tag: 2
message DataExtensions {
    optional bool beeswax_augmented = 1 [default = false];
    extensions 1000 to max;
}

message SegmentExtensions {
    extensions 1000 to max;
}

message RegulationsExtensions {
    optional Flag gdpr = 1;
    // The raw IAB consent string or "daisybit" as provided in the incoming bid
    // request.
    optional string gdpr_consent_string = 2;
    extensions 1000 to max;
}

message BidResponseExtensions {
    extensions 1000 to max;
}

message SeatBidExtensions {
    extensions 1000 to max;
}

// Next available tag: 11
message BidExtensions {
    optional string advertiser_name = 201;
    optional string agency_name = 202;
    optional string agency_id = 203;
    extensions 1000 to max;
}

// This field is used for Geo targeting.
// It is populated by the LocalAugmentor in Stinger.
message TargetingGeoExtension {
    // Country using ISO-3166-1 Alpha-3.
    optional string country = 1 [default = "000"];
    // Region using ISO 3166-2
    optional string region = 2 [default = "000/00"];
    // City using United Nations Code for Trade and Transport Locations
    // (http://www.unece.org/cefact/locode/service/location.htm).
    optional string city = 3 [default = "-1"];
    // Zip/postal code.
    optional string zip = 4 [default = "-1"];
    optional string metro = 5 [default = "000"];
    optional bool lat_long_present = 6 [default = false];
    optional double lat = 7;
    optional double lon = 8;
    optional Enums.BidRequest.Geo.LocationType type = 9;
}

// Viewability.predicted_viewability is populated by FES LocalAugmentor
// and used for targeting in Matcher
message ViewabilityExtensions {
    // Specifies the predicted viewability from Beeswax ViewabilityPredictor
    optional float predicted_viewability = 1;
    // Specifies the probability that the impression will be viewable by the user,
    // based on historical data.
    // Currently populated for AppNexus and AdX only
    optional float exchange_predicted_view_rate = 2;
}

// Exchange specific extensions.
// Next available tag: 3
message AdxBidRequestExtension {
    // If true, then the selective callout model predicted that we will not bid
    // on this request. ADX sends a sampled percentage of such requests so that they
    // can automatically update the model when bidding patterns change.
    optional bool is_predicted_to_be_ignored = 1;
    // The offset of the user's time from GMT in minutes.
    // For example, GMT-5 is timezone_offset = -300.
    optional int32 timezone_offset = 2;
}

// Next available tag: 3
message AdxImpressionExtension {
    optional int32 adslot_id = 1;
    // Historical click-through rate for ads served in the ad slot. This is
    // expressed as a fraction in the range [0.0, 1.0]. The default value of
    // -1.0 indicates that historical click-through rate data is not available.
    // This figure does not include data aggregated from AdWords.
    optional float click_through_rate = 2 [default = -1.0];
}

message AdxGeoExtension {
    optional int32 dma_region_code = 1;
    // Use fes.exchange.adx.AdxBidRequest.HyperlocalSet to parse.
    optional bytes hyperlocal_set = 2;
}

// 2. AppNexus Exchange
// Next available tag: 2
message AppNexusBidRequestExtension {
    // Specifies the ID of the member selling the inventory.
    optional int32 seller_member_id = 1;
}

// OpenRTB 6.1: IAB contextual taxonomy for categorization.
enum ContentCategory {
    IAB1 = 1; // Arts & Entertainment
    IAB1_1 = 2; // Books & Literature
    IAB1_2 = 3; // Celebrity Fan/Gossip
    IAB1_3 = 4; // Fine Art
    IAB1_4 = 5; // Humor
    IAB1_5 = 6; // Movies
    IAB1_6 = 7; // Music
    IAB1_7 = 8; // Television
    IAB2 = 9; // Automotive
    IAB2_1 = 10; // Auto Parts
    IAB2_2 = 11; // Auto Repair
    IAB2_3 = 12; // Buying/Selling Cars
    IAB2_4 = 13; // Car Culture
    IAB2_5 = 14; // Certified Pre-Owned
    IAB2_6 = 15; // Convertible
    IAB2_7 = 16; // Coupe
    IAB2_8 = 17; // Crossover
    IAB2_9 = 18; // Diesel
    IAB2_10 = 19; // Electric Vehicle
    IAB2_11 = 20; // Hatchback
    IAB2_12 = 21; // Hybrid
    IAB2_13 = 22; // Luxury
    IAB2_14 = 23; // MiniVan
    IAB2_15 = 24; // Mororcycles
    IAB2_16 = 25; // Off-Road Vehicles
    IAB2_17 = 26; // Performance Vehicles
    IAB2_18 = 27; // Pickup
    IAB2_19 = 28; // Road-Side Assistance
    IAB2_20 = 29; // Sedan
    IAB2_21 = 30; // Trucks & Accessories
    IAB2_22 = 31; // Vintage Cars
    IAB2_23 = 32; // Wagon
    IAB3 = 33; // Business
    IAB3_1 = 34; // Advertising
    IAB3_2 = 35; // Agriculture
    IAB3_3 = 36; // Biotech/Biomedical
    IAB3_4 = 37; // Business Software
    IAB3_5 = 38; // Construction
    IAB3_6 = 39; // Forestry
    IAB3_7 = 40; // Government
    IAB3_8 = 41; // Green Solutions
    IAB3_9 = 42; // Human Resources
    IAB3_10 = 43; // Logistics
    IAB3_11 = 44; // Marketing
    IAB3_12 = 45; // Metals
    IAB4 = 46; // Careers
    IAB4_1 = 47; // Career Planning
    IAB4_2 = 48; // College
    IAB4_3 = 49; // Financial  Aid
    IAB4_4 = 50; // Job Fairs
    IAB4_5 = 51; // Job Search
    IAB4_6 = 52; // Resume Writing/Advice
    IAB4_7 = 53; // Nursing
    IAB4_8 = 54; // Scholarships
    IAB4_9 = 55; // Telecommuting
    IAB4_10 = 56; // U.S. Military
    IAB4_11 = 57; // Career Advice
    IAB5 = 58; // Education
    IAB5_1 = 59; // 7-12 Education
    IAB5_2 = 60; // Adult Education
    IAB5_3 = 61; // Art History
    IAB5_4 = 62; // Colledge Administration
    IAB5_5 = 63; // College Life
    IAB5_6 = 64; // Distance Learning
    IAB5_7 = 65; // English as a 2nd Language
    IAB5_8 = 66; // Language Learning
    IAB5_9 = 67; // Graduate School
    IAB5_10 = 68; // Homeschooling
    IAB5_11 = 69; // Homework/Study Tips
    IAB5_12 = 70; // K-6 Educators
    IAB5_13 = 71; // Private School
    IAB5_14 = 72; // Special Education
    IAB5_15 = 73; // Studying Business
    IAB6 = 74; // Family & Parenting
    IAB6_1 = 75; // Adoption
    IAB6_2 = 76; // Babies & Toddlers
    IAB6_3 = 77; // Daycare/Pre School
    IAB6_4 = 78; // Family Internet
    IAB6_5 = 79; // Parenting - K-6 Kids
    IAB6_6 = 80; // Parenting teens
    IAB6_7 = 81; // Pregnancy
    IAB6_8 = 82; // Special Needs Kids
    IAB6_9 = 83; // Eldercare
    IAB7 = 84; // Health & Fitness
    IAB7_1 = 85; // Exercise
    IAB7_2 = 86; // A.D.D.
    IAB7_3 = 87; // AIDS/HIV
    IAB7_4 = 88; // Allergies
    IAB7_5 = 89; // Alternative Medicine
    IAB7_6 = 90; // Arthritis
    IAB7_7 = 91; // Asthma
    IAB7_8 = 92; // Autism/PDD
    IAB7_9 = 93; // Bipolar Disorder
    IAB7_10 = 94; // Brain Tumor
    IAB7_11 = 95; // Cancer
    IAB7_12 = 96; // Cholesterol
    IAB7_13 = 97; // Chronic Fatigue Syndrome
    IAB7_14 = 98; // Chronic Pain
    IAB7_15 = 99; // Cold & Flu
    IAB7_16 = 100; // Deafness
    IAB7_17 = 101; // Dental Care
    IAB7_18 = 102; // Depression
    IAB7_19 = 103; // Dermatology
    IAB7_20 = 104; // Diabetes
    IAB7_21 = 105; // Epilepsy
    IAB7_22 = 106; // GERD/Acid Reflux
    IAB7_23 = 107; // Headaches/Migraines
    IAB7_24 = 108; // Heart Disease
    IAB7_25 = 109; // Herbs for Health
    IAB7_26 = 110; // Holistic Healing
    IAB7_27 = 111; // IBS/Crohn's Disease
    IAB7_28 = 112; // Incest/Abuse Support
    IAB7_29 = 113; // Incontinence
    IAB7_30 = 114; // Infertility
    IAB7_31 = 115; // Men's Health
    IAB7_32 = 116; // Nutrition
    IAB7_33 = 117; // Orthopedics
    IAB7_34 = 118; // Panic/Anxiety Disorders
    IAB7_35 = 119; // Pediatrics
    IAB7_36 = 120; // Physical Therapy
    IAB7_37 = 121; // Psychology/Psychiatry
    IAB7_38 = 122; // Senor Health
    IAB7_39 = 123; // Sexuality
    IAB7_40 = 124; // Sleep Disorders
    IAB7_41 = 125; // Smoking Cessation
    IAB7_42 = 126; // Substance Abuse
    IAB7_43 = 127; // Thyroid Disease
    IAB7_44 = 128; // Weight Loss
    IAB7_45 = 129; // Women's Health
    IAB8 = 130; // Food & Drink
    IAB8_1 = 131; // American Cuisine
    IAB8_2 = 132; // Barbecues & Grilling
    IAB8_3 = 133; // Cajun/Creole
    IAB8_4 = 134; // Chinese Cuisine
    IAB8_5 = 135; // Cocktails/Beer
    IAB8_6 = 136; // Coffee/Tea
    IAB8_7 = 137; // Cuisine-Specific
    IAB8_8 = 138; // Desserts & Baking
    IAB8_9 = 139; // Dining Out
    IAB8_10 = 140; // Food Allergies
    IAB8_11 = 141; // French Cuisine
    IAB8_12 = 142; // Health/Lowfat Cooking
    IAB8_13 = 143; // Italian Cuisine
    IAB8_14 = 144; // Japanese Cuisine
    IAB8_15 = 145; // Mexican Cuisine
    IAB8_16 = 146; // Vegan
    IAB8_17 = 147; // Vegetarian
    IAB8_18 = 148; // Wine
    IAB9 = 149; // Hobbies & Interests
    IAB9_1 = 150; // Art/Technology
    IAB9_2 = 151; // Arts & Crafts
    IAB9_3 = 152; // Beadwork
    IAB9_4 = 153; // Birdwatching
    IAB9_5 = 154; // Board Games/Puzzles
    IAB9_6 = 155; // Candle & Soap Making
    IAB9_7 = 156; // Card Games
    IAB9_8 = 157; // Chess
    IAB9_9 = 158; // Cigars
    IAB9_10 = 159; // Collecting
    IAB9_11 = 160; // Comic Books
    IAB9_12 = 161; // Drawing/Sketching
    IAB9_13 = 162; // Freelance Writing
    IAB9_14 = 163; // Geneaology
    IAB9_15 = 164; // Getting Published
    IAB9_16 = 165; // Guitar
    IAB9_17 = 166; // Home Recording
    IAB9_18 = 167; // Investors & Patents
    IAB9_19 = 168; // Jewelry Making
    IAB9_20 = 169; // Magic & Illusion
    IAB9_21 = 170; // Needlework
    IAB9_22 = 171; // Painting
    IAB9_23 = 172; // Photography
    IAB9_24 = 173; // Radio
    IAB9_25 = 174; // Roleplaying Games
    IAB9_26 = 175; // Sci-Fi & Fantasy
    IAB9_27 = 176; // Scrapbooking
    IAB9_28 = 177; // Screenwriting
    IAB9_29 = 178; // Stamps & Coins
    IAB9_30 = 179; // Video & Computer Games
    IAB9_31 = 180; // Woodworking
    IAB10 = 181; // Home & Garden
    IAB10_1 = 182; // Appliances
    IAB10_2 = 183; // Entertaining
    IAB10_3 = 184; // Environmental Safety
    IAB10_4 = 185; // Gardening
    IAB10_5 = 186; // Home Repair
    IAB10_6 = 187; // Home Theater
    IAB10_7 = 188; // Interior  Decorating
    IAB10_8 = 189; // Landscaping
    IAB10_9 = 190; // Remodeling & Construction
    IAB11 = 191; // Law, Gov't & Politics
    IAB11_1 = 192; // Immigration
    IAB11_2 = 193; // Legal Issues
    IAB11_3 = 194; // U.S. Government Resources
    IAB11_4 = 195; // Politics
    IAB11_5 = 196; // Commentary
    IAB12 = 197; // News
    IAB12_1 = 198; // International News
    IAB12_2 = 199; // National News
    IAB12_3 = 200; // Local News
    IAB13 = 201; // Personal Finance
    IAB13_1 = 202; // Beginning Investing
    IAB13_2 = 203; // Credit/Debt & Loans
    IAB13_3 = 204; // Financial News
    IAB13_4 = 205; // Financial Planning
    IAB13_5 = 206; // Hedge Fund
    IAB13_6 = 207; // Insurance
    IAB13_7 = 208; // Investing
    IAB13_8 = 209; // Mutual Funds
    IAB13_9 = 210; // Options
    IAB13_10 = 211; // Retirement Planning
    IAB13_11 = 212; // Stocks
    IAB13_12 = 213; // Tax Planning
    IAB14 = 214; // Society
    IAB14_1 = 215; // Dating
    IAB14_2 = 216; // Divorce Support
    IAB14_3 = 217; // Gay Life
    IAB14_4 = 218; // Marriage
    IAB14_5 = 219; // Senior Living
    IAB14_6 = 220; // Teens
    IAB14_7 = 221; // Weddings
    IAB14_8 = 222; // Ethnic Specific
    IAB15 = 223; // Science
    IAB15_1 = 224; // Astrology
    IAB15_2 = 225; // Biology
    IAB15_3 = 226; // Chemistry
    IAB15_4 = 227; // Geology
    IAB15_5 = 228; // Paranormal Phenomena
    IAB15_6 = 229; // Physics
    IAB15_7 = 230; // Space/Astronomy
    IAB15_8 = 231; // Geography
    IAB15_9 = 232; // Botany
    IAB15_10 = 233; // Weather
    IAB16 = 234; // Pets
    IAB16_1 = 235; // Aquariums
    IAB16_2 = 236; // Birds
    IAB16_3 = 237; // Cats
    IAB16_4 = 238; // Dogs
    IAB16_5 = 239; // Large Animals
    IAB16_6 = 240; // Reptiles
    IAB16_7 = 241; // Veterinary Medicine
    IAB17 = 242; // Sports
    IAB17_1 = 243; // Auto Racing
    IAB17_2 = 244; // Baseball
    IAB17_3 = 245; // Bicycling
    IAB17_4 = 246; // Bodybuilding
    IAB17_5 = 247; // Boxing
    IAB17_6 = 248; // Canoeing/Kayaking
    IAB17_7 = 249; // Cheerleading
    IAB17_8 = 250; // Climbing
    IAB17_9 = 251; // Cricket
    IAB17_10 = 252; // Figure Skating
    IAB17_11 = 253; // Fly Fishing
    IAB17_12 = 254; // Football
    IAB17_13 = 255; // Freshwater Fishing
    IAB17_14 = 256; // Game & Fish
    IAB17_15 = 257; // Golf
    IAB17_16 = 258; // Horse Racing
    IAB17_17 = 259; // Horses
    IAB17_18 = 260; // Hunting/Shooting
    IAB17_19 = 261; // Inline  Skating
    IAB17_20 = 262; // Martial Arts
    IAB17_21 = 263; // Mountain Biking
    IAB17_22 = 264; // NASCAR Racing
    IAB17_23 = 265; // Olympics
    IAB17_24 = 266; // Paintball
    IAB17_25 = 267; // Power & Motorcycles
    IAB17_26 = 268; // Pro Basketball
    IAB17_27 = 269; // Pro Ice Hockey
    IAB17_28 = 270; // Rodeo
    IAB17_29 = 271; // Rugby
    IAB17_30 = 272; // Running/Jogging
    IAB17_31 = 273; // Sailing
    IAB17_32 = 274; // Saltwater Fishing
    IAB17_33 = 275; // Scuba Diving
    IAB17_34 = 276; // Skateboarding
    IAB17_35 = 277; // Skiing
    IAB17_36 = 278; // Snowboarding
    IAB17_37 = 279; // Surfing/Bodyboarding
    IAB17_38 = 280; // Swimming
    IAB17_39 = 281; // Table Tennis/Ping-Pong
    IAB17_40 = 282; // Tennis
    IAB17_41 = 283; // Volleyball
    IAB17_42 = 284; // Walking
    IAB17_43 = 285; // Waterski/Wakeboard
    IAB17_44 = 286; // World Soccer
    IAB18 = 287; // Style & Fashion
    IAB18_1 = 288; // Beauty
    IAB18_2 = 289; // Body Art
    IAB18_3 = 290; // Fashion
    IAB18_4 = 291; // Jewelry
    IAB18_5 = 292; // Clothing
    IAB18_6 = 293; // Accessories
    IAB19 = 294; // Technology & Computing
    IAB19_1 = 295; // 3-D Graphics
    IAB19_2 = 296; // Animation
    IAB19_3 = 297; // Antivirus Software
    IAB19_4 = 298; // C/C++
    IAB19_5 = 299; // Cameras & Camcorders
    IAB19_6 = 300; // Cell  Phones
    IAB19_7 = 301; // Computer Certification
    IAB19_8 = 302; // Computer Networking
    IAB19_9 = 303; // Computer Peripherals
    IAB19_10 = 304; // Computer Reviews
    IAB19_11 = 305; // Data Centers
    IAB19_12 = 306; // Databases
    IAB19_13 = 307; // Desktop Publishing
    IAB19_14 = 308; // Desktop Video
    IAB19_15 = 309; // Email
    IAB19_16 = 310; // Graphics Software
    IAB19_17 = 311; // Home Video/DVD
    IAB19_18 = 312; // Internet Technology
    IAB19_19 = 313; // Java
    IAB19_20 = 314; // Javascript
    IAB19_21 = 315; // Mac Support
    IAB19_22 = 316; // MP3/MIDI
    IAB19_23 = 317; // Net Conferencing
    IAB19_24 = 318; // Net for Beginners
    IAB19_25 = 319; // Network Security
    IAB19_26 = 320; // Palmtops/PDAs
    IAB19_27 = 321; // PC Support
    IAB19_28 = 322; // Portable
    IAB19_29 = 323; // Entertainment
    IAB19_30 = 324; // Shareware/Freeware
    IAB19_31 = 325; // Unix
    IAB19_32 = 326; // Visual Basic
    IAB19_33 = 327; // Web Clip Art
    IAB19_34 = 328; // Web Design/HTML
    IAB19_35 = 329; // Web Search
    IAB19_36 = 330; // Windows
    IAB20 = 331; // Travel
    IAB20_1 = 332; // Adventure Travel
    IAB20_2 = 333; // Africa
    IAB20_3 = 334; // Air Travel
    IAB20_4 = 335; // Australia & New Zealand
    IAB20_5 = 336; // Bed & Breakfasts
    IAB20_6 = 337; // Budget Travel
    IAB20_7 = 338; // Business Travel
    IAB20_8 = 339; // By US Locale
    IAB20_9 = 340; // Camping
    IAB20_10 = 341; // Canada
    IAB20_11 = 342; // Caribbean
    IAB20_12 = 343; // Cruises
    IAB20_13 = 344; // Eastern  Europe
    IAB20_14 = 345; // Europe
    IAB20_15 = 346; // France
    IAB20_16 = 347; // Greece
    IAB20_17 = 348; // Honeymoons/Getaways
    IAB20_18 = 349; // Hotels
    IAB20_19 = 350; // Italy
    IAB20_20 = 351; // Japan
    IAB20_21 = 352; // Mexico & Central America
    IAB20_22 = 353; // National Parks
    IAB20_23 = 354; // South America
    IAB20_24 = 355; // Spas
    IAB20_25 = 356; // Theme Parks
    IAB20_26 = 357; // Traveling with Kids
    IAB20_27 = 358; // United Kingdom
    IAB21 = 359; // Real Estate
    IAB21_1 = 360; // Apartments
    IAB21_2 = 361; // Architects
    IAB21_3 = 362; // Buying/Selling Homes
    IAB22 = 363; // Shopping
    IAB22_1 = 364; // Contests & Freebies
    IAB22_2 = 365; // Couponing
    IAB22_3 = 366; // Comparison
    IAB22_4 = 367; // Engines
    IAB23 = 368; // Religion & Spirituality
    IAB23_1 = 369; // Alternative Religions
    IAB23_2 = 370; // Atheism/Agnosticism
    IAB23_3 = 371; // Buddhism
    IAB23_4 = 372; // Catholicism
    IAB23_5 = 373; // Christianity
    IAB23_6 = 374; // Hinduism
    IAB23_7 = 375; // Islam
    IAB23_8 = 376; // Judaism
    IAB23_9 = 377; // Latter-Day Saints
    IAB23_10 = 378; // Paga/Wiccan
    IAB24 = 379; // Uncategorized
    IAB25 = 380; // Non-Standard Content
    IAB25_1 = 381; // Unmoderated UGC
    IAB25_2 = 382; // Extreme Graphic/Explicit Violence
    IAB25_3 = 383; // Pornography
    IAB25_4 = 384; // Profane Content
    IAB25_5 = 385; // Hate Content
    IAB25_6 = 386; // Under Construction
    IAB25_7 = 387; // Incentivized
    IAB26 = 388; // Illegal Content
    IAB26_1 = 389; // Illegal Content
    IAB26_2 = 390; // Warez
    IAB26_3 = 391; // Spyware/Malware
    IAB26_4 = 392; // Copyright Infringement
}

// creative attributes that can describe an ad being served
// or serve as restrictions of thereof.
enum CreativeAttribute {
    AUDIO_AUTO_PLAY = 1;
    AUDIO_USER_INITIATED = 2;
    EXPANDABLE_AUTOMATIC = 3;
    EXPANDABLE_CLICK_INITIATED = 4;
    EXPANDABLE_ROLLOVER_INITIATED = 5;
    VIDEO_IN_BANNER_AUTO_PLAY = 6;
    VIDEO_IN_BANNER_USER_INITIATED = 7;
    POP_UP = 8;
    PROVOCATIVE_OR_SUGGESTIVE = 9;
    ANNOYING = 10;
    SURVEYS = 11;
    TEXT_ONLY = 12;
    USER_INTERACTIVE = 13;
    WINDOWS_DIALOG_OR_ALERT_STYLE = 14;
    HAS_AUDIO_ON_OFF_BUTTON = 15;
    AD_CAN_BE_SKIPPED = 16;
    AD_HAS_THUMBNAIL = 101; // Creative needs to have a "thumbnail_url"
    AD_SIZE_IS_FLEXIBLE = 102; // Exact size match may be avoided during serving
    AD_CAN_EXPAND_LEFT = 103;
    AD_CAN_EXPAND_RIGHT = 104;
    AD_CAN_EXPAND_UP = 105;
    AD_CAN_EXPAND_DOWN = 106;
    AD_CAN_EXPAND_FULLSCREEN = 107;
    AD_SUPPORTS_DYNAMIC_PIXELS = 108;
    AD_SUPPORTS_DYNAMIC_CLICK_URL = 109;
}

// Boolean-like enumeration used in various attributes.
enum Flag {
    NO = 0;
    YES = 1;
}

message Enums {
    message BidRequest {
        message Impression {
            // OpenRTB 6.4: API frameworks.
            enum ApiFramework {
                // updated at 2020-08-13 following https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-proto.txt
                VPAID_1 = 1;
                VPAID_2 = 2;
                MRAID_1 = 3;
                ORMMA = 4;
                MRAID_2 = 5;
                MRAID_3 = 6;
                OMID_1 = 7;

                // Following values are not in openRTB standard.

                // Mopub requests will have MRAID_PLAYABLE in banner.ext.bapis
                // if USER_INTERACTIVE is in banner.battr. Stinger will filter
                // MRAID_PLAYABLE creatives.
                MRAID_PLAYABLE = 10001;
            }

            // OpenRTB 6.5: the position of the ad as a relative measure of visibility or
            // prominence.
            enum AdPosition {
                POSITION_UNKNOWN = 0;
                ABOVE_THE_FOLD = 1;
                DEPRECATED_MAYBE_VISIBLE = 2;
                BELOW_THE_FOLD = 3;
                HEADER = 4;
                FOOTER = 5;
                SIDEBAR = 6;
                FULLSCREEN = 7;
            }

            message Banner {
                // OpenRTB 6.2: types of ads that can be accepted by the exchange unless
                // restricted by publisher site settings.
                enum AdType {
                    // "Usually mobile".
                    XHTML_TEXT = 1;
                    // "Usually mobile".
                    XHTML_BANNER = 2;
                    // Javascript must be valid XHTML (ie, script tags included).
                    JAVASCRIPT = 3;
                    // Iframe.
                    IFRAME = 4;
                }

                // OpenRTB 6.11: the directions in which an expandable ad may expand, given the
                // positioning of the ad unit on the page and constraints imposed by the content.
                enum ExpandableDirection {
                    LEFT = 1;
                    RIGHT = 2;
                    UP = 3;
                    DOWN = 4;
                    FULLSCREEN = 5;
                }

                message BannerExtensions {
                    // Some exchanges support a "bannertype=rewarded" field for banners. This
                    // signifies that an end user will recieve a reward for interacting with
                    // the ad. E.g. if the user clicks the ad, they get game currency in a
                    // phone game. There aren't other possible "bannertype" values yet, but
                    // there could be in the future.
                    enum BannerType {
                      UNKNOWN = -1;
                      REWARDED = 0;
                    }
                }
            }

            message Video {
                // OpenRTB 6.7: video bid response protocols that could be supported by an
                // exchange.
                enum Protocol {
                    VAST_1_0 = 1;
                    VAST_2_0 = 2;
                    VAST_3_0 = 3;
                    VAST_1_0_WRAPPER = 4;
                    VAST_2_0_WRAPPER = 5;
                    VAST_3_0_WRAPPER = 6;
                }

                // OpenRTB 6.17: markup types allowed for video companion ads.
                // This table is derived from IAB VAST 2.0+. See www.iab.net/vast/ for more
                // information.
                enum CompanionType {
                    STATIC = 1;
                    HTML = 2;
                    IFRAME = 3;
                }

                // OpenRTB 6.6: "In-stream" or "linear" video refers to pre-roll, post-roll, or
                // mid-roll
                // video ads where the user is forced to watch ad in order to see the video
                // content.
                // “Overlay” or “non-linear” refer to ads that are shown on top of the video
                // content.
                // This OpenRTB table has values derived from the IAB Quality Assurance
                // Guidelines (QAG).
                enum Linearity {
                    LINEAR = 1;
                    NON_LINEAR = 2;
                }

                // OpenRTB 6.8: video playback methods.
                enum PlaybackMethod {
                    AUTOPLAY_SOUND_ON = 1;
                    AUTOPLAY_SOUND_OFF = 2;
                    CLICK_TO_PLAY = 3;
                    MOUSE_OVER = 4;
                }

                // OpenRTB 6.9: Various options for the video start delay. If the start delay
                // value is greater than 0 then the position is mid-roll, and the value
                // represents the number of seconds into the content that the ad will be
                // displayed. If the start delay time is not available, the exchange can report
                // the position of the ad in general terms using this table of negative numbers.
                // Beeswax extends this enum to indiciate requests with unknown VideoStartDelay.
                enum VideoStartDelay {
                    PRE_ROLL = 0;
                    GENERIC_MID_ROLL = -1;
                    GENERIC_POST_ROLL = -2;
                    UNKNOWN = -3; // Keep in sync with the default value of startdelay field.
                }

                // OpenRTB 6.12: delivery of video content.
                enum ContentDelivery {
                    STREAMING = 1;
                    PROGRESSIVE = 2;
                }

                // OpenRTB 2.5: The following table lists the various types of video placements
                // derived largely from the IAB Digital Video Guidelines.
                enum VideoPlacementType {
                    // The video placement is not defined.
                    // Default value.
                    UNDEFINED_VIDEO_PLACEMENT = 0;

                    // Played before, during or after the streaming video content
                    // that the consumer has requested.
                    // E.G.: Pre-roll, Mid-roll, Post-roll.
                    IN_STREAM_PLACEMENT = 1;

                    // Exists within a web banner that leverages the banner space
                    // to deliver a video experience as opposed to another static
                    // or rich media format.
                    // The format relies on the existence of display ad inventory
                    // on the page for its delivery.
                    IN_BANNER_PLACEMENT = 2;

                    // Loads and plays dynamically between paragraphs of editorial content;
                    // existing as a standalone branded message.
                    IN_ARTICLE_PLACEMENT = 3;

                    // In-Feed - Found in content, social, or product feeds.
                    IN_FEED_PLACEMENT = 4;

                    // Interstitial/Slider/Floating.
                    // Covers the entire or a portion of screen area,
                    // but is always on screen while displayed
                    // (i.e. cannot be scrolled out of view).
                    // Note that a full-screen interstitial (e.g., in mobile)
                    // can be distinguished from a floating/slider unit by the imp.instl field.
                    FLOATING_PLACEMENT = 5;
                }

                // OpenRTB 2.5: The various modes for when playback terminates.
                enum PlaybackCessationMode {
                    // On Video Completion or when Terminated by User
                    COMPLETION_OR_USER = 1;

                    // On Leaving Viewport or when Terminated by User
                    LEAVING_OR_USER = 2;

                    // On Leaving Viewport Continues as a Floating/Slider Unit until
                    // Video Completion or when Terminated by User
                    LEAVING_CONTINUES_OR_USER = 3;
                }


                message VideoExtensions {
                    // Some exchanges support a "videotype=rewarded" field for videos. This
                    // signifies that an end user will recieve a reward for interacting with
                    // the ad. E.g. if the user watches the whole video, they get game currency
                    // in a phone game. There aren't other possible "videotype" values yet, but
                    // there could be in the future.
                    enum VideoType {
                        UNKNOWN = -1;
                        REWARDED = 0;
                    }
                }
            }

            message NativeRequest {
                // OpenRTB Native 7.1: Core layouts. An implementing exchange may not
                // support all asset variants or introduce new ones unique to that system.
                enum LayoutId {
                    CONTENT_WALL = 1;
                    APP_WALL = 2;
                    NEWS_FEED = 3;
                    CHAT_LIST = 4;
                    CAROUSEL = 5;
                    CONTENT_STREAM = 6;
                    GRID = 7;
                    // Exchange-specific values above 500.
                }

                // OpenRTB Native 7.2: Below is a list of the core ad unit ids described
                // by IAB here:
                // http://www.iab.net/media/file/IABNativeAdvertisingPlaybook120413.pdf
                // In feed unit is essentially a layout, it has been removed from the list.
                // The in feed units can be identified via the layout parameter on the
                // request. An implementing exchange may not support all asset variants
                // or introduce new ones unique to that system.
                enum AdUnitId {
                    PAID_SEARCH_UNIT = 1;
                    RECOMMENDATION_WIDGET = 2;
                    PROMOTED_LISTING = 3;
                    IAB_IN_AD_NATIVE = 4;
                    CUSTOM = 5;
                    // Exchange-specific values above 500.
                }

                // The context in which the ad appears - what type of content is
                // surrounding the ad on the page at a high level. This maps directly to
                // the new Deep Dive on In-Feed Ad Units. This denotes the primary
                // context, but does not imply other content may not exist on the page -
                // for example it's expected that most content platforms have some
                // social components, etc.
                enum Context {
                    // Content-centric context such as newsfeed, article, image gallery, video
                    // gallery, or similar.
                    CONTENT_CENTRIC = 1;
                    // Social-centric context such as social network feed, email, chat, or
                    // similar.
                    SOCIAL_CENTRIC = 2;
                    // Product context such as product listings, details, recommendations,
                    // reviews, or similar.
                    PRODUCT = 3;
                    // Exchange-specific values above 500.
                }

                // Next-level context in which the ad appears. Again this reflects the
                // primary context, and does not imply no presence of other
                // elements. For example, an article is likely to contain images but is
                // still first and foremost an article. SubType should only be combined
                // with the primary context type as indicated (ie for a context type of 1,
                // only context subtypes that start with 1 are valid).
                enum ContextSubtype {
                    // General or mixed content.
                    GENERAL_OR_MIXED = 10;
                    // Primarily article content (which of course could include images, etc
                    // as part of the article)
                    ARTICLE = 11;
                    // Primarily video content
                    VIDEO = 12;
                    // Primarily audio content
                    AUDIO = 13;
                    // Primarily image content
                    IMAGE = 14;
                    // User-generated content - forums, comments, etc
                    USER_GENERATED = 15;
                    // General social content such as a general social network
                    GENERAL_SOCIAL = 20;
                    // Primarily email content
                    EMAIL = 21;
                    // Primarily chat/IM content
                    CHAT_IM = 22;
                    // Content focused on selling products, whether digital or physical
                    SELLING_PRODUCTS = 30;
                    // Application store/marketplace
                    APPLICATION = 31;
                    // Product reviews site primarily (which may sell product secondarily)
                    REVIEW_SITE = 32;
                    // Exchange-specific values above 500.
                }

                // The FORMAT of the ad you are purchasing, separate from the surrounding
                // context
                enum PlacementType {
                    // In the feed of content - for example as an item inside the organic
                    // feed/grid/listing/carousel.
                    FEED = 1;
                    // In the atomic unit of the content - IE in the article page or
                    // single image page
                    ATOMIC_UNIT = 2;
                    // Outside the core content - for example in the ads section on the right
                    // rail, as a banner-style placement near the content, etc.
                    OUTSIDE_THE_CORE = 3;
                    // Recommendation widget, most commonly presented below the article
                    // content.
                    WIDGET = 4;
                    // Exchange-specific values above 500.
                }
            }
        }

        message Content {
            // OpenRTB 6.13: Options for the content context; what type of content is it.
            enum Context {
                VIDEO = 1;
                GAME = 2;
                MUSIC = 3;
                APPLICATION = 4;
                TEXT = 5;
                OTHER = 6;
                CONTEXT_UNKNOWN = 7;
            }

            // OpenRTB 6.14: video quality.
            // See http://www.iab.net/media/file/long-form-video-final.pdf
            enum VideoQuality {
                QUALITY_UNKNOWN = 0;
                PROFESSIONAL = 1;
                PROSUMER = 2;
                USER_GENERATED = 3;
            }

            // OpenRTB 6.18: media ratings using the QAG categorization.
            // See http://www.iab.net/ne_guidelines
            enum QAGMediaRating {
                UNKNOWN = -1; // Extension to standard, added by Beeswax
                ALL_AUDIENCES = 1;
                EVERYONE_12 = 2;
                MATURE = 3;
            }

            enum SourceRelationship {
                INDIRECT = 0;
                DIRECT = 1;
            }
        }

        message Device {
            // OpenRTB 6.10: connection type.
            enum ConnectionType {
                CONNECTION_UNKNOWN = 0;
                ETHERNET = 1;
                WIFI = 2;
                CELL_UNKNOWN = 3;
                CELL_2G = 4;
                CELL_3G = 5;
                CELL_4G = 6;
            }

            // The type of device from which the impression originated.
            // This OpenRTB table has values derived from the IAB Quality Assurance
            // Guidelines (QAG).
            enum DeviceType {
                UNKNOWN = -1; // Extension defined by Beeswax.
                MOBILE = 1;
                PC = 2;
                CONNECTED_TV = 3;
                PHONE = 4;
                TABLET = 5;
                CONNECTED_DEVICE = 6;
                SET_TOP_BOX = 7;
                GAMES_CONSOLE = 8;
            }
        }

        message Geo {
            // OpenRTB 6.15: how the geographic information was determined.
            enum LocationType {
                GPS_LOCATION = 1;
                IP = 2;
                USER = 3;
            }
        }

        message User {
            // UserID types.
            // The enum value less then 100 should be in sync with
            // buzz/mysql/data/version 0.5/insert_segment_user_type.sql
            enum UserIdType {
                UNKNOWN = -1;
                BEESWAX = 0;
                CUSTOMER = 1;
                IDFA = 2;
                IDFA_MD5 = 3;
                IDFA_SHA1 = 4;
                AD_ID = 5;
                AD_ID_MD5 = 6;
                AD_ID_SHA1 = 7;
                OTHER_MOBILE_ID = 8; // The serving system will use this type when the mobile OS is unknown.
                // The request will be processed in the same way as other
                // mobile ids. (Prefix with `mid.` and do frequency cap, user_data augmentation, etc)
            }
        }
    }

    message BidResponse {

        // The following table lists the options for a bidder to signal
        // the exchange as to why it did not offer a bid for the impression.
        enum NoBidReason {
            UNKNOWN_ERROR = 0;
            TECHNICAL_ERROR = 1;
            INVALID_REQUEST = 2;
            KNOWN_WEB_SPIDER = 3;
            SUSPECTED_NONHUMAN_TRAFFIC = 4;
            CLOUD_DATACENTER_PROXYIP = 5;
            UNSUPPORTED_DEVICE = 6;
            BLOCKED_PUBLISHER = 7;
            UNMATCHED_USER = 8;
        }
    }

    // Following constants are defined by Beeswax and are not a part of the
    // Openrtb standard.
    message Inventory {
        // Exchange Id.
        // These values are obtained from inventory_source table in fes_buzz_db.
        enum Source {
            UNKNOWN_SOURCE = -1;
            GOOGLE_ADX = 0;
            LIVERAIL = 1;
            BRIGHTROLL = 2;
            MOPUB = 3;
            AERSERV = 4;
            PULSEPOINT = 5;
            RUBICON = 6;
            ADAPTV = 7;
            MILLENNIAL = 8;
            APPNEXUS = 9;
            OPENX = 10;
            PUBMATIC = 11;
            OPERA_MEDIA = 12;
            RTK = 13;
            INNERACTIVE = 14;
            TREMOR = 15;
            INDEX_EXCHANGE = 16;
            YAHOO = 17;
            SMAATO = 18;
            APP_LOVIN = 19;
            MOLABS = 20;
            SPOTX = 21;
            FYBER = 22;
            ADBUDDIZ = 23;
            ADCONDUCTOR = 24;
            ADEASY = 25;
            ADFORM = 26;
            ADLANTIC = 27;
            ADMAX = 28;
            ADMEDIA = 29;
            ADMETA = 30;
            ADMIXER = 31;
            ADMIZED = 32;
            ADOP = 33;
            ADTHINK = 34;
            ADRIVER = 35;
            ADRU = 36;
            ADSCALE = 37;
            ADSNATIVE = 38;
            ADSKOM = 39;
            ADSPRUCE = 40;
            ADSTIR = 41;
            ADSUPPLY = 42;
            ADUNITY = 43;
            ADYOULIKE = 44;
            AMBIENT = 45;
            ANCORA = 46;
            AOL = 47;
            APPVADOR = 48;
            AVOCARROT = 49;
            AXONIX = 50;
            BEACHFRONT = 51;
            BETWEEN = 52;
            BIDTELLECT = 53;
            BLUEWATERADS = 54;
            CAULY = 55;
            CENTRO = 56;
            CHAMELEON = 57;
            CLICKONOMETRICS = 58;
            CONVERGE = 59;
            COULL = 60;
            DISH = 61;
            EXPERIAN = 62;
            FALKTECH = 63;
            FMX = 64;
            FIDELITY = 65;
            FLUCT = 66;
            COX = 67;
            GENIEE = 68;
            GMO = 69;
            FLOOR6 = 70;
            GUMGUM = 71;
            IBILLBOARD = 72;
            IMOIBLE = 73;
            KARGO = 74;
            KIOSKED = 75;
            KRUX = 76;
            LIGATUS = 77;
            LIVEINTENT = 78;
            LKQD = 79;
            LUPON = 80;
            MADS = 81;
            MEDIABONG = 82;
            MICROAD = 83;
            MOBFOX = 84;
            MOBSMART = 85;
            MOCOPLEX = 86;
            NASMEDIA = 87;
            NATIVEADS = 88;
            NETSPRINT = 89;
            OOYALA = 90;
            OPTIMATIC = 91;
            POWERLINKS = 92;
            PROFITX = 93;
            PUBNATIVE = 94;
            REALVU = 95;
            REPUBLER = 96;
            SARA = 97;
            SCALEOUT = 98;
            SHARETHROUGH = 99;
            SMARTADSERVER = 100;
            SONOBI = 101;
            SORTABLE = 102;
            SSPICYADS = 103;
            STICKYADS = 104;
            SWITCHCONCEPTS = 105;
            TEADS = 106;
            THIRDPRESENCE = 107;
            THRONE = 108;
            TPMN = 109;
            TRIPLELIFT = 110;
            UCFUNNEL = 111;
            UNRULYX = 112;
            VDOPIA = 113;
            VI = 114;
            VMG = 115;
            VIDMATIC = 116;
            VMAX = 117;
            VRTCAL = 118;
            VUNGLE = 119;
            WORDPRESS = 120;
            XROST = 121;
            YIELDLAB = 122;
            YIELDONE = 123;
            YIELDONE_ADS = 124;
            YIELDONE_INNITY = 125;
            YUME = 126;
            ZEDO = 127;
            ZEOTAP = 128;
            POLAR = 129;
            UNITY = 130;
            DAILYMOTION = 131;
            ADTELLIGENT = 132;
            GLISPA = 133;
            TRUSTX = 134;
            // DISTRICTM            =  135; // DEPRECATED SEE 224
            IRON_SOURCE = 136;
            BIDSWITCH_DEALS_FEED = 137;
            SMARTY_ADS = 138;
            // note that 139 is at the bottom
            BIDSTACK = 140;
            ADASIA = 141;
            AD_UNITY = 142;
            ADVIEW = 143;
            AD_GENERATION = 144;
            AMOBEE = 145;
            ANTS = 146;
            ADSTANDING = 147;
            PLAYBUZZ = 148;
            COLOSSUS = 149;
            CONVERGE_DIGITAL = 150;
            CONNECTAD = 151;
            CONEX = 152;
            CXENSE = 153;
            DASHBID = 154;
            DATAWRKZ = 155;
            DIGITAL_GARAGE = 156;
            AD_RU = 157;
            ADXMI = 158;
            AMEBA = 159;
            CHEETAH = 160;
            ERICSSON_EMODO = 161;
            EXELBID = 162;
            ADFULLY = 163;
            GIANT_MEDIA = 164;
            BROAD_SIGN = 165;
            IMPROVE_DIGITAL = 166;
            BRAINY = 167;
            DISH_NETWORK = 168;
            ADVERLINE = 169;
            LODEO = 170;
            LOOPME = 171;
            ADMAN = 172;
            ADMATIC = 173;
            MADVERTISE_MEDIA = 174;
            ADMIX = 175;
            GAMMA = 176;
            YIELDMO = 177;
            ZNAPTAG = 178;
            NATIVO = 179;
            MEDIA_NET = 180;
            CHOCOLATE = 181;
            OGURY = 182;
            ONETAG = 183;
            OUTBRAIN = 184;
            PERSONAGRAPH = 185;
            DEEP_INTENT = 186;
            PLAYTEM = 187;
            POKKT = 188;
            POLYMORPHICADS = 189;
            POWERINBOX = 190;
            PRIMIS = 191;
            QUANTX = 192;
            RAKUTEN = 193;
            REKLAMSTORE = 194;
            RELAIDO = 195;
            REVCONTENT = 196;
            ADVERTY = 197;
            SEEDTAG = 198;
            SELECTMEDIA = 199;
            COLUMN6 = 200;
            SORENSON = 201;
            SPICY = 202;
            SYNACOR = 203;
            TABOOLA = 204;
            TAGON = 205;
            TENMAX = 206;
            ADTOMA = 207;
            ATWOX = 208;
            THIRTYTHREEACROSS = 209;
            UNDERTONE = 210;
            VENA_TV = 211;
            VERTOZ = 212;
            INADVIA = 213;
            WEBORAMA = 214;
            WOOBI = 215;
            YENGO = 216;
            YOC = 217;
            ZIFF_DAVIS = 218;
            OZONE = 219;
            THIRTY_THREE_ACROSS = 220;
            SAMSUNG = 221;
            PHUNWARE = 222;
            IMPROVE = 223;
            DISTRICTM = 224;
            INMOBI = 225;
            CONNATIX = 226;
            EMX = 227;
            SPRINGSERVE = 228;
            VERVE = 229;
        }

        // Placement Type of the OpenRTB Bid Request
        enum PlacementType {
            UNKNOWN_PLACEMENT_TYPE = -1;
            BANNER = 0;
            VIDEO = 1;
            NATIVE = 2;
            BANNER_AND_VIDEO = 3;
        }

        // Environment type of the bid request.
        enum EnvironmentType {
            UNKNOWN_ENVIRONMENT_TYPE = -1;
            WEB = 0;
            APP = 1;
        }

        // DataCenter, a.k.a. AWS region.
        enum DataCenter {
            // FIXME(ronr) Deprecating "UNKNOWN" due to ambiguity [2016-08-19]
            option allow_alias = true;
            UNKNOWN = 0;
            UNKNOWN_DATA_CENTER = 0;
            US_EAST_1 = 1;
            US_WEST_2 = 2;
            EU_WEST_1 = 3;
        }

        // Continents are nonoverlapping geographic areas. Continent-to-DataCenter
        // is one-to-many. DataCenter-to-Continent is one-to-one.
        // For example, US-EAST-1 and US-WEST-2 are in NAM, and EU_WEST_1 is in EMEA.
        // The data centers within a continent share things like budget and user data,
        // neither of which crosses continent boundaries.
        // For more information, https://docs.google.com/document/d/1oACWofpsEZsjXNVNnEINZYAutEtAmvWbznTLLx-Aa9c
        enum Continent {
            // Keep continents in sync with Buzz
            UNKNOWN_CONTINENT = 0;
            NAM = 1; // North America
            EMEA = 2; // Europe, the Middle East & Asia
        }

        // Impression trackers are explicit fields in the BidResponse sent back to the
        // exchange. The exchange is responsible for pinging the bidder and this helps
        // reduce discrepancy between the exchange and the bidder.
        // Exchanges support ImpressionTracker for certain segments of their inventory,
        // and whether it supports third party impression urls in impression trackers,
        // are captured by the enum below.
        // The values in this enum are bit vectors.
        // |-----------------|------|-----|------|---|---|
        // |3rd_Party_Impurls|Native|Video|Banner|App|Web|
        // |-----------------|------|-----|------|---|---|
        // If 3rd_Party_Impurls is 1, they will be populated into the impression tracker
        // BidResponse field. Otherwise they will be rendered in the creative markup.
        enum ImpressionTracker {
            NEVER_USE_TRACKER = 0; // Never render impression trackers.
            ALWAYS_USE_TRACKER = 63; // Always render impression trackers, for both Beeswax and 3rd party impression urls.
            APP_BANNER_USE_TRACKER = 38; // Render impression trackers only for In-App Banners, for both Beeswax and 3rd party impression urls.
            ALWAYS_USE_TRACKER_FOR_BEESWAX_ONLY = 31; // Always render impression trackers for Beeswax impression url.
            // 3rd Party impression urls will be rendered in the markup.
            VIDEO_USE_TRACKER_FOR_BEESWAX_ONLY = 11; // Render impression trackers for video creatives in any environment
            // for Beeswax impression url.
            // 3rd Party impression urls will be rendered in the markup.
        }

        // Suppliers can request that we notify them about clicks and provide us
        // with a click url macro. They can either request that we do it by
        // redirecting the click itself to their click url and giving them a url to
        // redirect the click back to, or by sending them a server call without the
        // click.
        // NO_CLICK_TRACKER means that the supplier does not want click
        // notifications.
        // CLICK_TRACKER_WITH_REDIRECT means that the supplier wants us to redirect
        // the click to their click url and they'll redirect back to the url we
        // provide.
        // CLICK_TRACKER_WITHOUT_REDIRECT means that the supplier wants us to send
        // them a server call to notify them about clicks.
        enum SupplierClickTracker {
            NO_CLICK_TRACKER = 0;
            CLICK_TRACKER_WITH_REDIRECT = 1;
            CLICK_TRACKER_WITHOUT_REDIRECT = 2;
        }
    }
}
