Show / Hide Table of Contents

Class DaiSessionServiceClient

DaiSessionService client wrapper, for convenient use.

Inheritance
object
DaiSessionServiceClient
DaiSessionServiceClientImpl
Inherited Members
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ToString()
Namespace: Google.Ads.AdManager.V1
Assembly: Google.Ads.AdManager.V1.dll
Syntax
public abstract class DaiSessionServiceClient
Remarks

Provides methods for handling DaiSession objects.

Properties

DefaultEndpoint

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

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

The default DaiSessionService scopes are:

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

GrpcClient

The underlying gRPC DaiSessionService client

Declaration
public virtual DaiSessionService.DaiSessionServiceClient GrpcClient { get; }
Property Value
Type Description
DaiSessionService.DaiSessionServiceClient

ServiceMetadata

The service metadata associated with this client type.

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

Methods

Create()

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

Declaration
public static DaiSessionServiceClient Create()
Returns
Type Description
DaiSessionServiceClient

The created DaiSessionServiceClient.

CreateAsync(CancellationToken)

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

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

The CancellationToken to use while creating the client.

Returns
Type Description
Task<DaiSessionServiceClient>

The task representing the created DaiSessionServiceClient.

GetDaiSession(DaiSessionName, CallSettings)

Retrieves a DaiSession object.

Declaration
public virtual DaiSession GetDaiSession(DaiSessionName name, CallSettings callSettings = null)
Parameters
Type Name Description
DaiSessionName name

Required. The resource name of the DaiSession. The dai_session can be either the session ID or debug key, that DAI returns on stream create. For details, see Locate a DAI session ID or debug key.

Format: networks/{network_code}/daiSessions/{dai_session} Format: networks/{network_code}/daiSessions/{session_id} Format: networks/{network_code}/daiSessions/{debug_key}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DaiSession

The RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = DaiSessionServiceClient.Create();
// Initialize request argument(s)
DaiSessionName name = DaiSessionName.FromNetworkCodeDaiSession("[NETWORK_CODE]", "[DAI_SESSION]");
// Make the request
DaiSession response = daiSessionServiceClient.GetDaiSession(name);

GetDaiSession(GetDaiSessionRequest, CallSettings)

Retrieves a DaiSession object.

Declaration
public virtual DaiSession GetDaiSession(GetDaiSessionRequest request, CallSettings callSettings = null)
Parameters
Type Name Description
GetDaiSessionRequest 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
DaiSession

The RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = DaiSessionServiceClient.Create();
// Initialize request argument(s)
GetDaiSessionRequest request = new GetDaiSessionRequest
{
    DaiSessionName = DaiSessionName.FromNetworkCodeDaiSession("[NETWORK_CODE]", "[DAI_SESSION]"),
};
// Make the request
DaiSession response = daiSessionServiceClient.GetDaiSession(request);

GetDaiSession(string, CallSettings)

Retrieves a DaiSession object.

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

Required. The resource name of the DaiSession. The dai_session can be either the session ID or debug key, that DAI returns on stream create. For details, see Locate a DAI session ID or debug key.

Format: networks/{network_code}/daiSessions/{dai_session} Format: networks/{network_code}/daiSessions/{session_id} Format: networks/{network_code}/daiSessions/{debug_key}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DaiSession

The RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = DaiSessionServiceClient.Create();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/daiSessions/[DAI_SESSION]";
// Make the request
DaiSession response = daiSessionServiceClient.GetDaiSession(name);

GetDaiSessionAsync(DaiSessionName, CallSettings)

Retrieves a DaiSession object.

Declaration
public virtual Task<DaiSession> GetDaiSessionAsync(DaiSessionName name, CallSettings callSettings = null)
Parameters
Type Name Description
DaiSessionName name

Required. The resource name of the DaiSession. The dai_session can be either the session ID or debug key, that DAI returns on stream create. For details, see Locate a DAI session ID or debug key.

Format: networks/{network_code}/daiSessions/{dai_session} Format: networks/{network_code}/daiSessions/{session_id} Format: networks/{network_code}/daiSessions/{debug_key}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<DaiSession>

