forked from k-bx/openrtb-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
use super::category::Category; | ||
use serde_utils; | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct Bid { | ||
pub id: String, | ||
#[serde(rename = "impid")] | ||
pub imp_id: String, | ||
pub price: f64, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub nurl: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub burl: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub lurl: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub adm: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub adid: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub adomain: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub bundle: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub iurl: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub cid: Option<String>, | ||
#[serde(rename = "crid", skip_serializing_if = "Option::is_none")] | ||
pub cr_id: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub tactic: Option<String>, | ||
#[serde(skip_serializing_if = "Vec::is_empty")] | ||
pub cat: Vec<Category>, | ||
#[serde(skip_serializing_if = "Vec::is_empty")] | ||
pub attr: Vec<u32>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub api: Option<u32>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub protocol: Option<u32>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub qagmediarating: Option<u32>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub language: Option<String>, | ||
#[serde(rename = "dealid", skip_serializing_if = "Option::is_none")] | ||
pub deal_id: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub w: Option<u64>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub h: Option<u64>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub wratio: Option<u64>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub hratio: Option<u64>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub exp: Option<u64>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub ext: Option<serde_utils::Ext>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
use serde_utils; | ||
use super::bid::Bid; | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct SeatBid { | ||
pub bid: Vec<Bid>, // todo: require 1+ bid somehow | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub seat: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub group: Option<u32>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub ext: Option<serde_utils::Ext>, | ||
} |