Skip to content

RFC: Emitter and Storage refactoring #2325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

use crate::{
clients::GeneratedBlobClient,
generated::clients::BlobClient as GeneratedBlobClient,
models::{
BlobBlobClientDownloadOptions, BlobBlobClientGetPropertiesOptions,
BlobBlockBlobClientCommitBlockListOptions, BlobBlockBlobClientStageBlockOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

use crate::{
clients::GeneratedBlobClient,
generated::clients::BlobClient as GeneratedBlobClient,
models::{
BlobContainerClientCreateOptions, BlobContainerClientDeleteOptions,
BlobContainerClientGetPropertiesOptions, ContainerProperties,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

use crate::{
clients::GeneratedBlobClient,
generated::clients::BlobClient as GeneratedBlobClient,
models::{BlobServiceClientGetPropertiesOptions, StorageServiceProperties},
pipeline::StorageHeadersPolicy,
BlobClientOptions,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions sdk/storage/azure_storage_blob/src/generated/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 6 additions & 51 deletions sdk/storage/azure_storage_blob/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) Rust Code Generator. DO NOT EDIT.

// BEGIN GENERATED CODE -- do not edit from here till END
mod generated;
mod pipeline;

pub mod clients {
mod blob_client;
Expand All @@ -14,60 +14,15 @@ pub mod clients {
pub use blob_client::BlobClient;
pub use blob_container_client::BlobContainerClient as ContainerClient;
pub use blob_service_client::BlobServiceClient as ServiceClient;

pub use crate::generated::clients::{
BlobAppendBlobClient, BlobBlobClient, BlobBlockBlobClient,
BlobClient as GeneratedBlobClient, BlobClientOptions, BlobContainerClient,
BlobPageBlobClient, BlobServiceClient,
};
}

pub mod models {
pub use crate::generated::clients::method_options::{
BlobAppendBlobClientAppendBlockFromUrlOptions, BlobAppendBlobClientAppendBlockOptions,
BlobAppendBlobClientCreateOptions, BlobAppendBlobClientSealOptions,
BlobBlobClientAbortCopyFromUrlOptions, BlobBlobClientAcquireLeaseOptions,
BlobBlobClientBreakLeaseOptions, BlobBlobClientChangeLeaseOptions,
BlobBlobClientCopyFromUrlOptions, BlobBlobClientCreateSnapshotOptions,
BlobBlobClientDeleteImmutabilityPolicyOptions, BlobBlobClientDeleteOptions,
BlobBlobClientDownloadOptions, BlobBlobClientGetAccountInfoOptions,
BlobBlobClientGetPropertiesOptions, BlobBlobClientGetTagsOptions,
BlobBlobClientQueryOptions, BlobBlobClientReleaseLeaseOptions,
BlobBlobClientRenewLeaseOptions, BlobBlobClientSetExpiryOptions,
BlobBlobClientSetHttpHeadersOptions, BlobBlobClientSetImmutabilityPolicyOptions,
BlobBlobClientSetLegalHoldOptions, BlobBlobClientSetMetadataOptions,
BlobBlobClientSetTagsOptions, BlobBlobClientSetTierOptions,
BlobBlobClientStartCopyFromUrlOptions, BlobBlobClientUndeleteOptions,
BlobBlockBlobClientCommitBlockListOptions, BlobBlockBlobClientGetBlockListOptions,
BlobBlockBlobClientPutBlobFromUrlOptions, BlobBlockBlobClientStageBlockFromUrlOptions,
BlobBlockBlobClientStageBlockOptions, BlobBlockBlobClientUploadOptions,
BlobContainerClientAcquireLeaseOptions, BlobContainerClientBreakLeaseOptions,
BlobContainerClientChangeLeaseOptions, BlobContainerClientCreateOptions,
BlobContainerClientDeleteOptions, BlobContainerClientFilterBlobsOptions,
BlobContainerClientGetAccessPolicyOptions, BlobContainerClientGetAccountInfoOptions,
BlobContainerClientGetPropertiesOptions, BlobContainerClientReleaseLeaseOptions,
BlobContainerClientRenameOptions, BlobContainerClientRenewLeaseOptions,
BlobContainerClientRestoreOptions, BlobContainerClientSetAccessPolicyOptions,
BlobContainerClientSetMetadataOptions, BlobContainerClientSubmitBatchOptions,
BlobPageBlobClientClearPagesOptions, BlobPageBlobClientCopyIncrementalOptions,
BlobPageBlobClientCreateOptions, BlobPageBlobClientResizeOptions,
BlobPageBlobClientUpdateSequenceNumberOptions, BlobPageBlobClientUploadPagesFromUrlOptions,
BlobPageBlobClientUploadPagesOptions, BlobServiceClientFilterBlobsOptions,
BlobServiceClientGetAccountInfoOptions, BlobServiceClientGetPropertiesOptions,
BlobServiceClientGetStatisticsOptions, BlobServiceClientGetUserDelegationKeyOptions,
BlobServiceClientSetPropertiesOptions, BlobServiceClientSubmitBatchOptions,
};
pub use crate::generated::enums::*;
pub use crate::generated::models::*;

mod blob_properties;
pub use blob_properties::BlobProperties;

mod container_properties;
pub use container_properties::ContainerProperties;
}

pub use crate::generated::clients::{BlobClient, BlobClientOptions};
// END GENERATED CODE
pub use super::generated::models::*;
pub use blob_properties::*;
pub use container_properties::*;
}

pub(crate) mod pipeline;
pub use generated::clients::{BlobClient, BlobClientOptions};
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@

use azure_core::{
headers::{
FromHeaders, HeaderName, Headers, BLOB_ACCESS_TIER, BLOB_TYPE, CREATION_TIME, LEASE_STATE,
LEASE_STATUS, SERVER_ENCRYPTED,
FromHeaders, HeaderName, Headers, BLOB_ACCESS_TIER, BLOB_TYPE, CREATION_TIME,
LAST_MODIFIED, LEASE_STATE, LEASE_STATUS, SERVER_ENCRYPTED,
},
Error, Etag, LeaseStatus,
};
use typespec_client_core::fmt::SafeDebug;

use crate::models::{AccessTier, BlobType, LeaseState};
use crate::generated::models::{AccessTier, BlobType, LeaseState};

pub const CONTENT_LENGTH: HeaderName = HeaderName::from_static("content-length");
pub const CONTENT_MD5: HeaderName = HeaderName::from_static("content-md5");
pub const CONTENT_TYPE: HeaderName = HeaderName::from_static("content-type");
pub const ETAG: HeaderName = HeaderName::from_static("etag");
pub const LAST_MODIFIED: HeaderName = HeaderName::from_static("last-modified");
pub const BLOB_ACCESS_TIER_INFERRED: HeaderName =
HeaderName::from_static("x-ms-access-tier-inferred");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use azure_core::{
};
use typespec_client_core::fmt::SafeDebug;

use crate::models::LeaseState;
use crate::generated::models::LeaseState;

pub const LAST_MODIFIED: HeaderName = HeaderName::from_static("last-modified");
pub const IMMUTABLE_STORAGE_WITH_VERSIONING_ENABLED: HeaderName =
Expand Down
9 changes: 0 additions & 9 deletions sdk/storage/azure_storage_blob/src/models/mod.rs

This file was deleted.

Loading