Show / Hide Table of Contents

Class UserListServiceClient

UserListService client wrapper, for convenient use.

Inheritance
object
UserListServiceClient
UserListServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Ads.DataManager.V1
Assembly: Google.Ads.DataManager.V1.dll
Syntax
public abstract class UserListServiceClient
Remarks

Service for managing UserList resources.

Properties

DefaultEndpoint

The default endpoint for the UserListService service, which is a host of "datamanager.googleapis.com" and a port of 443.

Declaration
public static string DefaultEndpoint { get; }
Property Value
Type Description
string

DefaultScopes

The default UserListService scopes.

Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type Description
IReadOnlyList<string>
Remarks

The default UserListService scopes are:

  • https://www.googleapis.com/auth/datamanager

GrpcClient

The underlying gRPC UserListService client

Declaration
public virtual UserListService.UserListServiceClient GrpcClient { get; }
Property Value
Type Description
UserListService.UserListServiceClient

ServiceMetadata

The service metadata associated with this client type.

Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type Description
ServiceMetadata

Methods

Create()

Synchronously creates a UserListServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use UserListServiceClientBuilder.

Declaration
public static UserListServiceClient Create()
Returns
Type Description
UserListServiceClient

The created UserListServiceClient.

CreateAsync(CancellationToken)

Asynchronously creates a UserListServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use UserListServiceClientBuilder.

Declaration
public static Task<UserListServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
Task<UserListServiceClient>

The task representing the created UserListServiceClient.

CreateUserList(AccountName, UserList, CallSettings)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual UserList CreateUserList(AccountName parent, UserList userList, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The parent account where this user list will be created. Format: accountTypes/{account_type}/accounts/{account}

UserList userList

Required. The user list to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
UserList

The RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]");
UserList userList = new UserList();
// Make the request
UserList response = userListServiceClient.CreateUserList(parent, userList);

CreateUserList(CreateUserListRequest, CallSettings)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual UserList CreateUserList(CreateUserListRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateUserListRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
UserList

The RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
CreateUserListRequest request = new CreateUserListRequest
{
    ParentAsAccountName = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]"),
    UserList = new UserList(),
    ValidateOnly = false,
};
// Make the request
UserList response = userListServiceClient.CreateUserList(request);

CreateUserList(string, UserList, CallSettings)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual UserList CreateUserList(string parent, UserList userList, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent account where this user list will be created. Format: accountTypes/{account_type}/accounts/{account}

UserList userList

Required. The user list to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
UserList

The RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
string parent = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]";
UserList userList = new UserList();
// Make the request
UserList response = userListServiceClient.CreateUserList(parent, userList);

CreateUserListAsync(AccountName, UserList, CallSettings)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> CreateUserListAsync(AccountName parent, UserList userList, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The parent account where this user list will be created. Format: accountTypes/{account_type}/accounts/{account}

UserList userList

Required. The user list to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]");
UserList userList = new UserList();
// Make the request
UserList response = await userListServiceClient.CreateUserListAsync(parent, userList);

CreateUserListAsync(AccountName, UserList, CancellationToken)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> CreateUserListAsync(AccountName parent, UserList userList, CancellationToken cancellationToken)
Parameters
Type Name Description
AccountName parent

Required. The parent account where this user list will be created. Format: accountTypes/{account_type}/accounts/{account}

UserList userList

Required. The user list to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]");
UserList userList = new UserList();
// Make the request
UserList response = await userListServiceClient.CreateUserListAsync(parent, userList);

CreateUserListAsync(CreateUserListRequest, CallSettings)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> CreateUserListAsync(CreateUserListRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateUserListRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
CreateUserListRequest request = new CreateUserListRequest
{
    ParentAsAccountName = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]"),
    UserList = new UserList(),
    ValidateOnly = false,
};
// Make the request
UserList response = await userListServiceClient.CreateUserListAsync(request);

CreateUserListAsync(CreateUserListRequest, CancellationToken)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> CreateUserListAsync(CreateUserListRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
CreateUserListRequest request

The request object containing all of the parameters for the API call.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
CreateUserListRequest request = new CreateUserListRequest
{
    ParentAsAccountName = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]"),
    UserList = new UserList(),
    ValidateOnly = false,
};
// Make the request
UserList response = await userListServiceClient.CreateUserListAsync(request);

