Skip to content
62 changes: 10 additions & 52 deletions specification/storage/Microsoft.BlobStorage/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,19 @@ using Storage.Blob;

namespace Customizations;

/** Parameters to be added in client constructors */
model BlobServiceClientParameters {
...ContainerNamePathParameter;
...BlobPathParameter;
}

@@clientNamespace(Storage.Blob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container.Blob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container.Blob.AppendBlob,
"Azure.Storage.Blobs"
);
@@clientNamespace(Storage.Blob.Container.Blob.BlockBlob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Container.Blob.PageBlob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.Blob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.AppendBlob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.BlockBlob, "Azure.Storage.Blobs");
@@clientNamespace(Storage.Blob.PageBlob, "Azure.Storage.Blobs");

@@clientName(Storage.Blob, "BlobServiceClient", "rust");
@@clientName(Storage.Blob.Service, "BlobServiceClient", "rust");
@@clientName(Storage.Blob.Container, "BlobContainerClient", "rust");
@@clientName(Storage.Blob.Container.Blob, "BlobClient", "rust");
@@clientName(Storage.Blob.Container.Blob.AppendBlob,
"AppendBlobClient",
"rust"
);
@@clientName(Storage.Blob.Container.Blob.BlockBlob, "BlockBlobClient", "rust");
@@clientName(Storage.Blob.Container.Blob.PageBlob, "PageBlobClient", "rust");

@@clientInitialization(Storage.Blob.Container,
{
parameters: ContainerNamePathParameter,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientInitialization(Storage.Blob.Container.Blob,
{
parameters: BlobServiceClientParameters,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientInitialization(Storage.Blob.Container.Blob.AppendBlob,
{
parameters: BlobServiceClientParameters,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientInitialization(Storage.Blob.Container.Blob.BlockBlob,
{
parameters: BlobServiceClientParameters,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientInitialization(Storage.Blob.Container.Blob.PageBlob,
{
parameters: BlobServiceClientParameters,
initializedBy: InitializedBy.parent | InitializedBy.individually,
}
);
@@clientName(Storage.Blob.Blob, "BlobClient", "rust");
@@clientName(Storage.Blob.AppendBlob, "AppendBlobClient", "rust");
@@clientName(Storage.Blob.BlockBlob, "BlockBlobClient", "rust");
@@clientName(Storage.Blob.PageBlob, "PageBlobClient", "rust");

@@clientName(ContainerProperties.denyEncryptionScopeOverride,
"PreventEncryptionScopeOverride"
Expand Down Expand Up @@ -96,4 +54,4 @@ model BlobServiceClientParameters {
);

@@scope(Storage.Blob.Container.submitBatch, "!rust");
@@scope(Storage.Blob.submitBatch, "!rust");
@@scope(Storage.Blob.Service.submitBatch, "!rust");
1 change: 0 additions & 1 deletion specification/storage/Microsoft.BlobStorage/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ namespace Storage.Blob;
@doc("The Azure.Storage.Blob service versions.")
enum Versions {
@doc("The 2025-11-05 version of the Azure.Storage.Blob service.")
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
v2025_11_05: "2025-11-05",
}
25 changes: 4 additions & 21 deletions specification/storage/Microsoft.BlobStorage/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ model BlobItemInternal {
@Xml.name("OrMetadata")
objectReplicationMetadata?: ObjectReplicationMetadata;

/** Whether the blog has versions only. */
/** Whether the blob has versions only. */
@Xml.name("HasVersionsOnly") hasVersionsOnly?: boolean;
}

Expand All @@ -916,7 +916,7 @@ model BlobPropertiesInternal {
@Xml.name("Last-Modified")
lastModified: utcDateTime;

/** The blog ETag. */
/** The blob ETag. */
@Xml.name("Etag") eTag: string;

/** The content length of the blob. */
Expand Down Expand Up @@ -976,10 +976,10 @@ model BlobPropertiesInternal {
/** The copy status description of the blob. */
@Xml.name("CopyStatusDescription") copyStatusDescription?: string;

/** Whether the blog is encrypted on the server. */
/** Whether the blob is encrypted on the server. */
@Xml.name("ServerEncrypted") serverEncrypted?: boolean;

/** Whether the blog is incremental copy. */
/** Whether the blob is incremental copy. */
@Xml.name("IncrementalCopy") incrementalCopy?: boolean;

/** The name of the destination snapshot. */
Expand Down Expand Up @@ -2241,16 +2241,6 @@ union PremiumPageBlobAccessTier {
string,
}

/** The blob name parameter. */
alias BlobPathParameter = {
/** The name of the blob. */
@minLength(1)
@maxLength(1024)
@pattern("^[a-zA-Z0-9]+(?:/[a-zA-Z0-9]+)*(?:\\.[a-zA-Z0-9]+){0,1}$")
@path
blobName: string;
};

/** The type of blob deletions. */
#suppress "@azure-tools/typespec-azure-core/no-enum" "Existing API"
enum BlobDeleteType {
Expand Down Expand Up @@ -2475,13 +2465,6 @@ alias LeaseDurationHeaderParameter = {
duration: int32;
};

/** The container name path parameter */
alias ContainerNamePathParameter = {
/** The name of the container. */
@path
containerName: string;
};

// NOTE: This does not explicitly let emitters know that this is a collection header for metadata. Logic should be handwritten to handle this.
alias MetadataHeadersParameter = {
/** The metadata headers. */
Expand Down
Loading
Loading