Skip to content
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

[AutoPR @azure/arm-storage] chore: jsonfmt storage #4531

Merged
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
6 changes: 3 additions & 3 deletions sdk/storage/arm-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "StorageManagementClient Library with typescript type definitions for node.js and browser.",
"version": "9.0.1",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
"@azure/ms-rest-azure-js": "^2.0.0",
"@azure/ms-rest-js": "^2.0.3",
"tslib": "^1.10.0"
},
"keywords": [
"node",
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/arm-storage/src/models/blobServicesMappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export {
AzureFilesIdentityBasedAuthentication,
BaseResource,
BlobContainer,
BlobServiceItems,
BlobServiceProperties,
CloudError,
CorsRule,
Expand Down
32 changes: 30 additions & 2 deletions sdk/storage/arm-storage/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ export interface ListServiceSasResponse {
*/
export interface DateAfterModification {
/**
* Integer value indicating the age in days after last modification
* Value indicating the age in days after last modification
*/
daysAfterModificationGreaterThan: number;
}
Expand Down Expand Up @@ -1035,7 +1035,7 @@ export interface ManagementPolicyBaseBlob {
*/
export interface DateAfterCreation {
/**
* Integer value indicating the age in days after creation
* Value indicating the age in days after creation
*/
daysAfterCreationGreaterThan: number;
}
Expand Down Expand Up @@ -1749,6 +1749,14 @@ export interface StorageAccountListResult extends Array<StorageAccount> {
export interface UsageListResult extends Array<Usage> {
}

/**
* @interface
* An interface representing the BlobServiceItems.
* @extends Array<BlobServiceProperties>
*/
export interface BlobServiceItems extends Array<BlobServiceProperties> {
}

/**
* @interface
* Response schema. Contains list of blobs returned, and if paging is requested or required, a URL
Expand Down Expand Up @@ -2328,6 +2336,26 @@ export type ManagementPoliciesCreateOrUpdateResponse = ManagementPolicy & {
};
};

/**
* Contains response data for the list operation.
*/
export type BlobServicesListResponse = BlobServiceItems & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: BlobServiceItems;
};
};

/**
* Contains response data for the setServiceProperties operation.
*/
Expand Down
29 changes: 27 additions & 2 deletions sdk/storage/arm-storage/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,8 @@ export const DateAfterModification: msRest.CompositeMapper = {
required: true,
serializedName: "daysAfterModificationGreaterThan",
constraints: {
InclusiveMinimum: 0
InclusiveMinimum: 0,
MultipleOf: 1
},
type: {
name: "Number"
Expand Down Expand Up @@ -1652,7 +1653,8 @@ export const DateAfterCreation: msRest.CompositeMapper = {
required: true,
serializedName: "daysAfterCreationGreaterThan",
constraints: {
InclusiveMinimum: 0
InclusiveMinimum: 0,
MultipleOf: 1
},
type: {
name: "Number"
Expand Down Expand Up @@ -2668,6 +2670,29 @@ export const UsageListResult: msRest.CompositeMapper = {
}
};

export const BlobServiceItems: msRest.CompositeMapper = {
serializedName: "BlobServiceItems",
type: {
name: "Composite",
className: "BlobServiceItems",
modelProperties: {
value: {
readOnly: true,
serializedName: "",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "BlobServiceProperties"
}
}
}
}
}
}
};

export const ListContainerItems: msRest.CompositeMapper = {
serializedName: "ListContainerItems",
type: {
Expand Down
66 changes: 66 additions & 0 deletions sdk/storage/arm-storage/src/operations/blobServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,47 @@ export class BlobServices {
this.client = client;
}

/**
* List blob services of storage account. It returns a collection of one object named default.
* @param resourceGroupName The name of the resource group within the user's subscription. The name
* is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage
* account names must be between 3 and 24 characters in length and use numbers and lower-case
* letters only.
* @param [options] The optional parameters
* @returns Promise<Models.BlobServicesListResponse>
*/
list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise<Models.BlobServicesListResponse>;
/**
* @param resourceGroupName The name of the resource group within the user's subscription. The name
* is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage
* account names must be between 3 and 24 characters in length and use numbers and lower-case
* letters only.
* @param callback The callback
*/
list(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback<Models.BlobServiceItems>): void;
/**
* @param resourceGroupName The name of the resource group within the user's subscription. The name
* is case insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage
* account names must be between 3 and 24 characters in length and use numbers and lower-case
* letters only.
* @param options The optional parameters
* @param callback The callback
*/
list(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.BlobServiceItems>): void;
list(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.BlobServiceItems>, callback?: msRest.ServiceCallback<Models.BlobServiceItems>): Promise<Models.BlobServicesListResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
accountName,
options
},
listOperationSpec,
callback) as Promise<Models.BlobServicesListResponse>;
}

/**
* Sets the properties of a storage account’s Blob service, including properties for Storage
* Analytics and CORS (Cross-Origin Resource Sharing) rules.
Expand Down Expand Up @@ -120,6 +161,31 @@ export class BlobServices {

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices",
urlParameters: [
Parameters.resourceGroupName,
Parameters.accountName,
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.BlobServiceItems
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};

const setServicePropertiesOperationSpec: msRest.OperationSpec = {
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}",
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/arm-storage/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es6"],
"lib": ["es6", "dom"],
"declaration": true,
"outDir": "./esm",
"importHelpers": true
Expand Down