Show / Hide Table of Contents

Class LineItemCreativeAssociationServiceClient

LineItemCreativeAssociationService client wrapper, for convenient use.

Inheritance
object
LineItemCreativeAssociationServiceClient
LineItemCreativeAssociationServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class LineItemCreativeAssociationServiceClient
Remarks

Provides methods for handling LineItemCreativeAssociation objects.

Properties

DefaultEndpoint

The default endpoint for the LineItemCreativeAssociationService 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 LineItemCreativeAssociationService scopes.

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

The default LineItemCreativeAssociationService scopes are:

  • https://www.googleapis.com/auth/admanager
  • https://www.googleapis.com/auth/admanager.readonly

GrpcClient

The underlying gRPC LineItemCreativeAssociationService client

Declaration
public virtual LineItemCreativeAssociationService.LineItemCreativeAssociationServiceClient GrpcClient { get; }
Property Value
Type Description
LineItemCreativeAssociationService.LineItemCreativeAssociationServiceClient

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 LineItemCreativeAssociationServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use LineItemCreativeAssociationServiceClientBuilder.

Declaration
public static LineItemCreativeAssociationServiceClient Create()
Returns
Type Description
LineItemCreativeAssociationServiceClient

The created LineItemCreativeAssociationServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<LineItemCreativeAssociationServiceClient>

The task representing the created LineItemCreativeAssociationServiceClient.

