OpenRTB Extensions Protocol Buffer

View raw content Back to Reference page

// Protocol version: v.95
import "openrtb.proto";
option java_outer_classname = "AdxExt";
package com.google.doubleclick;

// Copyright 2021 Google Inc. All Rights Reserved.

import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";

// Protocol buffer for Ad Exchange OpenRTB specification.

// Ad Exchange extensions for the Imp object.
message ImpExt {
  // [AdX: BidRequest.AdSlot.MatchingAdData.billing_id]
  repeated int64 billing_id = 1;

  // [AdX: BidRequest.publisher_settings_list_id]
  // [AdX: BidRequest.AdSlot.publisher_settings_list_id]
  repeated fixed64 publisher_settings_list_id = 2;

  // [AdX: BidRequest.AdSlot.allowed_vendor_type]
  repeated int32 allowed_vendor_type = 3 [packed = true];

  // A creative that is disallowed to bid on this impression due to Ad
  // Exchange policies or creative disapproval, excluded creative attributes,
  // excluded product or sensitive categories, allowed vendor types,
  // restricted categories or languages applicable to the bid request.
  message ExcludedCreative {
    // Buyer creative ID of the disallowed creative.
    optional string buyer_creative_id = 1;
  }

  // Creatives that are disallowed for the impression. Submitting a bid with
  // one of the creatives in this list will result in such bid being filtered
  // before the auction. Please contact your account manager if you would like
  // to enable this feature.
  repeated ExcludedCreative excluded_creatives = 10;

  // [AdX: BidRequest.AdSlot.dfp_ad_unit_code]
  optional string dfp_ad_unit_code = 6;

  // [AdX: BidRequest.AdSlot.is_rewarded]
  optional bool is_rewarded_inventory = 7;

  // Possible requirement types for AMP ads.
  enum AmpAdRequirementType {
    // AMP ad requirements unknown.
    UNKNOWN_AMP_AD_REQUIREMENT_TYPE = 1;
    // AMP ads are not allowed.
    AMP_AD_NOT_ALLOWED = 2;
    // Either AMP ads or non-AMP ads are allowed;
    // AMP ads are not early rendered.
    AMP_AD_ALLOWED_AND_NOT_EARLY_RENDERED = 3;
    // Either AMP ads or non-AMP ads are allowed;
    // AMP ads are early rendered.
    AMP_AD_ALLOWED_AND_EARLY_RENDERED = 4;
    // AMP ads are required.
    // Ads that are non-AMP may be rejected by the publisher.
    AMP_AD_REQUIRED = 5;
    // Exchange-specific values above 500.
  }
  optional AmpAdRequirementType ampad = 8
      [default = UNKNOWN_AMP_AD_REQUIREMENT_TYPE];

  // Data, opaque to Google and to the publisher, generated by the buyer
  // within the publisher's mobile application.
  message BuyerGeneratedRequestData {
    // Identification for the source of the buyer generated request data when
    // that source is from within an application.
    message SourceApp {
      // Identifier for the SDK that generated this data. It will match the id
      // in AppExt.InstalledSdk.id.
      optional string id = 1;
    }
    // The source of the data.
    oneof source {
      SourceApp source_app = 1;
    }

    // Data sent from the buyer's source within the publisher's domain to the
    // bidder. This data is opaque to the publisher and to Google.
    optional string data = 2;
  }

  repeated BuyerGeneratedRequestData buyer_generated_request_data = 9;

  // For ads rendered using a custom SDK only: multiplier applied to bid in
  // the auction. The adjustment reflects the likelihood that your bid would
  // generate a billable event (i.e. the ad renders successfully) if it won
  // the auction, relative to the probability that other bids generate a
  // billable event if they won the auction. This adjustment can be larger or
  // smaller than 1. This affects the final ranking in the auction only; in
  // particular, this multiplier does not affect the payment.
  optional double billable_event_rate_adjustment = 16 [default = 1.0];

  // Parameters related to Open Bidding.
  message OpenBidding {
    // This field is set to true if the publisher set up a yield group or a
    // mediation group that targets this adslot and this bidder. See
    // https://support.google.com/admanager/answer/7128453 for information on
    // Open Bidding and its effects on the bidding process.
    optional bool is_open_bidding = 2;
  }
  optional OpenBidding open_bidding = 12;

  // The allowed restricted ad categories. See
  // https://storage.googleapis.com/adx-rtb-dictionaries/ad-restricted-categories.txt
  // for a list of ids. If you bid with an ad in a restricted category, you MUST
  // ALWAYS declare the category in the bid response regardless of the values in
  // this field.
  repeated int32 allowed_restricted_category = 13;

  // Publisher's SKAdNetwork information to support app installation
  // attribution for iOS 14 and later. Apple's SKAdNetwork API helps
  // advertisers measure ad-driven app installation by sending a postback
  // to the ad network after a successful install. Publishers will need
  // to configure supported ad networks in their app's property list
  // (Info.plist) to allow an install to be attributed to the ad impression.
  // For more info visit:
  // https://developer.apple.com/documentation/storekit/skadnetwork
  message SKAdNetworkRequest {
    // Version of SKAdNetwork supported. Dependent on both the OS version
    // and the SDK version.
    // Note:  This field will be replaced by the
    // BidRequest.mobile.skadn.versions field to support a list of version
    // numbers.
    optional string version = 1;

    // List of SKAdNetwork versions supported, depending on the OS version
    // and the SDK version.
    repeated string versions = 4;

    // ID of publisher app in Apple’s App Store.
    optional string sourceapp = 2;

    // SKAdNetworkIdentifier entries in the publisher app's Info.plist.
    repeated string skadnetids = 3;

    // List of fidelity types supported, depending on the SKAdNetwork API
    // version supported by the operating system and SDK as well as ad slot
    // properties.
    repeated SKAdNetworkFidelityType fidelities = 5 [packed = true];
  }

  // [AdX: BidRequest.Mobile.skadn]
  optional SKAdNetworkRequest skadn = 14;

  // Indicates the creative policy and publisher blocks that applies to this
  // request.
  message CreativeEnforcementSettings {
    // Creative policy enforcement level that applies to this request.
    // Creatives that don't adhere to the specified policy will be filtered
    // before the auction. The status of the creatives with their respective
    // policies can be retrieved via Creative API.
    // https://developers.google.com/authorized-buyers/apis/guides/rtb-api/creatives
    // Bids on deals may override the policy enforcement applicable to the
    // request.
    enum PolicyEnforcement {
      POLICY_ENFORCEMENT_UNKNOWN = 0;

      // Baseline policy for all ads serving through any of Google’s ads
      // platform products. Learn more at:
      // https://support.google.com/platformspolicy/answer/3013851.
      POLICY_ENFORCEMENT_PLATFORM_POLICY = 1;

      // Policy for ads serving through Google’s ad network. This includes the
      // baseline policy for all ads serving through any of Google’s ads
      // platform products. Learn more at:
      // https://support.google.com/authorizedbuyers/answer/1325008.
      POLICY_ENFORCEMENT_NETWORK_AND_PLATFORM_POLICY = 2;
    }
    optional PolicyEnforcement policy_enforcement = 1;

    // Creative publisher blocks enforcement level that applies to this
    // request. Publisher blocks allow publishers to control which creatives
    // can be shown on their properties.
    // Deals may also override publisher blocks. Please refer to Deals.adx_ext.
    // publisher_blocks_overridden field.
    enum PublisherBlocksEnforcement {
      PUBLISHER_BLOCKS_ENFORCEMENT_UNKNOWN = 0;

      // The publisher's blocking controls are enforced on creatives
      // submitted. Publisher blocks enforcement settings are provided in the
      // following fields:
      // - Imp.adx_ext.publisher_settings_list_id
      // - bcat
      // - Imp.adx_ext.allowed_restricted_category
      // - Imp.adx_ext.allowed_vendor_type
      // - Audio.battr
      // - Video.battr
      // - Banner.battr
      // - Native.battr
      PUBLISHER_BLOCKS_ENFORCEMENT_APPLIES = 1;

      // The publisher's blocking controls are not enforced on creatives
      // submitted.
      PUBLISHER_BLOCKS_ENFORCEMENT_OVERRIDDEN = 2;
    }
    optional PublisherBlocksEnforcement publisher_blocks_enforcement = 3;

    // Indicates whether the policy, scan and publisher blocks level
    // combination is the default combination for this bidder.
    optional bool is_default = 4;
  }

  optional CreativeEnforcementSettings creative_enforcement_settings = 15;

  // Describes the environment where the ad auction is run:  either all
  // on the server-side, server-side with sandboxed interest group bidding
  // simulation, or with the contextual auction on the server-side and the
  // interest group bidding and the final auction on the device.
  enum AuctionEnvironment {
    // The auction determining the winning ad is held server-side.
    SERVER_SIDE_AUCTION = 0;

    // This value is currently not in use and will be provided only when
    // browsers start supporting on-device auctions.
    // The contextual auction that determines a winning contextual bid is held
    // server-side, and bidding functions are run on the device to determine
    // interest group bids. Both the winning contextual bid and interest
    // group bids are entered into a final auction held on the device to
    // select the winning ad. For more information regarding the TURTLEDOVE
    // on device bidding and auction, see:
    // https://github.com/WICG/turtledove and
    // https://github.com/WICG/turtledove/blob/main/FLEDGE.md
    ON_DEVICE_INTEREST_GROUP_AUCTION = 1;

    // An interest group auction is simulated in a sandboxed environment, and
    // its results are entered into the conventional server-side auction to
    // determine the winning ad. Experimental feature; may be subject to
    // change. For more information regarding about the TURTLEDOVE simulation
    // for RTB, see:
    // https://github.com/google/ads-privacy/tree/master/experiments/turtledove-simulation,
    // https://developers.google.com/authorized-buyers/rtb/turtledove,
    // and https://developers.google.com/authorized-buyers/rtb/fledge
    SERVER_SIDE_AUCTION_WITH_INTEREST_GROUP_SIMULATION = 2;
  }

  // Specifies where the ad auction runs.
  optional AuctionEnvironment auction_environment = 18
      [default = SERVER_SIDE_AUCTION];

}

