Skip to content

Commit 511fec7

Browse files
PierrickVouletpierrick
andauthored
Migrate all region tags to snake_case (#410)
Change-Id: Id6c8561df113996059b1958572c1f9a1b1d0ac95 Co-authored-by: pierrick <pierrick@google.com>
1 parent 71816b9 commit 511fec7

65 files changed

Lines changed: 250 additions & 250 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google-ads-examples/src/main/java/com/google/ads/googleads/examples/accountmanagement/ApproveMerchantCenterLink.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private void runExample(
108108
// Center account with merchantCenterAccountId.
109109
try (MerchantCenterLinkServiceClient merchantCenterLinkService =
110110
googleAdsClient.getLatestVersion().createMerchantCenterLinkServiceClient()) {
111-
// [START ApproveMerchantCenterLink]
111+
// [START approve_merchant_center_link]
112112
ListMerchantCenterLinksResponse response =
113113
merchantCenterLinkService.listMerchantCenterLinks(
114114
ListMerchantCenterLinksRequest.newBuilder()
@@ -118,14 +118,14 @@ private void runExample(
118118
System.out.printf(
119119
"%d Merchant Center link(s) found with the following details:%n",
120120
response.getMerchantCenterLinksCount());
121-
// [END ApproveMerchantCenterLink]
121+
// [END approve_merchant_center_link]
122122

123123
for (MerchantCenterLink merchantCenterLink : response.getMerchantCenterLinksList()) {
124-
// [START ApproveMerchantCenterLink_1]
124+
// [START approve_merchant_center_link_1]
125125
System.out.printf(
126126
"Link '%s' has status '%s'.%n",
127127
merchantCenterLink.getResourceName(), merchantCenterLink.getStatus());
128-
// [END ApproveMerchantCenterLink_1]
128+
// [END approve_merchant_center_link_1]
129129

130130
// Checks if there is a link for the Merchant Center account we are looking for, then only
131131
// approves the link if it is in a 'PENDING' state.
@@ -151,7 +151,7 @@ private void runExample(
151151
* @param status the new status to set on the link.
152152
* @throws GoogleAdsException if an API request failed with one or more service errors.
153153
*/
154-
// [START ApproveMerchantCenterLink_2]
154+
// [START approve_merchant_center_link_2]
155155
private void updateMerchantCenterLinkStatus(
156156
MerchantCenterLinkServiceClient merchantCenterLinkServiceClient,
157157
long customerId,
@@ -183,5 +183,5 @@ private void updateMerchantCenterLinkStatus(
183183
"Updated Merchant Center link with resource name: '%s'.%n",
184184
merchantCenterLinkResult.getResourceName());
185185
}
186-
// [END ApproveMerchantCenterLink_2]
186+
// [END approve_merchant_center_link_2]
187187
}

google-ads-examples/src/main/java/com/google/ads/googleads/examples/accountmanagement/CreateCustomer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static void main(String[] args) {
8282
}
8383
}
8484

85-
// [START CreateCustomer]
85+
// [START create_customer]
8686
private void runExample(GoogleAdsClient googleAdsClient, Long managerId) {
8787
// Formats the current date/time to use as a timestamp in the new customer description.
8888
String dateTime = ZonedDateTime.now().format(DateTimeFormatter.RFC_1123_DATE_TIME);
@@ -110,5 +110,5 @@ private void runExample(GoogleAdsClient googleAdsClient, Long managerId) {
110110
response.getResourceName(), managerId);
111111
}
112112
}
113-
// [END CreateCustomer]
113+
// [END create_customer]
114114
}

google-ads-examples/src/main/java/com/google/ads/googleads/examples/accountmanagement/GetChangeSummary.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static void main(String[] args) {
8282
* @param googleAdsClient the client instance.
8383
* @param customerId the customerId for which to retrieve change status.
8484
*/
85-
// [START GetAccountChanges]
85+
// [START get_account_changes]
8686
private void runExample(GoogleAdsClient googleAdsClient, long customerId) {
8787
String query =
8888
"SELECT change_status.resource_name, "
@@ -123,7 +123,7 @@ private void runExample(GoogleAdsClient googleAdsClient, long customerId) {
123123
}
124124
}
125125
}
126-
// [END GetAccountChanges]
126+
// [END get_account_changes]
127127

128128
/**
129129
* Each returned row contains all possible changed fields. This function returns the resource name

google-ads-examples/src/main/java/com/google/ads/googleads/examples/accountmanagement/LinkManagerToClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static void main(String[] args) throws IOException {
9292
}
9393

9494
/** Runs the example. */
95-
// [START LinkManagerToClient]
95+
// [START link_manager_to_client]
9696
private void runExample(GoogleAdsClient googleAdsClient, long clientCustomerId, long managerId) {
9797
// This example assumes that the same credentials will work for both customers, but that may not
9898
// be the case. If you need to use different credentials for each customer, then you may either
@@ -164,5 +164,5 @@ private void runExample(GoogleAdsClient googleAdsClient, long clientCustomerId,
164164
response.getResults(0).getResourceName());
165165
}
166166
}
167-
// [END LinkManagerToClient]
167+
// [END link_manager_to_client]
168168
}

google-ads-examples/src/main/java/com/google/ads/googleads/examples/accountmanagement/ListAccessibleCustomers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static void main(String[] args) {
6767
*
6868
* @param client the GoogleAdsClient instance to use.
6969
*/
70-
// [START ListAccessibleCustomers]
70+
// [START list_accessible_customers]
7171
private void runExample(GoogleAdsClient client) {
7272
// Optional: Change credentials to use a different refresh token, to retrieve customers
7373
// available for a specific user.
@@ -94,5 +94,5 @@ private void runExample(GoogleAdsClient client) {
9494
}
9595
}
9696
}
97-
// [END ListAccessibleCustomers]
97+
// [END list_accessible_customers]
9898
}

