Vault IOperationSource <Vault> .CreateResult(Response response, CancellationToken cancellationToken)
        {
            using var document = JsonDocument.Parse(response.ContentStream);
            var data = VaultData.DeserializeVaultData(document.RootElement);

            return(new Vault(_client, data));
        }
        public async Task <Response <VaultData> > UpdateAsync(string resourceGroupName, string vaultName, IDictionary <string, string> tags = null, VaultPatchProperties properties = null, CancellationToken cancellationToken = default)
        {
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException(nameof(resourceGroupName));
            }
            if (vaultName == null)
            {
                throw new ArgumentNullException(nameof(vaultName));
            }

            using var message = CreateUpdateRequest(resourceGroupName, vaultName, tags, properties);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            switch (message.Response.Status)
            {
            case 200:
            case 201:
            {
                VaultData value = default;
                using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);

                value = VaultData.DeserializeVaultData(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }