/// <summary> /// Patches the metadata for an object in storage asynchronously. /// </summary> /// <param name="obj">Object to update. Must not be null, and must have populated <c>Name</c> and /// <c>Bucket</c> properties.</param> /// <param name="options">Additional options for the update. May be null, in which case appropriate /// defaults will be used.</param> /// <param name="cancellationToken">The token to monitor for cancellation requests.</param> /// <returns>A task representing the asynchronous operation, with a result returning the /// <see cref="Object"/> representation of the updated storage object.</returns> public virtual Task <Object> PatchObjectAsync( Object obj, PatchObjectOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { throw new NotImplementedException(); }
private ObjectsResource.PatchRequest CreatePatchObjectRequest(Object obj, PatchObjectOptions options) { GaxPreconditions.CheckNotNull(obj, nameof(obj)); GaxPreconditions.CheckArgument(obj.Bucket != null, nameof(obj), "The Bucket property of the object to update is null"); GaxPreconditions.CheckArgument(obj.Name != null, nameof(obj), "The Name property of the object to update is null"); var request = Service.Objects.Patch(obj, obj.Bucket, obj.Name); options?.ModifyRequest(request); return(request); }
/// <inheritdoc /> public override Task <Object> PatchObjectAsync( Object obj, PatchObjectOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) => CreatePatchObjectRequest(obj, options).ExecuteAsync(cancellationToken);
/// <inheritdoc /> public override Object PatchObject( Object obj, PatchObjectOptions options = null) => CreatePatchObjectRequest(obj, options).Execute();
/// <summary> /// Patches the metadata for an object in storage synchronously. /// </summary> /// <param name="obj">Object to update. Must not be null, and must have populated <c>Name</c> and /// <c>Bucket</c> properties.</param> /// <param name="options">Additional options for the update. May be null, in which case appropriate /// defaults will be used.</param> /// <returns>The <see cref="Object"/> representation of the updated storage object.</returns> public virtual Object PatchObject( Object obj, PatchObjectOptions options = null) { throw new NotImplementedException(); }