Show / Hide Table of Contents

Class AdSpotServiceClient

AdSpotService client wrapper, for convenient use.

Inheritance
object
AdSpotServiceClient
AdSpotServiceClientImpl
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 AdSpotServiceClient
Remarks

Provides methods for handling AdSpot objects.

Properties

DefaultEndpoint

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

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

The default AdSpotService scopes are:

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

GrpcClient

The underlying gRPC AdSpotService client

Declaration
public virtual AdSpotService.AdSpotServiceClient GrpcClient { get; }
Property Value
Type Description
AdSpotService.AdSpotServiceClient

ServiceMetadata

The service metadata associated with this client type.

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

Methods

BatchCreateAdSpots(BatchCreateAdSpotsRequest, CallSettings)

Batch creates AdSpot objects.

Declaration
public virtual BatchCreateAdSpotsResponse BatchCreateAdSpots(BatchCreateAdSpotsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchCreateAdSpotsRequest 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
BatchCreateAdSpotsResponse

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
BatchCreateAdSpotsRequest request = new BatchCreateAdSpotsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateAdSpotRequest(),
    },
};
// Make the request
BatchCreateAdSpotsResponse response = adSpotServiceClient.BatchCreateAdSpots(request);

BatchCreateAdSpots(NetworkName, IEnumerable<CreateAdSpotRequest>, CallSettings)

Batch creates AdSpot objects.

Declaration
public virtual BatchCreateAdSpotsResponse BatchCreateAdSpots(NetworkName parent, IEnumerable<CreateAdSpotRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateAdSpotRequest> requests

Required. The AdSpot 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
BatchCreateAdSpotsResponse

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateAdSpotRequest> requests = new CreateAdSpotRequest[]
{
    new CreateAdSpotRequest(),
};
// Make the request
BatchCreateAdSpotsResponse response = adSpotServiceClient.BatchCreateAdSpots(parent, requests);

BatchCreateAdSpots(string, IEnumerable<CreateAdSpotRequest>, CallSettings)

Batch creates AdSpot objects.

Declaration
public virtual BatchCreateAdSpotsResponse BatchCreateAdSpots(string parent, IEnumerable<CreateAdSpotRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateAdSpotRequest> requests

Required. The AdSpot 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
BatchCreateAdSpotsResponse

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateAdSpotRequest> requests = new CreateAdSpotRequest[]
{
    new CreateAdSpotRequest(),
};
// Make the request
BatchCreateAdSpotsResponse response = adSpotServiceClient.BatchCreateAdSpots(parent, requests);

BatchCreateAdSpotsAsync(BatchCreateAdSpotsRequest, CallSettings)

Batch creates AdSpot objects.

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

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateAdSpotsRequest request = new BatchCreateAdSpotsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateAdSpotRequest(),
    },
};
// Make the request
BatchCreateAdSpotsResponse response = await adSpotServiceClient.BatchCreateAdSpotsAsync(request);

BatchCreateAdSpotsAsync(BatchCreateAdSpotsRequest, CancellationToken)

Batch creates AdSpot objects.

Declaration
public virtual Task<BatchCreateAdSpotsResponse> BatchCreateAdSpotsAsync(BatchCreateAdSpotsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchCreateAdSpotsRequest 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<BatchCreateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateAdSpotsRequest request = new BatchCreateAdSpotsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new CreateAdSpotRequest(),
    },
};
// Make the request
BatchCreateAdSpotsResponse response = await adSpotServiceClient.BatchCreateAdSpotsAsync(request);

BatchCreateAdSpotsAsync(NetworkName, IEnumerable<CreateAdSpotRequest>, CallSettings)

Batch creates AdSpot objects.

