示例#1
0
 /// <summary>
 /// Delete an index.
 /// </summary>
 /// <remarks>
 /// Delete an index definition along with all the catalog.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tenantid'>
 /// The ID that uniquely identifies the tenant that the index belongs to.
 /// </param>
 /// <param name='indexid'>
 /// The ID that uniquely identifies the index definition to manage.
 /// </param>
 /// <param name='subscriptionId'>
 /// Bing developer subcription id
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IndexResponse> DeleteIndexAsync(this IBingCommerceIngestion operations, string tenantid, string indexid, string subscriptionId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteIndexWithHttpMessagesAsync(tenantid, indexid, subscriptionId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// Bing developer subcription id
 /// </param>
 /// <param name='format'>
 /// The push data update document format. Possible values include: 'Unknown',
 /// 'LDJson', 'CSV', 'TSV', 'JsonArray'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SchemaDetectionResponse> DetectSchemaAsync(this IBingCommerceIngestion operations, string subscriptionId = default(string), string format = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DetectSchemaWithHttpMessagesAsync(subscriptionId, format, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Push catalog data.
 /// </summary>
 /// <remarks>
 /// This method pushes updates to your your index data to Bing. This is an
 /// asynchronous process. To upload your index data to Bing, you'll send a push
 /// request that contains your index data.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='tenantid'>
 /// The ID that uniquely identifies the tenant that the index belongs to.
 /// </param>
 /// <param name='indexid'>
 /// The ID that uniquely identifies the index definition to manage.
 /// </param>
 /// <param name='subscriptionId'>
 /// Bing developer subcription id
 /// </param>
 /// <param name='notransform'>
 /// This disables transformation config processing if the config was uploaded
 /// for some index. It's useful when the data is already transformed and is
 /// matching the index definition. Default is `false`
 /// </param>
 /// <param name='updateid'>
 /// An id to uniquely identify the push update request in order to be able to
 /// track it down later.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <PushDataUpdateResponse> PushDataUpdateAsync(this IBingCommerceIngestion operations, string body, string tenantid, string indexid, string subscriptionId = default(string), bool?notransform = default(bool?), string updateid = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PushDataUpdateWithHttpMessagesAsync(body, tenantid, indexid, subscriptionId, notransform, updateid, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 /// <summary>
 /// Upload a trytout config.
 /// </summary>
 /// <remarks>
 /// Upload a transformation config that you can use to test data transformation
 /// on the cloud.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='tryoutid'>
 /// The transformation tryout config id.
 /// </param>
 /// <param name='subscriptionId'>
 /// Bing developer subcription id
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TransformationTryoutResponse> ExecuteTryOutConfigAsync(this IBingCommerceIngestion operations, string body, string tryoutid, string subscriptionId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ExecuteTryOutConfigWithHttpMessagesAsync(body, tryoutid, subscriptionId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#5
0
 /// <summary>
 /// Retrieve your current index's transformation config.
 /// </summary>
 /// <remarks>
 /// Retrieve the transformation config that currently applies to data you push
 /// to your index.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='tenantid'>
 /// The ID that uniquely identifies the tenant that the index belongs to.
 /// </param>
 /// <param name='indexid'>
 /// The ID that uniquely identifies the index definition to manage.
 /// </param>
 /// <param name='subscriptionId'>
 /// Bing developer subcription id
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <TransformationConfigResponse> CreateOrUpdateTransformationConfigAsync(this IBingCommerceIngestion operations, string body, string tenantid, string indexid, string subscriptionId = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateTransformationConfigWithHttpMessagesAsync(body, tenantid, indexid, subscriptionId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BingCommerceIngestionWithRetry"/> class, which wraps the Bing for Commerce client with added retry logic.
 /// </summary>
 /// <param name="internalClient">The wrapped bing client for added retry option.</param>
 /// <param name="maxAttempts">The maximum number of attempts to call an API before failing the requests.</param>
 /// <param name="initialBackoffMs">The initial backoff wait time between attempts in milliseconds.</param>
 public BingCommerceIngestionWithRetry(IBingCommerceIngestion internalClient, uint maxAttempts, uint initialBackoffMs)
 {
     this.internalClient   = internalClient;
     this.retryCount       = maxAttempts;
     this.initialBackoffMs = initialBackoffMs;
 }