export enum AccountSASResourceType { Service = "s" , Container = "c" , Object = "o" } /**
 * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value
 * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the
 * values are set, this should be serialized with toString and set as the resources field on an
 *  AccountSASSignatureValues object. It is possible to construct the resources string without this class, but
 * the order of the resources is particular and this class guarantees correctness.
 *
 *  export class export default class AccountSASResourceTypes { /**
     * Creates an  AccountSASResourceType from the specified resource types string. This method will throw an
     * Error if it encounters a character that does not correspond to a valid resource type.
     *
     *  static param { string } resourceTypes returns { AccountSASResourceTypes } memberof public static parse ( resourceTypes ) { const accountSASResourceTypes = new AccountSASResourceTypes ( ) ; for ( const c of resourceTypes ) { switch ( c ) { case AccountSASResourceType . Service : if ( accountSASResourceTypes . service ) { throw new RangeError ( `Duplicated permission character: ${ c }` ) ; } accountSASResourceTypes . service = true ; break ; case AccountSASResourceType . Container : if ( accountSASResourceTypes . container ) { throw new RangeError ( `Duplicated permission character: ${ c }` ) ; } accountSASResourceTypes . container = true ; break ; case AccountSASResourceType . Object : if ( accountSASResourceTypes . object ) { throw new RangeError ( `Duplicated permission character: ${ c }` ) ; } accountSASResourceTypes . object = true ; break ; default : throw new RangeError ( `Invalid resource type: ${ c }` ) ; } } return accountSASResourceTypes ; } type { boolean } memberof public service : boolean = false ; type { boolean } memberof public container : boolean = false ; type { boolean } memberof public object : boolean = false ; see https returns { string } memberof public toString ( ) { const resourceTypes = [ ] ; if ( this . service ) { resourceTypes . push ( AccountSASResourceType . Service ) ; } if ( this . container ) { resourceTypes . push ( AccountSASResourceType . Container ) ; } if ( this . object ) { resourceTypes . push ( AccountSASResourceType . Object ) ; } return resourceTypes . join ( "" ) ; } }