Skip to content

Commit

Permalink
Update AccessControlChangeFailure to AccessControlChangeError with ty…
Browse files Browse the repository at this point in the history
…pical name and message properties
  • Loading branch information
XiaoningLiu committed Sep 24, 2020
1 parent 28ef2ca commit 4994963
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ export interface AccessControlChangeCounters {
}

// @public
export interface AccessControlChangeFailure {
errorMessage: string;
export interface AccessControlChangeError {
isDirectory: boolean;
message: string;
name: string;
}

// @public
export interface AccessControlChanges {
aggregateCounters: AccessControlChangeCounters;
batchCounters: AccessControlChangeCounters;
batchFailures: AccessControlChangeFailure[];
batchFailures: AccessControlChangeError[];
continuationToken?: string;
}

Expand Down
8 changes: 4 additions & 4 deletions sdk/storage/storage-file-datalake/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ export interface PathChangeAccessControlRecursiveOptions extends CommonOptions {
* @export
* @interface AccessControlChangeFailure
*/
export interface AccessControlChangeFailure {
export interface AccessControlChangeError {
/**
* Returns name of an entry.
*
Expand All @@ -615,7 +615,7 @@ export interface AccessControlChangeFailure {
* @type {string}
* @memberof AccessControlChangeFailure
*/
errorMessage: string;
message: string;
}

/**
Expand All @@ -629,10 +629,10 @@ export interface AccessControlChanges {
/**
* Path entries that failed to update Access Control List within single batch.
*
* @type {AccessControlChangeFailure[]}
* @type {AccessControlChangeError[]}
* @memberof AccessControlChanges
*/
batchFailures: AccessControlChangeFailure[];
batchFailures: AccessControlChangeError[];
/**
* Counts of paths changed within single batch.
*
Expand Down
6 changes: 3 additions & 3 deletions sdk/storage/storage-file-datalake/src/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ContainerItem, PublicAccessType as ContainerPublicAccessType } from "@a

import { AclFailedEntry, PathGetPropertiesResponse } from "./generated/src/models";
import {
AccessControlChangeFailure,
AccessControlChangeError,
FileSystemItem,
Metadata,
PathAccessControlItem,
Expand Down Expand Up @@ -443,12 +443,12 @@ export function toPermissionsString(permissions: PathPermissions): string {

export function toAccessControlChangeFailureArray(
aclFailedEntry: AclFailedEntry[] = []
): AccessControlChangeFailure[] {
): AccessControlChangeError[] {
return aclFailedEntry.map((aclFailedEntry: AclFailedEntry) => {
return {
name: aclFailedEntry.name || "",
isDirectory: (aclFailedEntry.type || "").toLowerCase() === "directory",
errorMessage: aclFailedEntry.errorMessage || ""
message: aclFailedEntry.errorMessage || ""
};
});
}

0 comments on commit 4994963

Please sign in to comment.