GetLineItemCreativeAssociation(GetLineItemCreativeAssociationRequest, CallSettings)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual LineItemCreativeAssociation GetLineItemCreativeAssociation(GetLineItemCreativeAssociationRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetLineItemCreativeAssociationRequest 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
LineItemCreativeAssociation

The RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = LineItemCreativeAssociationServiceClient.Create();
// Initialize request argument(s)
GetLineItemCreativeAssociationRequest request = new GetLineItemCreativeAssociationRequest
{
    LineItemCreativeAssociationName = LineItemCreativeAssociationName.FromNetworkCodeLineItemCreative("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]"),
};
// Make the request
LineItemCreativeAssociation response = lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociation(request);

GetLineItemCreativeAssociation(LineItemCreativeAssociationName, CallSettings)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual LineItemCreativeAssociation GetLineItemCreativeAssociation(LineItemCreativeAssociationName name, CallSettings callSettings = null)
Parameters
Type Name Description
LineItemCreativeAssociationName name

Required. The resource name of the LineItemCreativeAssociation. Format: networks/{network_code}/lineItems/{line_item_id}/creatives/{creative_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LineItemCreativeAssociation

The RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = LineItemCreativeAssociationServiceClient.Create();
// Initialize request argument(s)
LineItemCreativeAssociationName name = LineItemCreativeAssociationName.FromNetworkCodeLineItemCreative("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]");
// Make the request
LineItemCreativeAssociation response = lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociation(name);

GetLineItemCreativeAssociation(string, CallSettings)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual LineItemCreativeAssociation GetLineItemCreativeAssociation(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The resource name of the LineItemCreativeAssociation. Format: networks/{network_code}/lineItems/{line_item_id}/creatives/{creative_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LineItemCreativeAssociation

The RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = LineItemCreativeAssociationServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/lineItems/[LINE_ITEM]/creatives/[CREATIVE]";
// Make the request
LineItemCreativeAssociation response = lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociation(name);

GetLineItemCreativeAssociationAsync(GetLineItemCreativeAssociationRequest, CallSettings)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual Task<LineItemCreativeAssociation> GetLineItemCreativeAssociationAsync(GetLineItemCreativeAssociationRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetLineItemCreativeAssociationRequest 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<LineItemCreativeAssociation>

A Task containing the RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
GetLineItemCreativeAssociationRequest request = new GetLineItemCreativeAssociationRequest
{
    LineItemCreativeAssociationName = LineItemCreativeAssociationName.FromNetworkCodeLineItemCreative("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]"),
};
// Make the request
LineItemCreativeAssociation response = await lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociationAsync(request);

GetLineItemCreativeAssociationAsync(GetLineItemCreativeAssociationRequest, CancellationToken)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual Task<LineItemCreativeAssociation> GetLineItemCreativeAssociationAsync(GetLineItemCreativeAssociationRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetLineItemCreativeAssociationRequest 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<LineItemCreativeAssociation>

A Task containing the RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
GetLineItemCreativeAssociationRequest request = new GetLineItemCreativeAssociationRequest
{
    LineItemCreativeAssociationName = LineItemCreativeAssociationName.FromNetworkCodeLineItemCreative("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]"),
};
// Make the request
LineItemCreativeAssociation response = await lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociationAsync(request);

GetLineItemCreativeAssociationAsync(LineItemCreativeAssociationName, CallSettings)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual Task<LineItemCreativeAssociation> GetLineItemCreativeAssociationAsync(LineItemCreativeAssociationName name, CallSettings callSettings = null)
Parameters
Type Name Description
LineItemCreativeAssociationName name

Required. The resource name of the LineItemCreativeAssociation. Format: networks/{network_code}/lineItems/{line_item_id}/creatives/{creative_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<LineItemCreativeAssociation>

A Task containing the RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
LineItemCreativeAssociationName name = LineItemCreativeAssociationName.FromNetworkCodeLineItemCreative("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]");
// Make the request
LineItemCreativeAssociation response = await lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociationAsync(name);

GetLineItemCreativeAssociationAsync(LineItemCreativeAssociationName, CancellationToken)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual Task<LineItemCreativeAssociation> GetLineItemCreativeAssociationAsync(LineItemCreativeAssociationName name, CancellationToken cancellationToken)
Parameters
Type Name Description
LineItemCreativeAssociationName name

Required. The resource name of the LineItemCreativeAssociation. Format: networks/{network_code}/lineItems/{line_item_id}/creatives/{creative_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<LineItemCreativeAssociation>

A Task containing the RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
LineItemCreativeAssociationName name = LineItemCreativeAssociationName.FromNetworkCodeLineItemCreative("[NETWORK_CODE]", "[LINE_ITEM]", "[CREATIVE]");
// Make the request
LineItemCreativeAssociation response = await lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociationAsync(name);

GetLineItemCreativeAssociationAsync(string, CallSettings)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual Task<LineItemCreativeAssociation> GetLineItemCreativeAssociationAsync(string name, CallSettings callSettings = null)
Parameters
Type Name Description
string name

Required. The resource name of the LineItemCreativeAssociation. Format: networks/{network_code}/lineItems/{line_item_id}/creatives/{creative_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<LineItemCreativeAssociation>

A Task containing the RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/lineItems/[LINE_ITEM]/creatives/[CREATIVE]";
// Make the request
LineItemCreativeAssociation response = await lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociationAsync(name);

GetLineItemCreativeAssociationAsync(string, CancellationToken)

Retrieves a LineItemCreativeAssociation object.

Declaration
public virtual Task<LineItemCreativeAssociation> GetLineItemCreativeAssociationAsync(string name, CancellationToken cancellationToken)
Parameters
Type Name Description
string name

Required. The resource name of the LineItemCreativeAssociation. Format: networks/{network_code}/lineItems/{line_item_id}/creatives/{creative_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<LineItemCreativeAssociation>

A Task containing the RPC response.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/lineItems/[LINE_ITEM]/creatives/[CREATIVE]";
// Make the request
LineItemCreativeAssociation response = await lineItemCreativeAssociationServiceClient.GetLineItemCreativeAssociationAsync(name);

ListLineItemCreativeAssociations(LineItemName, string, int?, CallSettings)

Lists LineItemCreativeAssociation objects.

Declaration
public virtual PagedEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> ListLineItemCreativeAssociations(LineItemName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
LineItemName parent

Required. The parent, which owns this collection of LineItemCreativeAssociations. This request supports using the "-" character as a wildcard for resources that span across multiple LineItem parents. Format: networks/{network_code}/lineItems/{line_item_id} Format: networks/{network_code}/lineItems/-

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<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation>

A pageable sequence of LineItemCreativeAssociation resources.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = LineItemCreativeAssociationServiceClient.Create();
// Initialize request argument(s)
LineItemName parent = LineItemName.FromNetworkCodeLineItem("[NETWORK_CODE]", "[LINE_ITEM]");
// Make the request
PagedEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> response = lineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (LineItemCreativeAssociation 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 (ListLineItemCreativeAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (LineItemCreativeAssociation 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<LineItemCreativeAssociation> 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 (LineItemCreativeAssociation 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;

ListLineItemCreativeAssociations(ListLineItemCreativeAssociationsRequest, CallSettings)

Lists LineItemCreativeAssociation objects.

Declaration
public virtual PagedEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> ListLineItemCreativeAssociations(ListLineItemCreativeAssociationsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListLineItemCreativeAssociationsRequest 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<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation>

A pageable sequence of LineItemCreativeAssociation resources.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = LineItemCreativeAssociationServiceClient.Create();
// Initialize request argument(s)
ListLineItemCreativeAssociationsRequest request = new ListLineItemCreativeAssociationsRequest
{
    ParentAsLineItemName = LineItemName.FromNetworkCodeLineItem("[NETWORK_CODE]", "[LINE_ITEM]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> response = lineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociations(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (LineItemCreativeAssociation 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 (ListLineItemCreativeAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (LineItemCreativeAssociation 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<LineItemCreativeAssociation> 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 (LineItemCreativeAssociation 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;

ListLineItemCreativeAssociations(string, string, int?, CallSettings)

Lists LineItemCreativeAssociation objects.

Declaration
public virtual PagedEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> ListLineItemCreativeAssociations(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 LineItemCreativeAssociations. This request supports using the "-" character as a wildcard for resources that span across multiple LineItem parents. Format: networks/{network_code}/lineItems/{line_item_id} Format: networks/{network_code}/lineItems/-

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<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation>

A pageable sequence of LineItemCreativeAssociation resources.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = LineItemCreativeAssociationServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]/lineItems/[LINE_ITEM]";
// Make the request
PagedEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> response = lineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (LineItemCreativeAssociation 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 (ListLineItemCreativeAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (LineItemCreativeAssociation 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<LineItemCreativeAssociation> 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 (LineItemCreativeAssociation 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;

ListLineItemCreativeAssociationsAsync(LineItemName, string, int?, CallSettings)

Lists LineItemCreativeAssociation objects.

Declaration
public virtual PagedAsyncEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> ListLineItemCreativeAssociationsAsync(LineItemName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
LineItemName parent

Required. The parent, which owns this collection of LineItemCreativeAssociations. This request supports using the "-" character as a wildcard for resources that span across multiple LineItem parents. Format: networks/{network_code}/lineItems/{line_item_id} Format: networks/{network_code}/lineItems/-

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<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation>

A pageable asynchronous sequence of LineItemCreativeAssociation resources.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
LineItemName parent = LineItemName.FromNetworkCodeLineItem("[NETWORK_CODE]", "[LINE_ITEM]");
// Make the request
PagedAsyncEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> response = lineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (LineItemCreativeAssociation 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 (ListLineItemCreativeAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (LineItemCreativeAssociation 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<LineItemCreativeAssociation> 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 (LineItemCreativeAssociation 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;

ListLineItemCreativeAssociationsAsync(ListLineItemCreativeAssociationsRequest, CallSettings)

Lists LineItemCreativeAssociation objects.

Declaration
public virtual PagedAsyncEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> ListLineItemCreativeAssociationsAsync(ListLineItemCreativeAssociationsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListLineItemCreativeAssociationsRequest 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<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation>

A pageable asynchronous sequence of LineItemCreativeAssociation resources.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
ListLineItemCreativeAssociationsRequest request = new ListLineItemCreativeAssociationsRequest
{
    ParentAsLineItemName = LineItemName.FromNetworkCodeLineItem("[NETWORK_CODE]", "[LINE_ITEM]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> response = lineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (LineItemCreativeAssociation 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 (ListLineItemCreativeAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (LineItemCreativeAssociation 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<LineItemCreativeAssociation> 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 (LineItemCreativeAssociation 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;

ListLineItemCreativeAssociationsAsync(string, string, int?, CallSettings)

Lists LineItemCreativeAssociation objects.

Declaration
public virtual PagedAsyncEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> ListLineItemCreativeAssociationsAsync(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 LineItemCreativeAssociations. This request supports using the "-" character as a wildcard for resources that span across multiple LineItem parents. Format: networks/{network_code}/lineItems/{line_item_id} Format: networks/{network_code}/lineItems/-

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<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation>

A pageable asynchronous sequence of LineItemCreativeAssociation resources.

Sample code
// Create client
LineItemCreativeAssociationServiceClient lineItemCreativeAssociationServiceClient = await LineItemCreativeAssociationServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]/lineItems/[LINE_ITEM]";
// Make the request
PagedAsyncEnumerable<ListLineItemCreativeAssociationsResponse, LineItemCreativeAssociation> response = lineItemCreativeAssociationServiceClient.ListLineItemCreativeAssociationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (LineItemCreativeAssociation 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 (ListLineItemCreativeAssociationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (LineItemCreativeAssociation 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<LineItemCreativeAssociation> 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 (LineItemCreativeAssociation 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.

In this article
Back to top Generated by DocFX