Class ContentBundleServiceClient
ContentBundleService client wrapper, for convenient use.
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class ContentBundleServiceClient
Remarks
Provides methods for handling ContentBundle objects.
Properties
DefaultEndpoint
The default endpoint for the ContentBundleService 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 ContentBundleService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default ContentBundleService scopes are:
- https://www.googleapis.com/auth/admanager
- https://www.googleapis.com/auth/admanager.readonly
GrpcClient
The underlying gRPC ContentBundleService client
Declaration
public virtual ContentBundleService.ContentBundleServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| ContentBundleService.ContentBundleServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
| Type | Description |
|---|---|
| ServiceMetadata |
Methods
BatchActivateContentBundles(BatchActivateContentBundlesRequest, CallSettings)
Activate a list of ContentBundle objects.
Declaration
public virtual BatchActivateContentBundlesResponse BatchActivateContentBundles(BatchActivateContentBundlesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateContentBundlesRequest | 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 |
|---|---|
| BatchActivateContentBundlesResponse | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
BatchActivateContentBundlesRequest request = new BatchActivateContentBundlesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
ContentBundleNames =
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
},
};
// Make the request
BatchActivateContentBundlesResponse response = contentBundleServiceClient.BatchActivateContentBundles(request);
BatchActivateContentBundles(NetworkName, IEnumerable<ContentBundleName>, CallSettings)
Activate a list of ContentBundle objects.
Declaration
public virtual BatchActivateContentBundlesResponse BatchActivateContentBundles(NetworkName parent, IEnumerable<ContentBundleName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<ContentBundleName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchActivateContentBundlesResponse | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<ContentBundleName> names = new ContentBundleName[]
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
BatchActivateContentBundlesResponse response = contentBundleServiceClient.BatchActivateContentBundles(parent, names);
BatchActivateContentBundles(string, IEnumerable<string>, CallSettings)
Activate a list of ContentBundle objects.
Declaration
public virtual BatchActivateContentBundlesResponse BatchActivateContentBundles(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchActivateContentBundlesResponse | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]",
};
// Make the request
BatchActivateContentBundlesResponse response = contentBundleServiceClient.BatchActivateContentBundles(parent, names);
BatchActivateContentBundlesAsync(BatchActivateContentBundlesRequest, CallSettings)
Activate a list of ContentBundle objects.
Declaration
public virtual Task<BatchActivateContentBundlesResponse> BatchActivateContentBundlesAsync(BatchActivateContentBundlesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateContentBundlesRequest | 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<BatchActivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateContentBundlesRequest request = new BatchActivateContentBundlesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
ContentBundleNames =
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
},
};
// Make the request
BatchActivateContentBundlesResponse response = await contentBundleServiceClient.BatchActivateContentBundlesAsync(request);
BatchActivateContentBundlesAsync(BatchActivateContentBundlesRequest, CancellationToken)
Activate a list of ContentBundle objects.
Declaration
public virtual Task<BatchActivateContentBundlesResponse> BatchActivateContentBundlesAsync(BatchActivateContentBundlesRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchActivateContentBundlesRequest | 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<BatchActivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
BatchActivateContentBundlesRequest request = new BatchActivateContentBundlesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
ContentBundleNames =
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
},
};
// Make the request
BatchActivateContentBundlesResponse response = await contentBundleServiceClient.BatchActivateContentBundlesAsync(request);
BatchActivateContentBundlesAsync(NetworkName, IEnumerable<ContentBundleName>, CallSettings)
Activate a list of ContentBundle objects.
Declaration
public virtual Task<BatchActivateContentBundlesResponse> BatchActivateContentBundlesAsync(NetworkName parent, IEnumerable<ContentBundleName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<ContentBundleName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<ContentBundleName> names = new ContentBundleName[]
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
BatchActivateContentBundlesResponse response = await contentBundleServiceClient.BatchActivateContentBundlesAsync(parent, names);
BatchActivateContentBundlesAsync(NetworkName, IEnumerable<ContentBundleName>, CancellationToken)
Activate a list of ContentBundle objects.
Declaration
public virtual Task<BatchActivateContentBundlesResponse> BatchActivateContentBundlesAsync(NetworkName parent, IEnumerable<ContentBundleName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<ContentBundleName> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<ContentBundleName> names = new ContentBundleName[]
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
BatchActivateContentBundlesResponse response = await contentBundleServiceClient.BatchActivateContentBundlesAsync(parent, names);
BatchActivateContentBundlesAsync(string, IEnumerable<string>, CallSettings)
Activate a list of ContentBundle objects.
Declaration
public virtual Task<BatchActivateContentBundlesResponse> BatchActivateContentBundlesAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]",
};
// Make the request
BatchActivateContentBundlesResponse response = await contentBundleServiceClient.BatchActivateContentBundlesAsync(parent, names);
BatchActivateContentBundlesAsync(string, IEnumerable<string>, CancellationToken)
Activate a list of ContentBundle objects.
Declaration
public virtual Task<BatchActivateContentBundlesResponse> BatchActivateContentBundlesAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<string> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchActivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]",
};
// Make the request
BatchActivateContentBundlesResponse response = await contentBundleServiceClient.BatchActivateContentBundlesAsync(parent, names);
BatchDeactivateContentBundles(BatchDeactivateContentBundlesRequest, CallSettings)
Deactivates a list of ContentBundle objects.
Declaration
public virtual BatchDeactivateContentBundlesResponse BatchDeactivateContentBundles(BatchDeactivateContentBundlesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateContentBundlesRequest | 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 |
|---|---|
| BatchDeactivateContentBundlesResponse | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
BatchDeactivateContentBundlesRequest request = new BatchDeactivateContentBundlesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
ContentBundleNames =
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
},
};
// Make the request
BatchDeactivateContentBundlesResponse response = contentBundleServiceClient.BatchDeactivateContentBundles(request);
BatchDeactivateContentBundles(NetworkName, IEnumerable<ContentBundleName>, CallSettings)
Deactivates a list of ContentBundle objects.
Declaration
public virtual BatchDeactivateContentBundlesResponse BatchDeactivateContentBundles(NetworkName parent, IEnumerable<ContentBundleName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<ContentBundleName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchDeactivateContentBundlesResponse | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<ContentBundleName> names = new ContentBundleName[]
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
BatchDeactivateContentBundlesResponse response = contentBundleServiceClient.BatchDeactivateContentBundles(parent, names);
BatchDeactivateContentBundles(string, IEnumerable<string>, CallSettings)
Deactivates a list of ContentBundle objects.
Declaration
public virtual BatchDeactivateContentBundlesResponse BatchDeactivateContentBundles(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchDeactivateContentBundlesResponse | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]",
};
// Make the request
BatchDeactivateContentBundlesResponse response = contentBundleServiceClient.BatchDeactivateContentBundles(parent, names);
BatchDeactivateContentBundlesAsync(BatchDeactivateContentBundlesRequest, CallSettings)
Deactivates a list of ContentBundle objects.
Declaration
public virtual Task<BatchDeactivateContentBundlesResponse> BatchDeactivateContentBundlesAsync(BatchDeactivateContentBundlesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateContentBundlesRequest | 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<BatchDeactivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateContentBundlesRequest request = new BatchDeactivateContentBundlesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
ContentBundleNames =
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
},
};
// Make the request
BatchDeactivateContentBundlesResponse response = await contentBundleServiceClient.BatchDeactivateContentBundlesAsync(request);
BatchDeactivateContentBundlesAsync(BatchDeactivateContentBundlesRequest, CancellationToken)
Deactivates a list of ContentBundle objects.
Declaration
public virtual Task<BatchDeactivateContentBundlesResponse> BatchDeactivateContentBundlesAsync(BatchDeactivateContentBundlesRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchDeactivateContentBundlesRequest | 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<BatchDeactivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeactivateContentBundlesRequest request = new BatchDeactivateContentBundlesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
ContentBundleNames =
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
},
};
// Make the request
BatchDeactivateContentBundlesResponse response = await contentBundleServiceClient.BatchDeactivateContentBundlesAsync(request);
BatchDeactivateContentBundlesAsync(NetworkName, IEnumerable<ContentBundleName>, CallSettings)
Deactivates a list of ContentBundle objects.
Declaration
public virtual Task<BatchDeactivateContentBundlesResponse> BatchDeactivateContentBundlesAsync(NetworkName parent, IEnumerable<ContentBundleName> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<ContentBundleName> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<ContentBundleName> names = new ContentBundleName[]
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
BatchDeactivateContentBundlesResponse response = await contentBundleServiceClient.BatchDeactivateContentBundlesAsync(parent, names);
BatchDeactivateContentBundlesAsync(NetworkName, IEnumerable<ContentBundleName>, CancellationToken)
Deactivates a list of ContentBundle objects.
Declaration
public virtual Task<BatchDeactivateContentBundlesResponse> BatchDeactivateContentBundlesAsync(NetworkName parent, IEnumerable<ContentBundleName> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkName | parent | Required. The parent resource where |
| IEnumerable<ContentBundleName> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
IEnumerable<ContentBundleName> names = new ContentBundleName[]
{
ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
BatchDeactivateContentBundlesResponse response = await contentBundleServiceClient.BatchDeactivateContentBundlesAsync(parent, names);
BatchDeactivateContentBundlesAsync(string, IEnumerable<string>, CallSettings)
Deactivates a list of ContentBundle objects.
Declaration
public virtual Task<BatchDeactivateContentBundlesResponse> BatchDeactivateContentBundlesAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<string> | names | Required. The resource names of the |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]",
};
// Make the request
BatchDeactivateContentBundlesResponse response = await contentBundleServiceClient.BatchDeactivateContentBundlesAsync(parent, names);
BatchDeactivateContentBundlesAsync(string, IEnumerable<string>, CancellationToken)
Deactivates a list of ContentBundle objects.
Declaration
public virtual Task<BatchDeactivateContentBundlesResponse> BatchDeactivateContentBundlesAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where |
| IEnumerable<string> | names | Required. The resource names of the |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<BatchDeactivateContentBundlesResponse> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
IEnumerable<string> names = new string[]
{
"networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]",
};
// Make the request
BatchDeactivateContentBundlesResponse response = await contentBundleServiceClient.BatchDeactivateContentBundlesAsync(parent, names);
Create()
Synchronously creates a ContentBundleServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ContentBundleServiceClientBuilder.
Declaration
public static ContentBundleServiceClient Create()
Returns
| Type | Description |
|---|---|
| ContentBundleServiceClient | The created ContentBundleServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a ContentBundleServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ContentBundleServiceClientBuilder.
Declaration
public static Task<ContentBundleServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<ContentBundleServiceClient> | The task representing the created ContentBundleServiceClient. |
GetContentBundle(ContentBundleName, CallSettings)
Retrieves a ContentBundle object.
Declaration
public virtual ContentBundle GetContentBundle(ContentBundleName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentBundleName | name | Required. The resource name of the ContentBundle.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| ContentBundle | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
ContentBundleName name = ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]");
// Make the request
ContentBundle response = contentBundleServiceClient.GetContentBundle(name);
GetContentBundle(GetContentBundleRequest, CallSettings)
Retrieves a ContentBundle object.
Declaration
public virtual ContentBundle GetContentBundle(GetContentBundleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetContentBundleRequest | 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 |
|---|---|
| ContentBundle | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
GetContentBundleRequest request = new GetContentBundleRequest
{
ContentBundleName = ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
ContentBundle response = contentBundleServiceClient.GetContentBundle(request);
GetContentBundle(string, CallSettings)
Retrieves a ContentBundle object.
Declaration
public virtual ContentBundle GetContentBundle(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the ContentBundle.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| ContentBundle | The RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]";
// Make the request
ContentBundle response = contentBundleServiceClient.GetContentBundle(name);
GetContentBundleAsync(ContentBundleName, CallSettings)
Retrieves a ContentBundle object.
Declaration
public virtual Task<ContentBundle> GetContentBundleAsync(ContentBundleName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentBundleName | name | Required. The resource name of the ContentBundle.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<ContentBundle> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
ContentBundleName name = ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]");
// Make the request
ContentBundle response = await contentBundleServiceClient.GetContentBundleAsync(name);
GetContentBundleAsync(ContentBundleName, CancellationToken)
Retrieves a ContentBundle object.
Declaration
public virtual Task<ContentBundle> GetContentBundleAsync(ContentBundleName name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentBundleName | name | Required. The resource name of the ContentBundle.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<ContentBundle> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
ContentBundleName name = ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]");
// Make the request
ContentBundle response = await contentBundleServiceClient.GetContentBundleAsync(name);
GetContentBundleAsync(GetContentBundleRequest, CallSettings)
Retrieves a ContentBundle object.
Declaration
public virtual Task<ContentBundle> GetContentBundleAsync(GetContentBundleRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetContentBundleRequest | 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<ContentBundle> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
GetContentBundleRequest request = new GetContentBundleRequest
{
ContentBundleName = ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
ContentBundle response = await contentBundleServiceClient.GetContentBundleAsync(request);
GetContentBundleAsync(GetContentBundleRequest, CancellationToken)
Retrieves a ContentBundle object.
Declaration
public virtual Task<ContentBundle> GetContentBundleAsync(GetContentBundleRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| GetContentBundleRequest | 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<ContentBundle> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
GetContentBundleRequest request = new GetContentBundleRequest
{
ContentBundleName = ContentBundleName.FromNetworkCodeContentBundle("[NETWORK_CODE]", "[CONTENT_BUNDLE]"),
};
// Make the request
ContentBundle response = await contentBundleServiceClient.GetContentBundleAsync(request);
GetContentBundleAsync(string, CallSettings)
Retrieves a ContentBundle object.
Declaration
public virtual Task<ContentBundle> GetContentBundleAsync(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the ContentBundle.
Format: |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<ContentBundle> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]";
// Make the request
ContentBundle response = await contentBundleServiceClient.GetContentBundleAsync(name);
GetContentBundleAsync(string, CancellationToken)
Retrieves a ContentBundle object.
Declaration
public virtual Task<ContentBundle> GetContentBundleAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The resource name of the ContentBundle.
Format: |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<ContentBundle> | A Task containing the RPC response. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/contentBundles/[CONTENT_BUNDLE]";
// Make the request
ContentBundle response = await contentBundleServiceClient.GetContentBundleAsync(name);
ListContentBundles(ListContentBundlesRequest, CallSettings)
Lists ContentBundle objects.
Declaration
public virtual PagedEnumerable<ListContentBundlesResponse, ContentBundle> ListContentBundles(ListContentBundlesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListContentBundlesRequest | 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<ListContentBundlesResponse, ContentBundle> | A pageable sequence of ContentBundle resources. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
ListContentBundlesRequest request = new ListContentBundlesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedEnumerable<ListContentBundlesResponse, ContentBundle> response = contentBundleServiceClient.ListContentBundles(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (ContentBundle 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 (ListContentBundlesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ContentBundle 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<ContentBundle> 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 (ContentBundle 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;
ListContentBundles(NetworkName, string, int?, CallSettings)
Lists ContentBundle objects.
Declaration
public virtual PagedEnumerable<ListContentBundlesResponse, ContentBundle> ListContentBundles(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 ContentBundles.
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<ListContentBundlesResponse, ContentBundle> | A pageable sequence of ContentBundle resources. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedEnumerable<ListContentBundlesResponse, ContentBundle> response = contentBundleServiceClient.ListContentBundles(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (ContentBundle 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 (ListContentBundlesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ContentBundle 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<ContentBundle> 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 (ContentBundle 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;
ListContentBundles(string, string, int?, CallSettings)
Lists ContentBundle objects.
Declaration
public virtual PagedEnumerable<ListContentBundlesResponse, ContentBundle> ListContentBundles(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 ContentBundles.
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<ListContentBundlesResponse, ContentBundle> | A pageable sequence of ContentBundle resources. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = ContentBundleServiceClient.Create();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedEnumerable<ListContentBundlesResponse, ContentBundle> response = contentBundleServiceClient.ListContentBundles(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (ContentBundle 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 (ListContentBundlesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ContentBundle 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<ContentBundle> 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 (ContentBundle 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;
ListContentBundlesAsync(ListContentBundlesRequest, CallSettings)
Lists ContentBundle objects.
Declaration
public virtual PagedAsyncEnumerable<ListContentBundlesResponse, ContentBundle> ListContentBundlesAsync(ListContentBundlesRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListContentBundlesRequest | 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<ListContentBundlesResponse, ContentBundle> | A pageable asynchronous sequence of ContentBundle resources. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
ListContentBundlesRequest request = new ListContentBundlesRequest
{
ParentAsNetworkName = NetworkName.FromNetworkCode("[NETWORK_CODE]"),
Filter = "",
OrderBy = "",
Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListContentBundlesResponse, ContentBundle> response = contentBundleServiceClient.ListContentBundlesAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (ContentBundle 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 (ListContentBundlesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ContentBundle 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<ContentBundle> 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 (ContentBundle 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;
ListContentBundlesAsync(NetworkName, string, int?, CallSettings)
Lists ContentBundle objects.
Declaration
public virtual PagedAsyncEnumerable<ListContentBundlesResponse, ContentBundle> ListContentBundlesAsync(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 ContentBundles.
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<ListContentBundlesResponse, ContentBundle> | A pageable asynchronous sequence of ContentBundle resources. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
NetworkName parent = NetworkName.FromNetworkCode("[NETWORK_CODE]");
// Make the request
PagedAsyncEnumerable<ListContentBundlesResponse, ContentBundle> response = contentBundleServiceClient.ListContentBundlesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (ContentBundle 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 (ListContentBundlesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ContentBundle 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<ContentBundle> 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 (ContentBundle 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;
ListContentBundlesAsync(string, string, int?, CallSettings)
Lists ContentBundle objects.
Declaration
public virtual PagedAsyncEnumerable<ListContentBundlesResponse, ContentBundle> ListContentBundlesAsync(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 ContentBundles.
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<ListContentBundlesResponse, ContentBundle> | A pageable asynchronous sequence of ContentBundle resources. |
Sample code
// Create client
ContentBundleServiceClient contentBundleServiceClient = await ContentBundleServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "networks/[NETWORK_CODE]";
// Make the request
PagedAsyncEnumerable<ListContentBundlesResponse, ContentBundle> response = contentBundleServiceClient.ListContentBundlesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (ContentBundle 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 (ListContentBundlesResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ContentBundle 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<ContentBundle> 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 (ContentBundle 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.