/// <summary>
 /// Replace operation on feed table
 /// </summary>
 /// <param name="table">Feed table</param>
 /// <param name="partitionKey">Partition key for feed</param>
 /// <param name="feedKey">Key for feed</param>
 /// <param name="itemKey">Item key for feed entity</param>
 /// <param name="entity">Feed entity</param>
 /// <returns>Table operation</returns>
 public static Operation Replace(FeedTable table, string partitionKey, string feedKey, string itemKey, FeedEntity entity)
 {
     ValidateFeedTableParameters(table, partitionKey, feedKey, itemKey, entity);
     return(new Operation()
     {
         Table = table,
         OperationType = OperationType.Replace,
         PartitionKey = partitionKey,
         Key = feedKey,
         ItemKey = itemKey,
         Entity = entity.Clone()
     });
 }
 /// <summary>
 /// Insert if not empty operation on feed table
 /// </summary>
 /// <param name="table">Feed table</param>
 /// <param name="partitionKey">Partition key for feed</param>
 /// <param name="feedKey">Key for feed</param>
 /// <param name="itemKey">Item key for feed entity</param>
 /// <param name="entity">Feed entity</param>
 /// <returns>Table operation</returns>
 internal static Operation InsertIfNotEmpty(FeedTable table, string partitionKey, string feedKey, string itemKey, FeedEntity entity)
 {
     ValidateFeedTableParameters(table, partitionKey, feedKey, itemKey, entity);
     return(new Operation()
     {
         Table = table,
         OperationType = OperationType.InsertIfNotEmpty,
         PartitionKey = partitionKey,
         Key = feedKey,
         ItemKey = itemKey,
         Entity = entity.Clone()
     });
 }
 /// <summary>
 /// Delete operation on feed table
 /// </summary>
 /// <param name="table">Feed table</param>
 /// <param name="partitionKey">Partition key for feed</param>
 /// <param name="feedKey">Key for feed</param>
 /// <param name="itemKey">Item key for feed entity</param>
 /// <param name="entity">Feed entity</param>
 /// <returns>Table operation</returns>
 public static Operation Delete(FeedTable table, string partitionKey, string feedKey, string itemKey, FeedEntity entity = null)
 {
     ValidateFeedTableParameters(table, partitionKey, feedKey, itemKey);
     return(new Operation()
     {
         Table = table,
         OperationType = OperationType.Delete,
         PartitionKey = partitionKey,
         Key = feedKey,
         ItemKey = itemKey,
         Entity = entity != null?entity.Clone() : null
     });
 }