extend com.google.openrtb.BidRequest.Imp {
  // Extension key for AdX Imp.ext.
  optional ImpExt imp = 1009;
}

message AppExt {
  // Identification of and information about an SDK installed in the
  // publisher's app that the bidder has access to, often because it's the
  // bidder's SDK.
  message InstalledSdk {
    // Identifier for the installed SDK.
    optional string id = 1;

    // Semantic version of the installed SDK and the adapter that communicates
    // between the installed SDK and Google's SDK.
    message Version {
      optional int32 major = 1 [default = -1];
      optional int32 minor = 2 [default = -1];
      optional int32 micro = 3 [default = -1];
    }

    // The version of the installed SDK.
    optional Version sdk_version = 2;

    // The version of the adapter that communicates with the installed SDK.
    optional Version adapter_version = 3;
  }
  repeated InstalledSdk installed_sdk = 1;
}

extend com.google.openrtb.BidRequest.App {
  // Extension key for AdX App.ext.
  optional AppExt app = 1011;
}

// Ad Exchange extensions for the BidResponse object.
message BidResponseExt {
  // [AdX: BidResponse.processing_time_ms]
  optional int32 processing_time_ms = 1;

  // Inputs to the bidding function. Only applicable to and used in the
  // TURTLEDOVE simulation, where it is passed to the bidding function as an
  // argument.
  // An object in the bidder-defined format.
  optional .google.protobuf.Value contextual_signal = 2;

  // Experimental feature; may be subject to change.
  // Please reach out to your account manager to participate in the FLEDGE
  // simulation experiment.
  //
  // A request by a bidder to execute a given bidding function in the FLEDGE
  // simulation in order to compute a bid and choose an ad. This also includes
  // inputs that will be provided to the bidding function.
  // https://github.com/WICG/turtledove/blob/main/FLEDGE.md#11-joining-interest-groups
  message InterestGroup {
    // References a bidding function that is provided by the bidder ahead of
    // time via Bidding functions API resource. See
    // https://developers.google.com/authorized-buyers/apis/realtimebidding/reference/rest/v1alpha/bidders.biddingFunctions
    optional string bidding_function_name = 1;

    // Inputs to the bidding function specified by the bidder. Only applicable
    // to and used in the FLEDGE simulation, where it is passed to the bidding
    // function as an argument.
    //
    // An object in a bidder-defined format. When passed to the bidding
    // function, it will be converted to a JSON object using the proto3
    // canonical JSON representation
    // (https://developers.google.com/protocol-buffers/docs/proto3#json).
    optional .google.protobuf.Struct user_bidding_signals = 2;

    // Inputs to the bidding function specified by the bidder. Only applicable
    // to and used in the FLEDGE simulation, where it is passed to the bidding
    // function as an argument.
    // Can help simulate the results of fetching trusted bidding signals in
    // FLEDGE proposal
    // (https://github.com/WICG/turtledove/blob/main/FLEDGE.md#31-fetching-real-time-data-from-a-trusted-server).
    //
    // An object in a bidder-defined format. When passed to the bidding
    // function, it will be converted to a JSON object using the proto3
    // canonical JSON representation
    // (https://developers.google.com/protocol-buffers/docs/proto3#json).
    optional .google.protobuf.Struct trusted_bidding_signals = 3;

    // Interest group owner's domain name to associate the contextual
    // per_buyer_signals from the bid response to their corresponding
    // invocations of the bidding functions in the FLEDGE simulation. This value
    // must match the interest group buyer domain name configured for the
    // bidder's account.
    optional string buyer_domain_name = 4;
  }

  // Experimental feature; may be subject to change.
  //
  // Please reach out to your account manager to participate in the FLEDGE
  // simulation.
  //
  // Bidder-provided inputs that a bidder requests to execute their bidding
  // functions for in order to compute bids and choose ads in the FLEDGE
  // simulation.
  map<string, InterestGroup> interest_group_map = 3;

  // Experimental feature; may be subject to change.
  //
  // Please reach out to your account manager to participate in the FLEDGE
  // simulation.
  //
  // Information used for running interest group auctions in a separate
  // execution environment, such as the TURTLEDOVE in-browser or simulated
  // server-side flow. In the FLEDGE simulation, this should be populated in the
  // contextual bid response.
  message InterestGroupBidding {
    // Buyer-level information to use in the separate auction environment, such
    // as the TURTLEDOVE in-browser or server-side FLEDGE simulation experiment.
    message InterestGroupBuyer {
      // Optional buyer-specific inputs to the bidding function. Currently, only
      // applicable to and used in the FLEDGE simulation, where it is passed to
      // the bidding function as an argument.
      //
      // An object in a bidder-defined format that will be transformed into a
      // JSON object following Proto3 JSON representation
      // (https://developers.google.com/protocol-buffers/docs/proto3#json).
      // Can be left empty if no additional signals are
      // required by the bidding function.
      optional .google.protobuf.Value per_buyer_signals = 1;
    }

    // Map of one or more interest group owners that the bidder would enter
    // into the interest group auction, keyed by the buyer's domain name.
    // Interest groups that are owned by a buyer without a corresponding entry
    // here will not participate in the auction.
    map<string, InterestGroupBuyer> interest_group_buyers = 1;
  }
  optional InterestGroupBidding interest_group_bidding = 4;
}