CreateUserListAsync(string, UserList, CallSettings)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> CreateUserListAsync(string parent, UserList userList, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent account where this user list will be created. Format: accountTypes/{account_type}/accounts/{account}

UserList userList

Required. The user list to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]";
UserList userList = new UserList();
// Make the request
UserList response = await userListServiceClient.CreateUserListAsync(parent, userList);

CreateUserListAsync(string, UserList, CancellationToken)

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> CreateUserListAsync(string parent, UserList userList, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The parent account where this user list will be created. Format: accountTypes/{account_type}/accounts/{account}

UserList userList

Required. The user list to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]";
UserList userList = new UserList();
// Make the request
UserList response = await userListServiceClient.CreateUserListAsync(parent, userList);

DeleteUserList(DeleteUserListRequest, CallSettings)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual void DeleteUserList(DeleteUserListRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
DeleteUserListRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
DeleteUserListRequest request = new DeleteUserListRequest
{
    UserListName = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]"),
    ValidateOnly = false,
};
// Make the request
userListServiceClient.DeleteUserList(request);

DeleteUserList(UserListName, CallSettings)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual void DeleteUserList(UserListName name, CallSettings callSettings = null)
Parameters
Type Name Description
UserListName name

Required. The name of the user list to delete. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
UserListName name = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]");
// Make the request
userListServiceClient.DeleteUserList(name);

DeleteUserList(string, CallSettings)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual void DeleteUserList(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The name of the user list to delete. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
string name = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]/userLists/[USER_LIST]";
// Make the request
userListServiceClient.DeleteUserList(name);

DeleteUserListAsync(DeleteUserListRequest, CallSettings)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task DeleteUserListAsync(DeleteUserListRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
DeleteUserListRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteUserListRequest request = new DeleteUserListRequest
{
    UserListName = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]"),
    ValidateOnly = false,
};
// Make the request
await userListServiceClient.DeleteUserListAsync(request);

DeleteUserListAsync(DeleteUserListRequest, CancellationToken)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task DeleteUserListAsync(DeleteUserListRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
DeleteUserListRequest request

The request object containing all of the parameters for the API call.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteUserListRequest request = new DeleteUserListRequest
{
    UserListName = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]"),
    ValidateOnly = false,
};
// Make the request
await userListServiceClient.DeleteUserListAsync(request);

DeleteUserListAsync(UserListName, CallSettings)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task DeleteUserListAsync(UserListName name, CallSettings callSettings = null)
Parameters
Type Name Description
UserListName name

Required. The name of the user list to delete. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
UserListName name = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]");
// Make the request
await userListServiceClient.DeleteUserListAsync(name);

DeleteUserListAsync(UserListName, CancellationToken)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task DeleteUserListAsync(UserListName name, CancellationToken cancellationToken)
Parameters
Type Name Description
UserListName name

Required. The name of the user list to delete. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
UserListName name = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]");
// Make the request
await userListServiceClient.DeleteUserListAsync(name);

DeleteUserListAsync(string, CallSettings)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task DeleteUserListAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The name of the user list to delete. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]/userLists/[USER_LIST]";
// Make the request
await userListServiceClient.DeleteUserListAsync(name);

DeleteUserListAsync(string, CancellationToken)

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task DeleteUserListAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The name of the user list to delete. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]/userLists/[USER_LIST]";
// Make the request
await userListServiceClient.DeleteUserListAsync(name);

GetUserList(GetUserListRequest, CallSettings)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual UserList GetUserList(GetUserListRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetUserListRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
UserList

The RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
GetUserListRequest request = new GetUserListRequest
{
    UserListName = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]"),
};
// Make the request
UserList response = userListServiceClient.GetUserList(request);

GetUserList(UserListName, CallSettings)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual UserList GetUserList(UserListName name, CallSettings callSettings = null)
Parameters
Type Name Description
UserListName name

Required. The resource name of the UserList to retrieve. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
UserList

The RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
UserListName name = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]");
// Make the request
UserList response = userListServiceClient.GetUserList(name);

