Class IngestionServiceClient
IngestionService client wrapper, for convenient use.
Namespace: Google.Ads.DataManager.V1
Assembly: Google.Ads.DataManager.V1.dll
Syntax
public abstract class IngestionServiceClient
Remarks
Service for sending audience data to supported destinations.
Properties
DefaultEndpoint
The default endpoint for the IngestionService service, which is a host of "datamanager.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| string |
DefaultScopes
The default IngestionService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default IngestionService scopes are:
- https://www.googleapis.com/auth/datamanager
GrpcClient
The underlying gRPC IngestionService client
Declaration
public virtual IngestionService.IngestionServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| IngestionService.IngestionServiceClient |
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 IngestionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use IngestionServiceClientBuilder.
Declaration
public static IngestionServiceClient Create()
Returns
| Type | Description |
|---|---|
| IngestionServiceClient | The created IngestionServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a IngestionServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use IngestionServiceClientBuilder.
Declaration
public static Task<IngestionServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<IngestionServiceClient> | The task representing the created IngestionServiceClient. |
IngestAudienceMembers(IngestAudienceMembersRequest, CallSettings)
Uploads a list of [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources to the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual IngestAudienceMembersResponse IngestAudienceMembers(IngestAudienceMembersRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IngestAudienceMembersRequest | 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 |
|---|---|
| IngestAudienceMembersResponse | The RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = IngestionServiceClient.Create();
// Initialize request argument(s)
IngestAudienceMembersRequest request = new IngestAudienceMembersRequest
{
Destinations = { new Destination(), },
AudienceMembers =
{
new AudienceMember(),
},
Consent = new Consent(),
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
TermsOfService = new TermsOfService(),
};
// Make the request
IngestAudienceMembersResponse response = ingestionServiceClient.IngestAudienceMembers(request);
IngestAudienceMembersAsync(IngestAudienceMembersRequest, CallSettings)
Uploads a list of [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources to the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual Task<IngestAudienceMembersResponse> IngestAudienceMembersAsync(IngestAudienceMembersRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IngestAudienceMembersRequest | 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<IngestAudienceMembersResponse> | A Task containing the RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = await IngestionServiceClient.CreateAsync();
// Initialize request argument(s)
IngestAudienceMembersRequest request = new IngestAudienceMembersRequest
{
Destinations = { new Destination(), },
AudienceMembers =
{
new AudienceMember(),
},
Consent = new Consent(),
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
TermsOfService = new TermsOfService(),
};
// Make the request
IngestAudienceMembersResponse response = await ingestionServiceClient.IngestAudienceMembersAsync(request);
IngestAudienceMembersAsync(IngestAudienceMembersRequest, CancellationToken)
Uploads a list of [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources to the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual Task<IngestAudienceMembersResponse> IngestAudienceMembersAsync(IngestAudienceMembersRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IngestAudienceMembersRequest | 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<IngestAudienceMembersResponse> | A Task containing the RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = await IngestionServiceClient.CreateAsync();
// Initialize request argument(s)
IngestAudienceMembersRequest request = new IngestAudienceMembersRequest
{
Destinations = { new Destination(), },
AudienceMembers =
{
new AudienceMember(),
},
Consent = new Consent(),
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
TermsOfService = new TermsOfService(),
};
// Make the request
IngestAudienceMembersResponse response = await ingestionServiceClient.IngestAudienceMembersAsync(request);
IngestEvents(IngestEventsRequest, CallSettings)
Uploads a list of [Event][google.ads.datamanager.v1.Event] resources from the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual IngestEventsResponse IngestEvents(IngestEventsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IngestEventsRequest | 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 |
|---|---|
| IngestEventsResponse | The RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = IngestionServiceClient.Create();
// Initialize request argument(s)
IngestEventsRequest request = new IngestEventsRequest
{
Destinations = { new Destination(), },
Events = { new Event(), },
Consent = new Consent(),
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
};
// Make the request
IngestEventsResponse response = ingestionServiceClient.IngestEvents(request);
IngestEventsAsync(IngestEventsRequest, CallSettings)
Uploads a list of [Event][google.ads.datamanager.v1.Event] resources from the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual Task<IngestEventsResponse> IngestEventsAsync(IngestEventsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IngestEventsRequest | 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<IngestEventsResponse> | A Task containing the RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = await IngestionServiceClient.CreateAsync();
// Initialize request argument(s)
IngestEventsRequest request = new IngestEventsRequest
{
Destinations = { new Destination(), },
Events = { new Event(), },
Consent = new Consent(),
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
};
// Make the request
IngestEventsResponse response = await ingestionServiceClient.IngestEventsAsync(request);
IngestEventsAsync(IngestEventsRequest, CancellationToken)
Uploads a list of [Event][google.ads.datamanager.v1.Event] resources from the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual Task<IngestEventsResponse> IngestEventsAsync(IngestEventsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IngestEventsRequest | 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<IngestEventsResponse> | A Task containing the RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = await IngestionServiceClient.CreateAsync();
// Initialize request argument(s)
IngestEventsRequest request = new IngestEventsRequest
{
Destinations = { new Destination(), },
Events = { new Event(), },
Consent = new Consent(),
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
};
// Make the request
IngestEventsResponse response = await ingestionServiceClient.IngestEventsAsync(request);
RemoveAudienceMembers(RemoveAudienceMembersRequest, CallSettings)
Removes a list of [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources from the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual RemoveAudienceMembersResponse RemoveAudienceMembers(RemoveAudienceMembersRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RemoveAudienceMembersRequest | 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 |
|---|---|
| RemoveAudienceMembersResponse | The RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = IngestionServiceClient.Create();
// Initialize request argument(s)
RemoveAudienceMembersRequest request = new RemoveAudienceMembersRequest
{
Destinations = { new Destination(), },
AudienceMembers =
{
new AudienceMember(),
},
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
};
// Make the request
RemoveAudienceMembersResponse response = ingestionServiceClient.RemoveAudienceMembers(request);
RemoveAudienceMembersAsync(RemoveAudienceMembersRequest, CallSettings)
Removes a list of [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources from the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual Task<RemoveAudienceMembersResponse> RemoveAudienceMembersAsync(RemoveAudienceMembersRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RemoveAudienceMembersRequest | 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<RemoveAudienceMembersResponse> | A Task containing the RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = await IngestionServiceClient.CreateAsync();
// Initialize request argument(s)
RemoveAudienceMembersRequest request = new RemoveAudienceMembersRequest
{
Destinations = { new Destination(), },
AudienceMembers =
{
new AudienceMember(),
},
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
};
// Make the request
RemoveAudienceMembersResponse response = await ingestionServiceClient.RemoveAudienceMembersAsync(request);
RemoveAudienceMembersAsync(RemoveAudienceMembersRequest, CancellationToken)
Removes a list of [AudienceMember][google.ads.datamanager.v1.AudienceMember] resources from the provided [Destination][google.ads.datamanager.v1.Destination].
Declaration
public virtual Task<RemoveAudienceMembersResponse> RemoveAudienceMembersAsync(RemoveAudienceMembersRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| RemoveAudienceMembersRequest | 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<RemoveAudienceMembersResponse> | A Task containing the RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = await IngestionServiceClient.CreateAsync();
// Initialize request argument(s)
RemoveAudienceMembersRequest request = new RemoveAudienceMembersRequest
{
Destinations = { new Destination(), },
AudienceMembers =
{
new AudienceMember(),
},
ValidateOnly = false,
Encoding = Encoding.Unspecified,
EncryptionInfo = new EncryptionInfo(),
};
// Make the request
RemoveAudienceMembersResponse response = await ingestionServiceClient.RemoveAudienceMembersAsync(request);
RetrieveRequestStatus(RetrieveRequestStatusRequest, CallSettings)
Gets the status of a request given request id.
Declaration
public virtual RetrieveRequestStatusResponse RetrieveRequestStatus(RetrieveRequestStatusRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RetrieveRequestStatusRequest | 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 |
|---|---|
| RetrieveRequestStatusResponse | The RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = IngestionServiceClient.Create();
// Initialize request argument(s)
RetrieveRequestStatusRequest request = new RetrieveRequestStatusRequest { RequestId = "", };
// Make the request
RetrieveRequestStatusResponse response = ingestionServiceClient.RetrieveRequestStatus(request);
RetrieveRequestStatusAsync(RetrieveRequestStatusRequest, CallSettings)
Gets the status of a request given request id.
Declaration
public virtual Task<RetrieveRequestStatusResponse> RetrieveRequestStatusAsync(RetrieveRequestStatusRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| RetrieveRequestStatusRequest | 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<RetrieveRequestStatusResponse> | A Task containing the RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = await IngestionServiceClient.CreateAsync();
// Initialize request argument(s)
RetrieveRequestStatusRequest request = new RetrieveRequestStatusRequest { RequestId = "", };
// Make the request
RetrieveRequestStatusResponse response = await ingestionServiceClient.RetrieveRequestStatusAsync(request);
RetrieveRequestStatusAsync(RetrieveRequestStatusRequest, CancellationToken)
Gets the status of a request given request id.
Declaration
public virtual Task<RetrieveRequestStatusResponse> RetrieveRequestStatusAsync(RetrieveRequestStatusRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| RetrieveRequestStatusRequest | 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<RetrieveRequestStatusResponse> | A Task containing the RPC response. |
Sample code
// Create client
IngestionServiceClient ingestionServiceClient = await IngestionServiceClient.CreateAsync();
// Initialize request argument(s)
RetrieveRequestStatusRequest request = new RetrieveRequestStatusRequest { RequestId = "", };
// Make the request
RetrieveRequestStatusResponse response = await ingestionServiceClient.RetrieveRequestStatusAsync(request);
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.