extend com.google.openrtb.BidResponse {
  // Extension key for AdX BidResponse.ext.
  optional BidResponseExt bid_response = 1005;
}

// Ad Exchange extensions for the Bid object.
message BidExt {
  // [AdX: BidResponse.Ad.impression_tracking_url]
  repeated string impression_tracking_url = 1;

  // [AdX: BidResponse.Ad.ad_choices_destination_url]
  optional string ad_choices_destination_url = 2;

  // This field is deprecated due to being unused.
  // [AdX: BidResponse.Ad.bidder_name]
  optional string DEPRECATED_bidder_name = 3 [deprecated = true];

  // [AdX: BidResponse.Ad.AdSlot.exchange_deal_type]
  enum ExchangeDealType {
    OPEN_AUCTION = 0;
    PRIVATE_AUCTION = 1;
    PREFERRED_DEAL = 2;
    EXCHANGE_AUCTION_PACKAGE = 3;
  }
  optional ExchangeDealType exchange_deal_type = 4 [default = OPEN_AUCTION];

  // [AdX: BidResponse.Ad.attribute]
  // See buyer-declarable-creative-attributes.txt in the technical documentation
  // for a list of ids. Note that not all declarable attributes come through in
  // the BidRequest in the various `battr` fields.
  repeated int32 attribute = 5 [packed = true];

  // The URL to fetch an AMPHTML ad. Only one of the following should be set:
  // html_snippet, video_url, amp_ad_url, native_ad.
  optional string amp_ad_url = 6;

  // An ad that will be rendered by an SDK known to the buyer. This can only
  // be used when the BidRequest included an AppExt.InstalledSdk submessage.
  message SdkRenderedAd {
    // The identifier for the SDK that will render the ad. Must match an
    // AppExt.InstalledSdk.id sent in the corresponding bid request.
    optional string id = 1;

    // Data to pass to the SDK in order to render the ad. This data is opaque
    // to the publisher and to Google.
    optional string rendering_data = 2;
    // Declared ad assets to support creative scanning, classification, and
    // enforcement of ad policy and publisher blocks for ads rendered with a
    // custom SDK.
    message DeclaredAd {
      // Ad content used by SDK to render ad.
      oneof content {
        // The HTML snippet representative of the SDK-rendered ad.
        string html_snippet = 1;

        // The URL to the VAST asset used in the SDK-rendered ad.
        string video_url = 2;

        // The VAST document used to render custom SDK-rendered ad. This
        // document should conform to the VAST 2.0 or 3.0 standard.
        string video_vast_xml = 4;
      }

      // The final landing pages of the SDK-rendered ad.
      repeated string click_through_url = 3;
    }
    optional DeclaredAd declared_ad = 6;
  }
  optional SdkRenderedAd sdk_rendered_ad = 7;

  message EventNotificationToken {
    // The contents of the token, which will be ignored if longer than 64
    // bytes.
    optional string payload = 1;
  }
  // A token set by bidders for troubleshooting which will be included in the
  // real-time feedback for the Bid it is sent in. The contents of the token
  // will not be logged.
  optional EventNotificationToken event_notification_token = 8;

  // All restricted categories for the ads that may be shown from this snippet.
  // See ad-restricted-categories.txt in the technical documentation for a list
  // of ids. If you are bidding with ads in restricted categories, you must
  // always declare them here.
  repeated int32 restricted_category = 9;

  // The billing ID to attribute this impression to. The value must be in the
  // repeated BidRequest.Imp.ImpExt.billing_id field sent for this impression.
  // If the length of BidRequest.Imp.ImpExt.billing_id is exactly 1
  // and the bidder does not have any active child seats, this field
  // is not required and its contents will be ignored.
  optional int64 billing_id = 10;

  // Token used to identify end third party buyer information if an
  // exchange as an open bidder is an intermediary. This is obtained from the
  // third party buyer and must be passed to Google unaltered in the bid
  // response.
  optional string third_party_buyer_token = 14;

  // Buyer declared ID which will be used to break down spend and invalid
  // traffic metrics in IVT transparency reporting in Query Tool. Note that IDs
  // with fewer than 1000 impressions will not be used to break down metrics.
  // IDs longer than 64 bytes will be ignored.
  optional string buyer_reporting_id = 17;

  // Experimental feature; may be subject to change. See
  // https://support.google.com/authorizedbuyers/answer/10890762 for more
  // information.
  //
  // To enable frequency capping for your account, please contact your account
  // manager.
  //
  // Specifies frequency capping to be applied to the bid. Impressions for each
  // user are capped at the level specified by fcap_id. A bid will not
  // participate in the auction if an additional impression for the user would
  // violate any of the specified caps. Multiple frequency caps can be specified
  // for the same fcap_id.
  //
  // A bid is filtered before the auction if the frequency cap is malformed.
  // Instances where the cap is malformed include:
  //  - fcap_id is empty or is very long
  //  - max_mpressions or time_range are non-positive
  //  - there are a large number of frequency caps for a single bid
  //  - time_unit is not specified
  //
  // Note that if a subsequent bid with the same fcap_id uses a different
  // duration (represented by time_unit and time_range) then impressions counted
  // against the old frequency cap will not count against the new one and vice
  // versa.
  message FrequencyCap {
    // An ID that can represent a bidder's use-case for frequency capping; for
    // example, it could represent their campaign, ad, line item, etc. It should
    // not contain any user-specific information or identifiers and should not
    // be longer than 64 characters.
    optional string fcap_id = 1;

    // The time units for which frequency caps can be enforced.
    enum TimeUnit {
      UNKNOWN_TIME_UNIT = 0;
      MINUTE = 1;
      DAY = 2;
      WEEK = 3;
      MONTH = 4;
      // When INDEFINITE is used, time_range will be ignored. INDEFINITE means
      // the frequency cap will be applied for a long period of time, (longer
      // than a month) but not necessarily forever.
      INDEFINITE = 5;
    }

    // The unit of time used to specify the time window for which a frequency
    // cap applies.
    optional TimeUnit time_unit = 2;

    // The length of the time window, in units specified by time_unit, for which
    // the frequency cap applies. For instance, if time_unit=WEEK and
    // time_range=3, then capping is applied for a three week period. If the
    // time_unit=INDEFINITE, this will be ignored.
    optional int32 time_range = 3 [default = 1];

    // The maximum number of impressions allowed to be shown to a user for
    // the provided frequency_cap_id within the time window described by
    // time_unit and time_range.
    optional int32 max_imp = 4;
  }
  repeated FrequencyCap fcap = 18;

  // Advertiser's SKAdNetwork information to support app installation
  // attribution for iOS 14 and later.  Apple's SKAdNetwork API helps
  // advertisers measure ad-driven app installation by sending a postback
  // to the ad network after a successful install. Ad networks will need
  // to send their network ID and signed advertiser information to allow
  // an install to be attributed to the ad impression.
  // For more info visit:
  // https://developer.apple.com/documentation/storekit/skadnetwork
  message SKAdNetworkResponse {
    // Version of SKAdNetwork supported by the advertiser. Also used to
    // specify how the signature was generated by the advertiser. This
    // should match the version from BidRequest.imp.ext.skad.version.
    optional string version = 1;

    // Ad network identifier used in signature. This should match one of the
    // items in BidRequest.imp.ext.skad.skadnetids.
    optional string network = 2;

    // Campaign ID compatible with Apple's spec.
    optional string campaign = 3;

    // ID of advertiser's app in Apple's app store.
    optional string itunesitem = 4;

    // SKAdNetwork API starting from version 2.2 supports multiple ad
    // presentation options specified by the `fidelity-type` parameter of the
    // SKAdNetwork signature.  This holds parameters used to generate the
    // signature that would be different for each fidelity type supported.
    // For more info visit:
    // https://developer.apple.com/documentation/storekit/skadnetwork/signing_and_providing_ads
    message Fidelity {
      // The fidelity type of the attribution to track.
      optional SKAdNetworkFidelityType fidelity = 1
          [default = STOREKIT_RENDERED_ADS];

      // A unique all-lowercase UUID generated by the advertiser to use for
      // generating the signature.
      optional string nonce = 2;

      // Unix time in millis used at the time of signature generation.
      optional string timestamp = 3;

      // SKAdNetwork signature as specified by Apple.
      optional string signature = 4;
    }

    repeated Fidelity fidelities = 9;

    // A unique all-lowercase UUID generated by the advertiser to use for
    // generating the signature.
    // Note:  This field will be deprecated in favor of the
    // BidResponse.bid.ext.skadn.fidelities.nonce field to support multiple
    // fidelity types.
    optional string nonce = 5;

    // ID of publisher's app in Apple's app store. This should match the ID
    // from BidRequest.imp.ext.skad.sourceapp.
    optional string sourceapp = 6;

    // Unix time in millis used at the time of signature generation.
    // Note:  This field will be deprecated in favor of the
    // BidResponse.bid.ext.skadn.fidelities.timestamp field to support multiple
    // fidelity types.
    optional string timestamp = 7;

    // SKAdNetwork signature as specified by Apple.
    // Note:  This field will be deprecated in favor of the
    // BidResponse.bid.ext.skadn.fidelities.signature field to support multiple
    // fidelity types.
    optional string signature = 8;

    // Google Mobile Ads SDK options for SKAdNetwork handling.
    message SKAdNetworkOptions {
      // By default, SKAdNetwork attribution will only be initiated if the
      // click-through URL lands on the app store, either as a direct link to
      // the app store or as the final destination of a server-side redirect
      // chain.  This flag enables GMA SDK to always initiate SKAdNetwork
      // attribution on-click regardless of the detected click's final
      // destination URL. Note that enabling this will launch the app store
      // even for clicks that are not meant to open the app store, for example
      // clicks on Ad Choices icon. For more info, see:
      // https://developers.google.com/authorized-buyers/rtb/skadnetwork
      optional bool always_open_appstore = 1 [default = false];
    }

    // [AdX: BidResponse.Ad.skadn_options]
    optional SKAdNetworkOptions skadn_opts = 10;
  }

  // [AdX: BidResponse.Ad.skadn]
  optional SKAdNetworkResponse skadn = 19;

  // Experimental feature; may be subject to change. See
  // https://github.com/google/ads-privacy/tree/master/experiments/turtledove-simulation
  // and https://developers.google.com/authorized-buyers/rtb/turtledove
  // for more information about the TURTLEDOVE simulation for RTB.
  //
  // Bidding function name that the bidder selected for the TURTLEDOVE
  // simulation. The name refers to the bidding function
  // that is provided ahead of time via Bidding functions API resource.
  // Bid value will be computed by the bidding function; value provided via
  // max_cpm_micros will be ignored.
  //
  // This field was used in the original TURTLEDOVE simulation phase.
  // Consider switching to FLEDGE simulation and
  // using BidResponse.interest_group_map.bidding_function_name. The latter
  // field associates bidding function with an interest group rather than
  // with an ad. The current field is still supported for backward
  // compatibility.
  optional string bidding_function_name = 20;

  // Experimental feature; may be subject to change. See
  // https://github.com/google/ads-privacy/tree/master/experiments/turtledove-simulation
  // and https://developers.google.com/authorized-buyers/rtb/turtledove
  // for more information about the TURTLEDOVE simulation experiments.
  //
  // Bidder-provided inputs to the bidding function; only used to be passed
  // to the bidding function as one of the arguments. An object in a
  // bidder-defined format.
  //
  // This field was used in the earlier TURTLEDOVE server-side simulation
  // experiment. Consider switching to the FLEDGE server-side simulation
  // experiment.
  optional .google.protobuf.Value interest_group_data = 21;

  // Experimental feature; may be subject to change.
  // Please reach out to your account manager to participate in the FLEDGE
  // simulation.
  //
  // Reference to the simulated FLEDGE interest group for this ad; must be
  // one of the map keys in BidResponse.interest_group_map.
  optional string interest_group_name = 23;

  // Experimental feature; may be subject to change.
  // Please reach out to your account manager to participate in the FLEDGE
  // simulation.
  //
  // Bidder-provided inputs to the bidding function (ad-level information).
  // Only applicable to and used in the FLEDGE simulation, where it is
  // passed to the bidding function as an argument.
  //
  // An object in a bidder-defined format. When passed to the bidding
  // function, it will be converted to a JSON object using the proto3
  // canonical JSON representation
  // (https://developers.google.com/protocol-buffers/docs/proto3#json).
  // This field simulates 'ads' data in FLEDGE.
  // https://github.com/WICG/turtledove/blob/main/FLEDGE.md#11-joining-interest-groups
  optional .google.protobuf.Value ad_data = 24;
}

