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 Jul 28, 2020
1 parent 48ab6ed commit 38b1d2c
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 @@ -587,7 +587,7 @@ export interface PathChangeAccessControlRecursiveOptions extends CommonOptions {
* @export
* @interface AccessControlChangeFailure
*/
export interface AccessControlChangeFailure {
export interface AccessControlChangeError {
/**
* Returns name of an entry.
*
Expand All @@ -608,7 +608,7 @@ export interface AccessControlChangeFailure {
* @type {string}
* @memberof AccessControlChangeFailure
*/
errorMessage: string;
message: string;
}

/**
Expand All @@ -622,10 +622,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 38b1d2c

Please sign in to comment.