Skip to content

Commit 21487aa

Browse files
authored
Merge pull request #567 from googleads/release-V20.1.0-b064df57c1febf0b45df
Changes for release V20.1.0.
2 parents 3674716 + 60792f3 commit 21487aa

File tree

1,525 files changed

+817129
-1205
lines changed

Some content is hidden

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

1,525 files changed

+817129
-1205
lines changed

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
20.1.0
2+
======
3+
- Added support for version 17.0 of the Google Ads API
4+
- Updated code examples to remove usage of the `PageSize` parameter for `GoogleAdsService.Search`:
5+
* GetAccountHierarchy
6+
* GetChangeSummary
7+
* GetAdGroupBidModifiers
8+
* AuthenticateInAspNetWebApplication
9+
* GetResponsiveSearchAd
10+
* GetAllDisapprovedAds
11+
* UpdateAudienceTargetRestriction
12+
* AddPerformanceMaxProductListingGroupTree
13+
* AddPerformanceMaxRetailCampaign
14+
* AddShoppingProductListingGroupTree
15+
- Removed the NavigateSearchResultPagesCachingTokens example as it is now obsolete
16+
17+
118
20.0.0
219
======
320
- Added support for version 16.1 of the Google Ads API.

Google.Ads.GoogleAds/examples/AccountManagement/CreateCustomer.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V16.Errors;
19-
using Google.Ads.GoogleAds.V16.Resources;
20-
using Google.Ads.GoogleAds.V16.Services;
18+
using Google.Ads.GoogleAds.V17.Errors;
19+
using Google.Ads.GoogleAds.V17.Resources;
20+
using Google.Ads.GoogleAds.V17.Services;
2121
using System;
2222
using System.Collections.Generic;
2323