extend com.google.openrtb.BidResponse.SeatBid.Bid {
  // Extension key for AdX Bid.ext.
  optional BidExt bid = 1014;
}

message NativeRequestExt {
  // [AdX: BidRequest.AdSlot.native_ad_template[0].style_id]
  optional int32 style_id = 1;

  // [AdX: BidRequest.AdSlot.native_ad_template[0].style_height]
  optional int32 style_height = 2;

  // [AdX: BidRequest.AdSlot.native_ad_template[0].style_width]
  optional int32 style_width = 3;

  // [AdX: BidRequest.AdSlot.native_ad_template[0].style_layout_type]
  enum LayoutType {
    PIXEL = 0;
    FLUID = 1;
  }
  optional LayoutType style_layout_type = 4 [default = PIXEL];

  // Note: This feature is currently in beta testing for publishers
  // and is subject to change.
  // This message is populated when the request is for an individual cell
  // within a multi-ad grid. It provides cell level information as well as
  // information about the grid this cell belongs to in the AdSlot.
  // Only native ads are supported for cells in a multi-ad grid at this time.
  message MultiAdsCellInfo {
    // The row this cell belongs to.
    optional int32 cell_row = 1;
    // The column this cell belongs to.
    optional int32 cell_column = 2;
    // Total number of rows in the grid for this cell.
    optional int32 grid_rows = 3;
    // Total number of columns in the grid for this cell.
    optional int32 grid_columns = 4;
    // Unique ID for the grid. It identifies a single grid on a single
    // instance of a page and is the same for all cells within that grid. If a
    // page has multiple grids, the grid_id for other grids would be
    // different. It would also be different for the same grid in two
    // different pageviews.
    // This is distinct from the google_query_id, which will differ for every
    // request for a cell in the grid.
    optional int64 grid_id = 5;
  }
  // [AdX: BidRequest.AdSlot.multi_ads_cell_info]
  optional MultiAdsCellInfo multi_ads_cell_info = 5;
}

