diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/api/Azure.Storage.Blobs.ChangeFeed.netstandard2.0.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/api/Azure.Storage.Blobs.ChangeFeed.netstandard2.0.cs index 25185fccb736..a3baaff88854 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/api/Azure.Storage.Blobs.ChangeFeed.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/api/Azure.Storage.Blobs.ChangeFeed.netstandard2.0.cs @@ -8,26 +8,19 @@ public BlobChangeFeedClient(string connectionString, Azure.Storage.Blobs.BlobCli public BlobChangeFeedClient(System.Uri serviceUri, Azure.Core.TokenCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null) { } public BlobChangeFeedClient(System.Uri serviceUri, Azure.Storage.Blobs.BlobClientOptions options = null) { } public BlobChangeFeedClient(System.Uri serviceUri, Azure.Storage.StorageSharedKeyCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null) { } - public virtual Azure.Pageable GetChanges() { throw null; } - public virtual Azure.Pageable GetChanges(System.DateTimeOffset start = default(System.DateTimeOffset), System.DateTimeOffset end = default(System.DateTimeOffset)) { throw null; } - public virtual Azure.Pageable GetChanges(string continuationToken) { throw null; } - public virtual Azure.AsyncPageable GetChangesAsync() { throw null; } - public virtual Azure.AsyncPageable GetChangesAsync(System.DateTimeOffset start = default(System.DateTimeOffset), System.DateTimeOffset end = default(System.DateTimeOffset)) { throw null; } - public virtual Azure.AsyncPageable GetChangesAsync(string continuationToken) { throw null; } + public virtual Azure.Pageable GetChanges() { throw null; } + public virtual Azure.Pageable GetChanges(System.DateTimeOffset start = default(System.DateTimeOffset), System.DateTimeOffset end = default(System.DateTimeOffset)) { throw null; } + public virtual Azure.Pageable GetChanges(string continuationToken) { throw null; } + public virtual Azure.AsyncPageable GetChangesAsync() { throw null; } + public virtual Azure.AsyncPageable GetChangesAsync(System.DateTimeOffset start = default(System.DateTimeOffset), System.DateTimeOffset end = default(System.DateTimeOffset)) { throw null; } + public virtual Azure.AsyncPageable GetChangesAsync(string continuationToken) { throw null; } } - public static partial class BlobChangeFeedExtensions - { - public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedClient GetChangeFeedClient(this Azure.Storage.Blobs.BlobServiceClient serviceClient) { throw null; } - } -} -namespace Azure.Storage.Blobs.ChangeFeed.Models -{ public partial class BlobChangeFeedEvent { internal BlobChangeFeedEvent() { } - public Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventData EventData { get { throw null; } } + public Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventData EventData { get { throw null; } } public System.DateTimeOffset EventTime { get { throw null; } } - public Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType EventType { get { throw null; } } + public Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType EventType { get { throw null; } } public System.Guid Id { get { throw null; } } public string MetadataVersion { get { throw null; } } public long SchemaVersion { get { throw null; } } @@ -38,7 +31,7 @@ internal BlobChangeFeedEvent() { } public partial class BlobChangeFeedEventData { internal BlobChangeFeedEventData() { } - public Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName BlobOperationName { get { throw null; } } + public Azure.Storage.Blobs.ChangeFeed.BlobOperationName BlobOperationName { get { throw null; } } public Azure.Storage.Blobs.Models.BlobType BlobType { get { throw null; } } public System.Guid ClientRequestId { get { throw null; } } public long ContentLength { get { throw null; } } @@ -53,60 +46,64 @@ internal BlobChangeFeedEventData() { } public System.Uri Uri { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BlobChangeFeedEventType : System.IEquatable + public readonly partial struct BlobChangeFeedEventType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public BlobChangeFeedEventType(string value) { throw null; } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType BlobAsyncOperationInitiated { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType BlobCreated { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType BlobDeleted { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType BlobPropertiesUpdated { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType BlobSnapshotCreated { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType BlobTierChanged { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType Control { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType UnspecifiedEventType { get { throw null; } } - public bool Equals(Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType other) { throw null; } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType BlobAsyncOperationInitiated { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType BlobCreated { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType BlobDeleted { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType BlobPropertiesUpdated { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType BlobSnapshotCreated { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType BlobTierChanged { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType Control { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType UnspecifiedEventType { get { throw null; } } + public bool Equals(Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType left, Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType right) { throw null; } - public static implicit operator Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType (string value) { throw null; } - public static bool operator !=(Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType left, Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType right) { throw null; } + public static bool operator ==(Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType left, Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType right) { throw null; } + public static implicit operator Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType (string value) { throw null; } + public static bool operator !=(Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType left, Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType right) { throw null; } public override string ToString() { throw null; } } + public static partial class BlobChangeFeedExtensions + { + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedClient GetChangeFeedClient(this Azure.Storage.Blobs.BlobServiceClient serviceClient) { throw null; } + } public static partial class BlobChangeFeedModelFactory { - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEvent BlobChangeFeedEvent(string topic, string subject, Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventType eventType, System.DateTimeOffset eventTime, System.Guid id, Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventData eventData, long dataVersion, string metadataVersion) { throw null; } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobChangeFeedEventData BlobChangeFeedEventData(string api, System.Guid clientRequestId, System.Guid requestId, Azure.ETag eTag, string contentType, long contentLength, Azure.Storage.Blobs.Models.BlobType blobType, long contentOffset, System.Uri destinationUri, System.Uri sourceUri, System.Uri uri, bool recursive, string sequencer) { throw null; } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEvent BlobChangeFeedEvent(string topic, string subject, Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventType eventType, System.DateTimeOffset eventTime, System.Guid id, Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventData eventData, long dataVersion, string metadataVersion) { throw null; } + public static Azure.Storage.Blobs.ChangeFeed.BlobChangeFeedEventData BlobChangeFeedEventData(string api, System.Guid clientRequestId, System.Guid requestId, Azure.ETag eTag, string contentType, long contentLength, Azure.Storage.Blobs.Models.BlobType blobType, long contentOffset, System.Uri destinationUri, System.Uri sourceUri, System.Uri uri, bool recursive, string sequencer) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BlobOperationName : System.IEquatable + public readonly partial struct BlobOperationName : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; public BlobOperationName(string value) { throw null; } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName AbortCopyBlob { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName ControlEvent { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName CopyBlob { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName DeleteBlob { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName PutBlob { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName PutBlockList { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName SetBlobMetadata { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName SetBlobProperties { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName SetBlobTier { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName SnapshotBlob { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName UndeleteBlob { get { throw null; } } - public static Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName UnspecifiedApi { get { throw null; } } - public bool Equals(Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName other) { throw null; } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName AbortCopyBlob { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName ControlEvent { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName CopyBlob { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName DeleteBlob { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName PutBlob { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName PutBlockList { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName SetBlobMetadata { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName SetBlobProperties { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName SetBlobTier { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName SnapshotBlob { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName UndeleteBlob { get { throw null; } } + public static Azure.Storage.Blobs.ChangeFeed.BlobOperationName UnspecifiedApi { get { throw null; } } + public bool Equals(Azure.Storage.Blobs.ChangeFeed.BlobOperationName other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName left, Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName right) { throw null; } - public static implicit operator Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName (string value) { throw null; } - public static bool operator !=(Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName left, Azure.Storage.Blobs.ChangeFeed.Models.BlobOperationName right) { throw null; } + public static bool operator ==(Azure.Storage.Blobs.ChangeFeed.BlobOperationName left, Azure.Storage.Blobs.ChangeFeed.BlobOperationName right) { throw null; } + public static implicit operator Azure.Storage.Blobs.ChangeFeed.BlobOperationName (string value) { throw null; } + public static bool operator !=(Azure.Storage.Blobs.ChangeFeed.BlobOperationName left, Azure.Storage.Blobs.ChangeFeed.BlobOperationName right) { throw null; } public override string ToString() { throw null; } } } diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample01a_HelloWorld.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample01a_HelloWorld.cs index 15e5e9854fe3..80234ae10542 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample01a_HelloWorld.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample01a_HelloWorld.cs @@ -5,8 +5,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Reflection.Metadata.Ecma335; -using Azure.Storage.Blobs.ChangeFeed.Models; using NUnit.Framework; namespace Azure.Storage.Blobs.ChangeFeed.Samples diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample01b_HelloWorldAsync.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample01b_HelloWorldAsync.cs index 31cec5d7a8d4..2c947bd12343 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample01b_HelloWorldAsync.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/samples/Sample01b_HelloWorldAsync.cs @@ -7,7 +7,6 @@ using System.Linq; using System.Threading.Tasks; using Azure.Storage; -using Azure.Storage.Blobs.ChangeFeed.Models; using NUnit.Framework; namespace Azure.Storage.Blobs.ChangeFeed.Samples diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedAsyncPageable.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedAsyncPageable.cs index a7d46f79adc2..83e619b17fa5 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedAsyncPageable.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedAsyncPageable.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using Azure.Storage.Blobs.ChangeFeed.Models; namespace Azure.Storage.Blobs.ChangeFeed { diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedClient.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedClient.cs index 1dcccc3082a0..3601b6d34091 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedClient.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedClient.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Storage.Blobs; -using Azure.Storage.Blobs.ChangeFeed.Models; namespace Azure.Storage.Blobs.ChangeFeed { diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedPageable.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedPageable.cs index 2564c594855f..82f36af33614 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedPageable.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/BlobChangeFeedPageable.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using Azure.Core.Pipeline; -using Azure.Storage.Blobs.ChangeFeed.Models; namespace Azure.Storage.Blobs.ChangeFeed { diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ChangeFeed.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ChangeFeed.cs index 812b0b8f39e2..00aea78cbe60 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ChangeFeed.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ChangeFeed.cs @@ -6,7 +6,6 @@ using System.Text.Json; using System.Threading.Tasks; using Azure.Storage.Blobs.Models; -using Azure.Storage.Blobs.ChangeFeed.Models; using System.Threading; namespace Azure.Storage.Blobs.ChangeFeed diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ChangeFeedFactory.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ChangeFeedFactory.cs index b2aeda732a1d..f11963460d3e 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ChangeFeedFactory.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ChangeFeedFactory.cs @@ -7,7 +7,6 @@ using System.Text.Json; using System.Threading; using System.Threading.Tasks; -using Azure.Storage.Blobs.ChangeFeed.Models; using Azure.Storage.Blobs.Models; namespace Azure.Storage.Blobs.ChangeFeed diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Chunk.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Chunk.cs index 5024a2529fb5..2fe92f54ee8e 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Chunk.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Chunk.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Azure.Storage.Blobs.ChangeFeed.Models; using Azure.Storage.Internal.Avro; namespace Azure.Storage.Blobs.ChangeFeed diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEvent.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEvent.cs index 7d1e00b9d17c..565d49cbd051 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEvent.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEvent.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Globalization; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { /// /// BlobChangeFeedEvent. diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventData.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventData.cs index 0de8fd8edf8b..d97ace5e4c2c 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventData.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventData.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using Azure.Storage.Blobs.Models; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { /// /// BlobChangeFeedEventData. diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventPage.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventPage.cs index 25077943c44b..4d2cad82d90d 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventPage.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventPage.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { internal class BlobChangeFeedEventPage : Page { diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventType.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventType.cs index 872921b73f3b..37ce0077b504 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventType.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedEventType.cs @@ -4,7 +4,7 @@ using System; using System.ComponentModel; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { /// /// BlobChangeFeedEventType. diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedModelFactory.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedModelFactory.cs index 63a873b8bdf4..503836538e9d 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedModelFactory.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobChangeFeedModelFactory.cs @@ -4,7 +4,7 @@ using System; using Azure.Storage.Blobs.Models; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { /// /// BlobChangeFeedModelFactory for building mock objects. diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobOperationName.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobOperationName.cs index 2feabb87f27c..0f0fabf280a9 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobOperationName.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/BlobOperationName.cs @@ -4,7 +4,7 @@ using System; using System.ComponentModel; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { /// /// The name of the API operation associated with a . diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/ChangeFeedCursor.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/ChangeFeedCursor.cs index 8036b2427bb3..c108db220f41 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/ChangeFeedCursor.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/ChangeFeedCursor.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { /// /// BlobChangeFeedCursor. diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/SegmentCursor.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/SegmentCursor.cs index a732ce776dfe..d9860eec88c5 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/SegmentCursor.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/SegmentCursor.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { /// /// Segment Cursor. diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/ShardCursor.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/ShardCursor.cs index b7ff67c17ec2..ea55a9e6f1a9 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/ShardCursor.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Models/ShardCursor.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text; -namespace Azure.Storage.Blobs.ChangeFeed.Models +namespace Azure.Storage.Blobs.ChangeFeed { internal class ShardCursor { diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Segment.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Segment.cs index a8fa1955e904..c32b560ab9a0 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Segment.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Segment.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Azure.Storage.Blobs.ChangeFeed.Models; using Azure.Storage.Blobs.Models; namespace Azure.Storage.Blobs.ChangeFeed diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/SegmentFactory.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/SegmentFactory.cs index 992c1d4681f5..cca133e7eb24 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/SegmentFactory.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/SegmentFactory.cs @@ -6,7 +6,6 @@ using System.Text; using System.Text.Json; using System.Threading.Tasks; -using Azure.Storage.Blobs.ChangeFeed.Models; using Azure.Storage.Blobs.Models; namespace Azure.Storage.Blobs.ChangeFeed diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Shard.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Shard.cs index 19109ad8a28f..86df6881180c 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Shard.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Shard.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Azure.Storage.Blobs.Models; -using Azure.Storage.Blobs.ChangeFeed.Models; using System.Threading; namespace Azure.Storage.Blobs.ChangeFeed diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ShardFactory.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ShardFactory.cs index c1185171b1cb..a29993072ca7 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ShardFactory.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/ShardFactory.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Threading.Tasks; -using Azure.Storage.Blobs.ChangeFeed.Models; using Azure.Storage.Blobs.Models; namespace Azure.Storage.Blobs.ChangeFeed diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedAsyncPagableTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedAsyncPagableTests.cs index 7f20fbd2fef3..db2f5ae3a436 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedAsyncPagableTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedAsyncPagableTests.cs @@ -7,7 +7,6 @@ using System.Threading.Tasks; using Azure.Core.TestFramework; using Azure.Storage.Blobs; -using Azure.Storage.Blobs.ChangeFeed.Models; using NUnit.Framework; namespace Azure.Storage.Blobs.ChangeFeed.Tests diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedPagableTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedPagableTests.cs index 8777b5301061..81718c19dcda 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedPagableTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/BlobChangeFeedPagableTests.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using Azure.Storage.Blobs.ChangeFeed.Models; using NUnit.Framework; namespace Azure.Storage.Blobs.ChangeFeed.Tests diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTests.cs index 4781ef1e3f81..736b8eaf7aca 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTests.cs @@ -11,7 +11,6 @@ using Azure.Core; using Azure.Core.TestFramework; using Azure.Storage.Blobs; -using Azure.Storage.Blobs.ChangeFeed.Models; using Azure.Storage.Blobs.Models; using Moq; using NUnit.Framework; diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChunkTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChunkTests.cs index 10f774cbf79b..15d458ac6ac4 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChunkTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChunkTests.cs @@ -7,7 +7,6 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using Azure.Storage.Blobs.ChangeFeed.Models; using Azure.Storage.Blobs.Models; using Azure.Storage.Internal.Avro; using Moq; diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/SegmentTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/SegmentTests.cs index 7afe32cdbd6d..3515f3e01e3f 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/SegmentTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/SegmentTests.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.TestFramework; -using Azure.Storage.Blobs.ChangeFeed.Models; using Azure.Storage.Blobs.Models; using Moq; using NUnit.Framework; diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs index 59cbbb2d21b8..563053e9bd25 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ShardTests.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Text; -using Azure.Storage.Blobs.ChangeFeed.Models; using Moq; using NUnit.Framework; using System.Threading.Tasks; diff --git a/sdk/storage/Azure.Storage.Blobs/api/Azure.Storage.Blobs.netstandard2.0.cs b/sdk/storage/Azure.Storage.Blobs/api/Azure.Storage.Blobs.netstandard2.0.cs index 55f2ed741b83..6ed02ad238c3 100644 --- a/sdk/storage/Azure.Storage.Blobs/api/Azure.Storage.Blobs.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.Blobs/api/Azure.Storage.Blobs.netstandard2.0.cs @@ -117,8 +117,8 @@ public BlobServiceClient(System.Uri serviceUri, Azure.Storage.StorageSharedKeyCr protected static Azure.Storage.Blobs.BlobServiceClient CreateClient(System.Uri serviceUri, Azure.Storage.Blobs.BlobClientOptions options, Azure.Core.Pipeline.HttpPipelinePolicy authentication, Azure.Core.Pipeline.HttpPipeline pipeline) { throw null; } public virtual Azure.Response DeleteBlobContainer(string blobContainerName, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteBlobContainerAsync(string blobContainerName, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable FindBlobsByTags(string tagFilterSqlExpression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable FindBlobsByTagsAsync(string tagFilterSqlExpression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable FindBlobsByTags(string tagFilterSqlExpression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable FindBlobsByTagsAsync(string tagFilterSqlExpression, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAccountInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAccountInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } protected static Azure.Core.Pipeline.HttpPipelinePolicy GetAuthenticationPolicy(Azure.Storage.Blobs.BlobServiceClient client) { throw null; } @@ -337,9 +337,9 @@ public partial class BlobCopyFromUriOptions public BlobCopyFromUriOptions() { } public Azure.Storage.Blobs.Models.AccessTier? AccessTier { get { throw null; } set { } } public Azure.Storage.Blobs.Models.BlobRequestConditions DestinationConditions { get { throw null; } set { } } - public bool? IsSealed { get { throw null; } set { } } public System.Collections.Generic.IDictionary Metadata { get { throw null; } set { } } public Azure.Storage.Blobs.Models.RehydratePriority? RehydratePriority { get { throw null; } set { } } + public bool? ShouldSealDestination { get { throw null; } set { } } public Azure.Storage.Blobs.Models.BlobRequestConditions SourceConditions { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } } } @@ -695,9 +695,9 @@ public BlobProperties() { } public long TagCount { get { throw null; } } public string VersionId { get { throw null; } } } - public partial class BlobQueryCsvTextConfiguration : Azure.Storage.Blobs.Models.BlobQueryTextConfiguration + public partial class BlobQueryCsvTextOptions : Azure.Storage.Blobs.Models.BlobQueryTextOptions { - public BlobQueryCsvTextConfiguration() { } + public BlobQueryCsvTextOptions() { } public string ColumnSeparator { get { throw null; } set { } } public char? EscapeCharacter { get { throw null; } set { } } public bool HasHeaders { get { throw null; } set { } } @@ -711,23 +711,25 @@ internal BlobQueryError() { } public string Name { get { throw null; } } public long Position { get { throw null; } } } - public partial class BlobQueryJsonTextConfiguration : Azure.Storage.Blobs.Models.BlobQueryTextConfiguration + public partial class BlobQueryJsonTextOptions : Azure.Storage.Blobs.Models.BlobQueryTextOptions { - public BlobQueryJsonTextConfiguration() { } + public BlobQueryJsonTextOptions() { } } public partial class BlobQueryOptions { public BlobQueryOptions() { } public Azure.Storage.Blobs.Models.BlobRequestConditions Conditions { get { throw null; } set { } } - public Azure.Storage.Blobs.Models.BlobQueryTextConfiguration InputTextConfiguration { get { throw null; } set { } } - public Azure.Storage.Blobs.Models.BlobQueryTextConfiguration OutputTextConfiguration { get { throw null; } set { } } + public Azure.Storage.Blobs.Models.BlobQueryTextOptions InputTextConfiguration { get { throw null; } set { } } + public Azure.Storage.Blobs.Models.BlobQueryTextOptions OutputTextConfiguration { get { throw null; } set { } } public System.IProgress ProgressHandler { get { throw null; } set { } } public event System.Action ErrorHandler { add { } remove { } } } - public abstract partial class BlobQueryTextConfiguration + public abstract partial class BlobQueryTextOptions { - protected BlobQueryTextConfiguration() { } + protected BlobQueryTextOptions() { } public string RecordSeparator { get { throw null; } set { } } + public static Azure.Storage.Blobs.Models.BlobQueryCsvTextOptions BlobQueryCsvTextOptions(string recordSeparator, string columnSeparator, char? quotationCharacter, char? escapeCharacter, bool hasHeaders) { throw null; } + public static Azure.Storage.Blobs.Models.BlobQueryJsonTextOptions BlobQueryJsonTextOptions(string recordSeparator) { throw null; } } public partial class BlobRequestConditions : Azure.Storage.Blobs.Models.BlobLeaseRequestConditions { @@ -819,11 +821,11 @@ public static partial class BlobsModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Storage.Blobs.Models.BlobSnapshotInfo BlobSnapshotInfo(string snapshot, Azure.ETag eTag, System.DateTimeOffset lastModified, bool isServerEncrypted) { throw null; } public static Azure.Storage.Blobs.Models.BlobSnapshotInfo BlobSnapshotInfo(string snapshot, Azure.ETag eTag, System.DateTimeOffset lastModified, string versionId, bool isServerEncrypted) { throw null; } - public static Azure.Storage.Blobs.Models.BlobTagItem BlobTagItem(string blobName = null, string blobContainerName = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Storage.Blobs.Models.BlockInfo BlockInfo(byte[] contentHash, byte[] contentCrc64, string encryptionKeySha256) { throw null; } public static Azure.Storage.Blobs.Models.BlockInfo BlockInfo(byte[] contentHash, byte[] contentCrc64, string encryptionKeySha256, string encryptionScope) { throw null; } public static Azure.Storage.Blobs.Models.BlockList BlockList(System.Collections.Generic.IEnumerable committedBlocks = null, System.Collections.Generic.IEnumerable uncommittedBlocks = null) { throw null; } + public static Azure.Storage.Blobs.Models.GetBlobTagResult GetBlobTagResult(System.Collections.Generic.IDictionary tags) { throw null; } public static Azure.Storage.Blobs.Models.ObjectReplicationPolicy ObjectReplicationPolicy(string policyId, System.Collections.Generic.IList rules) { throw null; } public static Azure.Storage.Blobs.Models.ObjectReplicationRule ObjectReplicationRule(string ruleId, Azure.Storage.Blobs.Models.ObjectReplicationStatus replicationStatus) { throw null; } public static Azure.Storage.Blobs.Models.PageBlobInfo PageBlobInfo(Azure.ETag eTag, System.DateTimeOffset lastModified, long blobSequenceNumber) { throw null; } @@ -831,6 +833,7 @@ public static partial class BlobsModelFactory public static Azure.Storage.Blobs.Models.PageInfo PageInfo(Azure.ETag eTag, System.DateTimeOffset lastModified, byte[] contentHash, byte[] contentCrc64, long blobSequenceNumber, string encryptionKeySha256) { throw null; } public static Azure.Storage.Blobs.Models.PageInfo PageInfo(Azure.ETag eTag, System.DateTimeOffset lastModified, byte[] contentHash, byte[] contentCrc64, long blobSequenceNumber, string encryptionKeySha256, string encryptionScope) { throw null; } public static Azure.Storage.Blobs.Models.PageRangesInfo PageRangesInfo(System.DateTimeOffset lastModified, Azure.ETag eTag, long blobContentLength, System.Collections.Generic.IEnumerable pageRanges, System.Collections.Generic.IEnumerable clearRanges) { throw null; } + public static Azure.Storage.Blobs.Models.TaggedBlobItem TaggedBlobItem(string blobName = null, string blobContainerName = null) { throw null; } public static Azure.Storage.Blobs.Models.UserDelegationKey UserDelegationKey(string signedObjectId, string signedTenantId, string signedService, string signedVersion, string value, System.DateTimeOffset signedExpiresOn, System.DateTimeOffset signedStartsOn) { throw null; } } public partial class BlobSnapshotInfo @@ -860,12 +863,6 @@ public BlobStaticWebsite() { } public string ErrorDocument404Path { get { throw null; } set { } } public string IndexDocument { get { throw null; } set { } } } - public partial class BlobTagItem - { - internal BlobTagItem() { } - public string BlobContainerName { get { throw null; } } - public string BlobName { get { throw null; } } - } [System.FlagsAttribute] public enum BlobTraits { @@ -974,6 +971,11 @@ public enum EncryptionAlgorithmType { Aes256 = 0, } + public partial class GetBlobTagResult + { + public GetBlobTagResult() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } public enum LeaseDurationType { Infinite = 0, @@ -1095,6 +1097,17 @@ public enum SkuName StandardZrs = 3, PremiumLrs = 4, } + public partial class TaggedBlobItem : System.IEquatable + { + internal TaggedBlobItem() { } + public string BlobContainerName { get { throw null; } } + public string BlobName { get { throw null; } } + public bool Equals(Azure.Storage.Blobs.Models.TaggedBlobItem other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Storage.Blobs.Models.TaggedBlobItem left, Azure.Storage.Blobs.Models.TaggedBlobItem right) { throw null; } + public static bool operator !=(Azure.Storage.Blobs.Models.TaggedBlobItem left, Azure.Storage.Blobs.Models.TaggedBlobItem right) { throw null; } + } public partial class UserDelegationKey { internal UserDelegationKey() { } @@ -1182,8 +1195,8 @@ public BlobBaseClient(System.Uri blobUri, Azure.Storage.StorageSharedKeyCredenti public virtual System.Threading.Tasks.Task> ExistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetProperties(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPropertiesAsync(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetTags(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetTagsAsync(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTags(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTagsAsync(Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.IO.Stream OpenRead(bool allowBlobModifications, long position = (long)0, int? bufferSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.IO.Stream OpenRead(long position = (long)0, int? bufferSize = default(int?), Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task OpenReadAsync(bool allowBlobModifications, long position = (long)0, int? bufferSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs index 8ab96f8d5c3c..221b9ee0525f 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobBaseClient.cs @@ -1621,7 +1621,7 @@ public virtual CopyFromUriOperation StartCopyFromUri( options?.SourceConditions, options?.DestinationConditions, options?.RehydratePriority, - options?.IsSealed, + options?.ShouldSealDestination, async: false, cancellationToken) .EnsureCompleted(); @@ -1772,7 +1772,7 @@ public virtual async Task StartCopyFromUriAsync( options?.SourceConditions, options?.DestinationConditions, options?.RehydratePriority, - options?.IsSealed, + options?.ShouldSealDestination, async: true, cancellationToken) .ConfigureAwait(false); @@ -3762,7 +3762,7 @@ private async Task SetAccessTierInternal( /// A will be thrown if /// a failure occurs. /// - public virtual Response GetTags( + public virtual Response GetTags( BlobRequestConditions conditions = default, CancellationToken cancellationToken = default) => GetTagsInternal( @@ -3794,7 +3794,7 @@ public virtual Response GetTags( /// A will be thrown if /// a failure occurs. /// - public virtual async Task> GetTagsAsync( + public virtual async Task> GetTagsAsync( BlobRequestConditions conditions = default, CancellationToken cancellationToken = default) => await GetTagsInternal( @@ -3829,7 +3829,7 @@ await GetTagsInternal( /// A will be thrown if /// a failure occurs. /// - private async Task> GetTagsInternal( + private async Task> GetTagsInternal( bool async, BlobRequestConditions conditions, CancellationToken cancellationToken) @@ -3854,8 +3854,13 @@ private async Task> GetTagsInternal( cancellationToken: cancellationToken) .ConfigureAwait(false); + GetBlobTagResult result = new GetBlobTagResult + { + Tags = response.Value.ToTagDictionary() + }; + return Response.FromValue( - response.Value.ToTagDictionary(), + result, response.GetRawResponse()); } catch (Exception ex) diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs index d2007e29b2fd..e932e2badc3a 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobExtensions.cs @@ -267,28 +267,28 @@ internal static IList ParseObjectReplicationMetadata(th return OrProperties; } - internal static BlobTagItem ToBlobTagItem(this FilterBlobItem filterBlobItem) + internal static TaggedBlobItem ToBlobTagItem(this FilterBlobItem filterBlobItem) { if (filterBlobItem == null) { return null; } - return new BlobTagItem + return new TaggedBlobItem { BlobName = filterBlobItem.BlobName, BlobContainerName = filterBlobItem.BlobContainerName }; } - internal static List ToBlobTagItems(this IEnumerable filterBlobItems) + internal static List ToBlobTagItems(this IEnumerable filterBlobItems) { if (filterBlobItems == null) { return null; } - List list = new List(); + List list = new List(); foreach (FilterBlobItem filterBlobItem in filterBlobItems) { diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs index 4ad961449f5b..eca35ba39b8d 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs @@ -1670,7 +1670,7 @@ internal async Task> UndeleteBlobContainerInternal /// A will be thrown if /// a failure occurs. /// - public virtual Pageable FindBlobsByTags( + public virtual Pageable FindBlobsByTags( string tagFilterSqlExpression, CancellationToken cancellationToken = default) => new FilterBlobsAsyncCollection(this, tagFilterSqlExpression).ToSyncCollection(cancellationToken); @@ -1701,7 +1701,7 @@ public virtual Pageable FindBlobsByTags( /// A will be thrown if /// a failure occurs. /// - public virtual AsyncPageable FindBlobsByTagsAsync( + public virtual AsyncPageable FindBlobsByTagsAsync( string tagFilterSqlExpression, CancellationToken cancellationToken = default) => new FilterBlobsAsyncCollection(this, tagFilterSqlExpression).ToAsyncCollection(cancellationToken); diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobCopyFromUriOptions.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobCopyFromUriOptions.cs index e89be5ac1e8d..294ee3639f97 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobCopyFromUriOptions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobCopyFromUriOptions.cs @@ -53,6 +53,6 @@ public class BlobCopyFromUriOptions /// /// This parameter is not valid for synchronous copies. /// - public bool? IsSealed { get; set; } + public bool? ShouldSealDestination { get; set; } } } diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryCsvTextConfiguration.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryCsvTextOptions.cs similarity index 91% rename from sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryCsvTextConfiguration.cs rename to sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryCsvTextOptions.cs index 1648c253518a..1dcd1bbf4fb5 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryCsvTextConfiguration.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryCsvTextOptions.cs @@ -10,7 +10,7 @@ namespace Azure.Storage.Blobs.Models /// /// CSV text configuration. /// - public class BlobQueryCsvTextConfiguration : BlobQueryTextConfiguration + public class BlobQueryCsvTextOptions : BlobQueryTextOptions { /// /// Column separator. diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextConfiguration.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextOptions.cs similarity index 79% rename from sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextConfiguration.cs rename to sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextOptions.cs index 67b32b7cbe06..e7b35ce092e1 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextConfiguration.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryJsonTextOptions.cs @@ -10,7 +10,7 @@ namespace Azure.Storage.Blobs.Models /// /// JSON text configuration. /// - public class BlobQueryJsonTextConfiguration : BlobQueryTextConfiguration + public class BlobQueryJsonTextOptions : BlobQueryTextOptions { } } diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryOptions.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryOptions.cs index 7826fa4caf8f..420059369fc3 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryOptions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryOptions.cs @@ -16,12 +16,12 @@ public class BlobQueryOptions /// /// Optional input text configuration. /// - public BlobQueryTextConfiguration InputTextConfiguration { get; set; } + public BlobQueryTextOptions InputTextConfiguration { get; set; } /// /// Optional output text configuration. /// - public BlobQueryTextConfiguration OutputTextConfiguration { get; set; } + public BlobQueryTextOptions OutputTextConfiguration { get; set; } /// /// Lock for ErrorHandler add and remove. diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryTextConfiguration.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryTextConfiguration.cs deleted file mode 100644 index 3c06850be7be..000000000000 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryTextConfiguration.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Azure.Storage.Blobs.Models -{ - /// - /// Blob Query Text Configuration. - /// - public abstract class BlobQueryTextConfiguration - { - /// - /// Record Separator. - /// - public string RecordSeparator { get; set; } - } -} diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryTextOptions.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryTextOptions.cs new file mode 100644 index 000000000000..1e4b7e5069ae --- /dev/null +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobQueryTextOptions.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Azure.Storage.Blobs.Models +{ + /// + /// Blob Query Text Configuration. + /// See and . + /// + public abstract class BlobQueryTextOptions + { + /// + /// Record Separator. + /// + public string RecordSeparator { get; set; } + + /// + /// Builds a . + /// + /// + /// Record Separator. + /// + /// + /// Column separator. + /// + /// + /// Field quote. + /// + /// + /// Escape character. + /// + /// + /// Has headers. + /// + public static BlobQueryCsvTextOptions BlobQueryCsvTextOptions( + string recordSeparator, + string columnSeparator, + char? quotationCharacter, + char? escapeCharacter, + bool hasHeaders) + => new BlobQueryCsvTextOptions + { + RecordSeparator = recordSeparator, + ColumnSeparator = columnSeparator, + QuotationCharacter = quotationCharacter, + EscapeCharacter = escapeCharacter, + HasHeaders = hasHeaders + }; + + /// + /// Builds a . + /// + /// + /// Record Separator. + /// + public static BlobQueryJsonTextOptions BlobQueryJsonTextOptions( + string recordSeparator) + => new BlobQueryJsonTextOptions + { + RecordSeparator = recordSeparator + }; + } +} diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobTagItem.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobTagItem.cs deleted file mode 100644 index 7f97d134fd66..000000000000 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobTagItem.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Azure.Storage.Blobs.Models -{ - /// - /// Blob info from a FindBlobsByTags. - /// - public class BlobTagItem - { - /// - /// Blob Name. - /// - public string BlobName { get; internal set; } - - /// - /// Container Name. - /// - public string BlobContainerName { get; internal set; } - - /// - /// Prevent direct instantiation of FilterBlobItem instances. - /// You can use BlobsModelFactory.FilterBlobItem instead. - /// - internal BlobTagItem() { } - } -} diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobsModelFactory.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobsModelFactory.cs index 5b5dcb7bdf52..772c18ac29c1 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/BlobsModelFactory.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/BlobsModelFactory.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Text; +using Tags = System.Collections.Generic.IDictionary; namespace Azure.Storage.Blobs.Models { @@ -686,13 +687,22 @@ public static BlobQueryError BlobQueryError( Position = position }; + /// + /// Creates a new GetBlobTagResult instance for mocking. + /// + public static GetBlobTagResult GetBlobTagResult(Tags tags) + => new GetBlobTagResult + { + Tags = tags + }; + /// /// Creates a new BlobTagItem instance for mocking. /// - public static BlobTagItem BlobTagItem( + public static TaggedBlobItem TaggedBlobItem( string blobName = default, string blobContainerName = default) - => new BlobTagItem + => new TaggedBlobItem { BlobName = blobName, BlobContainerName = blobContainerName diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/FilterBlobsAsyncCollection.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/FilterBlobsAsyncCollection.cs index cd01e8b7b13f..ff3df4c3bf9a 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Models/FilterBlobsAsyncCollection.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/FilterBlobsAsyncCollection.cs @@ -8,7 +8,7 @@ namespace Azure.Storage.Blobs.Models { - internal class FilterBlobsAsyncCollection : StorageCollectionEnumerator + internal class FilterBlobsAsyncCollection : StorageCollectionEnumerator { private readonly BlobServiceClient _client; private readonly string _expression; @@ -21,7 +21,7 @@ public FilterBlobsAsyncCollection( _expression = expression; } - public override async ValueTask> GetNextPageAsync( + public override async ValueTask> GetNextPageAsync( string continuationToken, int? pageSizeHint, bool async, @@ -35,7 +35,7 @@ public override async ValueTask> GetNextPageAsync( cancellationToken: cancellationToken) .ConfigureAwait(false); - return Page.FromValues( + return Page.FromValues( response.Value.Blobs.ToBlobTagItems(), response.Value.NextMarker, response.GetRawResponse()); diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/GetBlobTagResult.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/GetBlobTagResult.cs new file mode 100644 index 000000000000..f349bed17e51 --- /dev/null +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/GetBlobTagResult.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Tags = System.Collections.Generic.IDictionary; + +namespace Azure.Storage.Blobs.Models +{ + /// + /// The result of BlobBaseClient.GetTags() call. + /// + public class GetBlobTagResult + { + /// + /// Blob Tags. + /// + public Tags Tags { get; internal set; } + } +} diff --git a/sdk/storage/Azure.Storage.Blobs/src/Models/TaggedBlobItem.cs b/sdk/storage/Azure.Storage.Blobs/src/Models/TaggedBlobItem.cs new file mode 100644 index 000000000000..40db22dac459 --- /dev/null +++ b/sdk/storage/Azure.Storage.Blobs/src/Models/TaggedBlobItem.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.Storage.Blobs.Models +{ + /// + /// Blob info from a FindBlobsByTags. + /// + public class TaggedBlobItem : IEquatable + { + /// + /// Blob Name. + /// + public string BlobName { get; internal set; } + + /// + /// Container Name. + /// + public string BlobContainerName { get; internal set; } + + /// + /// Prevent direct instantiation of FilterBlobItem instances. + /// You can use BlobsModelFactory.FilterBlobItem instead. + /// + internal TaggedBlobItem() { } + + /// + /// Check if two TaggedBlobItem instances are equal. + /// + /// + /// The first instance to compare. + /// + /// + /// The first instance to compare. + /// + /// + /// True if they're equal, false otherwise. + /// + public static bool operator ==(TaggedBlobItem left, TaggedBlobItem right) => left.Equals(right); + + /// + /// Check if two TaggedBlobItem instances are not equal. + /// + /// + /// The first instance to compare. + /// + /// + /// The first instance to compare. + /// + /// + /// True if they're not equal, false otherwise. + /// + public static bool operator !=(TaggedBlobItem left, TaggedBlobItem right) => !(left == right); + + /// + /// Checks if two TaggedBlobItem are equal to each other. + /// + /// The other instance to compare to. + public override bool Equals(object obj) + => obj is TaggedBlobItem other && Equals(other); + + /// + /// Get a hash code for the TaggedBlobItem. + /// + /// Hash code for the TaggedBlobItem. + public override int GetHashCode() + => BlobName.GetHashCode() + ^ BlobContainerName.GetHashCode(); + + /// + /// Checks if two TaggedBlobItem are equal to each other. + /// + /// + /// The other instance to compare to. + /// + /// + public bool Equals(TaggedBlobItem other) + => BlobName == other.BlobName + && BlobContainerName == other.BlobContainerName; + } +} diff --git a/sdk/storage/Azure.Storage.Blobs/src/QuickQueryExtensions.cs b/sdk/storage/Azure.Storage.Blobs/src/QuickQueryExtensions.cs index 674373ce290d..13125aae1aff 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/QuickQueryExtensions.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/QuickQueryExtensions.cs @@ -15,7 +15,7 @@ namespace Azure.Storage.Blobs internal static class QuickQueryExtensions { internal static QuerySerialization ToQuickQuerySerialization( - this BlobQueryTextConfiguration textConfiguration) + this BlobQueryTextOptions textConfiguration) { if (textConfiguration == default) { @@ -30,9 +30,9 @@ internal static QuerySerialization ToQuickQuerySerialization( serialization.Format.DelimitedTextConfiguration = default; serialization.Format.JsonTextConfiguration = default; - if (textConfiguration.GetType() == typeof(BlobQueryCsvTextConfiguration)) + if (textConfiguration.GetType() == typeof(BlobQueryCsvTextOptions)) { - BlobQueryCsvTextConfiguration cvsTextConfiguration = textConfiguration as BlobQueryCsvTextConfiguration; + BlobQueryCsvTextOptions cvsTextConfiguration = textConfiguration as BlobQueryCsvTextOptions; serialization.Format.Type = QueryFormatType.Delimited; serialization.Format.DelimitedTextConfiguration = new DelimitedTextConfigurationInternal { @@ -43,9 +43,9 @@ internal static QuerySerialization ToQuickQuerySerialization( HeadersPresent = cvsTextConfiguration.HasHeaders }; } - else if (textConfiguration.GetType() == typeof(BlobQueryJsonTextConfiguration)) + else if (textConfiguration.GetType() == typeof(BlobQueryJsonTextOptions)) { - BlobQueryJsonTextConfiguration jsonTextConfiguration = textConfiguration as BlobQueryJsonTextConfiguration; + BlobQueryJsonTextOptions jsonTextConfiguration = textConfiguration as BlobQueryJsonTextOptions; serialization.Format.Type = QueryFormatType.Json; serialization.Format.JsonTextConfiguration = new JsonTextConfigurationInternal { diff --git a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs index 43cfb384d168..cc77034019e4 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs @@ -209,10 +209,10 @@ public async Task CreateAsync_Tags() // Act await blob.CreateAsync(options); - Response> response = await blob.GetTagsAsync(); + Response response = await blob.GetTagsAsync(); // Assert - AssertDictionaryEquality(options.Tags, response.Value); + AssertDictionaryEquality(options.Tags, response.Value.Tags); } [Test] @@ -234,10 +234,10 @@ public async Task CreateAsync_TagsWithSpecialCharacters() // Act await blob.CreateAsync(options); - Response> response = await blob.GetTagsAsync(); + Response response = await blob.GetTagsAsync(); // Assert - AssertDictionaryEquality(options.Tags, response.Value); + AssertDictionaryEquality(options.Tags, response.Value.Tags); } [Test] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs index 243a6136279f..f2951d97fd10 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs @@ -1330,8 +1330,8 @@ public async Task StartCopyFromUriAsync_Tags() await operation.WaitForCompletionAsync(); } - Response> response = await destBlob.GetTagsAsync(); - AssertDictionaryEquality(tags, response.Value); + Response response = await destBlob.GetTagsAsync(); + AssertDictionaryEquality(tags, response.Value.Tags); } [Test] @@ -1691,7 +1691,7 @@ public async Task StartCopyFromUriAsync_Seal() await srcBlob.CreateAsync(); BlobCopyFromUriOptions options = new BlobCopyFromUriOptions { - IsSealed = true + ShouldSealDestination = true }; // Act @@ -2040,8 +2040,8 @@ public async Task SyncCopyFromUriAsync_Tags() Response copyResponse = await destBlob.SyncCopyFromUriAsync(srcBlob.Uri, options); // Assert - Response> response = await destBlob.GetTagsAsync(); - AssertDictionaryEquality(tags, response.Value); + Response response = await destBlob.GetTagsAsync(); + AssertDictionaryEquality(tags, response.Value.Tags); } [Test] @@ -5025,10 +5025,10 @@ public async Task GetSetTagsAsync() // Act await blob.SetTagsAsync(tags); - Response> getTagsResponse = await blob.GetTagsAsync(); + Response getTagsResponse = await blob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, getTagsResponse.Value); + AssertDictionaryEquality(tags, getTagsResponse.Value.Tags); } [Test] @@ -5048,10 +5048,10 @@ public async Task GetSetTagsAsync_BlobTagSas() // Act await sasBlob.SetTagsAsync(tags); - Response> getTagsResponse = await sasBlob.GetTagsAsync(); + Response getTagsResponse = await sasBlob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, getTagsResponse.Value); + AssertDictionaryEquality(tags, getTagsResponse.Value.Tags); } [Test] @@ -5103,10 +5103,10 @@ public async Task GetSetTagsAsync_BlobIdentityTagSas() // Act await identitySasBlob.SetTagsAsync(tags); - Response> getTagsResponse = await identitySasBlob.GetTagsAsync(); + Response getTagsResponse = await identitySasBlob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, getTagsResponse.Value); + AssertDictionaryEquality(tags, getTagsResponse.Value.Tags); } [Test] @@ -5158,10 +5158,10 @@ public async Task GetSetTagsAsync_ContainerTagSas() // Act await sasBlob.SetTagsAsync(tags); - Response> getTagsResponse = await sasBlob.GetTagsAsync(); + Response getTagsResponse = await sasBlob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, getTagsResponse.Value); + AssertDictionaryEquality(tags, getTagsResponse.Value.Tags); } [Test] @@ -5212,10 +5212,10 @@ public async Task GetSetTagsAsync_ContainerIdentityTagSas() // Act await identitySasBlob.SetTagsAsync(tags); - Response> getTagsResponse = await identitySasBlob.GetTagsAsync(); + Response getTagsResponse = await identitySasBlob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, getTagsResponse.Value); + AssertDictionaryEquality(tags, getTagsResponse.Value.Tags); } [Test] @@ -5265,10 +5265,10 @@ public async Task GetSetTagsAsync_AccountSas(AccountSasPermissions accountSasPer // Act await sasBlob.SetTagsAsync(tags); - Response> getTagsResponse = await sasBlob.GetTagsAsync(); + Response getTagsResponse = await sasBlob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, getTagsResponse.Value); + AssertDictionaryEquality(tags, getTagsResponse.Value.Tags); } [Test] @@ -5296,11 +5296,11 @@ public async Task GetSetTagsAsync_IfTags() await blob.SetTagsAsync( tags, conditions: conditions); - Response> getTagsResponse = await blob.GetTagsAsync( + Response getTagsResponse = await blob.GetTagsAsync( conditions: conditions); // Assert - AssertDictionaryEquality(tags, getTagsResponse.Value); + AssertDictionaryEquality(tags, getTagsResponse.Value.Tags); } [Test] @@ -5360,10 +5360,10 @@ public async Task GetSetTagsAsync_Version() // Act await versionBlob.SetTagsAsync(tags); - Response> getVersionTagsResponse = await versionBlob.GetTagsAsync(); + Response getVersionTagsResponse = await versionBlob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, getVersionTagsResponse.Value); + AssertDictionaryEquality(tags, getVersionTagsResponse.Value.Tags); } [Test] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs index 71be8f253c57..8b36b1b86ac9 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs @@ -186,10 +186,10 @@ public async Task UploadAsync_Stream_Tags() await blob.UploadAsync(stream, options); } - Response> response = await blob.GetTagsAsync(); + Response response = await blob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, response.Value); + AssertDictionaryEquality(tags, response.Value.Tags); } [Test] @@ -376,10 +376,10 @@ public async Task UploadAsync_File_Tags() } } - Response> response = await blob.GetTagsAsync(); + Response response = await blob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, response.Value); + AssertDictionaryEquality(tags, response.Value.Tags); } [Test] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobQuickQueryTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobQuickQueryTests.cs index 8ece62d1dae8..0ace73e3ad5e 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobQuickQueryTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobQuickQueryTests.cs @@ -202,7 +202,7 @@ public async Task QueryAsync_QueryTextConfigurations() // Act string query = @"SELECT _2 from BlobStorage WHERE _1 > 250;"; - BlobQueryCsvTextConfiguration csvTextConfiguration = new BlobQueryCsvTextConfiguration + BlobQueryCsvTextOptions csvTextConfiguration = new BlobQueryCsvTextOptions { ColumnSeparator = ",", QuotationCharacter = '"', @@ -211,7 +211,7 @@ public async Task QueryAsync_QueryTextConfigurations() HasHeaders = false }; - BlobQueryJsonTextConfiguration jsonTextConfiguration = new BlobQueryJsonTextConfiguration + BlobQueryJsonTextOptions jsonTextConfiguration = new BlobQueryJsonTextOptions { RecordSeparator = "\n" }; @@ -285,7 +285,7 @@ public async Task QueryAsync_FatalError() Stream stream = CreateDataStream(Constants.KB); await blockBlobClient.UploadAsync(stream); string query = @"SELECT * from BlobStorage;"; - BlobQueryJsonTextConfiguration jsonTextConfiguration = new BlobQueryJsonTextConfiguration + BlobQueryJsonTextOptions jsonTextConfiguration = new BlobQueryJsonTextOptions { RecordSeparator = "\n" }; diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs index 59f68e1b4e5f..056a83ffc9d5 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs @@ -836,10 +836,10 @@ public async Task CommitBlockListAsync_Tags() // Act await blob.CommitBlockListAsync(commitList, options); - Response> response = await blob.GetTagsAsync(); + Response response = await blob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, response.Value); + AssertDictionaryEquality(tags, response.Value.Tags); } [Test] @@ -1664,10 +1664,10 @@ await blob.UploadAsync( options: options); } - Response> response = await blob.GetTagsAsync(); + Response response = await blob.GetTagsAsync(); // Assert - AssertDictionaryEquality(tags, response.Value); + AssertDictionaryEquality(tags, response.Value.Tags); } [LiveOnly] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs index e54d5b2c93d2..30e0402e25b4 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs @@ -136,10 +136,10 @@ public async Task CreateAsync_Tags() // Act await blob.CreateAsync(Constants.KB, options); - Response> response = await blob.GetTagsAsync(); + Response response = await blob.GetTagsAsync(); // Assert - AssertDictionaryEquality(options.Tags, response.Value); + AssertDictionaryEquality(options.Tags, response.Value.Tags); } [Test] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs index 60aee96ad07a..0cde1fe3c9b4 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs @@ -573,14 +573,14 @@ public async Task FindBlobsByTagAsync() await Delay(2000); // Act - List blobs = new List(); - await foreach (Page page in service.FindBlobsByTagsAsync(expression).AsPages()) + List blobs = new List(); + await foreach (Page page in service.FindBlobsByTagsAsync(expression).AsPages()) { blobs.AddRange(page.Values); } // Assert - BlobTagItem filterBlob = blobs.Where(r => r.BlobName == blobName).FirstOrDefault(); + TaggedBlobItem filterBlob = blobs.Where(r => r.BlobName == blobName).FirstOrDefault(); Assert.IsNotNull(filterBlob); } @@ -615,14 +615,14 @@ public async Task FindBlobsByTagAsync_AccountSas(AccountSasPermissions accountSa // Act SasQueryParameters sasQueryParameters = GetNewAccountSas(permissions: accountSasPermissions); BlobServiceClient sasServiceClient = new BlobServiceClient(new Uri($"{service.Uri}?{sasQueryParameters}"), GetOptions()); - List blobs = new List(); - await foreach (Page page in sasServiceClient.FindBlobsByTagsAsync(expression).AsPages()) + List blobs = new List(); + await foreach (Page page in sasServiceClient.FindBlobsByTagsAsync(expression).AsPages()) { blobs.AddRange(page.Values); } // Assert - BlobTagItem filterBlob = blobs.Where(r => r.BlobName == blobName).FirstOrDefault(); + TaggedBlobItem filterBlob = blobs.Where(r => r.BlobName == blobName).FirstOrDefault(); Assert.IsNotNull(filterBlob); } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs b/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs index 2d668e8c2397..1e18dbfddbb4 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/api/Azure.Storage.Files.DataLake.netstandard2.0.cs @@ -350,9 +350,9 @@ public static partial class DataLakeModelFactory public static Azure.Storage.Files.DataLake.Models.PathProperties PathProperties(System.DateTimeOffset lastModified, System.DateTimeOffset creationTime, System.Collections.Generic.IDictionary metadata, System.DateTimeOffset copyCompletionTime, string copyStatusDescription, string copyId, string copyProgress, System.Uri copySource, Azure.Storage.Files.DataLake.Models.CopyStatus copyStatus, bool isIncrementalCopy, Azure.Storage.Files.DataLake.Models.DataLakeLeaseDuration leaseDuration, Azure.Storage.Files.DataLake.Models.DataLakeLeaseState leaseState, Azure.Storage.Files.DataLake.Models.DataLakeLeaseStatus leaseStatus, long contentLength, string contentType, Azure.ETag eTag, byte[] contentHash, string contentEncoding, string contentDisposition, string contentLanguage, string cacheControl, string acceptRanges, bool isServerEncrypted, string encryptionKeySha256, string accessTier, string archiveStatus, System.DateTimeOffset accessTierChangeTime, bool isDirectory) { throw null; } public static Azure.Storage.Files.DataLake.Models.UserDelegationKey UserDelegationKey(string signedObjectId, string signedTenantId, System.DateTimeOffset signedStart, System.DateTimeOffset signedExpiry, string signedService, string signedVersion, string value) { throw null; } } - public partial class DataLakeQueryCsvTextConfiguration : Azure.Storage.Files.DataLake.Models.DataLakeQueryTextConfiguration + public partial class DataLakeQueryCsvTextOptions : Azure.Storage.Files.DataLake.Models.DataLakeQueryTextOptions { - public DataLakeQueryCsvTextConfiguration() { } + public DataLakeQueryCsvTextOptions() { } public string ColumnSeparator { get { throw null; } set { } } public char? EscapeCharacter { get { throw null; } set { } } public bool HasHeaders { get { throw null; } set { } } @@ -366,23 +366,25 @@ internal DataLakeQueryError() { } public string Name { get { throw null; } } public long Position { get { throw null; } } } - public partial class DataLakeQueryJsonTextConfiguration : Azure.Storage.Files.DataLake.Models.DataLakeQueryTextConfiguration + public partial class DataLakeQueryJsonTextOptions : Azure.Storage.Files.DataLake.Models.DataLakeQueryTextOptions { - public DataLakeQueryJsonTextConfiguration() { } + public DataLakeQueryJsonTextOptions() { } } public partial class DataLakeQueryOptions { public DataLakeQueryOptions() { } public Azure.Storage.Files.DataLake.Models.DataLakeRequestConditions Conditions { get { throw null; } set { } } - public Azure.Storage.Files.DataLake.Models.DataLakeQueryTextConfiguration InputTextConfiguration { get { throw null; } set { } } - public Azure.Storage.Files.DataLake.Models.DataLakeQueryTextConfiguration OutputTextConfiguration { get { throw null; } set { } } + public Azure.Storage.Files.DataLake.Models.DataLakeQueryTextOptions InputTextConfiguration { get { throw null; } set { } } + public Azure.Storage.Files.DataLake.Models.DataLakeQueryTextOptions OutputTextConfiguration { get { throw null; } set { } } public System.IProgress ProgressHandler { get { throw null; } set { } } public event System.Action ErrorHandler { add { } remove { } } } - public abstract partial class DataLakeQueryTextConfiguration + public abstract partial class DataLakeQueryTextOptions { - protected DataLakeQueryTextConfiguration() { } + protected DataLakeQueryTextOptions() { } public string RecordSeparator { get { throw null; } set { } } + public static Azure.Storage.Files.DataLake.Models.DataLakeQueryCsvTextOptions DataLakeQueryCsvTextOptions(string recordSeparator, string columnSeparator, char? quotationCharacter, char? escapeCharacter, bool hasHeaders) { throw null; } + public static Azure.Storage.Files.DataLake.Models.DataLakeQueryJsonTextOptions DataLakeQueryJsonTextOptions(string recordSeparator) { throw null; } } public partial class DataLakeRequestConditions : Azure.RequestConditions { diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeExtensions.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeExtensions.cs index e4c7f77a282f..c23192f7b60d 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeExtensions.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeExtensions.cs @@ -358,34 +358,34 @@ internal static BlobQueryOptions ToBlobQueryOptions(this DataLakeQueryOptions op return blobQueryOptions; } - internal static BlobQueryTextConfiguration ToBlobQueryTextConfiguration(this DataLakeQueryTextConfiguration textConfiguration) + internal static BlobQueryTextOptions ToBlobQueryTextConfiguration(this DataLakeQueryTextOptions textConfiguration) { if (textConfiguration == null) { return null; } - if (textConfiguration.GetType() == typeof(DataLakeQueryJsonTextConfiguration)) + if (textConfiguration.GetType() == typeof(DataLakeQueryJsonTextOptions)) { - return ((DataLakeQueryJsonTextConfiguration)textConfiguration).ToBlobQueryJsonTextConfiguration(); + return ((DataLakeQueryJsonTextOptions)textConfiguration).ToBlobQueryJsonTextConfiguration(); } - if (textConfiguration.GetType() == typeof(DataLakeQueryCsvTextConfiguration)) + if (textConfiguration.GetType() == typeof(DataLakeQueryCsvTextOptions)) { - return ((DataLakeQueryCsvTextConfiguration)textConfiguration).ToBlobQueryCsvTextConfiguration(); + return ((DataLakeQueryCsvTextOptions)textConfiguration).ToBlobQueryCsvTextConfiguration(); } throw new ArgumentException("Invalid text configuration type"); } - internal static BlobQueryJsonTextConfiguration ToBlobQueryJsonTextConfiguration(this DataLakeQueryJsonTextConfiguration textConfiguration) - => new BlobQueryJsonTextConfiguration + internal static BlobQueryJsonTextOptions ToBlobQueryJsonTextConfiguration(this DataLakeQueryJsonTextOptions textConfiguration) + => new BlobQueryJsonTextOptions { RecordSeparator = textConfiguration.RecordSeparator }; - internal static BlobQueryCsvTextConfiguration ToBlobQueryCsvTextConfiguration(this DataLakeQueryCsvTextConfiguration textConfiguration) - => new BlobQueryCsvTextConfiguration + internal static BlobQueryCsvTextOptions ToBlobQueryCsvTextConfiguration(this DataLakeQueryCsvTextOptions textConfiguration) + => new BlobQueryCsvTextOptions { ColumnSeparator = textConfiguration.ColumnSeparator, QuotationCharacter = textConfiguration.QuotationCharacter, diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryCsvTextConfiguration.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryCsvTextOptions.cs similarity index 90% rename from sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryCsvTextConfiguration.cs rename to sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryCsvTextOptions.cs index 32b2f841c87e..1b99b21e76a9 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryCsvTextConfiguration.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryCsvTextOptions.cs @@ -10,7 +10,7 @@ namespace Azure.Storage.Files.DataLake.Models /// /// CSV text configuration. /// - public class DataLakeQueryCsvTextConfiguration : DataLakeQueryTextConfiguration + public class DataLakeQueryCsvTextOptions : DataLakeQueryTextOptions { /// /// Column separator. diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryJsonTextConfiguration.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryJsonTextOptions.cs similarity index 77% rename from sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryJsonTextConfiguration.cs rename to sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryJsonTextOptions.cs index b6e2628c4a7d..ce020ac88e14 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryJsonTextConfiguration.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryJsonTextOptions.cs @@ -10,7 +10,7 @@ namespace Azure.Storage.Files.DataLake.Models /// /// JSON text configuration. /// - public class DataLakeQueryJsonTextConfiguration : DataLakeQueryTextConfiguration + public class DataLakeQueryJsonTextOptions : DataLakeQueryTextOptions { } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryOptions.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryOptions.cs index 886393781e19..299109009bca 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryOptions.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryOptions.cs @@ -15,12 +15,12 @@ public class DataLakeQueryOptions /// /// Optional input text configuration. /// - public DataLakeQueryTextConfiguration InputTextConfiguration { get; set; } + public DataLakeQueryTextOptions InputTextConfiguration { get; set; } /// /// Optional output text configuration. /// - public DataLakeQueryTextConfiguration OutputTextConfiguration { get; set; } + public DataLakeQueryTextOptions OutputTextConfiguration { get; set; } /// /// Lock for ErrorHandler add and remove. diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryTextConfiguration.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryTextConfiguration.cs deleted file mode 100644 index f289d9dddbcf..000000000000 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryTextConfiguration.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Azure.Storage.Files.DataLake.Models -{ - /// - /// Data Lake Query Text Configuration. - /// - public abstract class DataLakeQueryTextConfiguration - { - /// - /// Record Separator. - /// - public string RecordSeparator { get; set; } - } -} diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryTextOptions.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryTextOptions.cs new file mode 100644 index 000000000000..3c20e521a0b2 --- /dev/null +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeQueryTextOptions.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Azure.Storage.Files.DataLake.Models +{ + /// + /// Data Lake Query Text Configuration. + /// See and . + /// + public abstract class DataLakeQueryTextOptions + { + /// + /// Record Separator. + /// + public string RecordSeparator { get; set; } + + /// + /// Builds a . + /// + /// + /// Record Separator. + /// + /// + /// Column separator. + /// + /// + /// Field quote. + /// + /// + /// Escape character. + /// + /// + /// Has headers. + /// + public static DataLakeQueryCsvTextOptions DataLakeQueryCsvTextOptions( + string recordSeparator, + string columnSeparator, + char? quotationCharacter, + char? escapeCharacter, + bool hasHeaders) + => new DataLakeQueryCsvTextOptions + { + RecordSeparator = recordSeparator, + ColumnSeparator = columnSeparator, + QuotationCharacter = quotationCharacter, + EscapeCharacter = escapeCharacter, + HasHeaders = hasHeaders + }; + + /// + /// Builds a . + /// + /// + /// Record Separator. + /// + public static DataLakeQueryJsonTextOptions DataLakeQueryJsonTextOptions( + string recordSeparator) + => new DataLakeQueryJsonTextOptions + { + RecordSeparator = recordSeparator + }; + } +} diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs index 43b2233cdab8..d119051e4a08 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs @@ -3147,7 +3147,7 @@ public async Task QueryAsync_QueryTextConfigurations() // Act string query = @"SELECT _2 from BlobStorage WHERE _1 > 250;"; - DataLakeQueryCsvTextConfiguration csvTextConfiguration = new DataLakeQueryCsvTextConfiguration + DataLakeQueryCsvTextOptions csvTextConfiguration = new DataLakeQueryCsvTextOptions { ColumnSeparator = ",", QuotationCharacter = '"', @@ -3156,7 +3156,7 @@ public async Task QueryAsync_QueryTextConfigurations() HasHeaders = false }; - DataLakeQueryJsonTextConfiguration jsonTextConfiguration = new DataLakeQueryJsonTextConfiguration + DataLakeQueryJsonTextOptions jsonTextConfiguration = new DataLakeQueryJsonTextOptions { RecordSeparator = "\n" }; @@ -3230,7 +3230,7 @@ public async Task QueryAsync_FatalError() Stream stream = CreateDataStream(Constants.KB); await file.UploadAsync(stream); string query = @"SELECT * from BlobStorage;"; - DataLakeQueryJsonTextConfiguration jsonTextConfiguration = new DataLakeQueryJsonTextConfiguration + DataLakeQueryJsonTextOptions jsonTextConfiguration = new DataLakeQueryJsonTextOptions { RecordSeparator = "\n" };