/// <summary>
 /// Update an existing retention policy.
 /// </summary>
 /// <param name="entity">The retention policy to update.</param>
 /// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param>
 /// <returns>A task indicating completion.</returns>
 public async Task UpdateAsync(RetentionPolicyEntity entity, CancellationToken cancellationToken = default)
 {
     await Client.PutAsync(entity, "Self", entity, cancellationToken : cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Add a new retention policy.
 /// </summary>
 /// <param name="entity">The retention policy to add.</param>
 /// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param>
 /// <returns>The retention policy, with server-allocated properties such as <see cref="Entity.Id"/> initialized.</returns>
 public async Task <RetentionPolicyEntity> AddAsync(RetentionPolicyEntity entity, CancellationToken cancellationToken = default)
 {
     return(await GroupCreateAsync <RetentionPolicyEntity, RetentionPolicyEntity>(entity, cancellationToken : cancellationToken).ConfigureAwait(false));
 }
 public async Task RemoveAsync(RetentionPolicyEntity entity)
 {
     await Client.DeleteAsync(entity, "Self", entity).ConfigureAwait(false);
 }
 public async Task UpdateAsync(RetentionPolicyEntity entity)
 {
     await Client.PutAsync(entity, "Self", entity).ConfigureAwait(false);
 }
 public async Task <RetentionPolicyEntity> AddAsync(RetentionPolicyEntity entity)
 {
     return(await Client.PostAsync <RetentionPolicyEntity, RetentionPolicyEntity>(entity, "Create", entity).ConfigureAwait(false));
 }