extend com.google.openrtb.NativeRequest {
  // Extension key for the AdX Native.ext.
  optional NativeRequestExt native_ext = 1001;
}

message EventTrackerExt {
  // Additional context provided for rendering.
  enum Context {
    UNKNOWN = 0;

    // Currently not supported.
    OMID = 1;
  }
  repeated Context context = 1;

  // Parameters associated with the resource that will be passed to the
  // resource when it is loaded. The format of the parameters is dependent
  // on the script vendor.
  optional string verification_parameters = 2;

  // Used to uniquely identify the verification script provider.
  optional string vendor_key = 3;
}

extend com.google.openrtb.NativeResponse.EventTracker {
  // Extension key for the AdX EventTracker.ext.
  optional EventTrackerExt eventtrackers = 1000;
}

message PublisherExt {
  // The billing address country code of the publisher. This may be different
  // from the hosting country of the website. For a complete list of country
  // codes, please refer to
  // https://developers.google.com/adwords/api/docs/appendix/codes-formats#country-codes
  optional string country = 1;

  // The ID of the host publisher. When populated, indicates that the host
  // publisher participated in revenue sharing, and the ID can be used to
  // authorize ads.txt.
  optional string host_publisher_id = 2;
}

extend com.google.openrtb.BidRequest.Publisher {
  // Extension key for the AdX Publisher.ext
  optional PublisherExt publisher = 1002;
}

message SiteExt {
  enum AmpPage {
    // This is not an AMP page.
    DIALECT_HTML = 0;
    // This is an Amp page.
    DIALECT_HTML_AMP = 1;
  }
  // Whether this is an AMP page or not. Omitted if unknown.
  optional AmpPage amp = 1;

  enum VisibilityState {
    VISIBILITY_STATE_UNKNOWN = 0;
    // The page is at least partially visible. For example, in the foreground
    // tab of a non-minimized window.
    VISIBILITY_STATE_VISIBLE = 1;
    // The page is not visible to users. For example, when the page is in a
    // background browser tab, or in a minimized window.
    VISIBILITY_STATE_HIDDEN = 2;
  }
  // The visibility state of the web page containing the ad slot.
  // See https://www.w3.org/TR/page-visibility/.
  // [AdX: BidRequest.page_visibility]
  optional VisibilityState page_visibility = 2
      [default = VISIBILITY_STATE_UNKNOWN];

  // Indicates that the request is using semi-transparent branding,
  // which means only a truncated version of the request URL will
  // be provided.  This decision is made by the publisher, see
  // https://support.google.com/admanager/answer/4584891#urls for context.
  optional bool is_semi_transparent_request = 3;
}

extend com.google.openrtb.BidRequest.Site {
  // Extension key for the Adx Site.ext
  optional SiteExt site = 1010;
}

