Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #16 from google/sdf_v5
Browse files Browse the repository at this point in the history
Adding support for SDF version 5
  • Loading branch information
KingsleyKelly authored Jan 14, 2020
2 parents 864c444 + cac9932 commit b42be20
Show file tree
Hide file tree
Showing 7 changed files with 1,234 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
from orchestra.google.marketing_platform.utils.schema.sdf.v4_2 import (
SDF_V4_2_SCHEMA_TYPES
)
from orchestra.google.marketing_platform.utils.schema.sdf.v5 import (
SDF_V5_SCHEMA_TYPES
)

SDF_VERSIONED_SCHEMA_TYPES = {'4.2': SDF_V4_2_SCHEMA_TYPES}
SDF_VERSIONED_SCHEMA_TYPES = {'4.2':SDF_V4_2_SCHEMA_TYPES,'5':SDF_V5_SCHEMA_TYPES}
96 changes: 96 additions & 0 deletions orchestra/google/marketing_platform/utils/schema/sdf/v5/Ad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
###########################################################################
#
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################################################

# Ad SDF Schema for API version 5
SDF_Ad_Schema = [{
"type": "STRING",
"name": "Ad_Id",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Ad_Group_Id",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Name",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Status",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Video_Id",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Display_URL",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Landing_Page_URL",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "DCM_Tracking_Placement_Id",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "DCM_Tracking_Ad_Id",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "DCM_Tracking_Creative_Id",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Click_Tracker_URL",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "In_stream_Custom_Parameters",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Action_Button_Label",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Action_Headline",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Video_Discovery_Video_Thumbnail",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Video_Discovery_Headline",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Video_Discovery_Description_1",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Video_Discovery_Description_2",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Video_Discovery_Landing_Page",
"mode": "NULLABLE"
}]
140 changes: 140 additions & 0 deletions orchestra/google/marketing_platform/utils/schema/sdf/v5/AdGroup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
###########################################################################
#
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################################################

# Ad Group SDF Schema for API version 5
SDF_AdGroup_Schema = [{
"type": "STRING",
"name": "Ad_Group_Id",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Line_Item_Id",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Name",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Status",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Video_Ad_Format",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Bid_Cost",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Popular_Videos_Bid_Adjustment",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Keyword_Targeting_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Keyword_Targeting_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Category_Targeting_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Category_Targeting_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_YouTube_Channels_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_YouTube_Channels_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_YouTube_Videos_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_YouTube_Videos_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_URLs_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_URLs_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_Apps_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_Apps_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_App_Collections_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Placement_Targeting_App_Collections_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Demographic_Targeting_Gender",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Demographic_Targeting_Age",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Demographic_Targeting_Household_Income",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Demographic_Targeting_Parental_Status",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Audience_Targeting_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Audience_Targeting_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Affinity_And_In_Market_Targeting_Include",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Affinity_And_In_Market_Targeting_Exclude",
"mode": "NULLABLE"
}, {
"type": "STRING",
"name": "Custom_List_Targeting",
"mode": "NULLABLE"
}]
Loading

0 comments on commit b42be20

Please sign in to comment.