functionType: ToscaGetFunctionType;
propertyPathFromSource: Array<string>;
value: any;
- toscaIndex: string;
+ toscaIndexList: Array<string>;
constructor(toscaGetFunction?: ToscaGetFunction) {
if (!toscaGetFunction) {
this.sourceUniqueId = toscaGetFunction.sourceUniqueId;
this.sourceName = toscaGetFunction.sourceName;
this.functionType = toscaGetFunction.functionType;
- this.toscaIndex = toscaGetFunction.toscaIndex;
+ this.toscaIndexList = toscaGetFunction.toscaIndexList;
if (toscaGetFunction.propertyPathFromSource) {
this.propertyPathFromSource = [...toscaGetFunction.propertyPathFromSource];
}
private buildGetInputFunctionValue(): Object {
if (this.propertyPathFromSource.length === 1) {
- return {[this.functionType.toLowerCase()]: [this.propertyPathFromSource[0], this.toscaIndex]};
+ return {[this.functionType.toLowerCase()]: [this.propertyPathFromSource[0], this.toscaIndexList]};
}
- return {[this.functionType.toLowerCase()]: [this.propertyPathFromSource, this.toscaIndex]};
+ return {[this.functionType.toLowerCase()]: [this.propertyPathFromSource, this.toscaIndexList]};
}
private buildFunctionValueWithPropertySource(): Object {
if (this.propertySource == PropertySource.SELF) {
return {
- [this.functionType.toLowerCase()]: [PropertySource.SELF, ...this.propertyPathFromSource, this.toscaIndex]
+ [this.functionType.toLowerCase()]: [PropertySource.SELF, ...this.propertyPathFromSource, this.toscaIndexList]
};
}
if (this.propertySource == PropertySource.INSTANCE) {
return {
- [this.functionType.toLowerCase()]: [this.sourceName, ...this.propertyPathFromSource,this.toscaIndex]
+ [this.functionType.toLowerCase()]: [this.sourceName, ...this.propertyPathFromSource,this.toscaIndexList]
};
}
}