google-ads-examples/src/main/java/com/google/ads/googleads/examples/accountmanagement/RejectMerchantCenterLink.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private void runExample(
144144
* @param merchantCenterLink the MerchantCenterLink object to remove.
145145
* @throws GoogleAdsException if an API request failed with one or more service errors.
146146
*/
147-
// [START RejectMerchantCenterLink]
147+
// [START reject_merchant_center_link]
148148
private void removeMerchantCenterLink(
149149
MerchantCenterLinkServiceClient merchantCenterLinkServiceClient,
150150
long customerId,
@@ -163,5 +163,5 @@ private void removeMerchantCenterLink(
163163
System.out.printf(
164164
"Removed Merchant Center link with resource name: '%s'.%n", result.getResourceName());
165165
}
166-
// [END RejectMerchantCenterLink]
166+
// [END reject_merchant_center_link]
167167
}

google-ads-examples/src/main/java/com/google/ads/googleads/examples/advancedoperations/AddAdCustomizer.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private void runExample(GoogleAdsClient googleAdsClient, AddAdCustomizerParams p
185185
* @param feedName the name of the feed to create.
186186
* @return the resource name of the newly created feed.
187187
*/
188-
// [START AddAdCustomizer]
188+
// [START add_ad_customizer]
189189
private String createAdCustomizerFeed(
190190
GoogleAdsClient googleAdsClient, long customerId, String feedName) {
191191

@@ -221,7 +221,7 @@ private String createAdCustomizerFeed(
221221
return feedResourceName;
222222
}
223223
}
224-
// [END AddAdCustomizer]
224+
// [END add_ad_customizer]
225225

226226
/**
227227
* Retrieves all the attributes for a feed and returns them in a map using the attribute names as
@@ -232,7 +232,7 @@ private String createAdCustomizerFeed(
232232
* @param feedResourceName the resource name of the feed.
233233
* @return the attributes of the feed.
234234
*/
235-
// [START AddAdCustomizer_1]
235+
// [START add_ad_customizer_1]
236236
private Map<String, FeedAttribute> getFeedAttributes(
237237
GoogleAdsClient googleAdsClient, long customerId, String feedResourceName) {
238238
String query =
@@ -265,7 +265,7 @@ private Map<String, FeedAttribute> getFeedAttributes(
265265
}
266266
return feedAttributes;
267267
}
268-
// [END AddAdCustomizer_1]
268+
// [END add_ad_customizer_1]
269269

270270
/**
271271
* Creates a feed mapping and sets the feed as an ad customizer feed.
@@ -275,7 +275,7 @@ private Map<String, FeedAttribute> getFeedAttributes(
275275
* @param feedResourceName the resource name of the feed.
276276
* @param feedAttributes the attributes of the feed.
277277
*/
278-
// [START AddAdCustomizer_2]
278+
// [START add_ad_customizer_2]
279279
private void createAdCustomizerMapping(
280280
GoogleAdsClient googleAdsClient,
281281
long customerId,
@@ -327,7 +327,7 @@ private void createAdCustomizerMapping(
327327
"Added feed mapping with resource name %s.%n", response.getResults(0).getResourceName());
328328
}
329329
}
330-
// [END AddAdCustomizer_2]
330+
// [END add_ad_customizer_2]
331331

332332
/**
333333
* Creates two different feed items to enable two different ad customizations.
@@ -338,7 +338,7 @@ private void createAdCustomizerMapping(
338338
* @param feedAttributes the attributes of the feed.
339339
* @return the resource names of the feed items.
340340
*/
341-
// [START AddAdCustomizer_3]
341+
// [START add_ad_customizer_3]
342342
private List<String> createFeedItems(
343343
GoogleAdsClient googleAdsClient,
344344
long customerId,
@@ -381,7 +381,7 @@ private List<String> createFeedItems(
381381
return feedItemResourceNames;
382382
}
383383
}
384-
// [END AddAdCustomizer_3]
384+
// [END add_ad_customizer_3]
385385

386386
/**
387387
* Helper function to create a FeedItemOperation.
@@ -393,7 +393,7 @@ private List<String> createFeedItems(
393393
* @param feedAttributes the attributes to be set on the feed.
394394
* @return a FeedItemOperation to create a feed item.
395395
*/
396-
// [START AddAdCustomizer_4]
396+
// [START add_ad_customizer_4]
397397
private FeedItemOperation createFeedItemOperation(
398398
String name,
399399
String price,
@@ -428,7 +428,7 @@ private FeedItemOperation createFeedItemOperation(
428428

429429
return FeedItemOperation.newBuilder().setCreate(feedItem).build();
430430
}
431-
// [END AddAdCustomizer_4]
431+
// [END add_ad_customizer_4]
432432

433433
/**
434434
* Restricts the feed items to work only with a specific ad group; this prevents the feed items
@@ -440,7 +440,7 @@ private FeedItemOperation createFeedItemOperation(
440440
* @param adGroupIds the ad group IDs to bind the feed items to.
441441
* @param feedItemResourceNames the resource names of the feed items.
442442
*/
443-
// [START AddAdCustomizer_5]
443+
// [START add_ad_customizer_5]
444444
private void createFeedItemTargets(
445445
GoogleAdsClient googleAdsClient,
446446
long customerId,
@@ -475,7 +475,7 @@ private void createFeedItemTargets(
475475
}
476476
}
477477
}
478-
// [END AddAdCustomizer_5]
478+
// [END add_ad_customizer_5]
479479

480480
/**
481481
* Creates expanded text ads that use the ad customizer feed to populate the placeholders.
@@ -485,7 +485,7 @@ private void createFeedItemTargets(
485485
* @param adGroupIds the ad group IDs in which to create the ads.
486486
* @param feedName the name of the feed.
487487
*/
488-
// [START AddAdCustomizer_6]
488+
// [START add_ad_customizer_6]
489489
private void createAdsWithCustomizations(
490490
GoogleAdsClient googleAdsClient, long customerId, List<Long> adGroupIds, String feedName) {
491491

@@ -532,5 +532,5 @@ private void createAdsWithCustomizations(
532532
}
533533
}
534534
}
535-
// [END AddAdCustomizer_6]
535+
// [END add_ad_customizer_6]
536536
}

