adGroupAdLabel = AdGroupAdLabel.newBuilder()
.setAdGroupAd(
StringValue.of(ResourceNames.adGroupAd(accountId, adGroupId, adId))
)
.setLabel(StringValue.of(ResourceNames.label(accountId, labelId)))
.build
operation = AdGroupAdLabelOperation.newBuilder()
.setCreate(adGroupAdLabel)
.build()
adGroupAdLabelOperationList.append(operation)
result = service
.mutateAdGroupAdLabels(accountId, adGroupAdLabelOperationList, true, false)
// This result list returns a wrong return name by the API
result[0].getResourceName == `customers/{customer_id}/adGroupAdLabels/{ad_id}~{ad_group_id}~{label_id}`
// and it should be
result[0].getResourceName == `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}`
//The ad_group_id and the ad_id are returned in the wrong place
//After the call, this other method call fails unless you fix the position of the ids:
val adLabel = client.getVersion1.createAdGroupAdLabelServiceClient().getAdGroupAdLabel(result[0].getResourceName)
Here's the simplified code I'm using to attach an existing label to a adGroupAd, when testing it I found out that the result resource name is wrong.
Tested with the latest version as of now (3.0.1) and got the same result.