GetUserList(string, CallSettings)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual UserList GetUserList(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The resource name of the UserList to retrieve. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
UserList

The RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
string name = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]/userLists/[USER_LIST]";
// Make the request
UserList response = userListServiceClient.GetUserList(name);

GetUserListAsync(GetUserListRequest, CallSettings)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> GetUserListAsync(GetUserListRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetUserListRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
GetUserListRequest request = new GetUserListRequest
{
    UserListName = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]"),
};
// Make the request
UserList response = await userListServiceClient.GetUserListAsync(request);

GetUserListAsync(GetUserListRequest, CancellationToken)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> GetUserListAsync(GetUserListRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetUserListRequest request

The request object containing all of the parameters for the API call.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
GetUserListRequest request = new GetUserListRequest
{
    UserListName = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]"),
};
// Make the request
UserList response = await userListServiceClient.GetUserListAsync(request);

GetUserListAsync(UserListName, CallSettings)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> GetUserListAsync(UserListName name, CallSettings callSettings = null)
Parameters
Type Name Description
UserListName name

Required. The resource name of the UserList to retrieve. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
UserListName name = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]");
// Make the request
UserList response = await userListServiceClient.GetUserListAsync(name);

GetUserListAsync(UserListName, CancellationToken)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> GetUserListAsync(UserListName name, CancellationToken cancellationToken)
Parameters
Type Name Description
UserListName name

Required. The resource name of the UserList to retrieve. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
UserListName name = UserListName.FromAccountTypeAccountUserList("[ACCOUNT_TYPE]", "[ACCOUNT]", "[USER_LIST]");
// Make the request
UserList response = await userListServiceClient.GetUserListAsync(name);

GetUserListAsync(string, CallSettings)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> GetUserListAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The resource name of the UserList to retrieve. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]/userLists/[USER_LIST]";
// Make the request
UserList response = await userListServiceClient.GetUserListAsync(name);

GetUserListAsync(string, CancellationToken)

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> GetUserListAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The resource name of the UserList to retrieve. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]/userLists/[USER_LIST]";
// Make the request
UserList response = await userListServiceClient.GetUserListAsync(name);

ListUserLists(AccountName, string, int?, CallSettings)