google-ads-examples/src/main/java/com/google/ads/googleads/examples/advancedoperations/AddAdGroupBidModifier.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static void main(String[] args) {
104104
* @param bidModifier the bid modifier value to set
105105
* @throws GoogleAdsException if an API request failed with one or more service errors.
106106
*/
107-
// [START AddAdGroupBidModifier]
107+
// [START add_ad_group_bid_modifier]
108108
private void runExample(
109109
GoogleAdsClient googleAdsClient, long customerId, long adGroupId, double bidModifier) {
110110

@@ -135,5 +135,5 @@ private void runExample(
135135
}
136136
}
137137
}
138-
// [END AddAdGroupBidModifier]
138+
// [END add_ad_group_bid_modifier]
139139
}

google-ads-examples/src/main/java/com/google/ads/googleads/examples/advancedoperations/AddDynamicPageFeed.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ private static void createFeedItems(
363363
* @param feedResourceName the resource name of the feed.
364364
* @param campaignId the campaign ID of the campaign to update.
365365
*/
366-
// [START AddDynamicPageFeed_1]
366+
// [START add_dynamic_page_feed_1]
367367
private static void updateCampaignDsaSetting(
368368
GoogleAdsClient googleAdsClient, long customerId, String feedResourceName, long campaignId) {
369369
// Retrieves the existing dynamic search ads settings for the campaign.
@@ -397,7 +397,7 @@ private static void updateCampaignDsaSetting(
397397
"Updated campaign with resource name '%s'.%n", response.getResults(0).getResourceName());
398398
}
399399
}
400-
// [END AddDynamicPageFeed_1]
400+
// [END add_dynamic_page_feed_1]
401401

