// Copyright 2015, BeeswaxIO Inc.
//
// Common constants, enums of OpenRTB spec that are shared by different systems.

syntax = "proto2";
package openrtb;

option java_package = "com.beeswax.openrtb";

// 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 {
        option allow_alias = true;
        VPAID_1_0 = 1;
        VPAID_2_0 = 2;
        MRAID = 3;  // OpenRTB 2.2
        MRAID_1 = 3;  // OpenRTB 2.3
        ORMMA = 4;
        MRAID_2 = 5;
        // 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 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;
          VIEWPORT_SOUND_ON = 5;
          VIEWPORT_SOUND_OFF = 6;
        }

        // 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 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 {
      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)
        IP_ADDRESS = 9; // Support for IP Segments
      }
    }
  }

  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 {
      reserved 22, 135, 209; // Deprecated exchanges
      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;
      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;
      IRON_SOURCE          =  136;
      BIDSWITCH_DEALS_FEED =  137;
      SMARTY_ADS           =  138;
      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;
      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;
      PILOTX               =  230; 
      ADPRIME              =  231;
      RICHAUDIENCE         =  232;
      CRITEO               =  233;
    }

    // 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;
      AP_NORTHEAST_1 = 4;
    }

    // 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
      APAC = 3; // Asia Pacific
    }

    // 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;
    }
  }
}