message BidRequestExt {
  // Feedback on bids submitted in previous responses. This is only set if
  // real-time feedback is enabled for your bidder. Please contact your
  // account manager if you wish to enable real-time feedback.
  //
  message BidFeedback {
    // The unique id from BidRequest.id.
    optional string request_id = 1;

    // The status code for the ad. See creative-status-codes.txt in the
    // technical documentation for a list of ids.
    optional int32 creative_status_code = 2;

    // Experimental feature; may be subject to change. See
    // https://github.com/google/ads-privacy/tree/master/experiments/turtledove-simulation
    // and https://developers.google.com/authorized-buyers/rtb/turtledove
    // for more information about the TURTLEDOVE simulation for RTB.
    //
    // This is the bid price CPM specified by the bidder in the bid response
    // or computed by a bidding function in the TURTLEDOVE simulation
    // (https://developers.google.com/authorized-buyers/rtb/turtledove)
    // expressed in the bidding currency. The bidding currency is determined
    // by:
    // 1. The bidder-level currency, if configured.
    // 2. Otherwise, the currency of the buyer account indicated by the
    // billing ID in the billing_id field.
    // 3. If billing_id is empty, the currency of the buyer account indicated
    // by the sole billing ID in the bid request.
    optional double bid_price = 9;

    // Experimental feature; may be subject to change. See
    // https://developers.google.com/authorized-buyers/rtb/fledge and
    // https://developers.google.com/authorized-buyers/rtb/turtledove
    // for more information about the FLEDGE and TURTLEDOVE simulations for RTB.
    //
    // An optional string for debugging a bidding function.
    // This is the string that can be returned by the bidding function during
    // invocation. This debug string is limited to a maximum size of 200 bytes
    // of data.
    optional string bidding_function_debug_string = 10;

    // Experimental feature; may be subject to change. For more information
    // about the TURTLEDOVE and FLEDGE simulations respectively, see:
    // https://developers.google.com/authorized-buyers/rtb/turtledove,
    // https://developers.google.com/authorized-buyers/rtb/fledge
    //
    // The estimated time it took for the bidding function specified by the
    // bidder to run for on-device auctions simulated server-side.
    optional .google.protobuf.Duration bidding_function_runtime = 11;

    // If the bid won the auction, this is the price paid in your account
    // currency.  If the bid participated in the auction but was out-bid, this
    // is the CPM that should have been exceeded in order to win.  This is not
    // set if the bid was filtered prior to the auction, if the publisher or
    // winning bidder has opted out of price feedback or if your account has
    // opted out of sharing winning prices with other bidders. For first-price
    // auctions, minimum_bid_to_win is populated instead of this field.
    optional double price = 3;

    // The minimum bid value necessary to have the auction, in your account
    // currency. If your bid won the auction, this is the second highest bid
    // that was not filtered (including the floor price). If your bid did not
    // win the auction, this is the winning candidate's bid. This field will
    // only be populated if your bid participated in a first-price auction, and
    // will not be populated if your bid was filtered prior to the auction.
    optional double minimum_bid_to_win = 6;

    // When a publisher uses an RTB auction and waterfall-based SDK mediation on
    // the same query, the winner of the real-time auction must also compete in
    // a mediation waterfall (which is ordered by price) to win the impression.
    // If the bid participated in the auction and there was no waterfall, the
    // value of this field is 0. If the bid participated in the auction and
    // there was a waterfall, the value of this field is a price representing a
    // sample bid from the eligible mediation networks that were higher than the
    // auction winner, weighted by expected fill rate.  This field can be used
    // in conjunction with minimum_bid_to_win to train bidding models. The CPM
    // is in your account currency.
    optional double sampled_mediation_cpm_ahead_of_auction_winner = 8;

    message EventNotificationToken {
      // The contents of the token.
      optional string payload = 1;
    }
    // The token included in the corresponding bid.
    optional EventNotificationToken event_notification_token = 4;

    // The creative ID included in the corresponding bid.
    optional string buyer_creative_id = 5;
  }
  repeated BidFeedback bid_feedback = 1;

  // This represents a unique ID for the overall query.  In the event
  // that there are multiple callouts for a query, all callout requests for that
  // query will contain the same google_query_id.
  optional string google_query_id = 2;

  // Experimental feature; may be subject to change. See
  // https://support.google.com/authorizedbuyers/answer/10890762 for more
  // information.
  //
  // To receive this signal, please contact your account manager to enable
  // frequency capping for your account.
  //
  // Describes the scope of frequency cap enforcement available for this
  // request. Frequency caps to be enforced for a bid can be specified in the
  // Bid.ext.fcap field.
  enum FrequencyCappingScope {
    // Default value which should not be used, or which can indicate that
    // frequency cap scope could not be reliably determined.
    FREQUENCY_CAPPING_SCOPE_UNKNOWN = 0;

    // Frequency capping based on bid response specifications is not available
    // for this request. A frequency-capped bid for a bid request with no
    // frequency cap availability will be filtered prior to the auction.
    FREQUENCY_CAPPING_SCOPE_NONE = 1;

    // Frequency capping enforcement is available across multiple sites within
    // the same browser.
    FREQUENCY_CAPPING_SCOPE_BROWSER = 2;

    // Frequency capping enforcement is available across multiple apps on the
    // device, excluding browsers.
    FREQUENCY_CAPPING_SCOPE_DEVICE = 3;
  }

  optional FrequencyCappingScope fcap_scope = 4;
}

extend com.google.openrtb.BidRequest {
  // Extension key for the Adx BidRequest.ext
  optional BidRequestExt bid_request = 1018;
}

