Show / Hide Table of Contents

Class AudienceSegmentServiceClient

AudienceSegmentService client wrapper, for convenient use.

Inheritance
object
AudienceSegmentServiceClient
AudienceSegmentServiceClientImpl
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 AudienceSegmentServiceClient
Remarks

Provides methods for handling AudienceSegment objects.

Properties

DefaultEndpoint

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

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

The default AudienceSegmentService scopes are:

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

GrpcClient

The underlying gRPC AudienceSegmentService client

Declaration
public virtual AudienceSegmentService.AudienceSegmentServiceClient GrpcClient { get; }
Property Value
Type Description
AudienceSegmentService.AudienceSegmentServiceClient

ServiceMetadata

The service metadata associated with this client type.

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

Methods

BatchActivateAudienceSegments(BatchActivateAudienceSegmentsRequest, CallSettings)

Activates AudienceSegment objects.

Declaration
public virtual BatchActivateAudienceSegmentsResponse BatchActivateAudienceSegments(BatchActivateAudienceSegmentsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchActivateAudienceSegmentsRequest 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
BatchActivateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
BatchActivateAudienceSegmentsRequest request = new BatchActivateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchActivateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchActivateAudienceSegments(request);

BatchActivateAudienceSegments(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Activates AudienceSegment objects.

Declaration
public virtual BatchActivateAudienceSegmentsResponse BatchActivateAudienceSegments(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchActivateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchActivateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchActivateAudienceSegments(parent, names);

BatchActivateAudienceSegments(string, IEnumerable<string>, CallSettings)

Activates AudienceSegment objects.

Declaration
public virtual BatchActivateAudienceSegmentsResponse BatchActivateAudienceSegments(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchActivateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchActivateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchActivateAudienceSegments(parent, names);

BatchActivateAudienceSegmentsAsync(BatchActivateAudienceSegmentsRequest, CallSettings)

Activates AudienceSegment objects.

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

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateAudienceSegmentsRequest request = new BatchActivateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchActivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchActivateAudienceSegmentsAsync(request);

BatchActivateAudienceSegmentsAsync(BatchActivateAudienceSegmentsRequest, CancellationToken)

Activates AudienceSegment objects.

Declaration
public virtual Task<BatchActivateAudienceSegmentsResponse> BatchActivateAudienceSegmentsAsync(BatchActivateAudienceSegmentsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchActivateAudienceSegmentsRequest 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<BatchActivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateAudienceSegmentsRequest request = new BatchActivateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchActivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchActivateAudienceSegmentsAsync(request);

BatchActivateAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Activates AudienceSegment objects.

Declaration
public virtual Task<BatchActivateAudienceSegmentsResponse> BatchActivateAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchActivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchActivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchActivateAudienceSegmentsAsync(parent, names);

BatchActivateAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CancellationToken)

Activates AudienceSegment objects.

Declaration
public virtual Task<BatchActivateAudienceSegmentsResponse> BatchActivateAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchActivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchActivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchActivateAudienceSegmentsAsync(parent, names);

BatchActivateAudienceSegmentsAsync(string, IEnumerable<string>, CallSettings)

Activates AudienceSegment objects.

Declaration
public virtual Task<BatchActivateAudienceSegmentsResponse> BatchActivateAudienceSegmentsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchActivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchActivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchActivateAudienceSegmentsAsync(parent, names);

BatchActivateAudienceSegmentsAsync(string, IEnumerable<string>, CancellationToken)

Activates AudienceSegment objects.

Declaration
public virtual Task<BatchActivateAudienceSegmentsResponse> BatchActivateAudienceSegmentsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchActivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchActivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchActivateAudienceSegmentsAsync(parent, names);

BatchApproveAudienceSegments(BatchApproveAudienceSegmentsRequest, CallSettings)

Approves AudienceSegment objects.

Declaration
public virtual BatchApproveAudienceSegmentsResponse BatchApproveAudienceSegments(BatchApproveAudienceSegmentsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchApproveAudienceSegmentsRequest 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
BatchApproveAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
BatchApproveAudienceSegmentsRequest request = new BatchApproveAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchApproveAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchApproveAudienceSegments(request);

BatchApproveAudienceSegments(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Approves AudienceSegment objects.

Declaration
public virtual BatchApproveAudienceSegmentsResponse BatchApproveAudienceSegments(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchApproveAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchApproveAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchApproveAudienceSegments(parent, names);

BatchApproveAudienceSegments(string, IEnumerable<string>, CallSettings)

Approves AudienceSegment objects.

Declaration
public virtual BatchApproveAudienceSegmentsResponse BatchApproveAudienceSegments(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchApproveAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchApproveAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchApproveAudienceSegments(parent, names);

BatchApproveAudienceSegmentsAsync(BatchApproveAudienceSegmentsRequest, CallSettings)

Approves AudienceSegment objects.

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

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchApproveAudienceSegmentsRequest request = new BatchApproveAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchApproveAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchApproveAudienceSegmentsAsync(request);

BatchApproveAudienceSegmentsAsync(BatchApproveAudienceSegmentsRequest, CancellationToken)

Approves AudienceSegment objects.

Declaration
public virtual Task<BatchApproveAudienceSegmentsResponse> BatchApproveAudienceSegmentsAsync(BatchApproveAudienceSegmentsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchApproveAudienceSegmentsRequest 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<BatchApproveAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchApproveAudienceSegmentsRequest request = new BatchApproveAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchApproveAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchApproveAudienceSegmentsAsync(request);

BatchApproveAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Approves AudienceSegment objects.

Declaration
public virtual Task<BatchApproveAudienceSegmentsResponse> BatchApproveAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchApproveAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchApproveAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchApproveAudienceSegmentsAsync(parent, names);

BatchApproveAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CancellationToken)

Approves AudienceSegment objects.

Declaration
public virtual Task<BatchApproveAudienceSegmentsResponse> BatchApproveAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchApproveAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchApproveAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchApproveAudienceSegmentsAsync(parent, names);

BatchApproveAudienceSegmentsAsync(string, IEnumerable<string>, CallSettings)

Approves AudienceSegment objects.

Declaration
public virtual Task<BatchApproveAudienceSegmentsResponse> BatchApproveAudienceSegmentsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchApproveAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchApproveAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchApproveAudienceSegmentsAsync(parent, names);

BatchApproveAudienceSegmentsAsync(string, IEnumerable<string>, CancellationToken)

Approves AudienceSegment objects.

Declaration
public virtual Task<BatchApproveAudienceSegmentsResponse> BatchApproveAudienceSegmentsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchApproveAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchApproveAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchApproveAudienceSegmentsAsync(parent, names);

BatchCreateAudienceSegments(BatchCreateAudienceSegmentsRequest, CallSettings)

Creates AudienceSegment objects.

Declaration
public virtual BatchCreateAudienceSegmentsResponse BatchCreateAudienceSegments(BatchCreateAudienceSegmentsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchCreateAudienceSegmentsRequest 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
BatchCreateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
BatchCreateAudienceSegmentsRequest request = new BatchCreateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateAudienceSegmentRequest(),
    },
};
// Make the request
BatchCreateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchCreateAudienceSegments(request);

BatchCreateAudienceSegments(NetworkName, IEnumerable<CreateAudienceSegmentRequest>, CallSettings)

Creates AudienceSegment objects.

Declaration
public virtual BatchCreateAudienceSegmentsResponse BatchCreateAudienceSegments(NetworkName parent, IEnumerable<CreateAudienceSegmentRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where AudienceSegments will be created. Format: networks/{network_code} The parent field in the CreateAudienceSegmentRequest must match this field.

IEnumerable<CreateAudienceSegmentRequest> requests

Required. The AudienceSegment objects to create. A maximum of 100 objects can be created in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchCreateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateAudienceSegmentRequest> requests = new CreateAudienceSegmentRequest[]
{
    new CreateAudienceSegmentRequest(),
};
// Make the request
BatchCreateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchCreateAudienceSegments(parent, requests);

BatchCreateAudienceSegments(string, IEnumerable<CreateAudienceSegmentRequest>, CallSettings)

Creates AudienceSegment objects.

Declaration
public virtual BatchCreateAudienceSegmentsResponse BatchCreateAudienceSegments(string parent, IEnumerable<CreateAudienceSegmentRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where AudienceSegments will be created. Format: networks/{network_code} The parent field in the CreateAudienceSegmentRequest must match this field.

IEnumerable<CreateAudienceSegmentRequest> requests

Required. The AudienceSegment objects to create. A maximum of 100 objects can be created in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchCreateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateAudienceSegmentRequest> requests = new CreateAudienceSegmentRequest[]
{
    new CreateAudienceSegmentRequest(),
};
// Make the request
BatchCreateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchCreateAudienceSegments(parent, requests);

BatchCreateAudienceSegmentsAsync(BatchCreateAudienceSegmentsRequest, CallSettings)

Creates AudienceSegment objects.

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

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateAudienceSegmentsRequest request = new BatchCreateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateAudienceSegmentRequest(),
    },
};
// Make the request
BatchCreateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchCreateAudienceSegmentsAsync(request);

BatchCreateAudienceSegmentsAsync(BatchCreateAudienceSegmentsRequest, CancellationToken)

Creates AudienceSegment objects.

Declaration
public virtual Task<BatchCreateAudienceSegmentsResponse> BatchCreateAudienceSegmentsAsync(BatchCreateAudienceSegmentsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchCreateAudienceSegmentsRequest 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<BatchCreateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateAudienceSegmentsRequest request = new BatchCreateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateAudienceSegmentRequest(),
    },
};
// Make the request
BatchCreateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchCreateAudienceSegmentsAsync(request);

BatchCreateAudienceSegmentsAsync(NetworkName, IEnumerable<CreateAudienceSegmentRequest>, CallSettings)

Creates AudienceSegment objects.

Declaration
public virtual Task<BatchCreateAudienceSegmentsResponse> BatchCreateAudienceSegmentsAsync(NetworkName parent, IEnumerable<CreateAudienceSegmentRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where AudienceSegments will be created. Format: networks/{network_code} The parent field in the CreateAudienceSegmentRequest must match this field.

IEnumerable<CreateAudienceSegmentRequest> requests

Required. The AudienceSegment objects to create. A maximum of 100 objects can be created in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchCreateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateAudienceSegmentRequest> requests = new CreateAudienceSegmentRequest[]
{
    new CreateAudienceSegmentRequest(),
};
// Make the request
BatchCreateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchCreateAudienceSegmentsAsync(parent, requests);

BatchCreateAudienceSegmentsAsync(NetworkName, IEnumerable<CreateAudienceSegmentRequest>, CancellationToken)

Creates AudienceSegment objects.

Declaration
public virtual Task<BatchCreateAudienceSegmentsResponse> BatchCreateAudienceSegmentsAsync(NetworkName parent, IEnumerable<CreateAudienceSegmentRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where AudienceSegments will be created. Format: networks/{network_code} The parent field in the CreateAudienceSegmentRequest must match this field.

IEnumerable<CreateAudienceSegmentRequest> requests

Required. The AudienceSegment objects to create. A maximum of 100 objects can be created in a batch.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchCreateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateAudienceSegmentRequest> requests = new CreateAudienceSegmentRequest[]
{
    new CreateAudienceSegmentRequest(),
};
// Make the request
BatchCreateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchCreateAudienceSegmentsAsync(parent, requests);

BatchCreateAudienceSegmentsAsync(string, IEnumerable<CreateAudienceSegmentRequest>, CallSettings)

Creates AudienceSegment objects.

Declaration
public virtual Task<BatchCreateAudienceSegmentsResponse> BatchCreateAudienceSegmentsAsync(string parent, IEnumerable<CreateAudienceSegmentRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where AudienceSegments will be created. Format: networks/{network_code} The parent field in the CreateAudienceSegmentRequest must match this field.

IEnumerable<CreateAudienceSegmentRequest> requests

Required. The AudienceSegment objects to create. A maximum of 100 objects can be created in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchCreateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateAudienceSegmentRequest> requests = new CreateAudienceSegmentRequest[]
{
    new CreateAudienceSegmentRequest(),
};
// Make the request
BatchCreateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchCreateAudienceSegmentsAsync(parent, requests);

BatchCreateAudienceSegmentsAsync(string, IEnumerable<CreateAudienceSegmentRequest>, CancellationToken)

Creates AudienceSegment objects.

Declaration
public virtual Task<BatchCreateAudienceSegmentsResponse> BatchCreateAudienceSegmentsAsync(string parent, IEnumerable<CreateAudienceSegmentRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The parent resource where AudienceSegments will be created. Format: networks/{network_code} The parent field in the CreateAudienceSegmentRequest must match this field.

IEnumerable<CreateAudienceSegmentRequest> requests

Required. The AudienceSegment objects to create. A maximum of 100 objects can be created in a batch.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchCreateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateAudienceSegmentRequest> requests = new CreateAudienceSegmentRequest[]
{
    new CreateAudienceSegmentRequest(),
};
// Make the request
BatchCreateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchCreateAudienceSegmentsAsync(parent, requests);

BatchDeactivateAudienceSegments(BatchDeactivateAudienceSegmentsRequest, CallSettings)

Deactivates AudienceSegment objects.

Declaration
public virtual BatchDeactivateAudienceSegmentsResponse BatchDeactivateAudienceSegments(BatchDeactivateAudienceSegmentsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchDeactivateAudienceSegmentsRequest 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
BatchDeactivateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
BatchDeactivateAudienceSegmentsRequest request = new BatchDeactivateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchDeactivateAudienceSegments(request);

BatchDeactivateAudienceSegments(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Deactivates AudienceSegment objects.

Declaration
public virtual BatchDeactivateAudienceSegmentsResponse BatchDeactivateAudienceSegments(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchDeactivateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchDeactivateAudienceSegments(parent, names);

BatchDeactivateAudienceSegments(string, IEnumerable<string>, CallSettings)

Deactivates AudienceSegment objects.

Declaration
public virtual BatchDeactivateAudienceSegmentsResponse BatchDeactivateAudienceSegments(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchDeactivateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchDeactivateAudienceSegments(parent, names);

BatchDeactivateAudienceSegmentsAsync(BatchDeactivateAudienceSegmentsRequest, CallSettings)

Deactivates AudienceSegment objects.

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

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateAudienceSegmentsRequest request = new BatchDeactivateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchDeactivateAudienceSegmentsAsync(request);

BatchDeactivateAudienceSegmentsAsync(BatchDeactivateAudienceSegmentsRequest, CancellationToken)

Deactivates AudienceSegment objects.

Declaration
public virtual Task<BatchDeactivateAudienceSegmentsResponse> BatchDeactivateAudienceSegmentsAsync(BatchDeactivateAudienceSegmentsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchDeactivateAudienceSegmentsRequest 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<BatchDeactivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateAudienceSegmentsRequest request = new BatchDeactivateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchDeactivateAudienceSegmentsAsync(request);

BatchDeactivateAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Deactivates AudienceSegment objects.

Declaration
public virtual Task<BatchDeactivateAudienceSegmentsResponse> BatchDeactivateAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchDeactivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchDeactivateAudienceSegmentsAsync(parent, names);

BatchDeactivateAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CancellationToken)

Deactivates AudienceSegment objects.

Declaration
public virtual Task<BatchDeactivateAudienceSegmentsResponse> BatchDeactivateAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchDeactivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchDeactivateAudienceSegmentsAsync(parent, names);

BatchDeactivateAudienceSegmentsAsync(string, IEnumerable<string>, CallSettings)

Deactivates AudienceSegment objects.

Declaration
public virtual Task<BatchDeactivateAudienceSegmentsResponse> BatchDeactivateAudienceSegmentsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchDeactivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchDeactivateAudienceSegmentsAsync(parent, names);

BatchDeactivateAudienceSegmentsAsync(string, IEnumerable<string>, CancellationToken)

Deactivates AudienceSegment objects.

Declaration
public virtual Task<BatchDeactivateAudienceSegmentsResponse> BatchDeactivateAudienceSegmentsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchDeactivateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchDeactivateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchDeactivateAudienceSegmentsAsync(parent, names);

BatchPopulateAudienceSegments(BatchPopulateAudienceSegmentsRequest, CallSettings)

Populates AudienceSegment objects.

Declaration
public virtual BatchPopulateAudienceSegmentsResponse BatchPopulateAudienceSegments(BatchPopulateAudienceSegmentsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchPopulateAudienceSegmentsRequest 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
BatchPopulateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
BatchPopulateAudienceSegmentsRequest request = new BatchPopulateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchPopulateAudienceSegments(request);

BatchPopulateAudienceSegments(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Populates AudienceSegment objects.

Declaration
public virtual BatchPopulateAudienceSegmentsResponse BatchPopulateAudienceSegments(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchPopulateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchPopulateAudienceSegments(parent, names);

BatchPopulateAudienceSegments(string, IEnumerable<string>, CallSettings)

Populates AudienceSegment objects.

Declaration
public virtual BatchPopulateAudienceSegmentsResponse BatchPopulateAudienceSegments(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchPopulateAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchPopulateAudienceSegments(parent, names);

BatchPopulateAudienceSegmentsAsync(BatchPopulateAudienceSegmentsRequest, CallSettings)

Populates AudienceSegment objects.

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

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchPopulateAudienceSegmentsRequest request = new BatchPopulateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchPopulateAudienceSegmentsAsync(request);

BatchPopulateAudienceSegmentsAsync(BatchPopulateAudienceSegmentsRequest, CancellationToken)

Populates AudienceSegment objects.

Declaration
public virtual Task<BatchPopulateAudienceSegmentsResponse> BatchPopulateAudienceSegmentsAsync(BatchPopulateAudienceSegmentsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchPopulateAudienceSegmentsRequest 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<BatchPopulateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchPopulateAudienceSegmentsRequest request = new BatchPopulateAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchPopulateAudienceSegmentsAsync(request);

BatchPopulateAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Populates AudienceSegment objects.

Declaration
public virtual Task<BatchPopulateAudienceSegmentsResponse> BatchPopulateAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchPopulateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchPopulateAudienceSegmentsAsync(parent, names);

BatchPopulateAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CancellationToken)

Populates AudienceSegment objects.

Declaration
public virtual Task<BatchPopulateAudienceSegmentsResponse> BatchPopulateAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchPopulateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchPopulateAudienceSegmentsAsync(parent, names);

BatchPopulateAudienceSegmentsAsync(string, IEnumerable<string>, CallSettings)

Populates AudienceSegment objects.

Declaration
public virtual Task<BatchPopulateAudienceSegmentsResponse> BatchPopulateAudienceSegmentsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchPopulateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchPopulateAudienceSegmentsAsync(parent, names);

BatchPopulateAudienceSegmentsAsync(string, IEnumerable<string>, CancellationToken)

Populates AudienceSegment objects.

Declaration
public virtual Task<BatchPopulateAudienceSegmentsResponse> BatchPopulateAudienceSegmentsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchPopulateAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchPopulateAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchPopulateAudienceSegmentsAsync(parent, names);

BatchRejectAudienceSegments(BatchRejectAudienceSegmentsRequest, CallSettings)

Rejects AudienceSegment objects.

Declaration
public virtual BatchRejectAudienceSegmentsResponse BatchRejectAudienceSegments(BatchRejectAudienceSegmentsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchRejectAudienceSegmentsRequest 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
BatchRejectAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
BatchRejectAudienceSegmentsRequest request = new BatchRejectAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchRejectAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchRejectAudienceSegments(request);

BatchRejectAudienceSegments(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Rejects AudienceSegment objects.

Declaration
public virtual BatchRejectAudienceSegmentsResponse BatchRejectAudienceSegments(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchRejectAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchRejectAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchRejectAudienceSegments(parent, names);

BatchRejectAudienceSegments(string, IEnumerable<string>, CallSettings)

Rejects AudienceSegment objects.

Declaration
public virtual BatchRejectAudienceSegmentsResponse BatchRejectAudienceSegments(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchRejectAudienceSegmentsResponse

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchRejectAudienceSegmentsResponse response = audienceSegmentServiceClient.BatchRejectAudienceSegments(parent, names);

BatchRejectAudienceSegmentsAsync(BatchRejectAudienceSegmentsRequest, CallSettings)

Rejects AudienceSegment objects.

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

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchRejectAudienceSegmentsRequest request = new BatchRejectAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchRejectAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchRejectAudienceSegmentsAsync(request);

BatchRejectAudienceSegmentsAsync(BatchRejectAudienceSegmentsRequest, CancellationToken)

Rejects AudienceSegment objects.

Declaration
public virtual Task<BatchRejectAudienceSegmentsResponse> BatchRejectAudienceSegmentsAsync(BatchRejectAudienceSegmentsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchRejectAudienceSegmentsRequest 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<BatchRejectAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchRejectAudienceSegmentsRequest request = new BatchRejectAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegmentNames =
    {
        AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
    },
};
// Make the request
BatchRejectAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchRejectAudienceSegmentsAsync(request);

BatchRejectAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CallSettings)

Rejects AudienceSegment objects.

Declaration
public virtual Task<BatchRejectAudienceSegmentsResponse> BatchRejectAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchRejectAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchRejectAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchRejectAudienceSegmentsAsync(parent, names);

BatchRejectAudienceSegmentsAsync(NetworkName, IEnumerable<AudienceSegmentName>, CancellationToken)

Rejects AudienceSegment objects.

Declaration
public virtual Task<BatchRejectAudienceSegmentsResponse> BatchRejectAudienceSegmentsAsync(NetworkName parent, IEnumerable<AudienceSegmentName> names, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. Format: networks/{network_code}

IEnumerable<AudienceSegmentName> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchRejectAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<AudienceSegmentName> names = new AudienceSegmentName[]
{
    AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
BatchRejectAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchRejectAudienceSegmentsAsync(parent, names);

BatchRejectAudienceSegmentsAsync(string, IEnumerable<string>, CallSettings)

Rejects AudienceSegment objects.

Declaration
public virtual Task<BatchRejectAudienceSegmentsResponse> BatchRejectAudienceSegmentsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchRejectAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchRejectAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchRejectAudienceSegmentsAsync(parent, names);

BatchRejectAudienceSegmentsAsync(string, IEnumerable<string>, CancellationToken)

Rejects AudienceSegment objects.

Declaration
public virtual Task<BatchRejectAudienceSegmentsResponse> BatchRejectAudienceSegmentsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. Format: networks/{network_code}

IEnumerable<string> names

Required. Resource names for the AudienceSegments. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchRejectAudienceSegmentsResponse>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
    "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]",
};
// Make the request
BatchRejectAudienceSegmentsResponse response = await audienceSegmentServiceClient.BatchRejectAudienceSegmentsAsync(parent, names);

Create()

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

Declaration
public static AudienceSegmentServiceClient Create()
Returns
Type Description
AudienceSegmentServiceClient

The created AudienceSegmentServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<AudienceSegmentServiceClient>

The task representing the created AudienceSegmentServiceClient.

CreateAudienceSegment(CreateAudienceSegmentRequest, CallSettings)

Creates an AudienceSegment object.

Declaration
public virtual AudienceSegment CreateAudienceSegment(CreateAudienceSegmentRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateAudienceSegmentRequest 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
AudienceSegment

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
CreateAudienceSegmentRequest request = new CreateAudienceSegmentRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegment = new AudienceSegment(),
};
// Make the request
AudienceSegment response = audienceSegmentServiceClient.CreateAudienceSegment(request);

CreateAudienceSegment(NetworkName, AudienceSegment, CallSettings)

Creates an AudienceSegment object.

Declaration
public virtual AudienceSegment CreateAudienceSegment(NetworkName parent, AudienceSegment audienceSegment, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where this AudienceSegment will be created. Format: networks/{network_code}

AudienceSegment audienceSegment

Required. The AudienceSegment to create. Only first-party segments can be created.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AudienceSegment

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
AudienceSegment audienceSegment = new AudienceSegment();
// Make the request
AudienceSegment response = audienceSegmentServiceClient.CreateAudienceSegment(parent, audienceSegment);

CreateAudienceSegment(string, AudienceSegment, CallSettings)

Creates an AudienceSegment object.

Declaration
public virtual AudienceSegment CreateAudienceSegment(string parent, AudienceSegment audienceSegment, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where this AudienceSegment will be created. Format: networks/{network_code}

AudienceSegment audienceSegment

Required. The AudienceSegment to create. Only first-party segments can be created.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AudienceSegment

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
AudienceSegment audienceSegment = new AudienceSegment();
// Make the request
AudienceSegment response = audienceSegmentServiceClient.CreateAudienceSegment(parent, audienceSegment);

CreateAudienceSegmentAsync(CreateAudienceSegmentRequest, CallSettings)

Creates an AudienceSegment object.

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

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAudienceSegmentRequest request = new CreateAudienceSegmentRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegment = new AudienceSegment(),
};
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.CreateAudienceSegmentAsync(request);

CreateAudienceSegmentAsync(CreateAudienceSegmentRequest, CancellationToken)

Creates an AudienceSegment object.

Declaration
public virtual Task<AudienceSegment> CreateAudienceSegmentAsync(CreateAudienceSegmentRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
CreateAudienceSegmentRequest 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<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAudienceSegmentRequest request = new CreateAudienceSegmentRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AudienceSegment = new AudienceSegment(),
};
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.CreateAudienceSegmentAsync(request);

CreateAudienceSegmentAsync(NetworkName, AudienceSegment, CallSettings)

Creates an AudienceSegment object.

Declaration
public virtual Task<AudienceSegment> CreateAudienceSegmentAsync(NetworkName parent, AudienceSegment audienceSegment, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where this AudienceSegment will be created. Format: networks/{network_code}

AudienceSegment audienceSegment

Required. The AudienceSegment to create. Only first-party segments can be created.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
AudienceSegment audienceSegment = new AudienceSegment();
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.CreateAudienceSegmentAsync(parent, audienceSegment);

CreateAudienceSegmentAsync(NetworkName, AudienceSegment, CancellationToken)

Creates an AudienceSegment object.

Declaration
public virtual Task<AudienceSegment> CreateAudienceSegmentAsync(NetworkName parent, AudienceSegment audienceSegment, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where this AudienceSegment will be created. Format: networks/{network_code}

AudienceSegment audienceSegment

Required. The AudienceSegment to create. Only first-party segments can be created.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
AudienceSegment audienceSegment = new AudienceSegment();
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.CreateAudienceSegmentAsync(parent, audienceSegment);

CreateAudienceSegmentAsync(string, AudienceSegment, CallSettings)

Creates an AudienceSegment object.

Declaration
public virtual Task<AudienceSegment> CreateAudienceSegmentAsync(string parent, AudienceSegment audienceSegment, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where this AudienceSegment will be created. Format: networks/{network_code}

AudienceSegment audienceSegment

Required. The AudienceSegment to create. Only first-party segments can be created.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
AudienceSegment audienceSegment = new AudienceSegment();
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.CreateAudienceSegmentAsync(parent, audienceSegment);

CreateAudienceSegmentAsync(string, AudienceSegment, CancellationToken)

Creates an AudienceSegment object.

Declaration
public virtual Task<AudienceSegment> CreateAudienceSegmentAsync(string parent, AudienceSegment audienceSegment, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The parent resource where this AudienceSegment will be created. Format: networks/{network_code}

AudienceSegment audienceSegment

Required. The AudienceSegment to create. Only first-party segments can be created.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
AudienceSegment audienceSegment = new AudienceSegment();
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.CreateAudienceSegmentAsync(parent, audienceSegment);

GetAudienceSegment(AudienceSegmentName, CallSettings)

Retrieves an AudienceSegment object.

Declaration
public virtual AudienceSegment GetAudienceSegment(AudienceSegmentName name, CallSettings callSettings = null)
Parameters
Type Name Description
AudienceSegmentName name

Required. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AudienceSegment

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
AudienceSegmentName name = AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]");
// Make the request
AudienceSegment response = audienceSegmentServiceClient.GetAudienceSegment(name);

GetAudienceSegment(GetAudienceSegmentRequest, CallSettings)

Retrieves an AudienceSegment object.

Declaration
public virtual AudienceSegment GetAudienceSegment(GetAudienceSegmentRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetAudienceSegmentRequest 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
AudienceSegment

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
GetAudienceSegmentRequest request = new GetAudienceSegmentRequest
{
    AudienceSegmentName = AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
AudienceSegment response = audienceSegmentServiceClient.GetAudienceSegment(request);

GetAudienceSegment(string, CallSettings)

Retrieves an AudienceSegment object.

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

Required. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AudienceSegment

The RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]";
// Make the request
AudienceSegment response = audienceSegmentServiceClient.GetAudienceSegment(name);

GetAudienceSegmentAsync(AudienceSegmentName, CallSettings)

Retrieves an AudienceSegment object.

Declaration
public virtual Task<AudienceSegment> GetAudienceSegmentAsync(AudienceSegmentName name, CallSettings callSettings = null)
Parameters
Type Name Description
AudienceSegmentName name

Required. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
AudienceSegmentName name = AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]");
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.GetAudienceSegmentAsync(name);

GetAudienceSegmentAsync(AudienceSegmentName, CancellationToken)

Retrieves an AudienceSegment object.

Declaration
public virtual Task<AudienceSegment> GetAudienceSegmentAsync(AudienceSegmentName name, CancellationToken cancellationToken)
Parameters
Type Name Description
AudienceSegmentName name

Required. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
AudienceSegmentName name = AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]");
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.GetAudienceSegmentAsync(name);

GetAudienceSegmentAsync(GetAudienceSegmentRequest, CallSettings)

Retrieves an AudienceSegment object.

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

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
GetAudienceSegmentRequest request = new GetAudienceSegmentRequest
{
    AudienceSegmentName = AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.GetAudienceSegmentAsync(request);

GetAudienceSegmentAsync(GetAudienceSegmentRequest, CancellationToken)

Retrieves an AudienceSegment object.

Declaration
public virtual Task<AudienceSegment> GetAudienceSegmentAsync(GetAudienceSegmentRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetAudienceSegmentRequest 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<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
GetAudienceSegmentRequest request = new GetAudienceSegmentRequest
{
    AudienceSegmentName = AudienceSegmentName.FromNetworkCodeAudienceSegment("[NETWORK_CODE]", "[AUDIENCE_SEGMENT]"),
};
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.GetAudienceSegmentAsync(request);

GetAudienceSegmentAsync(string, CallSettings)

Retrieves an AudienceSegment object.

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

Required. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]";
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.GetAudienceSegmentAsync(name);

GetAudienceSegmentAsync(string, CancellationToken)

Retrieves an AudienceSegment object.

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

Required. The resource name of the AudienceSegment. Format: networks/{network_code}/audienceSegments/{audience_segment_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AudienceSegment>

A Task containing the RPC response.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/audienceSegments/[AUDIENCE_SEGMENT]";
// Make the request
AudienceSegment response = await audienceSegmentServiceClient.GetAudienceSegmentAsync(name);

ListAudienceSegments(ListAudienceSegmentsRequest, CallSettings)

Lists AudienceSegment objects.

Declaration
public virtual PagedEnumerable<ListAudienceSegmentsResponse, AudienceSegment> ListAudienceSegments(ListAudienceSegmentsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAudienceSegmentsRequest 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<ListAudienceSegmentsResponse, AudienceSegment>

A pageable sequence of AudienceSegment resources.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
ListAudienceSegmentsRequest request = new ListAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedEnumerable<ListAudienceSegmentsResponse, AudienceSegment> response = audienceSegmentServiceClient.ListAudienceSegments(request);

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

ListAudienceSegments(NetworkName, string, int?, CallSettings)

Lists AudienceSegment objects.

Declaration
public virtual PagedEnumerable<ListAudienceSegmentsResponse, AudienceSegment> ListAudienceSegments(NetworkName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent publisher network associated with these audience segments. Format: networks/{network_code}

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<ListAudienceSegmentsResponse, AudienceSegment>

A pageable sequence of AudienceSegment resources.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListAudienceSegmentsResponse, AudienceSegment> response = audienceSegmentServiceClient.ListAudienceSegments(parent);

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

ListAudienceSegments(string, string, int?, CallSettings)

Lists AudienceSegment objects.

Declaration
public virtual PagedEnumerable<ListAudienceSegmentsResponse, AudienceSegment> ListAudienceSegments(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent publisher network associated with these audience segments. Format: networks/{network_code}

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<ListAudienceSegmentsResponse, AudienceSegment>

A pageable sequence of AudienceSegment resources.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = AudienceSegmentServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListAudienceSegmentsResponse, AudienceSegment> response = audienceSegmentServiceClient.ListAudienceSegments(parent);

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

ListAudienceSegmentsAsync(ListAudienceSegmentsRequest, CallSettings)

Lists AudienceSegment objects.

Declaration
public virtual PagedAsyncEnumerable<ListAudienceSegmentsResponse, AudienceSegment> ListAudienceSegmentsAsync(ListAudienceSegmentsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAudienceSegmentsRequest 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<ListAudienceSegmentsResponse, AudienceSegment>

A pageable asynchronous sequence of AudienceSegment resources.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
ListAudienceSegmentsRequest request = new ListAudienceSegmentsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListAudienceSegmentsResponse, AudienceSegment> response = audienceSegmentServiceClient.ListAudienceSegmentsAsync(request);

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

ListAudienceSegmentsAsync(NetworkName, string, int?, CallSettings)

Lists AudienceSegment objects.

Declaration
public virtual PagedAsyncEnumerable<ListAudienceSegmentsResponse, AudienceSegment> ListAudienceSegmentsAsync(NetworkName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent publisher network associated with these audience segments. Format: networks/{network_code}

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<ListAudienceSegmentsResponse, AudienceSegment>

A pageable asynchronous sequence of AudienceSegment resources.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListAudienceSegmentsResponse, AudienceSegment> response = audienceSegmentServiceClient.ListAudienceSegmentsAsync(parent);

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

ListAudienceSegmentsAsync(string, string, int?, CallSettings)

Lists AudienceSegment objects.

Declaration
public virtual PagedAsyncEnumerable<ListAudienceSegmentsResponse, AudienceSegment> ListAudienceSegmentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent publisher network associated with these audience segments. Format: networks/{network_code}

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<ListAudienceSegmentsResponse, AudienceSegment>

A pageable asynchronous sequence of AudienceSegment resources.

Sample code
// Create client
AudienceSegmentServiceClient audienceSegmentServiceClient = await AudienceSegmentServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListAudienceSegmentsResponse, AudienceSegment> response = audienceSegmentServiceClient.ListAudienceSegmentsAsync(parent);

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