A Task containing the RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = await DaiSessionServiceClient.CreateAsync();
// Initialize request argument(s)
DaiSessionName name = DaiSessionName.FromNetworkCodeDaiSession("[NETWORK_CODE]", "[DAI_SESSION]");
// Make the request
DaiSession response = await daiSessionServiceClient.GetDaiSessionAsync(name);

GetDaiSessionAsync(DaiSessionName, CancellationToken)

Retrieves a DaiSession object.

Declaration
public virtual Task<DaiSession> GetDaiSessionAsync(DaiSessionName name, CancellationToken cancellationToken)
Parameters
Type Name Description
DaiSessionName name

Required. The resource name of the DaiSession. The dai_session can be either the session ID or debug key, that DAI returns on stream create. For details, see Locate a DAI session ID or debug key.

Format: networks/{network_code}/daiSessions/{dai_session} Format: networks/{network_code}/daiSessions/{session_id} Format: networks/{network_code}/daiSessions/{debug_key}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<DaiSession>

A Task containing the RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = await DaiSessionServiceClient.CreateAsync();
// Initialize request argument(s)
DaiSessionName name = DaiSessionName.FromNetworkCodeDaiSession("[NETWORK_CODE]", "[DAI_SESSION]");
// Make the request
DaiSession response = await daiSessionServiceClient.GetDaiSessionAsync(name);

GetDaiSessionAsync(GetDaiSessionRequest, CallSettings)

Retrieves a DaiSession object.

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

A Task containing the RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = await DaiSessionServiceClient.CreateAsync();
// Initialize request argument(s)
GetDaiSessionRequest request = new GetDaiSessionRequest
{
    DaiSessionName = DaiSessionName.FromNetworkCodeDaiSession("[NETWORK_CODE]", "[DAI_SESSION]"),
};
// Make the request
DaiSession response = await daiSessionServiceClient.GetDaiSessionAsync(request);

GetDaiSessionAsync(GetDaiSessionRequest, CancellationToken)

Retrieves a DaiSession object.

Declaration
public virtual Task<DaiSession> GetDaiSessionAsync(GetDaiSessionRequest request, CancellationToken cancellationToken)
Parameters
Type Name Description
GetDaiSessionRequest 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<DaiSession>

A Task containing the RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = await DaiSessionServiceClient.CreateAsync();
// Initialize request argument(s)
GetDaiSessionRequest request = new GetDaiSessionRequest
{
    DaiSessionName = DaiSessionName.FromNetworkCodeDaiSession("[NETWORK_CODE]", "[DAI_SESSION]"),
};
// Make the request
DaiSession response = await daiSessionServiceClient.GetDaiSessionAsync(request);

GetDaiSessionAsync(string, CallSettings)

Retrieves a DaiSession object.

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

Required. The resource name of the DaiSession. The dai_session can be either the session ID or debug key, that DAI returns on stream create. For details, see Locate a DAI session ID or debug key.

Format: networks/{network_code}/daiSessions/{dai_session} Format: networks/{network_code}/daiSessions/{session_id} Format: networks/{network_code}/daiSessions/{debug_key}

CallSettings callSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task<DaiSession>

A Task containing the RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = await DaiSessionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/daiSessions/[DAI_SESSION]";
// Make the request
DaiSession response = await daiSessionServiceClient.GetDaiSessionAsync(name);

GetDaiSessionAsync(string, CancellationToken)

Retrieves a DaiSession object.

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

Required. The resource name of the DaiSession. The dai_session can be either the session ID or debug key, that DAI returns on stream create. For details, see Locate a DAI session ID or debug key.

Format: networks/{network_code}/daiSessions/{dai_session} Format: networks/{network_code}/daiSessions/{session_id} Format: networks/{network_code}/daiSessions/{debug_key}

CancellationToken cancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task<DaiSession>

A Task containing the RPC response.

Sample code
// Create client
DaiSessionServiceClient daiSessionServiceClient = await DaiSessionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "networks/[NETWORK_CODE]/daiSessions/[DAI_SESSION]";
// Make the request
DaiSession response = await daiSessionServiceClient.GetDaiSessionAsync(name);

ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

In this article
Back to top Generated by DocFX