message UserExt {
  message ConsentedProvidersSettings {
    // Set of IDs corresponding to ad tech providers (ATPs) for whom the
    // publisher has specified to Google that its EEA users have given legally
    // valid consent to: 1) the use of cookies or other local storage where
    // legally required; and 2) the collection, sharing, and use of personal
    // data for personalization of ads by an ATP in accordance with Google’s EU
    // User Consent Policy.
    //
    // If a publisher is using the IAB Transparency and Consent Framework (TCF)
    // v2 to manage user consent, this is the set of ATPs consented via the
    // Additional Consent string (see
    // https://support.google.com/admanager/answer/9681920 for details about
    // Google's Additional Consent mode). ATPs consented via the TCF v2 consent
    // string are represented in the UserExt.consent field.
    //
    // A mapping of ATP ID to ATP name is posted at providers.csv.
    repeated int64 consented_providers = 2 [packed = true];

    // The raw Additional Consent string, which contains a list of certain
    // Google Ad Tech Providers (ATPs). These ATPs are not registered with IAB
    // TCF v2, but publishers or their Consent Management Providers (CMPs) have
    // ensured that certain disclosures are given to, and consents are obtained
    // from, end users, as required by Google’s EU User Consent Policy. This
    // field is only populated with the use of CMPs that are integrated with IAB
    // TCF v2. Such CMPs use the raw Additional Consent string to indicate
    // vendors that are not registered with IAB, and communicate end users’ CMP
    // choices to those vendors. The consented_providers field contains the set
    // of vendors that mirrors the one represented by the additional_consent
    // field, which is in the raw form. Vendors or any other third-party service
    // providers must not create AC strings themselves.
    //
    // See https://support.google.com/admanager/answer/9681920 for more details
    // about this field.
    optional string additional_consent = 3;
  }
  // Information about the ad tech providers for whom the publisher has
  // specified to Google that its EEA user has consented to the use of their
  // personal data for ads personalization in accordance with Google's EU User
  // Consent Policy. This field will only be populated when RegsExt.gdpr is
  // true.
  optional ConsentedProvidersSettings consented_providers_settings = 1;

  // The web-safe base64-encoded IAB Transparency and Consent Framework (TCF) v2
  // consent string fetched from the publisher's IAB Consent Management Platform
  // (CMP). The structure of the string is defined by the IAB TCF v2. This field
  // will be populated if the publisher has integrated with a CMP for TCF v2 and
  // that CMP indicates that GDPR applies to this ad request and provides a
  // valid consent string.  See
  // https://support.google.com/authorizedbuyers/answer/9789378 for additional
  // information about the Google TCF v2 integration.
  //
  // See the IAB Global Vendor List at
  // https://vendor-list.consensu.org/v2/vendor-list.json for details about the
  // vendors listed in the consent string.
  optional string consent = 2;

  message Floc {
    // The value of a cohort ID – a string identifier that is common to a large
    // cohort of users with similar browsing habits.
    //
    // Not currently populated.
    optional string id = 1;

    // The type of the FLoC. See
    // https://github.com/google/ads-privacy/blob/master/proposals/FLoC/FLOC-Whitepaper-Google.pdf.
    enum FlocType {
      // Default value that should not be used.
      FLOC_TYPE_UNKNOWN = 0;
      // FLoC simulated using affinity hierarchical clustering with centroids
      // and feature extraction based on Topic categories as described in the
      // whitepaper.
      SIMULATED_AFFINITY_CLUSTERING_CENTROID_VERTICAL = 2;
      // FLoC simulated using SortingLSH clustering algorithm and Domain One-hot
      // encoding feature extraction as described in the whitepaper.
      SIMULATED_SIMHASH_SORTING_LSH_DOMAIN_ONE_HOT = 3;
      // FLoC simulated using a k Random Centers locality-sensitive hash
      // function as described in
      // https://github.com/google/ads-privacy/blob/master/proposals/FLoC/k-random-centers.md
      // with Domain TF-IDF feature extraction as described in the whitepaper.
      KCENTER_DOM_FILTERED_TFDIF = 4;
    }
    optional FlocType type = 2;
  }
  // Cohort ID that is common to a large cohort of users with similar
  // browsing habits. Currently the cohort ID is simulated by the exchange
  // (as opposed to by the browser). When simulated
  // cohort ID is provided, traditional pseudonymous cookie-based user
  // identifiers or device advertising identifiers would not be populated.
  // Experimental feature; may be subject to change. See
  // https://github.com/WICG/floc for more background on FLoC.
  //
  // FLoC cohort information is not currently populated.
  optional Floc floc = 3;

  // Encrypted data to be passed to a buyer by the publisher.
  message ExtendedId {
    // The source (provider) of the signal.
    optional string source = 1;

    // The encrypted signal.
    message ExtendedIdUid {
      optional string id = 1;
    }

    repeated ExtendedIdUid uids = 2;
  }

  // Standard extension that is used for passing encrypted data chosen by the
  // publisher.
  // https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/extensions/2.x_official_extensions/eids.md
  repeated ExtendedId eids = 5;
}

extend com.google.openrtb.BidRequest.User {
  // Extension key for the Adx User.ext
  optional UserExt user = 1007;
}

message DeviceExt {
  // Represents a short-lived user session on CTV/OTT devices,
  // with a maximum session duration of 6 hours.
  // The use of session_id is never allowed for ads personalization.
  // session_id may only be used for frequency capping, competitive exclusions
  // or related purposes. This field is populated with web-safe base64 alphabet.
  optional string session_id = 1;

  // User Agent information. This will be populated with information about the
  // user agent, extracted from the User-Agent header or from Sec-CH-UA headers
  // (https://github.com/WICG/ua-client-hints).
  message UserAgent {
    // A tuple of (brand, version) for the browser or platform.
    message BrandVersion {
      // Brand identifier, e.g. "Chrome" or "Windows".
      optional string brand = 1;
      // Version, split in components if needed, e.g. {"85", "1"} = v85.1.
      repeated string version = 2;
    }
    // Identifies the browser.
    optional BrandVersion browser = 1;
    // Identifies the platform.
    optional BrandVersion platform = 2;
    // True if the agent prefers "mobile-optimized" content. Refer to the
    // BidRequest.device field for specific information about the device, which
    // may or may not be consistent with this field (for example, a smartphone's
    // browser can be requesting "Desktop site").
    optional bool mobile = 3;
    // Device architecture, e.g. "x86" or "arm".
    optional string architecture = 4;
    // Device's bitness, e.g. "64" for 64-bit architecture.
    optional string bitness = 9;
    // Device model.
    optional string model = 5;
  }

  // User Agent information.
  optional UserAgent user_agent_data = 2;

  // (iOS Only) An integer passed to represent the app's app tracking
  // authorization status, where 0 = not determined 1 = restricted 2 = denied
  // 3 = authorized. This value is retrieved from ATTrackingManager and
  // provided as is. See
  // https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/extensions/community_extensions/skadnetwork.md#bid-request-1
  //
  // For more information about iOS's app tracking authorization status, see:
  // https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/authorizationstatus
  optional int32 atts = 3;

}

extend com.google.openrtb.BidRequest.Device {
  optional DeviceExt device = 1066;
}

message RegsExt {
  // This field will be set to true in either of the two following cases:
  //   1. Google receives a valid IAB Transparency and Consent Framework (TCF)
  //      v2 consent string and the Consent Management Platform indicates that
  //      GDPR applies to this ad request.
  //   2. Google does not receive an IAB TCF v2 consent string and, based on
  //      information available to Google, this impression will serve to an
  //      EEA user.
  // It does not constitute legal guidance on GDPR.
  optional bool gdpr = 1;

  // This field will be set to true when, based on information available to
  // Google, this impression will serve to a user in Brazil. See
  // https://storage.googleapis.com/adx-rtb-dictionaries/lgpd-providers.csv for
  // the list of ad tech providers that are allowed to serve on LGPD-enforced
  // requests.
  //
  // See https://support.google.com/authorizedbuyers/answer/9928204 for more
  // information on LGPD.
  optional bool lgpd = 2;
}

extend com.google.openrtb.BidRequest.Regs {
  // Extension key for the Adx Regs.ext
  optional RegsExt regs = 1001;
}

message DealExt {
  // The type of the deal. Note that Authorized Buyers policy overrides apply to
  // all Programmatic Guaranteed and Preferred Deal bids, and do not apply to
  // bids for other deal types.
  enum DealType {
    UNKNOWN_DEAL_TYPE = 0;

    // Bids are fixed-price and evaluated before the Open Auction. Bidders are
    // not required to bid with Preferred Deals when they are present on the bid
    // request. See https://support.google.com/authorizedbuyers/answer/2604595
    // for more information.
    PREFERRED_DEAL = 1;

    // Bids participate in a Private Auction against a select list of buyers
    // with specific floors. See
    // https://support.google.com/authorizedbuyers/answer/2839853 for more
    // information.
    PRIVATE_AUCTION = 2;

    // Bids are fixed-price and evaluated before the Open Auction. Bidders are
    // expected to bid with Programmatic Guaranteed deals whenever they are
    // present on a bid request and the must_bid field is true in order to
    // ensure that the number of impressions agreed upon for a given deal are
    // served. See https://support.google.com/authorizedbuyers/answer/7174589
    // for more information.
    PROGRAMMATIC_GUARANTEED = 3;

    // The deal ID is an identifier for a collection of Open Auction inventory
    // matching a given set of targeting criteria. See
    // https://support.google.com/authorizedbuyers/answer/7516884 for more
    // information.
    AUCTION_PACKAGE = 4;
  }
  optional DealType deal_type = 1 [default = UNKNOWN_DEAL_TYPE];

  // This field is only applicable to Programmatic Guaranteed deals. The
  // buyer is allowed to skip bidding on the impression if this field is
  // false. When it is true, the buyer is required to bid on this deal for
  // this impression opportunity. This field will always be filled explicitly
  // for the JSON wire format.
  optional bool must_bid = 2 [default = true];

  // Whether the publisher has exempted this deal from configured blocks. This
  // setting does not override AdX policies or Ad Review Center decisions. See
  // https://support.google.com/authorizedbuyers/answer/6114194 for more
  // information.
  optional bool publisher_blocks_overridden = 3;

  // Experimental field; subject to change.
  // An enum declaring the host of the creative, which will only be
  // populated for Programmatic Guaranteed deals.
  // Currently, this field should only ever be set to
  // CREATIVE_SOURCE_ADVERTISER.
  enum CreativeSourceType {
    CREATIVE_SOURCE_UNKNOWN = 0;
    // The creative is hosted by the advertiser, which means the bidder is
    // required to provide a creative in the bid response.
    CREATIVE_SOURCE_ADVERTISER = 1;
    // The creative is hosted by the publisher, which means the bidder
    // does not need to include a creative in the bid response.
    // For more information on publisher-hosted creatives, see
    // https://support.google.com/admanager/answer/9243220.
    // This feature isn't currently supported for RTB bidders.
    CREATIVE_SOURCE_PUBLISHER = 2;
  }
  optional CreativeSourceType creative_source = 4
      [default = CREATIVE_SOURCE_ADVERTISER];
}

extend com.google.openrtb.BidRequest.Imp.Pmp.Deal {
  // Extension key for AdX Deal.ext.
  optional DealExt deal = 1010;
}

message SourceExt {
  // Identifier of the OM SDK integration. Equivalent to
  // BidRequest.AdSlot.omidpn in the Google protocol. For more info,
  // see the OpenRTB Advisory for Open Measurement SDK:
  // https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/OpenRTB%20support%20for%20OMSDK.md#openrtb-and-adcom.
  optional string omidpn = 1;
  // Version of the OM SDK integration. Equivalent to BidRequest.AdSlot.omidpv
  // in the Google protocol. For more info, see the OpenRTB Advisory for
  // Open Measurement SDK:
  // https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/OpenRTB%20support%20for%20OMSDK.md#openrtb-and-adcom.
  optional string omidpv = 2;

  // OpenRTB SupplyChain object. For more information, see
  // https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/supplychainobject.md.
  message SupplyChain {
    // Flag indicating whether the chain contains all nodes involved in the
    // transaction leading back to the owner of the site, app or other medium
    // of the inventory, where 0 = no, 1 = yes.
    optional int32 complete = 1;

    message SupplyChainNode {
      // The canonical domain name of the SSP, Exchange, Header Wrapper, etc
      // system that bidders connect to. This may be the operational domain
      // of the system, if that is different than the parent corporate domain,
      // to facilitate WHOIS and reverse IP lookups to establish clear
      // ownership of the delegate system. This should be the same value as
      // used to identify sellers in an ads.txt file if one exists.
      optional string asi = 1;

      // The identifier associated with the seller or reseller account within
      // the advertising system. This must contain the same value used in
      // transactions (i.e. OpenRTB bid requests) in the field specified by
      // the SSP/exchange. Typically, in OpenRTB, this is publisher.id.
      // For OpenDirect it is typically the publisher’s organization ID.
      // Should be limited to 64 characters in length.
      optional string sid = 2;

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

      // The name of the company (the legal entity) that is paid for inventory
      // transacted under the given seller_id. This value is optional and
      // should NOT be included if it exists in the advertising system’s
      // sellers.json file.
      optional string name = 4;

      // The business domain name of the entity represented by this node.
      // This value is optional and should NOT be included if it exists in
      // the advertising system’s sellers.json file.
      optional string domain = 5;

      // Indicates whether this node will be involved in the flow of payment
      // for the inventory. When set to 1, the advertising system in the asi
      // field pays the seller in the sid field, who is responsible for paying
      // the previous node in the chain. When set to 0, this node is not
      // involved in the flow of payment for the inventory. For version 1.0 of
      // SupplyChain, this property should always be 1. It is explicitly
      // required to be included as it is expected that future versions of the
      // specification will introduce non-payment handling nodes.
      // Implementers should ensure that they support this field and propagate
      // it onwards when constructing SupplyChain objects in bid requests sent
      // to a downstream advertising system.
      optional int32 hp = 6;
    }

    // Array of SupplyChainNode objects in the order of the chain.
    // In a complete supply chain, the first node represents the initial
    // advertising system and seller ID involved in the transaction, i.e. the
    // owner of the site, app, or other medium. In an incomplete supply chain,
    // it represents the first known node. The last node represents the entity
    // sending this bid request.
    repeated SupplyChainNode nodes = 2;

    // Version of the supply chain specification in use, in the format of
    // “major.minor”. For example, for version 1.0 of the spec,
    // use the string “1.0”.
    optional string ver = 3;
  }
  optional SupplyChain schain = 3;
}

extend com.google.openrtb.BidRequest.Source {
  // Extension key for Source.ext
  optional SourceExt source = 1059;
}

// SKAdNetwork API starting from version 2.2 supports multiple ad
// presentation options specified by the `fidelity-type` parameter of the
// SKAdNetwork signature.  The following are the fidelity types supported by
// Apple. For more info visit:
// https://developer.apple.com/documentation/storekit/skadnetwork/signing_and_providing_ads
enum SKAdNetworkFidelityType {
  // Attribution for app installs within 24 hours of viewing an ad for at least
  // 3 seconds. Supported for SKAdnetwork version 2.2 and up. For more info see:
  // https://developer.apple.com/documentation/storekit/skadnetwork/generating_the_signature_to_validate_view-through_ads
  VIEW_THROUGH_ADS = 0;

  // Attribution for app installs initiated from the StoreKit-rendered App Store
  // product page driven by ad clicks. Supported for all SKAdNetwork versions.
  // For more info see:
  // https://developer.apple.com/documentation/storekit/skadnetwork/generating_the_signature_to_validate_storekit-rendered_ads
  STOREKIT_RENDERED_ADS = 1;
}