Class CreativeSetServiceClient
CreativeSetService client wrapper, for convenient use.
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class CreativeSetServiceClient
Remarks
Provides methods for handling CreativeSet objects.
Properties
DefaultEndpoint
The default endpoint for the CreativeSetService service, which is a host of "admanager.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| string |
DefaultScopes
The default CreativeSetService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default CreativeSetService scopes are:
- https://www.googleapis.com/auth/admanager
- https://www.googleapis.com/auth/admanager.readonly
GrpcClient
The underlying gRPC CreativeSetService client
Declaration
public virtual CreativeSetService.CreativeSetServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| CreativeSetService.CreativeSetServiceClient |
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 CreativeSetServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CreativeSetServiceClientBuilder .
Declaration
public static CreativeSetServiceClient Create()
Returns
| Type | Description |
|---|---|
| CreativeSetServiceClient | The created CreativeSetServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a CreativeSetServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CreativeSetServiceClientBuilder .
Declaration
public static Task<CreativeSetServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSetServiceClient> | The task representing the created CreativeSetServiceClient. |
CreateCreativeSet(CreateCreativeSetRequest, CallSettings)
Creates a CreativeSet object.
Declaration
public virtual CreativeSet CreateCreativeSet(CreateCreativeSetRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateCreativeSetRequest | 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 |
|---|---|
| CreativeSet | The RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
CreateCreativeSetRequest request = new CreateCreativeSetRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeSet = new CreativeSet(),
};
// Make the request
CreativeSet response = creativeSetServiceClient.CreateCreativeSet(request);
CreateCreativeSet(NetworkName, CreativeSet, CallSettings)
Creates a CreativeSet object.
Declaration
public virtual CreativeSet CreateCreativeSet(NetworkName parent, CreativeSet creativeSet, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| CreativeSet | creativeSet | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| CreativeSet | The RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
CreativeSet creativeSet = new CreativeSet();
// Make the request
CreativeSet response = creativeSetServiceClient.CreateCreativeSet(parent, creativeSet);
CreateCreativeSet(string, CreativeSet, CallSettings)
Creates a CreativeSet object.
Declaration
public virtual CreativeSet CreateCreativeSet(string parent, CreativeSet creativeSet, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| CreativeSet | creativeSet | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| CreativeSet | The RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
CreativeSet creativeSet = new CreativeSet();
// Make the request
CreativeSet response = creativeSetServiceClient.CreateCreativeSet(parent, creativeSet);
CreateCreativeSetAsync(CreateCreativeSetRequest, CallSettings)
Creates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> CreateCreativeSetAsync(CreateCreativeSetRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateCreativeSetRequest | 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<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateCreativeSetRequest request = new CreateCreativeSetRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeSet = new CreativeSet(),
};
// Make the request
CreativeSet response = await creativeSetServiceClient.CreateCreativeSetAsync(request);
CreateCreativeSetAsync(CreateCreativeSetRequest, CancellationToken)
Creates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> CreateCreativeSetAsync(CreateCreativeSetRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateCreativeSetRequest | 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<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
CreateCreativeSetRequest request = new CreateCreativeSetRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeSet = new CreativeSet(),
};
// Make the request
CreativeSet response = await creativeSetServiceClient.CreateCreativeSetAsync(request);
CreateCreativeSetAsync(NetworkName, CreativeSet, CallSettings)
Creates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> CreateCreativeSetAsync(NetworkName parent, CreativeSet creativeSet, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| CreativeSet | creativeSet | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
CreativeSet creativeSet = new CreativeSet();
// Make the request
CreativeSet response = await creativeSetServiceClient.CreateCreativeSetAsync(parent, creativeSet);
CreateCreativeSetAsync(NetworkName, CreativeSet, CancellationToken)
Creates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> CreateCreativeSetAsync(NetworkName parent, CreativeSet creativeSet, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| CreativeSet | creativeSet | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
CreativeSet creativeSet = new CreativeSet();
// Make the request
CreativeSet response = await creativeSetServiceClient.CreateCreativeSetAsync(parent, creativeSet);
CreateCreativeSetAsync(string, CreativeSet, CallSettings)
Creates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> CreateCreativeSetAsync(string parent, CreativeSet creativeSet, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| CreativeSet | creativeSet | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
CreativeSet creativeSet = new CreativeSet();
// Make the request
CreativeSet response = await creativeSetServiceClient.CreateCreativeSetAsync(parent, creativeSet);
CreateCreativeSetAsync(string, CreativeSet, CancellationToken)
Creates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> CreateCreativeSetAsync(string parent, CreativeSet creativeSet, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| CreativeSet | creativeSet | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
CreativeSet creativeSet = new CreativeSet();
// Make the request
CreativeSet response = await creativeSetServiceClient.CreateCreativeSetAsync(parent, creativeSet);
GetCreativeSet(CreativeSetName, CallSettings)
Retrieves a CreativeSet object.
Declaration
public virtual CreativeSet GetCreativeSet(CreativeSetName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeSetName | name | Required. The resource name of the CreativeSet.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| CreativeSet | The RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
CreativeSetName name = CreativeSetName.FromNetworkCodeCreativeSet("[NETWORK_CODE]", "[CREATIVE_SET]");
// Make the request
CreativeSet response = creativeSetServiceClient.GetCreativeSet(name);
GetCreativeSet(GetCreativeSetRequest, CallSettings)
Retrieves a CreativeSet object.
Declaration
public virtual CreativeSet GetCreativeSet(GetCreativeSetRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetCreativeSetRequest | 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 |
|---|---|
| CreativeSet | The RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
GetCreativeSetRequest request = new GetCreativeSetRequest
{
CreativeSetName = CreativeSetName.FromNetworkCodeCreativeSet("[NETWORK_CODE]", "[CREATIVE_SET]"),
};
// Make the request
CreativeSet response = creativeSetServiceClient.GetCreativeSet(request);
GetCreativeSet(string, CallSettings)
Retrieves a CreativeSet object.
Declaration
public virtual CreativeSet GetCreativeSet(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the CreativeSet.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| CreativeSet | The RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/creativeSets/[CREATIVE_SET]";
// Make the request
CreativeSet response = creativeSetServiceClient.GetCreativeSet(name);
GetCreativeSetAsync(CreativeSetName, CallSettings)
Retrieves a CreativeSet object.
Declaration
public virtual Task<CreativeSet> GetCreativeSetAsync(CreativeSetName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeSetName | name | Required. The resource name of the CreativeSet.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
CreativeSetName name = CreativeSetName.FromNetworkCodeCreativeSet("[NETWORK_CODE]", "[CREATIVE_SET]");
// Make the request
CreativeSet response = await creativeSetServiceClient.GetCreativeSetAsync(name);
GetCreativeSetAsync(CreativeSetName, CancellationToken)
Retrieves a CreativeSet object.
Declaration
public virtual Task<CreativeSet> GetCreativeSetAsync(CreativeSetName name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeSetName | name | Required. The resource name of the CreativeSet.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
CreativeSetName name = CreativeSetName.FromNetworkCodeCreativeSet("[NETWORK_CODE]", "[CREATIVE_SET]");
// Make the request
CreativeSet response = await creativeSetServiceClient.GetCreativeSetAsync(name);
GetCreativeSetAsync(GetCreativeSetRequest, CallSettings)
Retrieves a CreativeSet object.
Declaration
public virtual Task<CreativeSet> GetCreativeSetAsync(GetCreativeSetRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetCreativeSetRequest | 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<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
GetCreativeSetRequest request = new GetCreativeSetRequest
{
CreativeSetName = CreativeSetName.FromNetworkCodeCreativeSet("[NETWORK_CODE]", "[CREATIVE_SET]"),
};
// Make the request
CreativeSet response = await creativeSetServiceClient.GetCreativeSetAsync(request);
GetCreativeSetAsync(GetCreativeSetRequest, CancellationToken)
Retrieves a CreativeSet object.
Declaration
public virtual Task<CreativeSet> GetCreativeSetAsync(GetCreativeSetRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| GetCreativeSetRequest | 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<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
GetCreativeSetRequest request = new GetCreativeSetRequest
{
CreativeSetName = CreativeSetName.FromNetworkCodeCreativeSet("[NETWORK_CODE]", "[CREATIVE_SET]"),
};
// Make the request
CreativeSet response = await creativeSetServiceClient.GetCreativeSetAsync(request);
GetCreativeSetAsync(string, CallSettings)
Retrieves a CreativeSet object.
Declaration
public virtual Task<CreativeSet> GetCreativeSetAsync(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the CreativeSet.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/creativeSets/[CREATIVE_SET]";
// Make the request
CreativeSet response = await creativeSetServiceClient.GetCreativeSetAsync(name);
GetCreativeSetAsync(string, CancellationToken)
Retrieves a CreativeSet object.
Declaration
public virtual Task<CreativeSet> GetCreativeSetAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the CreativeSet.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/creativeSets/[CREATIVE_SET]";
// Make the request
CreativeSet response = await creativeSetServiceClient.GetCreativeSetAsync(name);
ListCreativeSets(ListCreativeSetsRequest, CallSettings)
Lists CreativeSet objects.
Declaration
public virtual PagedEnumerable<ListCreativeSetsResponse, CreativeSet> ListCreativeSets(ListCreativeSetsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListCreativeSetsRequest | 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<ListCreativeSetsResponse, CreativeSet> | A pageable sequence of CreativeSet resources. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
ListCreativeSetsRequest request = new ListCreativeSetsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedEnumerable<ListCreativeSetsResponse, CreativeSet> response = creativeSetServiceClient.ListCreativeSets(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (CreativeSet 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 (ListCreativeSetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (CreativeSet 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<CreativeSet> 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 (CreativeSet 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;
ListCreativeSets(NetworkName, string, int?, CallSettings)
Lists CreativeSet objects.
Declaration
public virtual PagedEnumerable<ListCreativeSetsResponse, CreativeSet> ListCreativeSets(NetworkName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent, which owns this collection of CreativeSets.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListCreativeSetsResponse, CreativeSet> | A pageable sequence of CreativeSet resources. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListCreativeSetsResponse, CreativeSet> response = creativeSetServiceClient.ListCreativeSets(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (CreativeSet 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 (ListCreativeSetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (CreativeSet 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<CreativeSet> 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 (CreativeSet 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;
ListCreativeSets(string, string, int?, CallSettings)
Lists CreativeSet objects.
Declaration
public virtual PagedEnumerable<ListCreativeSetsResponse, CreativeSet> ListCreativeSets(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent, which owns this collection of CreativeSets.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListCreativeSetsResponse, CreativeSet> | A pageable sequence of CreativeSet resources. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListCreativeSetsResponse, CreativeSet> response = creativeSetServiceClient.ListCreativeSets(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (CreativeSet 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 (ListCreativeSetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (CreativeSet 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<CreativeSet> 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 (CreativeSet 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;
ListCreativeSetsAsync(ListCreativeSetsRequest, CallSettings)
Lists CreativeSet objects.
Declaration
public virtual PagedAsyncEnumerable<ListCreativeSetsResponse, CreativeSet> ListCreativeSetsAsync(ListCreativeSetsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListCreativeSetsRequest | 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<ListCreativeSetsResponse, CreativeSet> | A pageable asynchronous sequence of CreativeSet resources. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
ListCreativeSetsRequest request = new ListCreativeSetsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListCreativeSetsResponse, CreativeSet> response = creativeSetServiceClient.ListCreativeSetsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (CreativeSet 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 (ListCreativeSetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (CreativeSet 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<CreativeSet> 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 (CreativeSet 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;
ListCreativeSetsAsync(NetworkName, string, int?, CallSettings)
Lists CreativeSet objects.
Declaration
public virtual PagedAsyncEnumerable<ListCreativeSetsResponse, CreativeSet> ListCreativeSetsAsync(NetworkName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent, which owns this collection of CreativeSets.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListCreativeSetsResponse, CreativeSet> | A pageable asynchronous sequence of CreativeSet resources. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListCreativeSetsResponse, CreativeSet> response = creativeSetServiceClient.ListCreativeSetsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (CreativeSet 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 (ListCreativeSetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (CreativeSet 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<CreativeSet> 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 (CreativeSet 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;
ListCreativeSetsAsync(string, string, int?, CallSettings)
Lists CreativeSet objects.
Declaration
public virtual PagedAsyncEnumerable<ListCreativeSetsResponse, CreativeSet> ListCreativeSetsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent, which owns this collection of CreativeSets.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListCreativeSetsResponse, CreativeSet> | A pageable asynchronous sequence of CreativeSet resources. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListCreativeSetsResponse, CreativeSet> response = creativeSetServiceClient.ListCreativeSetsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (CreativeSet 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 (ListCreativeSetsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (CreativeSet 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<CreativeSet> 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 (CreativeSet 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.
UpdateCreativeSet(CreativeSet, FieldMask, CallSettings)
Updates a CreativeSet object.
Declaration
public virtual CreativeSet UpdateCreativeSet(CreativeSet creativeSet, FieldMask updateMask, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeSet | creativeSet | Required. The The |
| FieldMask | updateMask | Optional. The list of fields to update. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| CreativeSet | The RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
CreativeSet creativeSet = new CreativeSet();
FieldMask updateMask = new FieldMask();
// Make the request
CreativeSet response = creativeSetServiceClient.UpdateCreativeSet(creativeSet, updateMask);
UpdateCreativeSet(UpdateCreativeSetRequest, CallSettings)
Updates a CreativeSet object.
Declaration
public virtual CreativeSet UpdateCreativeSet(UpdateCreativeSetRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateCreativeSetRequest | 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 |
|---|---|
| CreativeSet | The RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = CreativeSetServiceClient.Create();
// Initialize request argument(s)
UpdateCreativeSetRequest request = new UpdateCreativeSetRequest
{
CreativeSet = new CreativeSet(),
UpdateMask = new FieldMask(),
};
// Make the request
CreativeSet response = creativeSetServiceClient.UpdateCreativeSet(request);
UpdateCreativeSetAsync(CreativeSet, FieldMask, CallSettings)
Updates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> UpdateCreativeSetAsync(CreativeSet creativeSet, FieldMask updateMask, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeSet | creativeSet | Required. The The |
| FieldMask | updateMask | Optional. The list of fields to update. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
CreativeSet creativeSet = new CreativeSet();
FieldMask updateMask = new FieldMask();
// Make the request
CreativeSet response = await creativeSetServiceClient.UpdateCreativeSetAsync(creativeSet, updateMask);
UpdateCreativeSetAsync(CreativeSet, FieldMask, CancellationToken)
Updates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> UpdateCreativeSetAsync(CreativeSet creativeSet, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeSet | creativeSet | Required. The The |
| FieldMask | updateMask | Optional. The list of fields to update. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
CreativeSet creativeSet = new CreativeSet();
FieldMask updateMask = new FieldMask();
// Make the request
CreativeSet response = await creativeSetServiceClient.UpdateCreativeSetAsync(creativeSet, updateMask);
UpdateCreativeSetAsync(UpdateCreativeSetRequest, CallSettings)
Updates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> UpdateCreativeSetAsync(UpdateCreativeSetRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateCreativeSetRequest | 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<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCreativeSetRequest request = new UpdateCreativeSetRequest
{
CreativeSet = new CreativeSet(),
UpdateMask = new FieldMask(),
};
// Make the request
CreativeSet response = await creativeSetServiceClient.UpdateCreativeSetAsync(request);
UpdateCreativeSetAsync(UpdateCreativeSetRequest, CancellationToken)
Updates a CreativeSet object.
Declaration
public virtual Task<CreativeSet> UpdateCreativeSetAsync(UpdateCreativeSetRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateCreativeSetRequest | 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<CreativeSet> | A Task containing the RPC response. |
Sample code
// Create client
CreativeSetServiceClient creativeSetServiceClient = await CreativeSetServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCreativeSetRequest request = new UpdateCreativeSetRequest
{
CreativeSet = new CreativeSet(),
UpdateMask = new FieldMask(),
};
// Make the request
CreativeSet response = await creativeSetServiceClient.UpdateCreativeSetAsync(request);