Lists UserLists.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual PagedEnumerable<ListUserListsResponse, UserList> ListUserLists(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The parent account which owns this collection of user lists. Format: accountTypes/{account_type}/accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListUserListsResponse, UserList>

A pageable sequence of UserList resources.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]");
// Make the request
PagedEnumerable<ListUserListsResponse, UserList> response = userListServiceClient.ListUserLists(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (UserList item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListUserListsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (UserList item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<UserList> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (UserList item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListUserLists(ListUserListsRequest, CallSettings)

Lists UserLists.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual PagedEnumerable<ListUserListsResponse, UserList> ListUserLists(ListUserListsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListUserListsRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListUserListsResponse, UserList>

A pageable sequence of UserList resources.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
ListUserListsRequest request = new ListUserListsRequest
{
    ParentAsAccountName = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListUserListsResponse, UserList> response = userListServiceClient.ListUserLists(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (UserList item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListUserListsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (UserList item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<UserList> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (UserList item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListUserLists(string, string, int?, CallSettings)

Lists UserLists.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual PagedEnumerable<ListUserListsResponse, UserList> ListUserLists(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent account which owns this collection of user lists. Format: accountTypes/{account_type}/accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerable<ListUserListsResponse, UserList>

A pageable sequence of UserList resources.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
string parent = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListUserListsResponse, UserList> response = userListServiceClient.ListUserLists(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (UserList item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListUserListsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (UserList item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<UserList> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (UserList item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListUserListsAsync(AccountName, string, int?, CallSettings)

Lists UserLists.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual PagedAsyncEnumerable<ListUserListsResponse, UserList> ListUserListsAsync(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
AccountName parent

Required. The parent account which owns this collection of user lists. Format: accountTypes/{account_type}/accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListUserListsResponse, UserList>

A pageable asynchronous sequence of UserList resources.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListUserListsResponse, UserList> response = userListServiceClient.ListUserListsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (UserList item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListUserListsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (UserList item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<UserList> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (UserList item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListUserListsAsync(ListUserListsRequest, CallSettings)

Lists UserLists.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual PagedAsyncEnumerable<ListUserListsResponse, UserList> ListUserListsAsync(ListUserListsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListUserListsRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListUserListsResponse, UserList>

A pageable asynchronous sequence of UserList resources.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
ListUserListsRequest request = new ListUserListsRequest
{
    ParentAsAccountName = AccountName.FromAccountTypeAccount("[ACCOUNT_TYPE]", "[ACCOUNT]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListUserListsResponse, UserList> response = userListServiceClient.ListUserListsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (UserList item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListUserListsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (UserList item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<UserList> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (UserList item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListUserListsAsync(string, string, int?, CallSettings)

Lists UserLists.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual PagedAsyncEnumerable<ListUserListsResponse, UserList> ListUserListsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent account which owns this collection of user lists. Format: accountTypes/{account_type}/accounts/{account}

string pageToken

The token returned from the previous request. A value of null or an empty string retrieves the first page.

int? pageSize

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerable<ListUserListsResponse, UserList>

A pageable asynchronous sequence of UserList resources.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accountTypes/[ACCOUNT_TYPE]/accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListUserListsResponse, UserList> response = userListServiceClient.ListUserListsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (UserList item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListUserListsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (UserList item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<UserList> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (UserList item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateUserList(UpdateUserListRequest, CallSettings)

Updates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual UserList UpdateUserList(UpdateUserListRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateUserListRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
UserList

The RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
UpdateUserListRequest request = new UpdateUserListRequest
{
    UserList = new UserList(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
UserList response = userListServiceClient.UpdateUserList(request);

UpdateUserList(UserList, FieldMask, CallSettings)

Updates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual UserList UpdateUserList(UserList userList, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
UserList userList

Required. The user list to update.

The user list's name field is used to identify the user list to update. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

FieldMask updateMask

Optional. The list of fields to update.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
UserList

The RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = UserListServiceClient.Create();
// Initialize request argument(s)
UserList userList = new UserList();
FieldMask updateMask = new FieldMask();
// Make the request
UserList response = userListServiceClient.UpdateUserList(userList, updateMask);

UpdateUserListAsync(UpdateUserListRequest, CallSettings)

Updates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> UpdateUserListAsync(UpdateUserListRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateUserListRequest request

The request object containing all of the parameters for the API call.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateUserListRequest request = new UpdateUserListRequest
{
    UserList = new UserList(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
UserList response = await userListServiceClient.UpdateUserListAsync(request);

UpdateUserListAsync(UpdateUserListRequest, CancellationToken)

Updates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> UpdateUserListAsync(UpdateUserListRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateUserListRequest request

The request object containing all of the parameters for the API call.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateUserListRequest request = new UpdateUserListRequest
{
    UserList = new UserList(),
    UpdateMask = new FieldMask(),
    ValidateOnly = false,
};
// Make the request
UserList response = await userListServiceClient.UpdateUserListAsync(request);

UpdateUserListAsync(UserList, FieldMask, CallSettings)

Updates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> UpdateUserListAsync(UserList userList, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
UserList userList

Required. The user list to update.

The user list's name field is used to identify the user list to update. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

FieldMask updateMask

Optional. The list of fields to update.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
UserList userList = new UserList();
FieldMask updateMask = new FieldMask();
// Make the request
UserList response = await userListServiceClient.UpdateUserListAsync(userList, updateMask);

UpdateUserListAsync(UserList, FieldMask, CancellationToken)

Updates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

  • login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId}
  • linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}
Declaration
public virtual Task<UserList> UpdateUserListAsync(UserList userList, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
UserList userList

Required. The user list to update.

The user list's name field is used to identify the user list to update. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list}

FieldMask updateMask

Optional. The list of fields to update.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<UserList>

A Task containing the RPC response.

Sample code
// Create client
UserListServiceClient userListServiceClient = await UserListServiceClient.CreateAsync();
// Initialize request argument(s)
UserList userList = new UserList();
FieldMask updateMask = new FieldMask();
// Make the request
UserList response = await userListServiceClient.UpdateUserListAsync(userList, updateMask);
In this article
Back to top Generated by DocFX