Declaration
public virtual Task<BatchCreateAdSpotsResponse> BatchCreateAdSpotsAsync(NetworkName parent, IEnumerable<CreateAdSpotRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateAdSpotRequest> requests

Required. The AdSpot 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<BatchCreateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateAdSpotRequest> requests = new CreateAdSpotRequest[]
{
    new CreateAdSpotRequest(),
};
// Make the request
BatchCreateAdSpotsResponse response = await adSpotServiceClient.BatchCreateAdSpotsAsync(parent, requests);

BatchCreateAdSpotsAsync(NetworkName, IEnumerable<CreateAdSpotRequest>, CancellationToken)

Batch creates AdSpot objects.

Declaration
public virtual Task<BatchCreateAdSpotsResponse> BatchCreateAdSpotsAsync(NetworkName parent, IEnumerable<CreateAdSpotRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

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

IEnumerable<CreateAdSpotRequest> requests

Required. The AdSpot 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<BatchCreateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateAdSpotRequest> requests = new CreateAdSpotRequest[]
{
    new CreateAdSpotRequest(),
};
// Make the request
BatchCreateAdSpotsResponse response = await adSpotServiceClient.BatchCreateAdSpotsAsync(parent, requests);

BatchCreateAdSpotsAsync(string, IEnumerable<CreateAdSpotRequest>, CallSettings)

Batch creates AdSpot objects.

Declaration
public virtual Task<BatchCreateAdSpotsResponse> BatchCreateAdSpotsAsync(string parent, IEnumerable<CreateAdSpotRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateAdSpotRequest> requests

Required. The AdSpot 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<BatchCreateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateAdSpotRequest> requests = new CreateAdSpotRequest[]
{
    new CreateAdSpotRequest(),
};
// Make the request
BatchCreateAdSpotsResponse response = await adSpotServiceClient.BatchCreateAdSpotsAsync(parent, requests);

BatchCreateAdSpotsAsync(string, IEnumerable<CreateAdSpotRequest>, CancellationToken)

Batch creates AdSpot objects.

Declaration
public virtual Task<BatchCreateAdSpotsResponse> BatchCreateAdSpotsAsync(string parent, IEnumerable<CreateAdSpotRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

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

IEnumerable<CreateAdSpotRequest> requests

Required. The AdSpot 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<BatchCreateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateAdSpotRequest> requests = new CreateAdSpotRequest[]
{
    new CreateAdSpotRequest(),
};
// Make the request
BatchCreateAdSpotsResponse response = await adSpotServiceClient.BatchCreateAdSpotsAsync(parent, requests);

BatchUpdateAdSpots(BatchUpdateAdSpotsRequest, CallSettings)

Batch updates AdSpot objects.

Declaration
public virtual BatchUpdateAdSpotsResponse BatchUpdateAdSpots(BatchUpdateAdSpotsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
BatchUpdateAdSpotsRequest 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
BatchUpdateAdSpotsResponse

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
BatchUpdateAdSpotsRequest request = new BatchUpdateAdSpotsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateAdSpotRequest(),
    },
};
// Make the request
BatchUpdateAdSpotsResponse response = adSpotServiceClient.BatchUpdateAdSpots(request);

BatchUpdateAdSpots(NetworkName, IEnumerable<UpdateAdSpotRequest>, CallSettings)

Batch updates AdSpot objects.

Declaration
public virtual BatchUpdateAdSpotsResponse BatchUpdateAdSpots(NetworkName parent, IEnumerable<UpdateAdSpotRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where AdSpots will be updated. Format: networks/{network_code} The parent field in the UpdateAdSpotRequest must match this field.

IEnumerable<UpdateAdSpotRequest> requests

Required. The AdSpot objects to update. A maximum of 100 objects can be updated in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchUpdateAdSpotsResponse

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateAdSpotRequest> requests = new UpdateAdSpotRequest[]
{
    new UpdateAdSpotRequest(),
};
// Make the request
BatchUpdateAdSpotsResponse response = adSpotServiceClient.BatchUpdateAdSpots(parent, requests);

BatchUpdateAdSpots(string, IEnumerable<UpdateAdSpotRequest>, CallSettings)

Batch updates AdSpot objects.

Declaration
public virtual BatchUpdateAdSpotsResponse BatchUpdateAdSpots(string parent, IEnumerable<UpdateAdSpotRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where AdSpots will be updated. Format: networks/{network_code} The parent field in the UpdateAdSpotRequest must match this field.

IEnumerable<UpdateAdSpotRequest> requests

Required. The AdSpot objects to update. A maximum of 100 objects can be updated in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
BatchUpdateAdSpotsResponse

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateAdSpotRequest> requests = new UpdateAdSpotRequest[]
{
    new UpdateAdSpotRequest(),
};
// Make the request
BatchUpdateAdSpotsResponse response = adSpotServiceClient.BatchUpdateAdSpots(parent, requests);

BatchUpdateAdSpotsAsync(BatchUpdateAdSpotsRequest, CallSettings)

Batch updates AdSpot objects.

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

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateAdSpotsRequest request = new BatchUpdateAdSpotsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateAdSpotRequest(),
    },
};
// Make the request
BatchUpdateAdSpotsResponse response = await adSpotServiceClient.BatchUpdateAdSpotsAsync(request);

BatchUpdateAdSpotsAsync(BatchUpdateAdSpotsRequest, CancellationToken)

Batch updates AdSpot objects.

Declaration
public virtual Task<BatchUpdateAdSpotsResponse> BatchUpdateAdSpotsAsync(BatchUpdateAdSpotsRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
BatchUpdateAdSpotsRequest 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<BatchUpdateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateAdSpotsRequest request = new BatchUpdateAdSpotsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Requests =
    {
        new UpdateAdSpotRequest(),
    },
};
// Make the request
BatchUpdateAdSpotsResponse response = await adSpotServiceClient.BatchUpdateAdSpotsAsync(request);

BatchUpdateAdSpotsAsync(NetworkName, IEnumerable<UpdateAdSpotRequest>, CallSettings)

Batch updates AdSpot objects.

Declaration
public virtual Task<BatchUpdateAdSpotsResponse> BatchUpdateAdSpotsAsync(NetworkName parent, IEnumerable<UpdateAdSpotRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where AdSpots will be updated. Format: networks/{network_code} The parent field in the UpdateAdSpotRequest must match this field.

IEnumerable<UpdateAdSpotRequest> requests

Required. The AdSpot objects to update. A maximum of 100 objects can be updated in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchUpdateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateAdSpotRequest> requests = new UpdateAdSpotRequest[]
{
    new UpdateAdSpotRequest(),
};
// Make the request
BatchUpdateAdSpotsResponse response = await adSpotServiceClient.BatchUpdateAdSpotsAsync(parent, requests);

BatchUpdateAdSpotsAsync(NetworkName, IEnumerable<UpdateAdSpotRequest>, CancellationToken)

Batch updates AdSpot objects.

Declaration
public virtual Task<BatchUpdateAdSpotsResponse> BatchUpdateAdSpotsAsync(NetworkName parent, IEnumerable<UpdateAdSpotRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

Required. The parent resource where AdSpots will be updated. Format: networks/{network_code} The parent field in the UpdateAdSpotRequest must match this field.

IEnumerable<UpdateAdSpotRequest> requests

Required. The AdSpot objects to update. A maximum of 100 objects can be updated in a batch.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchUpdateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateAdSpotRequest> requests = new UpdateAdSpotRequest[]
{
    new UpdateAdSpotRequest(),
};
// Make the request
BatchUpdateAdSpotsResponse response = await adSpotServiceClient.BatchUpdateAdSpotsAsync(parent, requests);

BatchUpdateAdSpotsAsync(string, IEnumerable<UpdateAdSpotRequest>, CallSettings)

Batch updates AdSpot objects.

Declaration
public virtual Task<BatchUpdateAdSpotsResponse> BatchUpdateAdSpotsAsync(string parent, IEnumerable<UpdateAdSpotRequest> requests, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent resource where AdSpots will be updated. Format: networks/{network_code} The parent field in the UpdateAdSpotRequest must match this field.

IEnumerable<UpdateAdSpotRequest> requests

Required. The AdSpot objects to update. A maximum of 100 objects can be updated in a batch.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<BatchUpdateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateAdSpotRequest> requests = new UpdateAdSpotRequest[]
{
    new UpdateAdSpotRequest(),
};
// Make the request
BatchUpdateAdSpotsResponse response = await adSpotServiceClient.BatchUpdateAdSpotsAsync(parent, requests);

BatchUpdateAdSpotsAsync(string, IEnumerable<UpdateAdSpotRequest>, CancellationToken)

Batch updates AdSpot objects.

Declaration
public virtual Task<BatchUpdateAdSpotsResponse> BatchUpdateAdSpotsAsync(string parent, IEnumerable<UpdateAdSpotRequest> requests, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

Required. The parent resource where AdSpots will be updated. Format: networks/{network_code} The parent field in the UpdateAdSpotRequest must match this field.

IEnumerable<UpdateAdSpotRequest> requests

Required. The AdSpot objects to update. A maximum of 100 objects can be updated in a batch.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<BatchUpdateAdSpotsResponse>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateAdSpotRequest> requests = new UpdateAdSpotRequest[]
{
    new UpdateAdSpotRequest(),
};
// Make the request
BatchUpdateAdSpotsResponse response = await adSpotServiceClient.BatchUpdateAdSpotsAsync(parent, requests);

Create()

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

Declaration
public static AdSpotServiceClient Create()
Returns
Type Description
AdSpotServiceClient

The created AdSpotServiceClient.

CreateAdSpot(CreateAdSpotRequest, CallSettings)

Creates an AdSpot object.

Declaration
public virtual AdSpot CreateAdSpot(CreateAdSpotRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
CreateAdSpotRequest 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
AdSpot

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
CreateAdSpotRequest request = new CreateAdSpotRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AdSpot = new AdSpot(),
};
// Make the request
AdSpot response = adSpotServiceClient.CreateAdSpot(request);

CreateAdSpot(NetworkName, AdSpot, CallSettings)

Creates an AdSpot object.

Declaration
public virtual AdSpot CreateAdSpot(NetworkName parent, AdSpot adSpot, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

AdSpot adSpot

Required. The AdSpot to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AdSpot

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
AdSpot adSpot = new AdSpot();
// Make the request
AdSpot response = adSpotServiceClient.CreateAdSpot(parent, adSpot);

CreateAdSpot(string, AdSpot, CallSettings)

Creates an AdSpot object.

Declaration
public virtual AdSpot CreateAdSpot(string parent, AdSpot adSpot, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

AdSpot adSpot

Required. The AdSpot to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AdSpot

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
AdSpot adSpot = new AdSpot();
// Make the request
AdSpot response = adSpotServiceClient.CreateAdSpot(parent, adSpot);

CreateAdSpotAsync(CreateAdSpotRequest, CallSettings)

Creates an AdSpot object.

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

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAdSpotRequest request = new CreateAdSpotRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AdSpot = new AdSpot(),
};
// Make the request
AdSpot response = await adSpotServiceClient.CreateAdSpotAsync(request);

CreateAdSpotAsync(CreateAdSpotRequest, CancellationToken)

Creates an AdSpot object.

Declaration
public virtual Task<AdSpot> CreateAdSpotAsync(CreateAdSpotRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
CreateAdSpotRequest 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<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAdSpotRequest request = new CreateAdSpotRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    AdSpot = new AdSpot(),
};
// Make the request
AdSpot response = await adSpotServiceClient.CreateAdSpotAsync(request);

CreateAdSpotAsync(NetworkName, AdSpot, CallSettings)

Creates an AdSpot object.

Declaration
public virtual Task<AdSpot> CreateAdSpotAsync(NetworkName parent, AdSpot adSpot, CallSettings callSettings = null)
Parameters
Type Name Description
NetworkName parent

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

AdSpot adSpot

Required. The AdSpot to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
AdSpot adSpot = new AdSpot();
// Make the request
AdSpot response = await adSpotServiceClient.CreateAdSpotAsync(parent, adSpot);

CreateAdSpotAsync(NetworkName, AdSpot, CancellationToken)

Creates an AdSpot object.

Declaration
public virtual Task<AdSpot> CreateAdSpotAsync(NetworkName parent, AdSpot adSpot, CancellationToken cancellationToken)
Parameters
Type Name Description
NetworkName parent

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

AdSpot adSpot

Required. The AdSpot to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
AdSpot adSpot = new AdSpot();
// Make the request
AdSpot response = await adSpotServiceClient.CreateAdSpotAsync(parent, adSpot);

CreateAdSpotAsync(string, AdSpot, CallSettings)

Creates an AdSpot object.

Declaration
public virtual Task<AdSpot> CreateAdSpotAsync(string parent, AdSpot adSpot, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

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

AdSpot adSpot

Required. The AdSpot to create.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
AdSpot adSpot = new AdSpot();
// Make the request
AdSpot response = await adSpotServiceClient.CreateAdSpotAsync(parent, adSpot);

CreateAdSpotAsync(string, AdSpot, CancellationToken)

Creates an AdSpot object.

Declaration
public virtual Task<AdSpot> CreateAdSpotAsync(string parent, AdSpot adSpot, CancellationToken cancellationToken)
Parameters
Type Name Description
string parent

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

AdSpot adSpot

Required. The AdSpot to create.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
AdSpot adSpot = new AdSpot();
// Make the request
AdSpot response = await adSpotServiceClient.CreateAdSpotAsync(parent, adSpot);

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<AdSpotServiceClient>

The task representing the created AdSpotServiceClient.

GetAdSpot(AdSpotName, CallSettings)

Retrieves an AdSpot object.

Declaration
public virtual AdSpot GetAdSpot(AdSpotName name, CallSettings callSettings = null)
Parameters
Type Name Description
AdSpotName name

Required. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AdSpot

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
AdSpotName name = AdSpotName.FromNetworkCodeAdSpot("[NETWORK_CODE]", "[AD_SPOT]");
// Make the request
AdSpot response = adSpotServiceClient.GetAdSpot(name);

GetAdSpot(GetAdSpotRequest, CallSettings)

Retrieves an AdSpot object.

Declaration
public virtual AdSpot GetAdSpot(GetAdSpotRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetAdSpotRequest 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
AdSpot

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
GetAdSpotRequest request = new GetAdSpotRequest
{
    AdSpotName = AdSpotName.FromNetworkCodeAdSpot("[NETWORK_CODE]", "[AD_SPOT]"),
};
// Make the request
AdSpot response = adSpotServiceClient.GetAdSpot(request);

GetAdSpot(string, CallSettings)

Retrieves an AdSpot object.

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

Required. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AdSpot

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/adSpots/[AD_SPOT]";
// Make the request
AdSpot response = adSpotServiceClient.GetAdSpot(name);

GetAdSpotAsync(AdSpotName, CallSettings)

Retrieves an AdSpot object.

Declaration
public virtual Task<AdSpot> GetAdSpotAsync(AdSpotName name, CallSettings callSettings = null)
Parameters
Type Name Description
AdSpotName name

Required. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
AdSpotName name = AdSpotName.FromNetworkCodeAdSpot("[NETWORK_CODE]", "[AD_SPOT]");
// Make the request
AdSpot response = await adSpotServiceClient.GetAdSpotAsync(name);

GetAdSpotAsync(AdSpotName, CancellationToken)

Retrieves an AdSpot object.

Declaration
public virtual Task<AdSpot> GetAdSpotAsync(AdSpotName name, CancellationToken cancellationToken)
Parameters
Type Name Description
AdSpotName name

Required. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
AdSpotName name = AdSpotName.FromNetworkCodeAdSpot("[NETWORK_CODE]", "[AD_SPOT]");
// Make the request
AdSpot response = await adSpotServiceClient.GetAdSpotAsync(name);

GetAdSpotAsync(GetAdSpotRequest, CallSettings)

Retrieves an AdSpot object.

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

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
GetAdSpotRequest request = new GetAdSpotRequest
{
    AdSpotName = AdSpotName.FromNetworkCodeAdSpot("[NETWORK_CODE]", "[AD_SPOT]"),
};
// Make the request
AdSpot response = await adSpotServiceClient.GetAdSpotAsync(request);

GetAdSpotAsync(GetAdSpotRequest, CancellationToken)

Retrieves an AdSpot object.

Declaration
public virtual Task<AdSpot> GetAdSpotAsync(GetAdSpotRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetAdSpotRequest 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<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
GetAdSpotRequest request = new GetAdSpotRequest
{
    AdSpotName = AdSpotName.FromNetworkCodeAdSpot("[NETWORK_CODE]", "[AD_SPOT]"),
};
// Make the request
AdSpot response = await adSpotServiceClient.GetAdSpotAsync(request);

GetAdSpotAsync(string, CallSettings)

Retrieves an AdSpot object.

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

Required. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/adSpots/[AD_SPOT]";
// Make the request
AdSpot response = await adSpotServiceClient.GetAdSpotAsync(name);

GetAdSpotAsync(string, CancellationToken)

Retrieves an AdSpot object.

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

Required. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/adSpots/[AD_SPOT]";
// Make the request
AdSpot response = await adSpotServiceClient.GetAdSpotAsync(name);

ListAdSpots(ListAdSpotsRequest, CallSettings)

Lists AdSpot objects.

Declaration
public virtual PagedEnumerable<ListAdSpotsResponse, AdSpot> ListAdSpots(ListAdSpotsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAdSpotsRequest 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<ListAdSpotsResponse, AdSpot>

A pageable sequence of AdSpot resources.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
ListAdSpotsRequest request = new ListAdSpotsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedEnumerable<ListAdSpotsResponse, AdSpot> response = adSpotServiceClient.ListAdSpots(request);

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

ListAdSpots(NetworkName, string, int?, CallSettings)

Lists AdSpot objects.

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

Required. The parent, which owns this collection of AdSpots. 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<ListAdSpotsResponse, AdSpot>

A pageable sequence of AdSpot resources.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListAdSpotsResponse, AdSpot> response = adSpotServiceClient.ListAdSpots(parent);

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

ListAdSpots(string, string, int?, CallSettings)

Lists AdSpot objects.

Declaration
public virtual PagedEnumerable<ListAdSpotsResponse, AdSpot> ListAdSpots(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of AdSpots. 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<ListAdSpotsResponse, AdSpot>

A pageable sequence of AdSpot resources.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListAdSpotsResponse, AdSpot> response = adSpotServiceClient.ListAdSpots(parent);

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

ListAdSpotsAsync(ListAdSpotsRequest, CallSettings)

Lists AdSpot objects.

Declaration
public virtual PagedAsyncEnumerable<ListAdSpotsResponse, AdSpot> ListAdSpotsAsync(ListAdSpotsRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
ListAdSpotsRequest 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<ListAdSpotsResponse, AdSpot>

A pageable asynchronous sequence of AdSpot resources.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
ListAdSpotsRequest request = new ListAdSpotsRequest
{
    ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
    Filter = "",
    OrderBy = "",
    Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListAdSpotsResponse, AdSpot> response = adSpotServiceClient.ListAdSpotsAsync(request);

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

ListAdSpotsAsync(NetworkName, string, int?, CallSettings)

Lists AdSpot objects.

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

Required. The parent, which owns this collection of AdSpots. 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<ListAdSpotsResponse, AdSpot>

A pageable asynchronous sequence of AdSpot resources.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListAdSpotsResponse, AdSpot> response = adSpotServiceClient.ListAdSpotsAsync(parent);

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

ListAdSpotsAsync(string, string, int?, CallSettings)

Lists AdSpot objects.

Declaration
public virtual PagedAsyncEnumerable<ListAdSpotsResponse, AdSpot> ListAdSpotsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type Name Description
string parent

Required. The parent, which owns this collection of AdSpots. 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<ListAdSpotsResponse, AdSpot>

A pageable asynchronous sequence of AdSpot resources.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListAdSpotsResponse, AdSpot> response = adSpotServiceClient.ListAdSpotsAsync(parent);

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

UpdateAdSpot(AdSpot, FieldMask, CallSettings)

Updates an AdSpot object.

Declaration
public virtual AdSpot UpdateAdSpot(AdSpot adSpot, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
AdSpot adSpot

Required. The AdSpot to update.

The AdSpot's name is used to identify the AdSpot to update.

FieldMask updateMask

Optional. The list of fields to update.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AdSpot

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
AdSpot adSpot = new AdSpot();
FieldMask updateMask = new FieldMask();
// Make the request
AdSpot response = adSpotServiceClient.UpdateAdSpot(adSpot, updateMask);

UpdateAdSpot(UpdateAdSpotRequest, CallSettings)

Updates an AdSpot object.

Declaration
public virtual AdSpot UpdateAdSpot(UpdateAdSpotRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
UpdateAdSpotRequest 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
AdSpot

The RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = AdSpotServiceClient.Create();
// Initialize request argument(s)
UpdateAdSpotRequest request = new UpdateAdSpotRequest
{
    AdSpot = new AdSpot(),
    UpdateMask = new FieldMask(),
};
// Make the request
AdSpot response = adSpotServiceClient.UpdateAdSpot(request);

UpdateAdSpotAsync(AdSpot, FieldMask, CallSettings)

Updates an AdSpot object.

Declaration
public virtual Task<AdSpot> UpdateAdSpotAsync(AdSpot adSpot, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type Name Description
AdSpot adSpot

Required. The AdSpot to update.

The AdSpot's name is used to identify the AdSpot to update.

FieldMask updateMask

Optional. The list of fields to update.

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
AdSpot adSpot = new AdSpot();
FieldMask updateMask = new FieldMask();
// Make the request
AdSpot response = await adSpotServiceClient.UpdateAdSpotAsync(adSpot, updateMask);

UpdateAdSpotAsync(AdSpot, FieldMask, CancellationToken)

Updates an AdSpot object.

Declaration
public virtual Task<AdSpot> UpdateAdSpotAsync(AdSpot adSpot, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type Name Description
AdSpot adSpot

Required. The AdSpot to update.

The AdSpot's name is used to identify the AdSpot to update.

FieldMask updateMask

Optional. The list of fields to update.

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
AdSpot adSpot = new AdSpot();
FieldMask updateMask = new FieldMask();
// Make the request
AdSpot response = await adSpotServiceClient.UpdateAdSpotAsync(adSpot, updateMask);

UpdateAdSpotAsync(UpdateAdSpotRequest, CallSettings)

Updates an AdSpot object.

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

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAdSpotRequest request = new UpdateAdSpotRequest
{
    AdSpot = new AdSpot(),
    UpdateMask = new FieldMask(),
};
// Make the request
AdSpot response = await adSpotServiceClient.UpdateAdSpotAsync(request);

UpdateAdSpotAsync(UpdateAdSpotRequest, CancellationToken)

Updates an AdSpot object.

Declaration
public virtual Task<AdSpot> UpdateAdSpotAsync(UpdateAdSpotRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
UpdateAdSpotRequest 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<AdSpot>

A Task containing the RPC response.

Sample code
// Create client
AdSpotServiceClient adSpotServiceClient = await AdSpotServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAdSpotRequest request = new UpdateAdSpotRequest
{
    AdSpot = new AdSpot(),
    UpdateMask = new FieldMask(),
};
// Make the request
AdSpot response = await adSpotServiceClient.UpdateAdSpotAsync(request);
In this article
Back to top Generated by DocFX