402402
/**
403403
* Returns the DSA settings for a campaign. Throws an error if the campaign does not exist or is
@@ -408,7 +408,7 @@ private static void updateCampaignDsaSetting(
408408
* @param campaignId the campaign ID of the campaign to update.
409409
* @return the DSA settings for the campaign.
410410
*/
411-
// [START AddDynamicPageFeed]
411+
// [START add_dynamic_page_feed]
412412
private static DynamicSearchAdsSetting getDsaSetting(
413413
GoogleAdsClient googleAdsClient, long customerId, long campaignId) {
414414
// Creates the query.
@@ -459,7 +459,7 @@ private static DynamicSearchAdsSetting getDsaSetting(
459459
.getDynamicSearchAdsSetting();
460460
}
461461
}
462-
// [END AddDynamicPageFeed]
462+
// [END add_dynamic_page_feed]
463463

464464
/**
465465
* Creates an ad group criterion targeting the DSA label.
@@ -469,7 +469,7 @@ private static DynamicSearchAdsSetting getDsaSetting(
469469
* @param adGroupId the ad group ID.
470470
* @param dsaPageUrlLabel the label for the DSA page URLs.
471471
*/
472-
// [START AddDynamicPageFeed_2]
472+
// [START add_dynamic_page_feed_2]
473473
private static void addDsaTarget(
474474
GoogleAdsClient googleAdsClient, long customerId, long adGroupId, String dsaPageUrlLabel) {
475475
String adGroupResourceName = ResourceNames.adGroup(customerId, adGroupId);
@@ -515,5 +515,5 @@ private static void addDsaTarget(
515515
response.getResults(0).getResourceName());
516516
}
517517
}
518-
// [END AddDynamicPageFeed_2]
518+
// [END add_dynamic_page_feed_2]
519519
}

google-ads-examples/src/main/java/com/google/ads/googleads/examples/advancedoperations/AddDynamicSearchAds.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private static String addCampaignBudget(GoogleAdsClient googleAdsClient, long cu
164164
* @param budgetResourceName the campaign budget resource name.
165165
* @return the campaign resource name.
166166
*/
167-
// [START AddDynamicSearchAds]
167+
// [START add_dynamic_search_ads]
168168
private static String addCampaign(
169169
GoogleAdsClient googleAdsClient, long customerId, String budgetResourceName) {
170170
// Creates the campaign.
@@ -202,7 +202,7 @@ private static String addCampaign(
202202
return campaignResourceName;
203203
}
204204
}
205-
// [END AddDynamicSearchAds]
205+
// [END add_dynamic_search_ads]
206206

207207
/**
208208
* Adds an ad group.
@@ -212,7 +212,7 @@ private static String addCampaign(
212212
* @param campaignResourceName the campaign resource name.
213213
* @return the ad group resource name.
214214
*/
215-
// [START AddDynamicSearchAds_1]
215+
// [START add_dynamic_search_ads_1]
216216
private static String addAdGroup(
217217
GoogleAdsClient googleAdsClient, long customerId, String campaignResourceName) {
218218
// Creates the ad group.
@@ -241,7 +241,7 @@ private static String addAdGroup(
241241
return adGroupResourceName;
242242
}
243243
}
244-
// [END AddDynamicSearchAds_1]
244+
// [END add_dynamic_search_ads_1]
245245

246246
/**
247247
* Adds an expanded dynamic search ad.
@@ -250,7 +250,7 @@ private static String addAdGroup(
250250
* @param customerId the client customer ID.
251251
* @param adGroupResourceName the ad group resource name.
252252
*/
253-
// [START AddDynamicSearchAds_2]
253+
// [START add_dynamic_search_ads_2]
254254
private static void addExpandedDSA(
255255
GoogleAdsClient googleAdsClient, long customerId, String adGroupResourceName) {
256256
// Creates an ad group ad.
@@ -283,7 +283,7 @@ private static void addExpandedDSA(
283283
"Added ad group ad with resource name '%s'.%n", response.getResults(0).getResourceName());
284284
}
285285
}
286-
// [END AddDynamicSearchAds_2]
286+
// [END add_dynamic_search_ads_2]
287287

288288
/**
289289
* Adds webpage targeting criteria for the DSA.

0 commit comments

Comments
 (0)