Subversion Repositories SmartDukaan

Rev

Rev 9057 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9047 manish.sha 1
namespace java in.shop2020.googleadwords
2
namespace py shop2020.thriftpy.googleadwords
3
 
4
include "GenericService.thrift"
5
 
6
/**
7
Exceptions
8
*/
9
 
10
exception GoogleAdwordsServiceException{
11
	1:i64 id,
12
	2:string message
13
}
14
 
15
enum NetworkSettingType{
16
	GOOGLE_SEARCH_AND_SEARCH_NETWORK = 1,
17
	DISPLAY_NETWORK = 2,
18
	GOOGLE_PARTNER_SEARCH_NETWORK = 3,
19
	SEARCH_AND_DISPLAY_NETWORK = 4,
20
	DISPLAY_AND_PARTNER_NETWORK = 5,
21
	SEARCH_AND_PARTNER_NETWORK = 6,
22
	ALL_AVALIABLE_SOURCES =7
23
}    
24
 
25
enum AdwordsCampaignStatus{
26
	ACTIVE = 1,
27
	PAUSED = 2,
28
	DELETED = 3
29
}
30
 
31
enum AdwordsAdGroupStatus{
32
	ENABLED = 1,
33
	PAUSED = 2,
34
	DELETED = 3
35
}
36
 
37
enum KeywordMatchType{
38
	EXACT = 1,
39
	PHRASE = 2,
40
	BROAD = 3
41
}
42
 
43
struct AdwordsCampaign{
44
	1:i64 id,
45
	2:i64 campaignId,
46
	3:string name,
47
	4:AdwordsCampaignStatus status,
48
	5:optional i64 startDate,
49
	6:optional i64 endDate,
50
	7:double budgetAmount,
51
	8:NetworkSettingType networkType
52
}
53
 
54
struct AdwordsAdGroup{
55
	1:i64 id,
56
	2:i64 campaignId,
57
	3:i64 adgroupId,
58
	4:i64 catalogItemId,
59
	5:string name,
60
	6:AdwordsAdGroupStatus status,
61
	7:double bidAmount
62
}
63
 
64
struct AdwordsAdGroupAd{
65
	1:i64 id,
66
	2:i64 campaignId,
67
	3:i64 adgroupId,
68
	4:i64 adgroupadId,
69
	5:string headline,
70
	6:string description1,
71
	7:string description2,
72
	8:string url,
73
	9:string displayUrl
74
}
75
 
76
struct AdwordsAdKeyword{
77
	1:i64 id,
78
	2:i64 campaignId,
79
	3:i64 adgroupId,
80
	4:i64 criterionId,
81
	5:string text,
82
	6:double bidAmount,
83
	7:KeywordMatchType matchType
84
}
85
 
86
service GoogleAdwordsService extends GenericService.GenericService{
87
 
88
	void addAdwordsCampaign(1:AdwordsCampaign campaign) throws (1:GoogleAdwordsServiceException gasex),
89
	void addAdwordsAdGroup(1:AdwordsAdGroup adgroup) throws (1:GoogleAdwordsServiceException gasex),
90
	void addAdwordsAdGroupAd(1:AdwordsAdGroupAd adgroupad) throws (1:GoogleAdwordsServiceException gasex),
91
	void addAdwordsAdKeyword(1:AdwordsAdKeyword adkeyword) throws (1:GoogleAdwordsServiceException gasex),
92
 
93
	void updateAdwordsCampaign(1:AdwordsCampaign campaign) throws (1:GoogleAdwordsServiceException gasex),
94
	void updateAdwordsAdGroup(1:AdwordsAdGroup adgroup) throws (1:GoogleAdwordsServiceException gasex),
95
	void updateAdwordsAdKeyword(1:AdwordsAdKeyword adkeyword) throws (1:GoogleAdwordsServiceException gasex),
96
 
97
	void deleteAdwordsCampaign(1:i64 campaignId) throws (1:GoogleAdwordsServiceException gasex),
98
	void deleteAdwordsAdGroup(1:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
99
	void deleteAdwordsAdGroupAd(1:i64 adgroupadId) throws (1:GoogleAdwordsServiceException gasex),
100
	void deleteAdwordsAdKeyword(1:i64 criterionId) throws (1:GoogleAdwordsServiceException gasex),
101
 
102
	AdwordsCampaign getAdwordsCampaignByCampaignId(1:i64 campaignId) throws (1:GoogleAdwordsServiceException gasex),
103
	AdwordsAdGroup getAdwordsAdGroupByAdGroupId(1:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
104
	AdwordsAdGroupAd getAdwordsAdgroupAdByAdId(1:i64 adgroupadId) throws (1:GoogleAdwordsServiceException gasex),
105
	AdwordsAdKeyword getAdwordsAdKeywordByCriterionId(1:i64 criterionId) throws (1:GoogleAdwordsServiceException gasex),
106
 
107
	list<AdwordsAdKeyword> getAdwordsAdKeywordsByAdgroupId(1:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
108
	list<AdwordsAdGroupAd> getAdwordsAdGroupAdsByAdgroupId(1:i64 adgroupId) throws (1:GoogleAdwordsServiceException gasex),
109
	list<AdwordsAdGroup> getAdwordsAdGroupsByCampaignId(1:i64 campaignId) throws (1:GoogleAdwordsServiceException gasex),
110
	list<AdwordsCampaign> getAllAdwordsCampaigns() throws (1:GoogleAdwordsServiceException gasex),
111
 
112
	list<AdwordsAdGroup> getAllAdwordsAdGroups() throws (1:GoogleAdwordsServiceException gasex),
113
	list<AdwordsAdGroupAd> getAllAdwordsAdGroupAds() throws (1:GoogleAdwordsServiceException gasex),
114
	list<AdwordsAdKeyword> getAllAdwordsAdKeywords() throws (1:GoogleAdwordsServiceException gasex)
115
}