Class PlacementServiceClient
PlacementService client wrapper, for convenient use.
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class PlacementServiceClient
Remarks
Provides methods for handling Placement objects.
Properties
DefaultEndpoint
The default endpoint for the PlacementService 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 PlacementService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default PlacementService scopes are:
- https://www.googleapis.com/auth/admanager
GrpcClient
The underlying gRPC PlacementService client
Declaration
public virtual PlacementService.PlacementServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| PlacementService.PlacementServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
| Type | Description |
|---|---|
| ServiceMetadata |
Methods
BatchActivatePlacements(BatchActivatePlacementsRequest, CallSettings)
Activates a list of Placement objects.
Declaration
public virtual BatchActivatePlacementsResponse BatchActivatePlacements(BatchActivatePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivatePlacementsRequest | 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 |
|---|---|
| BatchActivatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
BatchActivatePlacementsRequest request = new BatchActivatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchActivatePlacementsResponse response = placementServiceClient.BatchActivatePlacements(request);
BatchActivatePlacements(NetworkName, IEnumerable<PlacementName>, CallSettings)
Activates a list of Placement objects.
Declaration
public virtual BatchActivatePlacementsResponse BatchActivatePlacements(NetworkName parent, IEnumerable<PlacementName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchActivatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchActivatePlacementsResponse response = placementServiceClient.BatchActivatePlacements(parent, names);
BatchActivatePlacements(string, IEnumerable<string>, CallSettings)
Activates a list of Placement objects.
Declaration
public virtual BatchActivatePlacementsResponse BatchActivatePlacements(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchActivatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchActivatePlacementsResponse response = placementServiceClient.BatchActivatePlacements(parent, names);
BatchActivatePlacementsAsync(BatchActivatePlacementsRequest, CallSettings)
Activates a list of Placement objects.
Declaration
public virtual Task<BatchActivatePlacementsResponse> BatchActivatePlacementsAsync(BatchActivatePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivatePlacementsRequest | 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<BatchActivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivatePlacementsRequest request = new BatchActivatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchActivatePlacementsResponse response = await placementServiceClient.BatchActivatePlacementsAsync(request);
BatchActivatePlacementsAsync(BatchActivatePlacementsRequest, CancellationToken)
Activates a list of Placement objects.
Declaration
public virtual Task<BatchActivatePlacementsResponse> BatchActivatePlacementsAsync(BatchActivatePlacementsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivatePlacementsRequest | 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<BatchActivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivatePlacementsRequest request = new BatchActivatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchActivatePlacementsResponse response = await placementServiceClient.BatchActivatePlacementsAsync(request);
BatchActivatePlacementsAsync(NetworkName, IEnumerable<PlacementName>, CallSettings)
Activates a list of Placement objects.
Declaration
public virtual Task<BatchActivatePlacementsResponse> BatchActivatePlacementsAsync(NetworkName parent, IEnumerable<PlacementName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchActivatePlacementsResponse response = await placementServiceClient.BatchActivatePlacementsAsync(parent, names);
BatchActivatePlacementsAsync(NetworkName, IEnumerable<PlacementName>, CancellationToken)
Activates a list of Placement objects.
Declaration
public virtual Task<BatchActivatePlacementsResponse> BatchActivatePlacementsAsync(NetworkName parent, IEnumerable<PlacementName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchActivatePlacementsResponse response = await placementServiceClient.BatchActivatePlacementsAsync(parent, names);
BatchActivatePlacementsAsync(string, IEnumerable<string>, CallSettings)
Activates a list of Placement objects.
Declaration
public virtual Task<BatchActivatePlacementsResponse> BatchActivatePlacementsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchActivatePlacementsResponse response = await placementServiceClient.BatchActivatePlacementsAsync(parent, names);
BatchActivatePlacementsAsync(string, IEnumerable<string>, CancellationToken)
Activates a list of Placement objects.
Declaration
public virtual Task<BatchActivatePlacementsResponse> BatchActivatePlacementsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchActivatePlacementsResponse response = await placementServiceClient.BatchActivatePlacementsAsync(parent, names);
BatchArchivePlacements(BatchArchivePlacementsRequest, CallSettings)
Archives a list of Placement objects.
Declaration
public virtual BatchArchivePlacementsResponse BatchArchivePlacements(BatchArchivePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchArchivePlacementsRequest | 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 |
|---|---|
| BatchArchivePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
BatchArchivePlacementsRequest request = new BatchArchivePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchArchivePlacementsResponse response = placementServiceClient.BatchArchivePlacements(request);
BatchArchivePlacements(NetworkName, IEnumerable<PlacementName>, CallSettings)
Archives a list of Placement objects.
Declaration
public virtual BatchArchivePlacementsResponse BatchArchivePlacements(NetworkName parent, IEnumerable<PlacementName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchArchivePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchArchivePlacementsResponse response = placementServiceClient.BatchArchivePlacements(parent, names);
BatchArchivePlacements(string, IEnumerable<string>, CallSettings)
Archives a list of Placement objects.
Declaration
public virtual BatchArchivePlacementsResponse BatchArchivePlacements(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchArchivePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchArchivePlacementsResponse response = placementServiceClient.BatchArchivePlacements(parent, names);
BatchArchivePlacementsAsync(BatchArchivePlacementsRequest, CallSettings)
Archives a list of Placement objects.
Declaration
public virtual Task<BatchArchivePlacementsResponse> BatchArchivePlacementsAsync(BatchArchivePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchArchivePlacementsRequest | 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<BatchArchivePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchArchivePlacementsRequest request = new BatchArchivePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchArchivePlacementsResponse response = await placementServiceClient.BatchArchivePlacementsAsync(request);
BatchArchivePlacementsAsync(BatchArchivePlacementsRequest, CancellationToken)
Archives a list of Placement objects.
Declaration
public virtual Task<BatchArchivePlacementsResponse> BatchArchivePlacementsAsync(BatchArchivePlacementsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchArchivePlacementsRequest | 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<BatchArchivePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchArchivePlacementsRequest request = new BatchArchivePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchArchivePlacementsResponse response = await placementServiceClient.BatchArchivePlacementsAsync(request);
BatchArchivePlacementsAsync(NetworkName, IEnumerable<PlacementName>, CallSettings)
Archives a list of Placement objects.
Declaration
public virtual Task<BatchArchivePlacementsResponse> BatchArchivePlacementsAsync(NetworkName parent, IEnumerable<PlacementName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchArchivePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchArchivePlacementsResponse response = await placementServiceClient.BatchArchivePlacementsAsync(parent, names);
BatchArchivePlacementsAsync(NetworkName, IEnumerable<PlacementName>, CancellationToken)
Archives a list of Placement objects.
Declaration
public virtual Task<BatchArchivePlacementsResponse> BatchArchivePlacementsAsync(NetworkName parent, IEnumerable<PlacementName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchArchivePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchArchivePlacementsResponse response = await placementServiceClient.BatchArchivePlacementsAsync(parent, names);
BatchArchivePlacementsAsync(string, IEnumerable<string>, CallSettings)
Archives a list of Placement objects.
Declaration
public virtual Task<BatchArchivePlacementsResponse> BatchArchivePlacementsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchArchivePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchArchivePlacementsResponse response = await placementServiceClient.BatchArchivePlacementsAsync(parent, names);
BatchArchivePlacementsAsync(string, IEnumerable<string>, CancellationToken)
Archives a list of Placement objects.
Declaration
public virtual Task<BatchArchivePlacementsResponse> BatchArchivePlacementsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchArchivePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchArchivePlacementsResponse response = await placementServiceClient.BatchArchivePlacementsAsync(parent, names);
BatchCreatePlacements(BatchCreatePlacementsRequest, CallSettings)
API to batch create Placement objects.
Declaration
public virtual BatchCreatePlacementsResponse BatchCreatePlacements(BatchCreatePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreatePlacementsRequest | 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 |
|---|---|
| BatchCreatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
BatchCreatePlacementsRequest request = new BatchCreatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreatePlacementRequest(),
},
};
// Make the request
BatchCreatePlacementsResponse response = placementServiceClient.BatchCreatePlacements(request);
BatchCreatePlacements(NetworkName, IEnumerable<CreatePlacementRequest>, CallSettings)
API to batch create Placement objects.
Declaration
public virtual BatchCreatePlacementsResponse BatchCreatePlacements(NetworkName parent, IEnumerable<CreatePlacementRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where the |
| IEnumerable<CreatePlacementRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchCreatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreatePlacementRequest> requests = new CreatePlacementRequest[]
{
new CreatePlacementRequest(),
};
// Make the request
BatchCreatePlacementsResponse response = placementServiceClient.BatchCreatePlacements(parent, requests);
BatchCreatePlacements(string, IEnumerable<CreatePlacementRequest>, CallSettings)
API to batch create Placement objects.
Declaration
public virtual BatchCreatePlacementsResponse BatchCreatePlacements(string parent, IEnumerable<CreatePlacementRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where the |
| IEnumerable<CreatePlacementRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchCreatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreatePlacementRequest> requests = new CreatePlacementRequest[]
{
new CreatePlacementRequest(),
};
// Make the request
BatchCreatePlacementsResponse response = placementServiceClient.BatchCreatePlacements(parent, requests);
BatchCreatePlacementsAsync(BatchCreatePlacementsRequest, CallSettings)
API to batch create Placement objects.
Declaration
public virtual Task<BatchCreatePlacementsResponse> BatchCreatePlacementsAsync(BatchCreatePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreatePlacementsRequest | 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<BatchCreatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreatePlacementsRequest request = new BatchCreatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreatePlacementRequest(),
},
};
// Make the request
BatchCreatePlacementsResponse response = await placementServiceClient.BatchCreatePlacementsAsync(request);
BatchCreatePlacementsAsync(BatchCreatePlacementsRequest, CancellationToken)
API to batch create Placement objects.
Declaration
public virtual Task<BatchCreatePlacementsResponse> BatchCreatePlacementsAsync(BatchCreatePlacementsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchCreatePlacementsRequest | 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<BatchCreatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreatePlacementsRequest request = new BatchCreatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new CreatePlacementRequest(),
},
};
// Make the request
BatchCreatePlacementsResponse response = await placementServiceClient.BatchCreatePlacementsAsync(request);
BatchCreatePlacementsAsync(NetworkName, IEnumerable<CreatePlacementRequest>, CallSettings)
API to batch create Placement objects.
Declaration
public virtual Task<BatchCreatePlacementsResponse> BatchCreatePlacementsAsync(NetworkName parent, IEnumerable<CreatePlacementRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where the |
| IEnumerable<CreatePlacementRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreatePlacementRequest> requests = new CreatePlacementRequest[]
{
new CreatePlacementRequest(),
};
// Make the request
BatchCreatePlacementsResponse response = await placementServiceClient.BatchCreatePlacementsAsync(parent, requests);
BatchCreatePlacementsAsync(NetworkName, IEnumerable<CreatePlacementRequest>, CancellationToken)
API to batch create Placement objects.
Declaration
public virtual Task<BatchCreatePlacementsResponse> BatchCreatePlacementsAsync(NetworkName parent, IEnumerable<CreatePlacementRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where the |
| IEnumerable<CreatePlacementRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<CreatePlacementRequest> requests = new CreatePlacementRequest[]
{
new CreatePlacementRequest(),
};
// Make the request
BatchCreatePlacementsResponse response = await placementServiceClient.BatchCreatePlacementsAsync(parent, requests);
BatchCreatePlacementsAsync(string, IEnumerable<CreatePlacementRequest>, CallSettings)
API to batch create Placement objects.
Declaration
public virtual Task<BatchCreatePlacementsResponse> BatchCreatePlacementsAsync(string parent, IEnumerable<CreatePlacementRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where the |
| IEnumerable<CreatePlacementRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreatePlacementRequest> requests = new CreatePlacementRequest[]
{
new CreatePlacementRequest(),
};
// Make the request
BatchCreatePlacementsResponse response = await placementServiceClient.BatchCreatePlacementsAsync(parent, requests);
BatchCreatePlacementsAsync(string, IEnumerable<CreatePlacementRequest>, CancellationToken)
API to batch create Placement objects.
Declaration
public virtual Task<BatchCreatePlacementsResponse> BatchCreatePlacementsAsync(string parent, IEnumerable<CreatePlacementRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where the |
| IEnumerable<CreatePlacementRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchCreatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<CreatePlacementRequest> requests = new CreatePlacementRequest[]
{
new CreatePlacementRequest(),
};
// Make the request
BatchCreatePlacementsResponse response = await placementServiceClient.BatchCreatePlacementsAsync(parent, requests);
BatchDeactivatePlacements(BatchDeactivatePlacementsRequest, CallSettings)
Deactivates a list of Placement objects.
Declaration
public virtual BatchDeactivatePlacementsResponse BatchDeactivatePlacements(BatchDeactivatePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivatePlacementsRequest | 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 |
|---|---|
| BatchDeactivatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
BatchDeactivatePlacementsRequest request = new BatchDeactivatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchDeactivatePlacementsResponse response = placementServiceClient.BatchDeactivatePlacements(request);
BatchDeactivatePlacements(NetworkName, IEnumerable<PlacementName>, CallSettings)
Deactivates a list of Placement objects.
Declaration
public virtual BatchDeactivatePlacementsResponse BatchDeactivatePlacements(NetworkName parent, IEnumerable<PlacementName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchDeactivatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchDeactivatePlacementsResponse response = placementServiceClient.BatchDeactivatePlacements(parent, names);
BatchDeactivatePlacements(string, IEnumerable<string>, CallSettings)
Deactivates a list of Placement objects.
Declaration
public virtual BatchDeactivatePlacementsResponse BatchDeactivatePlacements(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchDeactivatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchDeactivatePlacementsResponse response = placementServiceClient.BatchDeactivatePlacements(parent, names);
BatchDeactivatePlacementsAsync(BatchDeactivatePlacementsRequest, CallSettings)
Deactivates a list of Placement objects.
Declaration
public virtual Task<BatchDeactivatePlacementsResponse> BatchDeactivatePlacementsAsync(BatchDeactivatePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivatePlacementsRequest | 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<BatchDeactivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivatePlacementsRequest request = new BatchDeactivatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchDeactivatePlacementsResponse response = await placementServiceClient.BatchDeactivatePlacementsAsync(request);
BatchDeactivatePlacementsAsync(BatchDeactivatePlacementsRequest, CancellationToken)
Deactivates a list of Placement objects.
Declaration
public virtual Task<BatchDeactivatePlacementsResponse> BatchDeactivatePlacementsAsync(BatchDeactivatePlacementsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivatePlacementsRequest | 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<BatchDeactivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivatePlacementsRequest request = new BatchDeactivatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
PlacementNames =
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
},
};
// Make the request
BatchDeactivatePlacementsResponse response = await placementServiceClient.BatchDeactivatePlacementsAsync(request);
BatchDeactivatePlacementsAsync(NetworkName, IEnumerable<PlacementName>, CallSettings)
Deactivates a list of Placement objects.
Declaration
public virtual Task<BatchDeactivatePlacementsResponse> BatchDeactivatePlacementsAsync(NetworkName parent, IEnumerable<PlacementName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchDeactivatePlacementsResponse response = await placementServiceClient.BatchDeactivatePlacementsAsync(parent, names);
BatchDeactivatePlacementsAsync(NetworkName, IEnumerable<PlacementName>, CancellationToken)
Deactivates a list of Placement objects.
Declaration
public virtual Task<BatchDeactivatePlacementsResponse> BatchDeactivatePlacementsAsync(NetworkName parent, IEnumerable<PlacementName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. Format: |
| IEnumerable<PlacementName> | names | Required. The names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<PlacementName> names = new PlacementName[]
{
PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
BatchDeactivatePlacementsResponse response = await placementServiceClient.BatchDeactivatePlacementsAsync(parent, names);
BatchDeactivatePlacementsAsync(string, IEnumerable<string>, CallSettings)
Deactivates a list of Placement objects.
Declaration
public virtual Task<BatchDeactivatePlacementsResponse> BatchDeactivatePlacementsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchDeactivatePlacementsResponse response = await placementServiceClient.BatchDeactivatePlacementsAsync(parent, names);
BatchDeactivatePlacementsAsync(string, IEnumerable<string>, CancellationToken)
Deactivates a list of Placement objects.
Declaration
public virtual Task<BatchDeactivatePlacementsResponse> BatchDeactivatePlacementsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. Format: |
| IEnumerable<string> | names | Required. The names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/placements/[PLACEMENT]",
};
// Make the request
BatchDeactivatePlacementsResponse response = await placementServiceClient.BatchDeactivatePlacementsAsync(parent, names);
BatchUpdatePlacements(BatchUpdatePlacementsRequest, CallSettings)
API to batch update Placement objects.
Declaration
public virtual BatchUpdatePlacementsResponse BatchUpdatePlacements(BatchUpdatePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdatePlacementsRequest | 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 |
|---|---|
| BatchUpdatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
BatchUpdatePlacementsRequest request = new BatchUpdatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdatePlacementRequest(),
},
};
// Make the request
BatchUpdatePlacementsResponse response = placementServiceClient.BatchUpdatePlacements(request);
BatchUpdatePlacements(NetworkName, IEnumerable<UpdatePlacementRequest>, CallSettings)
API to batch update Placement objects.
Declaration
public virtual BatchUpdatePlacementsResponse BatchUpdatePlacements(NetworkName parent, IEnumerable<UpdatePlacementRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdatePlacementRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchUpdatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdatePlacementRequest> requests = new UpdatePlacementRequest[]
{
new UpdatePlacementRequest(),
};
// Make the request
BatchUpdatePlacementsResponse response = placementServiceClient.BatchUpdatePlacements(parent, requests);
BatchUpdatePlacements(string, IEnumerable<UpdatePlacementRequest>, CallSettings)
API to batch update Placement objects.
Declaration
public virtual BatchUpdatePlacementsResponse BatchUpdatePlacements(string parent, IEnumerable<UpdatePlacementRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdatePlacementRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchUpdatePlacementsResponse | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdatePlacementRequest> requests = new UpdatePlacementRequest[]
{
new UpdatePlacementRequest(),
};
// Make the request
BatchUpdatePlacementsResponse response = placementServiceClient.BatchUpdatePlacements(parent, requests);
BatchUpdatePlacementsAsync(BatchUpdatePlacementsRequest, CallSettings)
API to batch update Placement objects.
Declaration
public virtual Task<BatchUpdatePlacementsResponse> BatchUpdatePlacementsAsync(BatchUpdatePlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdatePlacementsRequest | 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<BatchUpdatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdatePlacementsRequest request = new BatchUpdatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdatePlacementRequest(),
},
};
// Make the request
BatchUpdatePlacementsResponse response = await placementServiceClient.BatchUpdatePlacementsAsync(request);
BatchUpdatePlacementsAsync(BatchUpdatePlacementsRequest, CancellationToken)
API to batch update Placement objects.
Declaration
public virtual Task<BatchUpdatePlacementsResponse> BatchUpdatePlacementsAsync(BatchUpdatePlacementsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchUpdatePlacementsRequest | 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<BatchUpdatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdatePlacementsRequest request = new BatchUpdatePlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Requests =
{
new UpdatePlacementRequest(),
},
};
// Make the request
BatchUpdatePlacementsResponse response = await placementServiceClient.BatchUpdatePlacementsAsync(request);
BatchUpdatePlacementsAsync(NetworkName, IEnumerable<UpdatePlacementRequest>, CallSettings)
API to batch update Placement objects.
Declaration
public virtual Task<BatchUpdatePlacementsResponse> BatchUpdatePlacementsAsync(NetworkName parent, IEnumerable<UpdatePlacementRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdatePlacementRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdatePlacementRequest> requests = new UpdatePlacementRequest[]
{
new UpdatePlacementRequest(),
};
// Make the request
BatchUpdatePlacementsResponse response = await placementServiceClient.BatchUpdatePlacementsAsync(parent, requests);
BatchUpdatePlacementsAsync(NetworkName, IEnumerable<UpdatePlacementRequest>, CancellationToken)
API to batch update Placement objects.
Declaration
public virtual Task<BatchUpdatePlacementsResponse> BatchUpdatePlacementsAsync(NetworkName parent, IEnumerable<UpdatePlacementRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<UpdatePlacementRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<UpdatePlacementRequest> requests = new UpdatePlacementRequest[]
{
new UpdatePlacementRequest(),
};
// Make the request
BatchUpdatePlacementsResponse response = await placementServiceClient.BatchUpdatePlacementsAsync(parent, requests);
BatchUpdatePlacementsAsync(string, IEnumerable<UpdatePlacementRequest>, CallSettings)
API to batch update Placement objects.
Declaration
public virtual Task<BatchUpdatePlacementsResponse> BatchUpdatePlacementsAsync(string parent, IEnumerable<UpdatePlacementRequest> requests, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdatePlacementRequest> | requests | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdatePlacementRequest> requests = new UpdatePlacementRequest[]
{
new UpdatePlacementRequest(),
};
// Make the request
BatchUpdatePlacementsResponse response = await placementServiceClient.BatchUpdatePlacementsAsync(parent, requests);
BatchUpdatePlacementsAsync(string, IEnumerable<UpdatePlacementRequest>, CancellationToken)
API to batch update Placement objects.
Declaration
public virtual Task<BatchUpdatePlacementsResponse> BatchUpdatePlacementsAsync(string parent, IEnumerable<UpdatePlacementRequest> requests, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<UpdatePlacementRequest> | requests | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchUpdatePlacementsResponse> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<UpdatePlacementRequest> requests = new UpdatePlacementRequest[]
{
new UpdatePlacementRequest(),
};
// Make the request
BatchUpdatePlacementsResponse response = await placementServiceClient.BatchUpdatePlacementsAsync(parent, requests);
Create()
Synchronously creates a PlacementServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PlacementServiceClientBuilder.
Declaration
public static PlacementServiceClient Create()
Returns
| Type | Description |
|---|---|
| PlacementServiceClient | The created PlacementServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a PlacementServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use PlacementServiceClientBuilder.
Declaration
public static Task<PlacementServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<PlacementServiceClient> | The task representing the created PlacementServiceClient. |
CreatePlacement(CreatePlacementRequest, CallSettings)
API to create an Placement object.
Declaration
public virtual Placement CreatePlacement(CreatePlacementRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreatePlacementRequest | 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 |
|---|---|
| Placement | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
CreatePlacementRequest request = new CreatePlacementRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Placement = new Placement(),
};
// Make the request
Placement response = placementServiceClient.CreatePlacement(request);
CreatePlacement(NetworkName, Placement, CallSettings)
API to create an Placement object.
Declaration
public virtual Placement CreatePlacement(NetworkName parent, Placement placement, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Placement | placement | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Placement | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Placement placement = new Placement();
// Make the request
Placement response = placementServiceClient.CreatePlacement(parent, placement);
CreatePlacement(string, Placement, CallSettings)
API to create an Placement object.
Declaration
public virtual Placement CreatePlacement(string parent, Placement placement, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Placement | placement | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Placement | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Placement placement = new Placement();
// Make the request
Placement response = placementServiceClient.CreatePlacement(parent, placement);
CreatePlacementAsync(CreatePlacementRequest, CallSettings)
API to create an Placement object.
Declaration
public virtual Task<Placement> CreatePlacementAsync(CreatePlacementRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreatePlacementRequest | 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<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
CreatePlacementRequest request = new CreatePlacementRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Placement = new Placement(),
};
// Make the request
Placement response = await placementServiceClient.CreatePlacementAsync(request);
CreatePlacementAsync(CreatePlacementRequest, CancellationToken)
API to create an Placement object.
Declaration
public virtual Task<Placement> CreatePlacementAsync(CreatePlacementRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CreatePlacementRequest | 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<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
CreatePlacementRequest request = new CreatePlacementRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Placement = new Placement(),
};
// Make the request
Placement response = await placementServiceClient.CreatePlacementAsync(request);
CreatePlacementAsync(NetworkName, Placement, CallSettings)
API to create an Placement object.
Declaration
public virtual Task<Placement> CreatePlacementAsync(NetworkName parent, Placement placement, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Placement | placement | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Placement placement = new Placement();
// Make the request
Placement response = await placementServiceClient.CreatePlacementAsync(parent, placement);
CreatePlacementAsync(NetworkName, Placement, CancellationToken)
API to create an Placement object.
Declaration
public virtual Task<Placement> CreatePlacementAsync(NetworkName parent, Placement placement, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where this |
| Placement | placement | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
Placement placement = new Placement();
// Make the request
Placement response = await placementServiceClient.CreatePlacementAsync(parent, placement);
CreatePlacementAsync(string, Placement, CallSettings)
API to create an Placement object.
Declaration
public virtual Task<Placement> CreatePlacementAsync(string parent, Placement placement, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Placement | placement | Required. The |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Placement placement = new Placement();
// Make the request
Placement response = await placementServiceClient.CreatePlacementAsync(parent, placement);
CreatePlacementAsync(string, Placement, CancellationToken)
API to create an Placement object.
Declaration
public virtual Task<Placement> CreatePlacementAsync(string parent, Placement placement, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this |
| Placement | placement | Required. The |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
Placement placement = new Placement();
// Make the request
Placement response = await placementServiceClient.CreatePlacementAsync(parent, placement);
GetPlacement(GetPlacementRequest, CallSettings)
API to retrieve a Placement object.
Declaration
public virtual Placement GetPlacement(GetPlacementRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetPlacementRequest | 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 |
|---|---|
| Placement | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
GetPlacementRequest request = new GetPlacementRequest
{
PlacementName = PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
Placement response = placementServiceClient.GetPlacement(request);
GetPlacement(PlacementName, CallSettings)
API to retrieve a Placement object.
Declaration
public virtual Placement GetPlacement(PlacementName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| PlacementName | name | Required. The resource name of the Placement.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Placement | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
PlacementName name = PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]");
// Make the request
Placement response = placementServiceClient.GetPlacement(name);
GetPlacement(string, CallSettings)
API to retrieve a Placement object.
Declaration
public virtual Placement GetPlacement(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Placement.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Placement | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/placements/[PLACEMENT]";
// Make the request
Placement response = placementServiceClient.GetPlacement(name);
GetPlacementAsync(GetPlacementRequest, CallSettings)
API to retrieve a Placement object.
Declaration
public virtual Task<Placement> GetPlacementAsync(GetPlacementRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetPlacementRequest | 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<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
GetPlacementRequest request = new GetPlacementRequest
{
PlacementName = PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
Placement response = await placementServiceClient.GetPlacementAsync(request);
GetPlacementAsync(GetPlacementRequest, CancellationToken)
API to retrieve a Placement object.
Declaration
public virtual Task<Placement> GetPlacementAsync(GetPlacementRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| GetPlacementRequest | 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<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
GetPlacementRequest request = new GetPlacementRequest
{
PlacementName = PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]"),
};
// Make the request
Placement response = await placementServiceClient.GetPlacementAsync(request);
GetPlacementAsync(PlacementName, CallSettings)
API to retrieve a Placement object.
Declaration
public virtual Task<Placement> GetPlacementAsync(PlacementName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| PlacementName | name | Required. The resource name of the Placement.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
PlacementName name = PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]");
// Make the request
Placement response = await placementServiceClient.GetPlacementAsync(name);
GetPlacementAsync(PlacementName, CancellationToken)
API to retrieve a Placement object.
Declaration
public virtual Task<Placement> GetPlacementAsync(PlacementName name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| PlacementName | name | Required. The resource name of the Placement.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
PlacementName name = PlacementName.FromNetworkCodePlacement("[NETWORK_CODE]", "[PLACEMENT]");
// Make the request
Placement response = await placementServiceClient.GetPlacementAsync(name);
GetPlacementAsync(string, CallSettings)
API to retrieve a Placement object.
Declaration
public virtual Task<Placement> GetPlacementAsync(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Placement.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/placements/[PLACEMENT]";
// Make the request
Placement response = await placementServiceClient.GetPlacementAsync(name);
GetPlacementAsync(string, CancellationToken)
API to retrieve a Placement object.
Declaration
public virtual Task<Placement> GetPlacementAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the Placement.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/placements/[PLACEMENT]";
// Make the request
Placement response = await placementServiceClient.GetPlacementAsync(name);
ListPlacements(ListPlacementsRequest, CallSettings)
API to retrieve a list of Placement objects.
Declaration
public virtual PagedEnumerable<ListPlacementsResponse, Placement> ListPlacements(ListPlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListPlacementsRequest | 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<ListPlacementsResponse, Placement> | A pageable sequence of Placement resources. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
ListPlacementsRequest request = new ListPlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedEnumerable<ListPlacementsResponse, Placement> response = placementServiceClient.ListPlacements(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Placement 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 (ListPlacementsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Placement 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<Placement> 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 (Placement 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;
ListPlacements(NetworkName, string, int?, CallSettings)
API to retrieve a list of Placement objects.
Declaration
public virtual PagedEnumerable<ListPlacementsResponse, Placement> ListPlacements(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 Placements.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListPlacementsResponse, Placement> | A pageable sequence of Placement resources. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListPlacementsResponse, Placement> response = placementServiceClient.ListPlacements(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Placement 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 (ListPlacementsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Placement 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<Placement> 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 (Placement 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;
ListPlacements(string, string, int?, CallSettings)
API to retrieve a list of Placement objects.
Declaration
public virtual PagedEnumerable<ListPlacementsResponse, Placement> ListPlacements(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 Placements.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListPlacementsResponse, Placement> | A pageable sequence of Placement resources. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListPlacementsResponse, Placement> response = placementServiceClient.ListPlacements(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Placement 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 (ListPlacementsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Placement 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<Placement> 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 (Placement 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;
ListPlacementsAsync(ListPlacementsRequest, CallSettings)
API to retrieve a list of Placement objects.
Declaration
public virtual PagedAsyncEnumerable<ListPlacementsResponse, Placement> ListPlacementsAsync(ListPlacementsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListPlacementsRequest | 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<ListPlacementsResponse, Placement> | A pageable asynchronous sequence of Placement resources. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
ListPlacementsRequest request = new ListPlacementsRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListPlacementsResponse, Placement> response = placementServiceClient.ListPlacementsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Placement item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPlacementsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Placement 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<Placement> 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 (Placement 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;
ListPlacementsAsync(NetworkName, string, int?, CallSettings)
API to retrieve a list of Placement objects.
Declaration
public virtual PagedAsyncEnumerable<ListPlacementsResponse, Placement> ListPlacementsAsync(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 Placements.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListPlacementsResponse, Placement> | A pageable asynchronous sequence of Placement resources. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListPlacementsResponse, Placement> response = placementServiceClient.ListPlacementsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Placement item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPlacementsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Placement 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<Placement> 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 (Placement 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;
ListPlacementsAsync(string, string, int?, CallSettings)
API to retrieve a list of Placement objects.
Declaration
public virtual PagedAsyncEnumerable<ListPlacementsResponse, Placement> ListPlacementsAsync(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 Placements.
Format: |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListPlacementsResponse, Placement> | A pageable asynchronous sequence of Placement resources. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListPlacementsResponse, Placement> response = placementServiceClient.ListPlacementsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Placement item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPlacementsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Placement 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<Placement> 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 (Placement 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.
UpdatePlacement(Placement, FieldMask, CallSettings)
API to update an Placement object.
Declaration
public virtual Placement UpdatePlacement(Placement placement, FieldMask updateMask, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Placement | placement | Required. The The |
| FieldMask | updateMask | Required. The list of fields to update. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Placement | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
Placement placement = new Placement();
FieldMask updateMask = new FieldMask();
// Make the request
Placement response = placementServiceClient.UpdatePlacement(placement, updateMask);
UpdatePlacement(UpdatePlacementRequest, CallSettings)
API to update an Placement object.
Declaration
public virtual Placement UpdatePlacement(UpdatePlacementRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdatePlacementRequest | 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 |
|---|---|
| Placement | The RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = PlacementServiceClient.Create();
// Initialize request argument(s)
UpdatePlacementRequest request = new UpdatePlacementRequest
{
Placement = new Placement(),
UpdateMask = new FieldMask(),
};
// Make the request
Placement response = placementServiceClient.UpdatePlacement(request);
UpdatePlacementAsync(Placement, FieldMask, CallSettings)
API to update an Placement object.
Declaration
public virtual Task<Placement> UpdatePlacementAsync(Placement placement, FieldMask updateMask, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Placement | placement | Required. The The |
| FieldMask | updateMask | Required. The list of fields to update. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
Placement placement = new Placement();
FieldMask updateMask = new FieldMask();
// Make the request
Placement response = await placementServiceClient.UpdatePlacementAsync(placement, updateMask);
UpdatePlacementAsync(Placement, FieldMask, CancellationToken)
API to update an Placement object.
Declaration
public virtual Task<Placement> UpdatePlacementAsync(Placement placement, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| Placement | placement | Required. The The |
| FieldMask | updateMask | Required. The list of fields to update. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
Placement placement = new Placement();
FieldMask updateMask = new FieldMask();
// Make the request
Placement response = await placementServiceClient.UpdatePlacementAsync(placement, updateMask);
UpdatePlacementAsync(UpdatePlacementRequest, CallSettings)
API to update an Placement object.
Declaration
public virtual Task<Placement> UpdatePlacementAsync(UpdatePlacementRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdatePlacementRequest | 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<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
UpdatePlacementRequest request = new UpdatePlacementRequest
{
Placement = new Placement(),
UpdateMask = new FieldMask(),
};
// Make the request
Placement response = await placementServiceClient.UpdatePlacementAsync(request);
UpdatePlacementAsync(UpdatePlacementRequest, CancellationToken)
API to update an Placement object.
Declaration
public virtual Task<Placement> UpdatePlacementAsync(UpdatePlacementRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdatePlacementRequest | 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<Placement> | A Task containing the RPC response. |
Sample code
// Create client
PlacementServiceClient placementServiceClient = await PlacementServiceClient.CreateAsync();
// Initialize request argument(s)
UpdatePlacementRequest request = new UpdatePlacementRequest
{
Placement = new Placement(),
UpdateMask = new FieldMask(),
};
// Make the request
Placement response = await placementServiceClient.UpdatePlacementAsync(request);