Class CreativeServiceClient
CreativeService client wrapper, for convenient use.
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class CreativeServiceClient
Remarks
Provides methods for handling Creative objects.
Properties
DefaultEndpoint
The default endpoint for the CreativeService 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 CreativeService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default CreativeService scopes are:
- https://www.googleapis.com/auth/admanager
- https://www.googleapis.com/auth/admanager.readonly
GrpcClient
The underlying gRPC CreativeService client
Declaration
public virtual CreativeService.CreativeServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| CreativeService.CreativeServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
| Type | Description |
|---|---|
| ServiceMetadata |
Methods
BatchActivateCreatives(BatchActivateCreativesRequest, CallSettings)
Batch activates Creative objects.
Declaration
public virtual BatchActivateCreativesResponse BatchActivateCreatives(BatchActivateCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateCreativesRequest | 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 |
|---|---|
| BatchActivateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
BatchActivateCreativesRequest request = new BatchActivateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeNames =
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
},
};
// Make the request
BatchActivateCreativesResponse response = creativeServiceClient.BatchActivateCreatives(request);
BatchActivateCreatives(NetworkName, IEnumerable<CreativeName>, CallSettings)
Batch activates Creative objects.
Declaration
public virtual BatchActivateCreativesResponse BatchActivateCreatives(NetworkName parent, IEnumerable<CreativeName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<CreativeName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchActivateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreativeName> names = new CreativeName[]
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
BatchActivateCreativesResponse response = creativeServiceClient.BatchActivateCreatives(parent, names);
BatchActivateCreatives(string, IEnumerable<string>, CallSettings)
Batch activates Creative objects.
Declaration
public virtual BatchActivateCreativesResponse BatchActivateCreatives(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchActivateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/creatives/[CREATIVE]",
};
// Make the request
BatchActivateCreativesResponse response = creativeServiceClient.BatchActivateCreatives(parent, names);
BatchActivateCreativesAsync(BatchActivateCreativesRequest, CallSettings)
Batch activates Creative objects.
Declaration
public virtual Task<BatchActivateCreativesResponse> BatchActivateCreativesAsync(BatchActivateCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateCreativesRequest | 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<BatchActivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateCreativesRequest request = new BatchActivateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeNames =
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
},
};
// Make the request
BatchActivateCreativesResponse response = await creativeServiceClient.BatchActivateCreativesAsync(request);
BatchActivateCreativesAsync(BatchActivateCreativesRequest, CancellationToken)
Batch activates Creative objects.
Declaration
public virtual Task<BatchActivateCreativesResponse> BatchActivateCreativesAsync(BatchActivateCreativesRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateCreativesRequest | 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<BatchActivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateCreativesRequest request = new BatchActivateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeNames =
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
},
};
// Make the request
BatchActivateCreativesResponse response = await creativeServiceClient.BatchActivateCreativesAsync(request);
BatchActivateCreativesAsync(NetworkName, IEnumerable<CreativeName>, CallSettings)
Batch activates Creative objects.
Declaration
public virtual Task<BatchActivateCreativesResponse> BatchActivateCreativesAsync(NetworkName parent, IEnumerable<CreativeName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<CreativeName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreativeName> names = new CreativeName[]
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
BatchActivateCreativesResponse response = await creativeServiceClient.BatchActivateCreativesAsync(parent, names);
BatchActivateCreativesAsync(NetworkName, IEnumerable<CreativeName>, CancellationToken)
Batch activates Creative objects.
Declaration
public virtual Task<BatchActivateCreativesResponse> BatchActivateCreativesAsync(NetworkName parent, IEnumerable<CreativeName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<CreativeName> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreativeName> names = new CreativeName[]
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
BatchActivateCreativesResponse response = await creativeServiceClient.BatchActivateCreativesAsync(parent, names);
BatchActivateCreativesAsync(string, IEnumerable<string>, CallSettings)
Batch activates Creative objects.
Declaration
public virtual Task<BatchActivateCreativesResponse> BatchActivateCreativesAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/creatives/[CREATIVE]",
};
// Make the request
BatchActivateCreativesResponse response = await creativeServiceClient.BatchActivateCreativesAsync(parent, names);
BatchActivateCreativesAsync(string, IEnumerable<string>, CancellationToken)
Batch activates Creative objects.
Declaration
public virtual Task<BatchActivateCreativesResponse> BatchActivateCreativesAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/creatives/[CREATIVE]",
};
// Make the request
BatchActivateCreativesResponse response = await creativeServiceClient.BatchActivateCreativesAsync(parent, names);
BatchCreateCreatives(BatchCreateCreativesRequest, CallSettings)
Creates Creative objects.
Declaration
public virtual BatchCreateCreativesResponse BatchCreateCreatives(BatchCreateCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreateCreativesRequest | 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 |
|---|---|
| BatchCreateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
BatchCreateCreativesRequest request = new BatchCreateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreateCreativeRequest(),
},
};
// Make the request
BatchCreateCreativesResponse response = creativeServiceClient.BatchCreateCreatives(request);
BatchCreateCreatives(NetworkName, IEnumerable<CreateCreativeRequest>, CallSettings)
Creates Creative objects.
Declaration
public virtual BatchCreateCreativesResponse BatchCreateCreatives(NetworkName parent, IEnumerable<CreateCreativeRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<CreateCreativeRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchCreateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateCreativeRequest> requests = new CreateCreativeRequest[]
{
new CreateCreativeRequest(),
};
// Make the request
BatchCreateCreativesResponse response = creativeServiceClient.BatchCreateCreatives(parent, requests);
BatchCreateCreatives(string, IEnumerable<CreateCreativeRequest>, CallSettings)
Creates Creative objects.
Declaration
public virtual BatchCreateCreativesResponse BatchCreateCreatives(string parent, IEnumerable<CreateCreativeRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<CreateCreativeRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchCreateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateCreativeRequest> requests = new CreateCreativeRequest[]
{
new CreateCreativeRequest(),
};
// Make the request
BatchCreateCreativesResponse response = creativeServiceClient.BatchCreateCreatives(parent, requests);
BatchCreateCreativesAsync(BatchCreateCreativesRequest, CallSettings)
Creates Creative objects.
Declaration
public virtual Task<BatchCreateCreativesResponse> BatchCreateCreativesAsync(BatchCreateCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreateCreativesRequest | 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<BatchCreateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateCreativesRequest request = new BatchCreateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreateCreativeRequest(),
},
};
// Make the request
BatchCreateCreativesResponse response = await creativeServiceClient.BatchCreateCreativesAsync(request);
BatchCreateCreativesAsync(BatchCreateCreativesRequest, CancellationToken)
Creates Creative objects.
Declaration
public virtual Task<BatchCreateCreativesResponse> BatchCreateCreativesAsync(BatchCreateCreativesRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreateCreativesRequest | 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<BatchCreateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateCreativesRequest request = new BatchCreateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreateCreativeRequest(),
},
};
// Make the request
BatchCreateCreativesResponse response = await creativeServiceClient.BatchCreateCreativesAsync(request);
BatchCreateCreativesAsync(NetworkName, IEnumerable<CreateCreativeRequest>, CallSettings)
Creates Creative objects.
Declaration
public virtual Task<BatchCreateCreativesResponse> BatchCreateCreativesAsync(NetworkName parent, IEnumerable<CreateCreativeRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<CreateCreativeRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateCreativeRequest> requests = new CreateCreativeRequest[]
{
new CreateCreativeRequest(),
};
// Make the request
BatchCreateCreativesResponse response = await creativeServiceClient.BatchCreateCreativesAsync(parent, requests);
BatchCreateCreativesAsync(NetworkName, IEnumerable<CreateCreativeRequest>, CancellationToken)
Creates Creative objects.
Declaration
public virtual Task<BatchCreateCreativesResponse> BatchCreateCreativesAsync(NetworkName parent, IEnumerable<CreateCreativeRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<CreateCreativeRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreateCreativeRequest> requests = new CreateCreativeRequest[]
{
new CreateCreativeRequest(),
};
// Make the request
BatchCreateCreativesResponse response = await creativeServiceClient.BatchCreateCreativesAsync(parent, requests);
BatchCreateCreativesAsync(string, IEnumerable<CreateCreativeRequest>, CallSettings)
Creates Creative objects.
Declaration
public virtual Task<BatchCreateCreativesResponse> BatchCreateCreativesAsync(string parent, IEnumerable<CreateCreativeRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<CreateCreativeRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateCreativeRequest> requests = new CreateCreativeRequest[]
{
new CreateCreativeRequest(),
};
// Make the request
BatchCreateCreativesResponse response = await creativeServiceClient.BatchCreateCreativesAsync(parent, requests);
BatchCreateCreativesAsync(string, IEnumerable<CreateCreativeRequest>, CancellationToken)
Creates Creative objects.
Declaration
public virtual Task<BatchCreateCreativesResponse> BatchCreateCreativesAsync(string parent, IEnumerable<CreateCreativeRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<CreateCreativeRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreateCreativeRequest> requests = new CreateCreativeRequest[]
{
new CreateCreativeRequest(),
};
// Make the request
BatchCreateCreativesResponse response = await creativeServiceClient.BatchCreateCreativesAsync(parent, requests);
BatchDeactivateCreatives(BatchDeactivateCreativesRequest, CallSettings)
Deactivates a list of Creative objects.
Declaration
public virtual BatchDeactivateCreativesResponse BatchDeactivateCreatives(BatchDeactivateCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateCreativesRequest | 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 |
|---|---|
| BatchDeactivateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
BatchDeactivateCreativesRequest request = new BatchDeactivateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeNames =
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
},
};
// Make the request
BatchDeactivateCreativesResponse response = creativeServiceClient.BatchDeactivateCreatives(request);
BatchDeactivateCreatives(NetworkName, IEnumerable<CreativeName>, CallSettings)
Deactivates a list of Creative objects.
Declaration
public virtual BatchDeactivateCreativesResponse BatchDeactivateCreatives(NetworkName parent, IEnumerable<CreativeName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<CreativeName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchDeactivateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreativeName> names = new CreativeName[]
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
BatchDeactivateCreativesResponse response = creativeServiceClient.BatchDeactivateCreatives(parent, names);
BatchDeactivateCreatives(string, IEnumerable<string>, CallSettings)
Deactivates a list of Creative objects.
Declaration
public virtual BatchDeactivateCreativesResponse BatchDeactivateCreatives(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchDeactivateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/creatives/[CREATIVE]",
};
// Make the request
BatchDeactivateCreativesResponse response = creativeServiceClient.BatchDeactivateCreatives(parent, names);
BatchDeactivateCreativesAsync(BatchDeactivateCreativesRequest, CallSettings)
Deactivates a list of Creative objects.
Declaration
public virtual Task<BatchDeactivateCreativesResponse> BatchDeactivateCreativesAsync(BatchDeactivateCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateCreativesRequest | 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<BatchDeactivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateCreativesRequest request = new BatchDeactivateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeNames =
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
},
};
// Make the request
BatchDeactivateCreativesResponse response = await creativeServiceClient.BatchDeactivateCreativesAsync(request);
BatchDeactivateCreativesAsync(BatchDeactivateCreativesRequest, CancellationToken)
Deactivates a list of Creative objects.
Declaration
public virtual Task<BatchDeactivateCreativesResponse> BatchDeactivateCreativesAsync(BatchDeactivateCreativesRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateCreativesRequest | 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<BatchDeactivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateCreativesRequest request = new BatchDeactivateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
CreativeNames =
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
},
};
// Make the request
BatchDeactivateCreativesResponse response = await creativeServiceClient.BatchDeactivateCreativesAsync(request);
BatchDeactivateCreativesAsync(NetworkName, IEnumerable<CreativeName>, CallSettings)
Deactivates a list of Creative objects.
Declaration
public virtual Task<BatchDeactivateCreativesResponse> BatchDeactivateCreativesAsync(NetworkName parent, IEnumerable<CreativeName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<CreativeName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreativeName> names = new CreativeName[]
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
BatchDeactivateCreativesResponse response = await creativeServiceClient.BatchDeactivateCreativesAsync(parent, names);
BatchDeactivateCreativesAsync(NetworkName, IEnumerable<CreativeName>, CancellationToken)
Deactivates a list of Creative objects.
Declaration
public virtual Task<BatchDeactivateCreativesResponse> BatchDeactivateCreativesAsync(NetworkName parent, IEnumerable<CreativeName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<CreativeName> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreativeName> names = new CreativeName[]
{
CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
BatchDeactivateCreativesResponse response = await creativeServiceClient.BatchDeactivateCreativesAsync(parent, names);
BatchDeactivateCreativesAsync(string, IEnumerable<string>, CallSettings)
Deactivates a list of Creative objects.
Declaration
public virtual Task<BatchDeactivateCreativesResponse> BatchDeactivateCreativesAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/creatives/[CREATIVE]",
};
// Make the request
BatchDeactivateCreativesResponse response = await creativeServiceClient.BatchDeactivateCreativesAsync(parent, names);
BatchDeactivateCreativesAsync(string, IEnumerable<string>, CancellationToken)
Deactivates a list of Creative objects.
Declaration
public virtual Task<BatchDeactivateCreativesResponse> BatchDeactivateCreativesAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/creatives/[CREATIVE]",
};
// Make the request
BatchDeactivateCreativesResponse response = await creativeServiceClient.BatchDeactivateCreativesAsync(parent, names);
BatchUpdateCreatives(BatchUpdateCreativesRequest, CallSettings)
Batch updates Creative objects.
Declaration
public virtual BatchUpdateCreativesResponse BatchUpdateCreatives(BatchUpdateCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdateCreativesRequest | 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 |
|---|---|
| BatchUpdateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
BatchUpdateCreativesRequest request = new BatchUpdateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdateCreativeRequest(),
},
};
// Make the request
BatchUpdateCreativesResponse response = creativeServiceClient.BatchUpdateCreatives(request);
BatchUpdateCreatives(NetworkName, IEnumerable<UpdateCreativeRequest>, CallSettings)
Batch updates Creative objects.
Declaration
public virtual BatchUpdateCreativesResponse BatchUpdateCreatives(NetworkName parent, IEnumerable<UpdateCreativeRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdateCreativeRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchUpdateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateCreativeRequest> requests = new UpdateCreativeRequest[]
{
new UpdateCreativeRequest(),
};
// Make the request
BatchUpdateCreativesResponse response = creativeServiceClient.BatchUpdateCreatives(parent, requests);
BatchUpdateCreatives(string, IEnumerable<UpdateCreativeRequest>, CallSettings)
Batch updates Creative objects.
Declaration
public virtual BatchUpdateCreativesResponse BatchUpdateCreatives(string parent, IEnumerable<UpdateCreativeRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdateCreativeRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchUpdateCreativesResponse | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateCreativeRequest> requests = new UpdateCreativeRequest[]
{
new UpdateCreativeRequest(),
};
// Make the request
BatchUpdateCreativesResponse response = creativeServiceClient.BatchUpdateCreatives(parent, requests);
BatchUpdateCreativesAsync(BatchUpdateCreativesRequest, CallSettings)
Batch updates Creative objects.
Declaration
public virtual Task<BatchUpdateCreativesResponse> BatchUpdateCreativesAsync(BatchUpdateCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdateCreativesRequest | 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<BatchUpdateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateCreativesRequest request = new BatchUpdateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdateCreativeRequest(),
},
};
// Make the request
BatchUpdateCreativesResponse response = await creativeServiceClient.BatchUpdateCreativesAsync(request);
BatchUpdateCreativesAsync(BatchUpdateCreativesRequest, CancellationToken)
Batch updates Creative objects.
Declaration
public virtual Task<BatchUpdateCreativesResponse> BatchUpdateCreativesAsync(BatchUpdateCreativesRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdateCreativesRequest | 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<BatchUpdateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateCreativesRequest request = new BatchUpdateCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdateCreativeRequest(),
},
};
// Make the request
BatchUpdateCreativesResponse response = await creativeServiceClient.BatchUpdateCreativesAsync(request);
BatchUpdateCreativesAsync(NetworkName, IEnumerable<UpdateCreativeRequest>, CallSettings)
Batch updates Creative objects.
Declaration
public virtual Task<BatchUpdateCreativesResponse> BatchUpdateCreativesAsync(NetworkName parent, IEnumerable<UpdateCreativeRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdateCreativeRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateCreativeRequest> requests = new UpdateCreativeRequest[]
{
new UpdateCreativeRequest(),
};
// Make the request
BatchUpdateCreativesResponse response = await creativeServiceClient.BatchUpdateCreativesAsync(parent, requests);
BatchUpdateCreativesAsync(NetworkName, IEnumerable<UpdateCreativeRequest>, CancellationToken)
Batch updates Creative objects.
Declaration
public virtual Task<BatchUpdateCreativesResponse> BatchUpdateCreativesAsync(NetworkName parent, IEnumerable<UpdateCreativeRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdateCreativeRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdateCreativeRequest> requests = new UpdateCreativeRequest[]
{
new UpdateCreativeRequest(),
};
// Make the request
BatchUpdateCreativesResponse response = await creativeServiceClient.BatchUpdateCreativesAsync(parent, requests);
BatchUpdateCreativesAsync(string, IEnumerable<UpdateCreativeRequest>, CallSettings)
Batch updates Creative objects.
Declaration
public virtual Task<BatchUpdateCreativesResponse> BatchUpdateCreativesAsync(string parent, IEnumerable<UpdateCreativeRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdateCreativeRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateCreativeRequest> requests = new UpdateCreativeRequest[]
{
new UpdateCreativeRequest(),
};
// Make the request
BatchUpdateCreativesResponse response = await creativeServiceClient.BatchUpdateCreativesAsync(parent, requests);
BatchUpdateCreativesAsync(string, IEnumerable<UpdateCreativeRequest>, CancellationToken)
Batch updates Creative objects.
Declaration
public virtual Task<BatchUpdateCreativesResponse> BatchUpdateCreativesAsync(string parent, IEnumerable<UpdateCreativeRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdateCreativeRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdateCreativesResponse> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdateCreativeRequest> requests = new UpdateCreativeRequest[]
{
new UpdateCreativeRequest(),
};
// Make the request
BatchUpdateCreativesResponse response = await creativeServiceClient.BatchUpdateCreativesAsync(parent, requests);
Create()
Synchronously creates a CreativeServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CreativeServiceClientBuilder.
Declaration
public static CreativeServiceClient Create()
Returns
| Type | Description |
|---|---|
| CreativeServiceClient | The created CreativeServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a CreativeServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CreativeServiceClientBuilder.
Declaration
public static Task<CreativeServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<CreativeServiceClient> | The task representing the created CreativeServiceClient. |
CreateCreative(CreateCreativeRequest, CallSettings)
Creates a Creative object.
Declaration
public virtual Creative CreateCreative(CreateCreativeRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateCreativeRequest | 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 |
|---|---|
| Creative | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
CreateCreativeRequest request = new CreateCreativeRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Creative = new Creative(),
};
// Make the request
Creative response = creativeServiceClient.CreateCreative(request);
CreateCreative(NetworkName, Creative, CallSettings)
Creates a Creative object.
Declaration
public virtual Creative CreateCreative(NetworkName parent, Creative creative, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Creative | creative | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Creative | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Creative creative = new Creative();
// Make the request
Creative response = creativeServiceClient.CreateCreative(parent, creative);
CreateCreative(string, Creative, CallSettings)
Creates a Creative object.
Declaration
public virtual Creative CreateCreative(string parent, Creative creative, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Creative | creative | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Creative | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Creative creative = new Creative();
// Make the request
Creative response = creativeServiceClient.CreateCreative(parent, creative);
CreateCreativeAsync(CreateCreativeRequest, CallSettings)
Creates a Creative object.
Declaration
public virtual Task<Creative> CreateCreativeAsync(CreateCreativeRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateCreativeRequest | 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<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
CreateCreativeRequest request = new CreateCreativeRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Creative = new Creative(),
};
// Make the request
Creative response = await creativeServiceClient.CreateCreativeAsync(request);
CreateCreativeAsync(CreateCreativeRequest, CancellationToken)
Creates a Creative object.
Declaration
public virtual Task<Creative> CreateCreativeAsync(CreateCreativeRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateCreativeRequest | 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<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
CreateCreativeRequest request = new CreateCreativeRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Creative = new Creative(),
};
// Make the request
Creative response = await creativeServiceClient.CreateCreativeAsync(request);
CreateCreativeAsync(NetworkName, Creative, CallSettings)
Creates a Creative object.
Declaration
public virtual Task<Creative> CreateCreativeAsync(NetworkName parent, Creative creative, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Creative | creative | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Creative creative = new Creative();
// Make the request
Creative response = await creativeServiceClient.CreateCreativeAsync(parent, creative);
CreateCreativeAsync(NetworkName, Creative, CancellationToken)
Creates a Creative object.
Declaration
public virtual Task<Creative> CreateCreativeAsync(NetworkName parent, Creative creative, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Creative | creative | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Creative creative = new Creative();
// Make the request
Creative response = await creativeServiceClient.CreateCreativeAsync(parent, creative);
CreateCreativeAsync(string, Creative, CallSettings)
Creates a Creative object.
Declaration
public virtual Task<Creative> CreateCreativeAsync(string parent, Creative creative, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Creative | creative | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Creative creative = new Creative();
// Make the request
Creative response = await creativeServiceClient.CreateCreativeAsync(parent, creative);
CreateCreativeAsync(string, Creative, CancellationToken)
Creates a Creative object.
Declaration
public virtual Task<Creative> CreateCreativeAsync(string parent, Creative creative, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Creative | creative | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Creative creative = new Creative();
// Make the request
Creative response = await creativeServiceClient.CreateCreativeAsync(parent, creative);
GetCreative(CreativeName, CallSettings)
Retrieves a Creative object.
Declaration
public virtual Creative GetCreative(CreativeName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeName | name | Required. The resource name of the Creative.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Creative | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
CreativeName name = CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]");
// Make the request
Creative response = creativeServiceClient.GetCreative(name);
GetCreative(GetCreativeRequest, CallSettings)
Retrieves a Creative object.
Declaration
public virtual Creative GetCreative(GetCreativeRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetCreativeRequest | 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 |
|---|---|
| Creative | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
GetCreativeRequest request = new GetCreativeRequest
{
CreativeName = CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
Creative response = creativeServiceClient.GetCreative(request);
GetCreative(string, CallSettings)
Retrieves a Creative object.
Declaration
public virtual Creative GetCreative(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Creative.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Creative | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/creatives/[CREATIVE]";
// Make the request
Creative response = creativeServiceClient.GetCreative(name);
GetCreativeAsync(CreativeName, CallSettings)
Retrieves a Creative object.
Declaration
public virtual Task<Creative> GetCreativeAsync(CreativeName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeName | name | Required. The resource name of the Creative.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
CreativeName name = CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]");
// Make the request
Creative response = await creativeServiceClient.GetCreativeAsync(name);
GetCreativeAsync(CreativeName, CancellationToken)
Retrieves a Creative object.
Declaration
public virtual Task<Creative> GetCreativeAsync(CreativeName name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CreativeName | name | Required. The resource name of the Creative.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
CreativeName name = CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]");
// Make the request
Creative response = await creativeServiceClient.GetCreativeAsync(name);
GetCreativeAsync(GetCreativeRequest, CallSettings)
Retrieves a Creative object.
Declaration
public virtual Task<Creative> GetCreativeAsync(GetCreativeRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetCreativeRequest | 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<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
GetCreativeRequest request = new GetCreativeRequest
{
CreativeName = CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
Creative response = await creativeServiceClient.GetCreativeAsync(request);
GetCreativeAsync(GetCreativeRequest, CancellationToken)
Retrieves a Creative object.
Declaration
public virtual Task<Creative> GetCreativeAsync(GetCreativeRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| GetCreativeRequest | 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<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
GetCreativeRequest request = new GetCreativeRequest
{
CreativeName = CreativeName.FromNetworkCodeCreative("[NETWORK_CODE]", "[CREATIVE]"),
};
// Make the request
Creative response = await creativeServiceClient.GetCreativeAsync(request);
GetCreativeAsync(string, CallSettings)
Retrieves a Creative object.
Declaration
public virtual Task<Creative> GetCreativeAsync(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Creative.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/creatives/[CREATIVE]";
// Make the request
Creative response = await creativeServiceClient.GetCreativeAsync(name);
GetCreativeAsync(string, CancellationToken)
Retrieves a Creative object.
Declaration
public virtual Task<Creative> GetCreativeAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Creative.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/creatives/[CREATIVE]";
// Make the request
Creative response = await creativeServiceClient.GetCreativeAsync(name);
ListCreatives(ListCreativesRequest, CallSettings)
Lists Creative objects.
Declaration
public virtual PagedEnumerable<ListCreativesResponse, Creative> ListCreatives(ListCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListCreativesRequest | 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<ListCreativesResponse, Creative> | A pageable sequence of Creative resources. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
ListCreativesRequest request = new ListCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedEnumerable<ListCreativesResponse, Creative> response = creativeServiceClient.ListCreatives(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Creative 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 (ListCreativesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Creative 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<Creative> 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 (Creative 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;
ListCreatives(NetworkName, string, int?, CallSettings)
Lists Creative objects.
Declaration
public virtual PagedEnumerable<ListCreativesResponse, Creative> ListCreatives(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 Creatives. Format: networks/{network_code} |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListCreativesResponse, Creative> | A pageable sequence of Creative resources. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListCreativesResponse, Creative> response = creativeServiceClient.ListCreatives(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Creative 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 (ListCreativesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Creative 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<Creative> 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 (Creative 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;
ListCreatives(string, string, int?, CallSettings)
Lists Creative objects.
Declaration
public virtual PagedEnumerable<ListCreativesResponse, Creative> ListCreatives(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 Creatives. Format: networks/{network_code} |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListCreativesResponse, Creative> | A pageable sequence of Creative resources. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListCreativesResponse, Creative> response = creativeServiceClient.ListCreatives(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Creative 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 (ListCreativesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Creative 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<Creative> 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 (Creative 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;
ListCreativesAsync(ListCreativesRequest, CallSettings)
Lists Creative objects.
Declaration
public virtual PagedAsyncEnumerable<ListCreativesResponse, Creative> ListCreativesAsync(ListCreativesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListCreativesRequest | 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<ListCreativesResponse, Creative> | A pageable asynchronous sequence of Creative resources. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
ListCreativesRequest request = new ListCreativesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListCreativesResponse, Creative> response = creativeServiceClient.ListCreativesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Creative 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 (ListCreativesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Creative 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<Creative> 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 (Creative 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;
ListCreativesAsync(NetworkName, string, int?, CallSettings)
Lists Creative objects.
Declaration
public virtual PagedAsyncEnumerable<ListCreativesResponse, Creative> ListCreativesAsync(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 Creatives. Format: networks/{network_code} |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListCreativesResponse, Creative> | A pageable asynchronous sequence of Creative resources. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListCreativesResponse, Creative> response = creativeServiceClient.ListCreativesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Creative 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 (ListCreativesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Creative 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<Creative> 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 (Creative 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;
ListCreativesAsync(string, string, int?, CallSettings)
Lists Creative objects.
Declaration
public virtual PagedAsyncEnumerable<ListCreativesResponse, Creative> ListCreativesAsync(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 Creatives. Format: networks/{network_code} |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListCreativesResponse, Creative> | A pageable asynchronous sequence of Creative resources. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListCreativesResponse, Creative> response = creativeServiceClient.ListCreativesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Creative 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 (ListCreativesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Creative 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<Creative> 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 (Creative 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.
UpdateCreative(Creative, FieldMask, CallSettings)
Updates a Creative object.
Declaration
public virtual Creative UpdateCreative(Creative creative, FieldMask updateMask, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Creative | creative | Required. The The |
| FieldMask | updateMask | Optional. The list of fields to update. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Creative | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
Creative creative = new Creative();
FieldMask updateMask = new FieldMask();
// Make the request
Creative response = creativeServiceClient.UpdateCreative(creative, updateMask);
UpdateCreative(UpdateCreativeRequest, CallSettings)
Updates a Creative object.
Declaration
public virtual Creative UpdateCreative(UpdateCreativeRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateCreativeRequest | 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 |
|---|---|
| Creative | The RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = CreativeServiceClient.Create();
// Initialize request argument(s)
UpdateCreativeRequest request = new UpdateCreativeRequest
{
Creative = new Creative(),
UpdateMask = new FieldMask(),
};
// Make the request
Creative response = creativeServiceClient.UpdateCreative(request);
UpdateCreativeAsync(Creative, FieldMask, CallSettings)
Updates a Creative object.
Declaration
public virtual Task<Creative> UpdateCreativeAsync(Creative creative, FieldMask updateMask, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Creative | creative | Required. The The |
| FieldMask | updateMask | Optional. The list of fields to update. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
Creative creative = new Creative();
FieldMask updateMask = new FieldMask();
// Make the request
Creative response = await creativeServiceClient.UpdateCreativeAsync(creative, updateMask);
UpdateCreativeAsync(Creative, FieldMask, CancellationToken)
Updates a Creative object.
Declaration
public virtual Task<Creative> UpdateCreativeAsync(Creative creative, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| Creative | creative | Required. The The |
| FieldMask | updateMask | Optional. The list of fields to update. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
Creative creative = new Creative();
FieldMask updateMask = new FieldMask();
// Make the request
Creative response = await creativeServiceClient.UpdateCreativeAsync(creative, updateMask);
UpdateCreativeAsync(UpdateCreativeRequest, CallSettings)
Updates a Creative object.
Declaration
public virtual Task<Creative> UpdateCreativeAsync(UpdateCreativeRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateCreativeRequest | 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<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCreativeRequest request = new UpdateCreativeRequest
{
Creative = new Creative(),
UpdateMask = new FieldMask(),
};
// Make the request
Creative response = await creativeServiceClient.UpdateCreativeAsync(request);
UpdateCreativeAsync(UpdateCreativeRequest, CancellationToken)
Updates a Creative object.
Declaration
public virtual Task<Creative> UpdateCreativeAsync(UpdateCreativeRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateCreativeRequest | 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<Creative> | A Task containing the RPC response. |
Sample code
// Create client
CreativeServiceClient creativeServiceClient = await CreativeServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCreativeRequest request = new UpdateCreativeRequest
{
Creative = new Creative(),
UpdateMask = new FieldMask(),
};
// Make the request
Creative response = await creativeServiceClient.UpdateCreativeAsync(request);