Hi,
I wanted to use SOAP in Golang(Go) to access Ad Manager API.
Using google auth2 and soap client, I am able to make requests to Ad Manager API and get responses for most of the api calls.
I am facing issues with abstract type and extended types defined in WSDL schema.
e.g. CustomCriteriaSet has fields as children(type CustomCriteriaNode which is base object for CustomCriteriaSet).
corresponding go struct generated as follows.
type CustomCriteriaSet struct {
*CustomCriteriaNode
LogicalOperator *CustomCriteriaSet_LogicalOperator `xml:"logicalOperator,omitempty" json:"logicalOperator,omitempty"`
Children []*CustomCriteriaNode `xml:"children,omitempty" json:"children,omitempty"`
}
type CustomCriteriaNode struct {
}
type CustomCriteria struct {
*CustomCriteriaLeaf
KeyId int64 `xml:"keyId,omitempty" json:"keyId,omitempty"`
ValueIds []int64 `xml:"valueIds,omitempty" json:"valueIds,omitempty"`
Operator *CustomCriteria_ComparisonOperator `xml:"operator,omitempty" json:"operator,omitempty"`
}
Here I am not able to build custom targeting for line items since Go doesn't support struct extends of parent to base.
Can anyone give me some ideas how to fix this ? Is there any alternative way I can access Ad Manager API in Golang?
Any help would be appreciated.
Thanks,
Bhadreswar