24-
namespace Google.Ads.GoogleAds.Examples.V16
24+
namespace Google.Ads.GoogleAds.Examples.V17
2525
{
2626
/// <summary>
2727
/// This code example illustrates how to create a new customer under a given manager account.
@@ -76,7 +76,7 @@ public static void Main(string[] args)
7676
public void Run(GoogleAdsClient client, long managerCustomerId)
7777
{
7878
// Get the CustomerService.
79-
CustomerServiceClient customerService = client.GetService(Services.V16.CustomerService);
79+
CustomerServiceClient customerService = client.GetService(Services.V17.CustomerService);
8080

8181
Customer customer = new Customer()
8282
{

Google.Ads.GoogleAds/examples/AccountManagement/GetAccountHierarchy.cs

+6-9
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V16.Resources;
19-
using Google.Ads.GoogleAds.V16.Services;
18+
using Google.Ads.GoogleAds.V17.Resources;
19+
using Google.Ads.GoogleAds.V17.Services;
2020
using Google.Api.Gax;
2121
using System;
2222
using System.Collections.Generic;
2323

24-
namespace Google.Ads.GoogleAds.Examples.V16
24+
namespace Google.Ads.GoogleAds.Examples.V17
2525
{
2626
/// <summary>
2727
/// This example gets the account hierarchy of the specified manager account. If you don't
@@ -70,8 +70,6 @@ public static void Main(string[] args)
7070
options.LoginCustomerId);
7171
}
7272

73-
private const int PAGE_SIZE = 1000;
74-
7573
/// <summary>
7674
/// Returns a description about the code example.
7775
/// </summary>
@@ -99,10 +97,10 @@ public void Run(GoogleAdsClient googleAdsClient, long? managerCustomerId = null,
9997
}
10098

10199
GoogleAdsServiceClient googleAdsServiceClient =
102-
googleAdsClient.GetService(Services.V16.GoogleAdsService);
100+
googleAdsClient.GetService(Services.V17.GoogleAdsService);
103101

104102
CustomerServiceClient customerServiceClient =
105-
googleAdsClient.GetService(Services.V16.CustomerService);
103+
googleAdsClient.GetService(Services.V17.CustomerService);
106104

107105
// List of Customer IDs to handle.
108106
List<long> seedCustomerIds = new List<long>();
@@ -162,8 +160,7 @@ FROM customer_client
162160
PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> response =
163161
googleAdsServiceClient.Search(
164162
managerCustomerId.ToString(),
165-
query,
166-
pageSize: PAGE_SIZE
163+
query
167164
);
168165

169166
// Iterate over all rows in all pages to get all customer clients under the

Google.Ads.GoogleAds/examples/AccountManagement/GetChangeDetails.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.Gax.Util;
1818
using Google.Ads.GoogleAds.Lib;
19-
using Google.Ads.GoogleAds.V16.Errors;
20-
using Google.Ads.GoogleAds.V16.Resources;
21-
using Google.Ads.GoogleAds.V16.Services;
19+
using Google.Ads.GoogleAds.V17.Errors;
20+
using Google.Ads.GoogleAds.V17.Resources;
21+
using Google.Ads.GoogleAds.V17.Services;
2222
using Google.Protobuf;
2323
using System;
2424
using System.Collections.Generic;
25-
using static Google.Ads.GoogleAds.V16.Enums.ChangeEventResourceTypeEnum.Types;
26-
using static Google.Ads.GoogleAds.V16.Enums.ResourceChangeOperationEnum.Types;
27-
using static Google.Ads.GoogleAds.V16.Resources.ChangeEvent.Types;
25+
using static Google.Ads.GoogleAds.V17.Enums.ChangeEventResourceTypeEnum.Types;
26+
using static Google.Ads.GoogleAds.V17.Enums.ResourceChangeOperationEnum.Types;
27+
using static Google.Ads.GoogleAds.V17.Resources.ChangeEvent.Types;
2828

29-
namespace Google.Ads.GoogleAds.Examples.V16
29+
namespace Google.Ads.GoogleAds.Examples.V17
3030
{
3131
/// <summary>
3232
/// This code example gets the changes in an account during the last 25 days.
@@ -76,7 +76,7 @@ public void Run(GoogleAdsClient client, long customerId)
7676
{
7777
// Get the GoogleAdsService.
7878
GoogleAdsServiceClient googleAdsService = client.GetService(
79-
Services.V16.GoogleAdsService);
79+
Services.V17.GoogleAdsService);
8080

8181
// Construct a query to find details for recent changes in your account.
8282
// The LIMIT clause is required for the change_event resource.

Google.Ads.GoogleAds/examples/AccountManagement/GetChangeSummary.cs

+6-13
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V16.Errors;
19-
using Google.Ads.GoogleAds.V16.Services;
18+
using Google.Ads.GoogleAds.V17.Errors;
19+
using Google.Ads.GoogleAds.V17.Services;
2020
using Google.Api.Gax;
2121
using System;
2222
using System.Collections.Generic;
23-
using static Google.Ads.GoogleAds.V16.Enums.ChangeStatusResourceTypeEnum.Types;
23+
using static Google.Ads.GoogleAds.V17.Enums.ChangeStatusResourceTypeEnum.Types;
2424

25-
namespace Google.Ads.GoogleAds.Examples.V16
25+
namespace Google.Ads.GoogleAds.Examples.V17
2626
{
2727
/// <summary>
2828
/// This code example gets a list of which resources have been changed in your account
@@ -57,11 +57,6 @@ public static void Main(string[] args)
5757
options.CustomerId);
5858
}
5959

60-
/// <summary>
61-
/// The page size to be used by default.
62-
/// </summary>
63-
private const int PAGE_SIZE = 1_000;
64-
6560
/// <summary>
6661
/// Returns a description about the code example.
6762
/// </summary>
@@ -78,7 +73,7 @@ public void Run(GoogleAdsClient client, long customerId)
7873
{
7974
// Get the GoogleAdsService.
8075
GoogleAdsServiceClient googleAdsService = client.GetService(
81-
Services.V16.GoogleAdsService);
76+
Services.V17.GoogleAdsService);
8277

8378
string searchQuery = @"
8479
SELECT
@@ -97,11 +92,9 @@ change_status.last_change_date_time DURING LAST_14_DAYS
9792
ORDER BY change_status.last_change_date_time
9893
LIMIT 10000";
9994

100-
// Create a request that will retrieve all changes using pages of the specified
101-
// page size.
95+
// Create a request that will retrieve all changes.
10296
SearchGoogleAdsRequest request = new SearchGoogleAdsRequest()
10397
{
104-
PageSize = PAGE_SIZE,
10598
Query = searchQuery,
10699
CustomerId = customerId.ToString()
107100
};

Google.Ads.GoogleAds/examples/AccountManagement/InviteUserWithAccessRole.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V16.Errors;
19-
using Google.Ads.GoogleAds.V16.Resources;
20-
using Google.Ads.GoogleAds.V16.Services;
18+
using Google.Ads.GoogleAds.V17.Errors;
19+
using Google.Ads.GoogleAds.V17.Resources;
20+
using Google.Ads.GoogleAds.V17.Services;
2121
using System;
2222
using System.Collections.Generic;
23-
using static Google.Ads.GoogleAds.V16.Enums.AccessRoleEnum.Types;
23+
using static Google.Ads.GoogleAds.V17.Enums.AccessRoleEnum.Types;
2424

25-
namespace Google.Ads.GoogleAds.Examples.V16
25+
namespace Google.Ads.GoogleAds.Examples.V17
2626
{
2727
/// <summary>
2828
/// This code example sends an invitation email to a user to manage a customer
@@ -92,7 +92,7 @@ public void Run(GoogleAdsClient client, long customerId, string emailAddress,
9292
{
9393
// Get the CustomerUserAccessInvitationService.
9494
CustomerUserAccessInvitationServiceClient service = client.GetService(
95-
Services.V16.CustomerUserAccessInvitationService);
95+
Services.V17.CustomerUserAccessInvitationService);
9696

9797
// [START invite_user_with_access_role]
9898
MutateCustomerUserAccessInvitationRequest invitationRequest =

Google.Ads.GoogleAds/examples/AccountManagement/LinkManagerToClient.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.Gax.Util;
1818
using Google.Ads.GoogleAds.Lib;
19-
using Google.Ads.GoogleAds.V16.Errors;
20-
using Google.Ads.GoogleAds.V16.Resources;
21-
using Google.Ads.GoogleAds.V16.Services;
19+
using Google.Ads.GoogleAds.V17.Errors;
20+
using Google.Ads.GoogleAds.V17.Resources;
21+
using Google.Ads.GoogleAds.V17.Services;
2222
using System;
2323
using System.Collections.Generic;
2424
using System.Linq;
25-
using static Google.Ads.GoogleAds.V16.Enums.ManagerLinkStatusEnum.Types;
25+
using static Google.Ads.GoogleAds.V17.Enums.ManagerLinkStatusEnum.Types;
2626

27-
namespace Google.Ads.GoogleAds.Examples.V16
27+
namespace Google.Ads.GoogleAds.Examples.V17
2828
{
2929
/// <summary>
3030
/// This code example demonstrates how to link an existing Google Ads manager customer
@@ -124,7 +124,7 @@ private string CreateInvitation(GoogleAdsClient client, long managerCustomerId,
124124
{
125125
// Get the CustomerClientLinkService.
126126
CustomerClientLinkServiceClient customerClientLinkService =
127-
client.GetService(Services.V16.CustomerClientLinkService);
127+
client.GetService(Services.V17.CustomerClientLinkService);
128128

129129
// Create a client with the manager customer ID as login customer ID.
130130
client.Config.LoginCustomerId = managerCustomerId.ToString();
@@ -175,7 +175,7 @@ private string GetManagerLinkResourceName(GoogleAdsClient client, long managerCu
175175
{
176176
// Get the GoogleAdsService.
177177
GoogleAdsServiceClient googleAdsService =
178-
client.GetService(Services.V16.GoogleAdsService);
178+
client.GetService(Services.V17.GoogleAdsService);
179179

180180
// Create a client with the manager customer ID as login customer ID.
181181
client.Config.LoginCustomerId = managerCustomerId.ToString();
@@ -211,7 +211,7 @@ private void AcceptInvitation(GoogleAdsClient client, long clientCustomerId,
211211
{
212212
// Get the CustomerManagerLinkService.
213213
CustomerManagerLinkServiceClient customerManagerLinkService =
214-
client.GetService(Services.V16.CustomerManagerLinkService);
214+
client.GetService(Services.V17.CustomerManagerLinkService);
215215

216216
// Create a client with the client customer ID as login customer ID.
217217
client.Config.LoginCustomerId = clientCustomerId.ToString();

Google.Ads.GoogleAds/examples/AccountManagement/ListAccessibleCustomers.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V16.Errors;
19-
using Google.Ads.GoogleAds.V16.Services;
18+
using Google.Ads.GoogleAds.V17.Errors;
19+
using Google.Ads.GoogleAds.V17.Services;
2020
using System;
2121
using System.Collections.Generic;
2222

23-
namespace Google.Ads.GoogleAds.Examples.V16
23+
namespace Google.Ads.GoogleAds.Examples.V17
2424
{
2525
/// <summary>
2626
/// This code example lists the resource names for the customers that the authenticating user
@@ -70,7 +70,7 @@ public static void Main(string[] args)
7070
public void Run(GoogleAdsClient client)
7171
{
7272
// Get the CustomerService.
73-
CustomerServiceClient customerService = client.GetService(Services.V16.CustomerService);
73+
CustomerServiceClient customerService = client.GetService(Services.V17.CustomerService);
7474

7575
try
7676
{

Google.Ads.GoogleAds/examples/AccountManagement/UpdateUserAccess.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.Gax.Util;
1818
using Google.Ads.GoogleAds.Lib;
19-
using Google.Ads.GoogleAds.V16.Errors;
20-
using Google.Ads.GoogleAds.V16.Resources;
21-
using Google.Ads.GoogleAds.V16.Services;
19+
using Google.Ads.GoogleAds.V17.Errors;
20+
using Google.Ads.GoogleAds.V17.Resources;
21+
using Google.Ads.GoogleAds.V17.Services;
2222
using Google.Api.Gax;
2323
using System;
2424
using System.Collections.Generic;
2525
using System.Linq;
26-
using static Google.Ads.GoogleAds.V16.Enums.AccessRoleEnum.Types;
26+
using static Google.Ads.GoogleAds.V17.Enums.AccessRoleEnum.Types;
2727

28-
namespace Google.Ads.GoogleAds.Examples.V16
28+
namespace Google.Ads.GoogleAds.Examples.V17
2929
{
3030
/// <summary>
3131
/// This code example updates the access role of a user, given the email address.
@@ -131,7 +131,7 @@ public void Run(GoogleAdsClient client, long customerId, string emailAddress,
131131
{
132132
// Get the GoogleAdsService.
133133
GoogleAdsServiceClient googleAdsService = client.GetService(
134-
Services.V16.GoogleAdsService);
134+
Services.V17.GoogleAdsService);
135135

136136
// Create the search query. Use the LIKE query for filtering to ignore the text case
137137
// for email address when searching for a match.
@@ -175,7 +175,7 @@ private void ModifyUserAccess(GoogleAdsClient client, long customerId, long user
175175
{
176176
// Get the CustomerUserAccessService.
177177
CustomerUserAccessServiceClient userAccessService = client.GetService(
178-
Services.V16.CustomerUserAccessService);
178+
Services.V17.CustomerUserAccessService);
179179

180180
// Creates the modified user access.
181181
CustomerUserAccess userAccess = new CustomerUserAccess()

Google.Ads.GoogleAds/examples/AccountManagement/VerifyAdvertiserIdentity.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V16.Errors;
19-
using Google.Ads.GoogleAds.V16.Services;
20-
using static Google.Ads.GoogleAds.V16.Enums.IdentityVerificationProgramEnum.Types;
21-
using static Google.Ads.GoogleAds.V16.Enums.IdentityVerificationProgramStatusEnum.Types;
18+
using Google.Ads.GoogleAds.V17.Errors;
19+
using Google.Ads.GoogleAds.V17.Services;
20+
using static Google.Ads.GoogleAds.V17.Enums.IdentityVerificationProgramEnum.Types;
21+
using static Google.Ads.GoogleAds.V17.Enums.IdentityVerificationProgramStatusEnum.Types;
2222
using System;
2323
using Google.Ads.GoogleAds.Config;
2424
using Google.Ads.GoogleAds.Extensions.Config;
2525

26-
namespace Google.Ads.GoogleAds.Examples.V16
26+
namespace Google.Ads.GoogleAds.Examples.V17
2727
{
2828
/// <summary>
2929
/// This code example illustrates how to retrieve the status of the advertiser identity
@@ -130,7 +130,7 @@ private static IdentityVerification GetIdentityVerification(
130130
GoogleAdsClient client, long customerId)
131131
{
132132
IdentityVerificationServiceClient identityVerificationService =
133-
client.GetService(Services.V16.IdentityVerificationService);
133+
client.GetService(Services.V17.IdentityVerificationService);
134134

135135
try {
136136
GetIdentityVerificationResponse response =
@@ -179,7 +179,7 @@ private static IdentityVerification GetIdentityVerification(
179179
private static void StartIdentityVerification(GoogleAdsClient client, long customerId)
180180
{
181181
IdentityVerificationServiceClient identityVerificationService =
182-
client.GetService(Services.V16.IdentityVerificationService);
182+
client.GetService(Services.V17.IdentityVerificationService);
183183

184184
StartIdentityVerificationRequest request = new StartIdentityVerificationRequest()
185185
{

0 commit comments

Comments
 (0)