| /* |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| */ |
| |
| /* tslint:disable */ |
| /* eslint-disable */ |
| // @ts-nocheck |
| // Generated using typescript-generator version 3.2.1263 on 2024-10-29 10:04:46. |
| |
| export class NamedStreamPipesEntity implements Storable { |
| '@class': |
| | 'org.apache.streampipes.model.SpDataStream' |
| | 'org.apache.streampipes.model.base.VersionedNamedStreamPipesEntity' |
| | 'org.apache.streampipes.model.connect.adapter.AdapterDescription' |
| | 'org.apache.streampipes.model.base.InvocableStreamPipesEntity' |
| | 'org.apache.streampipes.model.graph.DataSinkInvocation' |
| | 'org.apache.streampipes.model.graph.DataProcessorInvocation'; |
| 'appId': string; |
| 'connectedTo': string[]; |
| 'description': string; |
| 'dom': string; |
| 'elementId': string; |
| 'includedAssets': string[]; |
| 'includedLocales': string[]; |
| 'includesAssets': boolean; |
| 'includesLocales': boolean; |
| 'internallyManaged': boolean; |
| 'name': string; |
| 'rev': string; |
| |
| static 'fromData'( |
| data: NamedStreamPipesEntity, |
| target?: NamedStreamPipesEntity, |
| ): NamedStreamPipesEntity { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new NamedStreamPipesEntity(); |
| instance['@class'] = data['@class']; |
| instance.appId = data.appId; |
| instance.connectedTo = __getCopyArrayFn(__identity<string>())( |
| data.connectedTo, |
| ); |
| instance.description = data.description; |
| instance.dom = data.dom; |
| instance.elementId = data.elementId; |
| instance.includedAssets = __getCopyArrayFn(__identity<string>())( |
| data.includedAssets, |
| ); |
| instance.includedLocales = __getCopyArrayFn(__identity<string>())( |
| data.includedLocales, |
| ); |
| instance.includesAssets = data.includesAssets; |
| instance.includesLocales = data.includesLocales; |
| instance.internallyManaged = data.internallyManaged; |
| instance.name = data.name; |
| instance.rev = data.rev; |
| return instance; |
| } |
| } |
| |
| export class VersionedNamedStreamPipesEntity extends NamedStreamPipesEntity { |
| '@class': |
| | 'org.apache.streampipes.model.base.VersionedNamedStreamPipesEntity' |
| | 'org.apache.streampipes.model.connect.adapter.AdapterDescription' |
| | 'org.apache.streampipes.model.base.InvocableStreamPipesEntity' |
| | 'org.apache.streampipes.model.graph.DataSinkInvocation' |
| | 'org.apache.streampipes.model.graph.DataProcessorInvocation'; |
| 'version': number; |
| |
| static 'fromData'( |
| data: VersionedNamedStreamPipesEntity, |
| target?: VersionedNamedStreamPipesEntity, |
| ): VersionedNamedStreamPipesEntity { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new VersionedNamedStreamPipesEntity(); |
| super.fromData(data, instance); |
| instance.version = data.version; |
| return instance; |
| } |
| } |
| |
| export class AdapterDescription extends VersionedNamedStreamPipesEntity { |
| '@class': 'org.apache.streampipes.model.connect.adapter.AdapterDescription'; |
| 'category': string[]; |
| 'config': StaticPropertyUnion[]; |
| 'correspondingDataStreamElementId': string; |
| /** |
| * @deprecated |
| */ |
| 'correspondingServiceGroup': string; |
| 'createdAt': number; |
| 'dataStream': SpDataStream; |
| 'deploymentConfiguration': ExtensionDeploymentConfiguration; |
| 'eventGrounding': EventGrounding; |
| 'eventSchema': EventSchema; |
| 'icon': string; |
| 'rules': TransformationRuleDescriptionUnion[]; |
| 'running': boolean; |
| 'schemaRules': TransformationRuleDescriptionUnion[]; |
| 'selectedEndpointUrl': string; |
| 'streamRules': TransformationRuleDescriptionUnion[]; |
| 'valueRules': TransformationRuleDescriptionUnion[]; |
| |
| static 'fromData'( |
| data: AdapterDescription, |
| target?: AdapterDescription, |
| ): AdapterDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new AdapterDescription(); |
| super.fromData(data, instance); |
| instance.category = __getCopyArrayFn(__identity<string>())( |
| data.category, |
| ); |
| instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)( |
| data.config, |
| ); |
| instance.correspondingDataStreamElementId = |
| data.correspondingDataStreamElementId; |
| instance.correspondingServiceGroup = data.correspondingServiceGroup; |
| instance.createdAt = data.createdAt; |
| instance.dataStream = SpDataStream.fromData(data.dataStream); |
| instance.deploymentConfiguration = |
| ExtensionDeploymentConfiguration.fromData( |
| data.deploymentConfiguration, |
| ); |
| instance.eventGrounding = EventGrounding.fromData(data.eventGrounding); |
| instance.eventSchema = EventSchema.fromData(data.eventSchema); |
| instance.icon = data.icon; |
| instance.rules = __getCopyArrayFn( |
| TransformationRuleDescription.fromDataUnion, |
| )(data.rules); |
| instance.running = data.running; |
| instance.schemaRules = __getCopyArrayFn( |
| TransformationRuleDescription.fromDataUnion, |
| )(data.schemaRules); |
| instance.selectedEndpointUrl = data.selectedEndpointUrl; |
| instance.streamRules = __getCopyArrayFn( |
| TransformationRuleDescription.fromDataUnion, |
| )(data.streamRules); |
| instance.valueRules = __getCopyArrayFn( |
| TransformationRuleDescription.fromDataUnion, |
| )(data.valueRules); |
| return instance; |
| } |
| } |
| |
| export class AdapterEventPreview { |
| inputData: string; |
| rules: TransformationRuleDescriptionUnion[]; |
| |
| static fromData( |
| data: AdapterEventPreview, |
| target?: AdapterEventPreview, |
| ): AdapterEventPreview { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new AdapterEventPreview(); |
| instance.inputData = data.inputData; |
| instance.rules = __getCopyArrayFn( |
| TransformationRuleDescription.fromDataUnion, |
| )(data.rules); |
| return instance; |
| } |
| } |
| |
| export class AdapterType { |
| code: string; |
| description: string; |
| label: string; |
| |
| static fromData(data: AdapterType, target?: AdapterType): AdapterType { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new AdapterType(); |
| instance.code = data.code; |
| instance.description = data.description; |
| instance.label = data.label; |
| return instance; |
| } |
| } |
| |
| export class TransformationRuleDescription { |
| '@class': |
| | 'org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.RegexTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription'; |
| 'rulePriority': number; |
| |
| static 'fromData'( |
| data: TransformationRuleDescription, |
| target?: TransformationRuleDescription, |
| ): TransformationRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new TransformationRuleDescription(); |
| instance['@class'] = data['@class']; |
| instance.rulePriority = data.rulePriority; |
| return instance; |
| } |
| |
| static 'fromDataUnion'( |
| data: TransformationRuleDescriptionUnion, |
| ): TransformationRuleDescriptionUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription': |
| return AddTimestampRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription': |
| return AddValueTransformationRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription': |
| return TimestampTranfsformationRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription': |
| return UnitTransformRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription': |
| return EventRateTransformationRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription': |
| return RemoveDuplicatesTransformationRuleDescription.fromData( |
| data, |
| ); |
| case 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription': |
| return CreateNestedRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription': |
| return DeleteRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription': |
| return RenameRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.RegexTransformationRuleDescription': |
| return RegexTransformationRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription': |
| return MoveRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription': |
| return ChangeDatatypeTransformationRuleDescription.fromData( |
| data, |
| ); |
| case 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription': |
| return CorrectionValueTransformationRuleDescription.fromData( |
| data, |
| ); |
| } |
| } |
| } |
| |
| export class ValueTransformationRuleDescription extends TransformationRuleDescription { |
| '@class': |
| | 'org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.RegexTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription'; |
| |
| static 'fromData'( |
| data: ValueTransformationRuleDescription, |
| target?: ValueTransformationRuleDescription, |
| ): ValueTransformationRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ValueTransformationRuleDescription(); |
| super.fromData(data, instance); |
| return instance; |
| } |
| |
| static 'fromDataUnion'( |
| data: ValueTransformationRuleDescriptionUnion, |
| ): ValueTransformationRuleDescriptionUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription': |
| return AddTimestampRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription': |
| return AddValueTransformationRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription': |
| return TimestampTranfsformationRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription': |
| return UnitTransformRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription': |
| return CorrectionValueTransformationRuleDescription.fromData( |
| data, |
| ); |
| case 'org.apache.streampipes.model.connect.rules.value.RegexTransformationRuleDescription': |
| return RegexTransformationRuleDescription.fromData(data); |
| } |
| } |
| } |
| |
| export class AddTimestampRuleDescription extends ValueTransformationRuleDescription { |
| '@class': 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription'; |
| 'propertyScope': PropertyScope; |
| 'runtimeKey': string; |
| |
| static 'fromData'( |
| data: AddTimestampRuleDescription, |
| target?: AddTimestampRuleDescription, |
| ): AddTimestampRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new AddTimestampRuleDescription(); |
| super.fromData(data, instance); |
| instance.propertyScope = data.propertyScope; |
| instance.runtimeKey = data.runtimeKey; |
| return instance; |
| } |
| } |
| |
| export class AddValueTransformationRuleDescription extends ValueTransformationRuleDescription { |
| '@class': 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription'; |
| 'datatype': string; |
| 'description': string; |
| 'label': string; |
| 'measurementUnit': string; |
| 'propertyScope': PropertyScope; |
| 'runtimeKey': string; |
| 'semanticType': string; |
| 'staticValue': string; |
| |
| static 'fromData'( |
| data: AddValueTransformationRuleDescription, |
| target?: AddValueTransformationRuleDescription, |
| ): AddValueTransformationRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new AddValueTransformationRuleDescription(); |
| super.fromData(data, instance); |
| instance.datatype = data.datatype; |
| instance.description = data.description; |
| instance.label = data.label; |
| instance.measurementUnit = data.measurementUnit; |
| instance.propertyScope = data.propertyScope; |
| instance.runtimeKey = data.runtimeKey; |
| instance.semanticType = data.semanticType; |
| instance.staticValue = data.staticValue; |
| return instance; |
| } |
| } |
| |
| export class StaticProperty { |
| '@class': |
| | 'org.apache.streampipes.model.staticproperty.CodeInputStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.CollectionStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.FileStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.FreeTextStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.MatchingStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.SecretStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternative' |
| | 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives' |
| | 'org.apache.streampipes.model.staticproperty.StaticPropertyGroup' |
| | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableGroupStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.SelectionStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.AnyStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.MappingProperty' |
| | 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary' |
| | 'org.apache.streampipes.model.staticproperty.MappingPropertyNary'; |
| 'description': string; |
| 'internalName': string; |
| 'label': string; |
| 'optional': boolean; |
| 'staticPropertyType': StaticPropertyType; |
| |
| static 'fromData'( |
| data: StaticProperty, |
| target?: StaticProperty, |
| ): StaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new StaticProperty(); |
| instance['@class'] = data['@class']; |
| instance.description = data.description; |
| instance.internalName = data.internalName; |
| instance.label = data.label; |
| instance.optional = data.optional; |
| instance.staticPropertyType = data.staticPropertyType; |
| return instance; |
| } |
| |
| static 'fromDataUnion'(data: StaticPropertyUnion): StaticPropertyUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.staticproperty.AnyStaticProperty': |
| return AnyStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.CodeInputStaticProperty': |
| return CodeInputStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.CollectionStaticProperty': |
| return CollectionStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty': |
| return ColorPickerStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.FileStaticProperty': |
| return FileStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.FreeTextStaticProperty': |
| return FreeTextStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary': |
| return MappingPropertyUnary.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.MappingPropertyNary': |
| return MappingPropertyNary.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.MatchingStaticProperty': |
| return MatchingStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty': |
| return OneOfStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty': |
| return RuntimeResolvableAnyStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty': |
| return RuntimeResolvableOneOfStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty': |
| return RuntimeResolvableTreeInputStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.SecretStaticProperty': |
| return SecretStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternative': |
| return StaticPropertyAlternative.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives': |
| return StaticPropertyAlternatives.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.StaticPropertyGroup': |
| return StaticPropertyGroup.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty': |
| return SlideToggleStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableGroupStaticProperty': |
| return RuntimeResolvableGroupStaticProperty.fromData(data); |
| } |
| } |
| } |
| |
| export class SelectionStaticProperty extends StaticProperty { |
| '@class': |
| | 'org.apache.streampipes.model.staticproperty.SelectionStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.AnyStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty'; |
| 'horizontalRendering': boolean; |
| 'options': Option[]; |
| |
| static 'fromData'( |
| data: SelectionStaticProperty, |
| target?: SelectionStaticProperty, |
| ): SelectionStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new SelectionStaticProperty(); |
| super.fromData(data, instance); |
| instance.horizontalRendering = data.horizontalRendering; |
| instance.options = __getCopyArrayFn(Option.fromData)(data.options); |
| return instance; |
| } |
| |
| static 'fromDataUnion'( |
| data: SelectionStaticPropertyUnion, |
| ): SelectionStaticPropertyUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.staticproperty.AnyStaticProperty': |
| return AnyStaticProperty.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty': |
| return OneOfStaticProperty.fromData(data); |
| } |
| } |
| } |
| |
| export class AnyStaticProperty extends SelectionStaticProperty { |
| '@class': |
| | 'org.apache.streampipes.model.staticproperty.AnyStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty'; |
| |
| static 'fromData'( |
| data: AnyStaticProperty, |
| target?: AnyStaticProperty, |
| ): AnyStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new AnyStaticProperty(); |
| super.fromData(data, instance); |
| return instance; |
| } |
| } |
| |
| export class OutputStrategy { |
| '@class': |
| | 'org.apache.streampipes.model.output.AppendOutputStrategy' |
| | 'org.apache.streampipes.model.output.CustomOutputStrategy' |
| | 'org.apache.streampipes.model.output.CustomTransformOutputStrategy' |
| | 'org.apache.streampipes.model.output.FixedOutputStrategy' |
| | 'org.apache.streampipes.model.output.KeepOutputStrategy' |
| | 'org.apache.streampipes.model.output.ListOutputStrategy' |
| | 'org.apache.streampipes.model.output.TransformOutputStrategy' |
| | 'org.apache.streampipes.model.output.UserDefinedOutputStrategy'; |
| 'name': string; |
| 'renameRules': PropertyRenameRule[]; |
| |
| static 'fromData'( |
| data: OutputStrategy, |
| target?: OutputStrategy, |
| ): OutputStrategy { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new OutputStrategy(); |
| instance['@class'] = data['@class']; |
| instance.name = data.name; |
| instance.renameRules = __getCopyArrayFn(PropertyRenameRule.fromData)( |
| data.renameRules, |
| ); |
| return instance; |
| } |
| |
| static 'fromDataUnion'(data: OutputStrategyUnion): OutputStrategyUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.output.AppendOutputStrategy': |
| return AppendOutputStrategy.fromData(data); |
| case 'org.apache.streampipes.model.output.CustomOutputStrategy': |
| return CustomOutputStrategy.fromData(data); |
| case 'org.apache.streampipes.model.output.CustomTransformOutputStrategy': |
| return CustomTransformOutputStrategy.fromData(data); |
| case 'org.apache.streampipes.model.output.FixedOutputStrategy': |
| return FixedOutputStrategy.fromData(data); |
| case 'org.apache.streampipes.model.output.KeepOutputStrategy': |
| return KeepOutputStrategy.fromData(data); |
| case 'org.apache.streampipes.model.output.ListOutputStrategy': |
| return ListOutputStrategy.fromData(data); |
| case 'org.apache.streampipes.model.output.TransformOutputStrategy': |
| return TransformOutputStrategy.fromData(data); |
| case 'org.apache.streampipes.model.output.UserDefinedOutputStrategy': |
| return UserDefinedOutputStrategy.fromData(data); |
| } |
| } |
| } |
| |
| export class AppendOutputStrategy extends OutputStrategy { |
| '@class': 'org.apache.streampipes.model.output.AppendOutputStrategy'; |
| 'eventProperties': EventPropertyUnion[]; |
| |
| static 'fromData'( |
| data: AppendOutputStrategy, |
| target?: AppendOutputStrategy, |
| ): AppendOutputStrategy { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new AppendOutputStrategy(); |
| super.fromData(data, instance); |
| instance.eventProperties = __getCopyArrayFn( |
| EventProperty.fromDataUnion, |
| )(data.eventProperties); |
| return instance; |
| } |
| } |
| |
| export class AssetExportConfiguration { |
| adapters: ExportItem[]; |
| assetId: string; |
| assetName: string; |
| assets: ExportItem[]; |
| dashboards: ExportItem[]; |
| dataLakeMeasures: ExportItem[]; |
| dataSources: ExportItem[]; |
| dataViews: ExportItem[]; |
| files: ExportItem[]; |
| overrideBrokerSettings: boolean; |
| pipelines: ExportItem[]; |
| |
| static fromData( |
| data: AssetExportConfiguration, |
| target?: AssetExportConfiguration, |
| ): AssetExportConfiguration { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new AssetExportConfiguration(); |
| instance.adapters = __getCopyArrayFn(ExportItem.fromData)( |
| data.adapters, |
| ); |
| instance.assetId = data.assetId; |
| instance.assetName = data.assetName; |
| instance.assets = __getCopyArrayFn(ExportItem.fromData)(data.assets); |
| instance.dashboards = __getCopyArrayFn(ExportItem.fromData)( |
| data.dashboards, |
| ); |
| instance.dataLakeMeasures = __getCopyArrayFn(ExportItem.fromData)( |
| data.dataLakeMeasures, |
| ); |
| instance.dataSources = __getCopyArrayFn(ExportItem.fromData)( |
| data.dataSources, |
| ); |
| instance.dataViews = __getCopyArrayFn(ExportItem.fromData)( |
| data.dataViews, |
| ); |
| instance.files = __getCopyArrayFn(ExportItem.fromData)(data.files); |
| instance.overrideBrokerSettings = data.overrideBrokerSettings; |
| instance.pipelines = __getCopyArrayFn(ExportItem.fromData)( |
| data.pipelines, |
| ); |
| return instance; |
| } |
| } |
| |
| export class CanvasPosition { |
| x: number; |
| y: number; |
| |
| static fromData( |
| data: CanvasPosition, |
| target?: CanvasPosition, |
| ): CanvasPosition { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CanvasPosition(); |
| instance.x = data.x; |
| instance.y = data.y; |
| return instance; |
| } |
| } |
| |
| export class ChangeDatatypeTransformationRuleDescription extends ValueTransformationRuleDescription { |
| '@class': 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription'; |
| 'originalDatatypeXsd': string; |
| 'runtimeKey': string; |
| 'targetDatatypeXsd': string; |
| |
| static 'fromData'( |
| data: ChangeDatatypeTransformationRuleDescription, |
| target?: ChangeDatatypeTransformationRuleDescription, |
| ): ChangeDatatypeTransformationRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = |
| target || new ChangeDatatypeTransformationRuleDescription(); |
| super.fromData(data, instance); |
| instance.originalDatatypeXsd = data.originalDatatypeXsd; |
| instance.runtimeKey = data.runtimeKey; |
| instance.targetDatatypeXsd = data.targetDatatypeXsd; |
| return instance; |
| } |
| } |
| |
| export class CodeInputStaticProperty extends StaticProperty { |
| '@class': 'org.apache.streampipes.model.staticproperty.CodeInputStaticProperty'; |
| 'codeTemplate': string; |
| 'language': string; |
| 'value': string; |
| |
| static 'fromData'( |
| data: CodeInputStaticProperty, |
| target?: CodeInputStaticProperty, |
| ): CodeInputStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CodeInputStaticProperty(); |
| super.fromData(data, instance); |
| instance.codeTemplate = data.codeTemplate; |
| instance.language = data.language; |
| instance.value = data.value; |
| return instance; |
| } |
| } |
| |
| export class CollectionStaticProperty extends StaticProperty { |
| '@class': 'org.apache.streampipes.model.staticproperty.CollectionStaticProperty'; |
| 'memberType': string; |
| 'members': StaticPropertyUnion[]; |
| 'staticPropertyTemplate': StaticPropertyUnion; |
| |
| static 'fromData'( |
| data: CollectionStaticProperty, |
| target?: CollectionStaticProperty, |
| ): CollectionStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CollectionStaticProperty(); |
| super.fromData(data, instance); |
| instance.memberType = data.memberType; |
| instance.members = __getCopyArrayFn(StaticProperty.fromDataUnion)( |
| data.members, |
| ); |
| instance.staticPropertyTemplate = StaticProperty.fromDataUnion( |
| data.staticPropertyTemplate, |
| ); |
| return instance; |
| } |
| } |
| |
| export class ColorPickerStaticProperty extends StaticProperty { |
| '@class': 'org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty'; |
| 'selectedColor': string; |
| |
| static 'fromData'( |
| data: ColorPickerStaticProperty, |
| target?: ColorPickerStaticProperty, |
| ): ColorPickerStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ColorPickerStaticProperty(); |
| super.fromData(data, instance); |
| instance.selectedColor = data.selectedColor; |
| return instance; |
| } |
| } |
| |
| export class CompactAdapter { |
| appId: string; |
| configuration: { [index: string]: any }[]; |
| createOptions: CreateOptions; |
| description: string; |
| enrich: EnrichmentConfig; |
| id: string; |
| name: string; |
| schema: { [index: string]: CompactEventProperty }; |
| transform: TransformationConfig; |
| |
| static fromData( |
| data: CompactAdapter, |
| target?: CompactAdapter, |
| ): CompactAdapter { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CompactAdapter(); |
| instance.appId = data.appId; |
| instance.configuration = __getCopyArrayFn( |
| __getCopyObjectFn(__identity<any>()), |
| )(data.configuration); |
| instance.createOptions = CreateOptions.fromData(data.createOptions); |
| instance.description = data.description; |
| instance.enrich = EnrichmentConfig.fromData(data.enrich); |
| instance.id = data.id; |
| instance.name = data.name; |
| instance.schema = __getCopyObjectFn(CompactEventProperty.fromData)( |
| data.schema, |
| ); |
| instance.transform = TransformationConfig.fromData(data.transform); |
| return instance; |
| } |
| } |
| |
| export class CompactEventProperty { |
| description: string; |
| label: string; |
| propertyScope: string; |
| semanticType: string; |
| |
| static fromData( |
| data: CompactEventProperty, |
| target?: CompactEventProperty, |
| ): CompactEventProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CompactEventProperty(); |
| instance.description = data.description; |
| instance.label = data.label; |
| instance.propertyScope = data.propertyScope; |
| instance.semanticType = data.semanticType; |
| return instance; |
| } |
| } |
| |
| export class CompactPipeline { |
| createOptions: CreateOptions; |
| description: string; |
| id: string; |
| name: string; |
| pipelineElements: CompactPipelineElement[]; |
| |
| static fromData( |
| data: CompactPipeline, |
| target?: CompactPipeline, |
| ): CompactPipeline { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CompactPipeline(); |
| instance.createOptions = CreateOptions.fromData(data.createOptions); |
| instance.description = data.description; |
| instance.id = data.id; |
| instance.name = data.name; |
| instance.pipelineElements = __getCopyArrayFn( |
| CompactPipelineElement.fromData, |
| )(data.pipelineElements); |
| return instance; |
| } |
| } |
| |
| export class CompactPipelineElement { |
| configuration: { [index: string]: any }[]; |
| connectedTo: string[]; |
| id: string; |
| output: OutputConfiguration; |
| ref: string; |
| type: string; |
| |
| static fromData( |
| data: CompactPipelineElement, |
| target?: CompactPipelineElement, |
| ): CompactPipelineElement { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CompactPipelineElement(); |
| instance.configuration = __getCopyArrayFn( |
| __getCopyObjectFn(__identity<any>()), |
| )(data.configuration); |
| instance.connectedTo = __getCopyArrayFn(__identity<string>())( |
| data.connectedTo, |
| ); |
| instance.id = data.id; |
| instance.output = OutputConfiguration.fromData(data.output); |
| instance.ref = data.ref; |
| instance.type = data.type; |
| return instance; |
| } |
| } |
| |
| export class CompactPipelineTemplate implements Storable { |
| description: string; |
| elementId: string; |
| name: string; |
| pipeline: CompactPipelineElement[]; |
| placeholders: PipelinePlaceholders; |
| rev: string; |
| |
| static fromData( |
| data: CompactPipelineTemplate, |
| target?: CompactPipelineTemplate, |
| ): CompactPipelineTemplate { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CompactPipelineTemplate(); |
| instance.description = data.description; |
| instance.elementId = data.elementId; |
| instance.name = data.name; |
| instance.pipeline = __getCopyArrayFn(CompactPipelineElement.fromData)( |
| data.pipeline, |
| ); |
| instance.placeholders = PipelinePlaceholders.fromData( |
| data.placeholders, |
| ); |
| instance.rev = data.rev; |
| return instance; |
| } |
| } |
| |
| export class ConfigItem { |
| configurationScope: ConfigurationScope; |
| description: string; |
| key: string; |
| password: boolean; |
| value: string; |
| valueType: string; |
| |
| static fromData(data: ConfigItem, target?: ConfigItem): ConfigItem { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ConfigItem(); |
| instance.configurationScope = data.configurationScope; |
| instance.description = data.description; |
| instance.key = data.key; |
| instance.password = data.password; |
| instance.value = data.value; |
| instance.valueType = data.valueType; |
| return instance; |
| } |
| } |
| |
| export class MessagesInfo { |
| groupId: string; |
| topicName: string; |
| |
| static fromData(data: MessagesInfo, target?: MessagesInfo): MessagesInfo { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MessagesInfo(); |
| instance.groupId = data.groupId; |
| instance.topicName = data.topicName; |
| return instance; |
| } |
| } |
| |
| export class ConsumedMessagesInfo extends MessagesInfo { |
| consumedMessagesSincePipelineStart: number; |
| lag: number; |
| totalMessagesSincePipelineStart: number; |
| |
| static fromData( |
| data: ConsumedMessagesInfo, |
| target?: ConsumedMessagesInfo, |
| ): ConsumedMessagesInfo { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ConsumedMessagesInfo(); |
| super.fromData(data, instance); |
| instance.consumedMessagesSincePipelineStart = |
| data.consumedMessagesSincePipelineStart; |
| instance.lag = data.lag; |
| instance.totalMessagesSincePipelineStart = |
| data.totalMessagesSincePipelineStart; |
| return instance; |
| } |
| } |
| |
| export class CorrectionValueTransformationRuleDescription extends ValueTransformationRuleDescription { |
| '@class': 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription'; |
| 'correctionValue': number; |
| 'operator': string; |
| 'runtimeKey': string; |
| |
| static 'fromData'( |
| data: CorrectionValueTransformationRuleDescription, |
| target?: CorrectionValueTransformationRuleDescription, |
| ): CorrectionValueTransformationRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = |
| target || new CorrectionValueTransformationRuleDescription(); |
| super.fromData(data, instance); |
| instance.correctionValue = data.correctionValue; |
| instance.operator = data.operator; |
| instance.runtimeKey = data.runtimeKey; |
| return instance; |
| } |
| } |
| |
| export class SchemaTransformationRuleDescription extends TransformationRuleDescription { |
| '@class': |
| | 'org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription'; |
| |
| static 'fromData'( |
| data: SchemaTransformationRuleDescription, |
| target?: SchemaTransformationRuleDescription, |
| ): SchemaTransformationRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new SchemaTransformationRuleDescription(); |
| super.fromData(data, instance); |
| return instance; |
| } |
| } |
| |
| /** |
| * @deprecated since 0.97.0, for removal |
| */ |
| export class CreateNestedRuleDescription extends SchemaTransformationRuleDescription { |
| '@class': 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription'; |
| 'runtimeKey': string; |
| |
| static 'fromData'( |
| data: CreateNestedRuleDescription, |
| target?: CreateNestedRuleDescription, |
| ): CreateNestedRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CreateNestedRuleDescription(); |
| super.fromData(data, instance); |
| instance.runtimeKey = data.runtimeKey; |
| return instance; |
| } |
| } |
| |
| export class CreateOptions { |
| persist: boolean; |
| start: boolean; |
| |
| static fromData( |
| data: CreateOptions, |
| target?: CreateOptions, |
| ): CreateOptions { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CreateOptions(); |
| instance.persist = data.persist; |
| instance.start = data.start; |
| return instance; |
| } |
| } |
| |
| export class CustomOutputStrategy extends OutputStrategy { |
| '@class': 'org.apache.streampipes.model.output.CustomOutputStrategy'; |
| 'availablePropertyKeys': string[]; |
| 'outputRight': boolean; |
| 'selectedPropertyKeys': string[]; |
| |
| static 'fromData'( |
| data: CustomOutputStrategy, |
| target?: CustomOutputStrategy, |
| ): CustomOutputStrategy { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CustomOutputStrategy(); |
| super.fromData(data, instance); |
| instance.availablePropertyKeys = __getCopyArrayFn(__identity<string>())( |
| data.availablePropertyKeys, |
| ); |
| instance.outputRight = data.outputRight; |
| instance.selectedPropertyKeys = __getCopyArrayFn(__identity<string>())( |
| data.selectedPropertyKeys, |
| ); |
| return instance; |
| } |
| } |
| |
| export class CustomTransformOutputStrategy extends OutputStrategy { |
| '@class': 'org.apache.streampipes.model.output.CustomTransformOutputStrategy'; |
| 'eventProperties': EventPropertyUnion[]; |
| |
| static 'fromData'( |
| data: CustomTransformOutputStrategy, |
| target?: CustomTransformOutputStrategy, |
| ): CustomTransformOutputStrategy { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new CustomTransformOutputStrategy(); |
| super.fromData(data, instance); |
| instance.eventProperties = __getCopyArrayFn( |
| EventProperty.fromDataUnion, |
| )(data.eventProperties); |
| return instance; |
| } |
| } |
| |
| export class DashboardEntity implements Storable { |
| elementId: string; |
| rev: string; |
| |
| static fromData( |
| data: DashboardEntity, |
| target?: DashboardEntity, |
| ): DashboardEntity { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DashboardEntity(); |
| instance.elementId = data.elementId; |
| instance.rev = data.rev; |
| return instance; |
| } |
| } |
| |
| export class DashboardItem { |
| cols: number; |
| component: string; |
| id: string; |
| name: string; |
| rows: number; |
| settings: string[]; |
| timeSettings: { [index: string]: any }; |
| x: number; |
| y: number; |
| |
| static fromData( |
| data: DashboardItem, |
| target?: DashboardItem, |
| ): DashboardItem { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DashboardItem(); |
| instance.cols = data.cols; |
| instance.component = data.component; |
| instance.id = data.id; |
| instance.name = data.name; |
| instance.rows = data.rows; |
| instance.settings = __getCopyArrayFn(__identity<string>())( |
| data.settings, |
| ); |
| instance.timeSettings = __getCopyObjectFn(__identity<any>())( |
| data.timeSettings, |
| ); |
| instance.x = data.x; |
| instance.y = data.y; |
| return instance; |
| } |
| } |
| |
| export class DashboardModel implements Storable { |
| couchDbId: string; |
| dashboardGeneralSettings: { [index: string]: any }; |
| dashboardLiveSettings: { [index: string]: any }; |
| dashboardTimeSettings: { [index: string]: any }; |
| description: string; |
| displayHeader: boolean; |
| elementId: string; |
| id: string; |
| name: string; |
| rev: string; |
| widgets: DashboardItem[]; |
| |
| static fromData( |
| data: DashboardModel, |
| target?: DashboardModel, |
| ): DashboardModel { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DashboardModel(); |
| instance.couchDbId = data.couchDbId; |
| instance.dashboardGeneralSettings = __getCopyObjectFn( |
| __identity<any>(), |
| )(data.dashboardGeneralSettings); |
| instance.dashboardLiveSettings = __getCopyObjectFn(__identity<any>())( |
| data.dashboardLiveSettings, |
| ); |
| instance.dashboardTimeSettings = __getCopyObjectFn(__identity<any>())( |
| data.dashboardTimeSettings, |
| ); |
| instance.description = data.description; |
| instance.displayHeader = data.displayHeader; |
| instance.elementId = data.elementId; |
| instance.id = data.id; |
| instance.name = data.name; |
| instance.rev = data.rev; |
| instance.widgets = __getCopyArrayFn(DashboardItem.fromData)( |
| data.widgets, |
| ); |
| return instance; |
| } |
| } |
| |
| export class DashboardWidgetModel extends DashboardEntity { |
| dashboardWidgetSettings: DashboardWidgetSettings; |
| pipelineId: string; |
| visualizationName: string; |
| widgetId: string; |
| widgetType: string; |
| |
| static fromData( |
| data: DashboardWidgetModel, |
| target?: DashboardWidgetModel, |
| ): DashboardWidgetModel { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DashboardWidgetModel(); |
| super.fromData(data, instance); |
| instance.dashboardWidgetSettings = DashboardWidgetSettings.fromData( |
| data.dashboardWidgetSettings, |
| ); |
| instance.pipelineId = data.pipelineId; |
| instance.visualizationName = data.visualizationName; |
| instance.widgetId = data.widgetId; |
| instance.widgetType = data.widgetType; |
| return instance; |
| } |
| } |
| |
| export class DashboardWidgetSettings { |
| config: StaticPropertyUnion[]; |
| requiredSchema: EventSchema; |
| widgetDescription: string; |
| widgetIconName: string; |
| widgetLabel: string; |
| widgetName: string; |
| |
| static fromData( |
| data: DashboardWidgetSettings, |
| target?: DashboardWidgetSettings, |
| ): DashboardWidgetSettings { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DashboardWidgetSettings(); |
| instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)( |
| data.config, |
| ); |
| instance.requiredSchema = EventSchema.fromData(data.requiredSchema); |
| instance.widgetDescription = data.widgetDescription; |
| instance.widgetIconName = data.widgetIconName; |
| instance.widgetLabel = data.widgetLabel; |
| instance.widgetName = data.widgetName; |
| return instance; |
| } |
| } |
| |
| export class DataExplorerWidgetModel extends DashboardEntity { |
| baseAppearanceConfig: { [index: string]: any }; |
| dataConfig: { [index: string]: any }; |
| measureName: string; |
| pipelineId: string; |
| timeSettings: { [index: string]: any }; |
| visualizationConfig: { [index: string]: any }; |
| widgetId: string; |
| widgetType: string; |
| |
| static fromData( |
| data: DataExplorerWidgetModel, |
| target?: DataExplorerWidgetModel, |
| ): DataExplorerWidgetModel { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DataExplorerWidgetModel(); |
| super.fromData(data, instance); |
| instance.baseAppearanceConfig = __getCopyObjectFn(__identity<any>())( |
| data.baseAppearanceConfig, |
| ); |
| instance.dataConfig = __getCopyObjectFn(__identity<any>())( |
| data.dataConfig, |
| ); |
| instance.measureName = data.measureName; |
| instance.pipelineId = data.pipelineId; |
| instance.timeSettings = __getCopyObjectFn(__identity<any>())( |
| data.timeSettings, |
| ); |
| instance.visualizationConfig = __getCopyObjectFn(__identity<any>())( |
| data.visualizationConfig, |
| ); |
| instance.widgetId = data.widgetId; |
| instance.widgetType = data.widgetType; |
| return instance; |
| } |
| } |
| |
| export class DataLakeMeasure implements Storable { |
| '@class': 'org.apache.streampipes.model.datalake.DataLakeMeasure'; |
| 'elementId': string; |
| 'eventSchema': EventSchema; |
| 'measureName': string; |
| 'pipelineId': string; |
| 'pipelineIsRunning': boolean; |
| 'pipelineName': string; |
| 'rev': string; |
| 'schemaUpdateStrategy': DataLakeMeasureSchemaUpdateStrategy; |
| 'schemaVersion': string; |
| 'timestampField': string; |
| |
| static 'fromData'( |
| data: DataLakeMeasure, |
| target?: DataLakeMeasure, |
| ): DataLakeMeasure { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DataLakeMeasure(); |
| instance['@class'] = data['@class']; |
| instance.elementId = data.elementId; |
| instance.eventSchema = EventSchema.fromData(data.eventSchema); |
| instance.measureName = data.measureName; |
| instance.pipelineId = data.pipelineId; |
| instance.pipelineIsRunning = data.pipelineIsRunning; |
| instance.pipelineName = data.pipelineName; |
| instance.rev = data.rev; |
| instance.schemaUpdateStrategy = data.schemaUpdateStrategy; |
| instance.schemaVersion = data.schemaVersion; |
| instance.timestampField = data.timestampField; |
| return instance; |
| } |
| } |
| |
| export class InvocableStreamPipesEntity |
| extends VersionedNamedStreamPipesEntity |
| implements EndpointSelectable |
| { |
| '@class': |
| | 'org.apache.streampipes.model.base.InvocableStreamPipesEntity' |
| | 'org.apache.streampipes.model.graph.DataSinkInvocation' |
| | 'org.apache.streampipes.model.graph.DataProcessorInvocation'; |
| 'belongsTo': string; |
| 'configured': boolean; |
| 'correspondingPipeline': string; |
| 'correspondingUser': string; |
| 'detachPath': string; |
| 'inputStreams': SpDataStream[]; |
| 'selectedEndpointUrl': string; |
| 'serviceTagPrefix': SpServiceTagPrefix; |
| 'staticProperties': StaticPropertyUnion[]; |
| 'streamRequirements': SpDataStream[]; |
| 'supportedGrounding': EventGrounding; |
| 'uncompleted': boolean; |
| |
| static 'fromData'( |
| data: InvocableStreamPipesEntity, |
| target?: InvocableStreamPipesEntity, |
| ): InvocableStreamPipesEntity { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new InvocableStreamPipesEntity(); |
| super.fromData(data, instance); |
| instance.belongsTo = data.belongsTo; |
| instance.configured = data.configured; |
| instance.correspondingPipeline = data.correspondingPipeline; |
| instance.correspondingUser = data.correspondingUser; |
| instance.detachPath = data.detachPath; |
| instance.inputStreams = __getCopyArrayFn(SpDataStream.fromData)( |
| data.inputStreams, |
| ); |
| instance.selectedEndpointUrl = data.selectedEndpointUrl; |
| instance.serviceTagPrefix = data.serviceTagPrefix; |
| instance.staticProperties = __getCopyArrayFn( |
| StaticProperty.fromDataUnion, |
| )(data.staticProperties); |
| instance.streamRequirements = __getCopyArrayFn(SpDataStream.fromData)( |
| data.streamRequirements, |
| ); |
| instance.supportedGrounding = EventGrounding.fromData( |
| data.supportedGrounding, |
| ); |
| instance.uncompleted = data.uncompleted; |
| return instance; |
| } |
| } |
| |
| export class DataProcessorInvocation extends InvocableStreamPipesEntity { |
| '@class': 'org.apache.streampipes.model.graph.DataProcessorInvocation'; |
| 'category': string[]; |
| 'outputStrategies': OutputStrategyUnion[]; |
| 'outputStream': SpDataStream; |
| |
| static 'fromData'( |
| data: DataProcessorInvocation, |
| target?: DataProcessorInvocation, |
| ): DataProcessorInvocation { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DataProcessorInvocation(); |
| super.fromData(data, instance); |
| instance.category = __getCopyArrayFn(__identity<string>())( |
| data.category, |
| ); |
| instance.outputStrategies = __getCopyArrayFn( |
| OutputStrategy.fromDataUnion, |
| )(data.outputStrategies); |
| instance.outputStream = SpDataStream.fromData(data.outputStream); |
| return instance; |
| } |
| } |
| |
| export class DataProcessorType { |
| code: string; |
| description: string; |
| label: string; |
| |
| static fromData( |
| data: DataProcessorType, |
| target?: DataProcessorType, |
| ): DataProcessorType { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DataProcessorType(); |
| instance.code = data.code; |
| instance.description = data.description; |
| instance.label = data.label; |
| return instance; |
| } |
| } |
| |
| export class DataSeries { |
| headers: string[]; |
| rows: any[][]; |
| tags: { [index: string]: string }; |
| total: number; |
| |
| static fromData(data: DataSeries, target?: DataSeries): DataSeries { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DataSeries(); |
| instance.headers = __getCopyArrayFn(__identity<string>())(data.headers); |
| instance.rows = __getCopyArrayFn(__getCopyArrayFn(__identity<any>()))( |
| data.rows, |
| ); |
| instance.tags = __getCopyObjectFn(__identity<string>())(data.tags); |
| instance.total = data.total; |
| return instance; |
| } |
| } |
| |
| export class DataSinkInvocation extends InvocableStreamPipesEntity { |
| '@class': 'org.apache.streampipes.model.graph.DataSinkInvocation'; |
| 'category': string[]; |
| |
| static 'fromData'( |
| data: DataSinkInvocation, |
| target?: DataSinkInvocation, |
| ): DataSinkInvocation { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DataSinkInvocation(); |
| super.fromData(data, instance); |
| instance.category = __getCopyArrayFn(__identity<string>())( |
| data.category, |
| ); |
| return instance; |
| } |
| } |
| |
| export class DataSinkType { |
| code: string; |
| description: string; |
| label: string; |
| |
| static fromData(data: DataSinkType, target?: DataSinkType): DataSinkType { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DataSinkType(); |
| instance.code = data.code; |
| instance.description = data.description; |
| instance.label = data.label; |
| return instance; |
| } |
| } |
| |
| export class DeleteRuleDescription extends SchemaTransformationRuleDescription { |
| '@class': 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription'; |
| 'runtimeKey': string; |
| |
| static 'fromData'( |
| data: DeleteRuleDescription, |
| target?: DeleteRuleDescription, |
| ): DeleteRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new DeleteRuleDescription(); |
| super.fromData(data, instance); |
| instance.runtimeKey = data.runtimeKey; |
| return instance; |
| } |
| } |
| |
| export class EdgeValidationStatus { |
| notifications: Notification[]; |
| validationStatusType: EdgeValidationStatusType; |
| |
| static fromData( |
| data: EdgeValidationStatus, |
| target?: EdgeValidationStatus, |
| ): EdgeValidationStatus { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EdgeValidationStatus(); |
| instance.notifications = __getCopyArrayFn(Notification.fromData)( |
| data.notifications, |
| ); |
| instance.validationStatusType = data.validationStatusType; |
| return instance; |
| } |
| } |
| |
| export interface EndpointSelectable { |
| correspondingPipeline: string; |
| detachPath: string; |
| name: string; |
| selectedEndpointUrl: string; |
| } |
| |
| export class EnrichmentConfig { |
| timestamp: string; |
| |
| static fromData( |
| data: EnrichmentConfig, |
| target?: EnrichmentConfig, |
| ): EnrichmentConfig { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EnrichmentConfig(); |
| instance.timestamp = data.timestamp; |
| return instance; |
| } |
| } |
| |
| export class ValueSpecification { |
| '@class': |
| | 'org.apache.streampipes.model.schema.QuantitativeValue' |
| | 'org.apache.streampipes.model.schema.Enumeration'; |
| |
| static 'fromData'( |
| data: ValueSpecification, |
| target?: ValueSpecification, |
| ): ValueSpecification { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ValueSpecification(); |
| instance['@class'] = data['@class']; |
| return instance; |
| } |
| |
| static 'fromDataUnion'( |
| data: ValueSpecificationUnion, |
| ): ValueSpecificationUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.schema.QuantitativeValue': |
| return QuantitativeValue.fromData(data); |
| case 'org.apache.streampipes.model.schema.Enumeration': |
| return Enumeration.fromData(data); |
| } |
| } |
| } |
| |
| export class Enumeration extends ValueSpecification { |
| '@class': 'org.apache.streampipes.model.schema.Enumeration'; |
| 'description': string; |
| 'label': string; |
| 'runtimeValues': string[]; |
| |
| static 'fromData'(data: Enumeration, target?: Enumeration): Enumeration { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new Enumeration(); |
| super.fromData(data, instance); |
| instance.description = data.description; |
| instance.label = data.label; |
| instance.runtimeValues = __getCopyArrayFn(__identity<string>())( |
| data.runtimeValues, |
| ); |
| return instance; |
| } |
| } |
| |
| export class Message { |
| elementName: string; |
| notifications: Notification[]; |
| success: boolean; |
| |
| static fromData(data: Message, target?: Message): Message { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new Message(); |
| instance.elementName = data.elementName; |
| instance.notifications = __getCopyArrayFn(Notification.fromData)( |
| data.notifications, |
| ); |
| instance.success = data.success; |
| return instance; |
| } |
| } |
| |
| export class ErrorMessage extends Message { |
| static fromData(data: ErrorMessage, target?: ErrorMessage): ErrorMessage { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ErrorMessage(); |
| super.fromData(data, instance); |
| return instance; |
| } |
| } |
| |
| export class EventGrounding { |
| transportProtocols: TransportProtocolUnion[]; |
| |
| static fromData( |
| data: EventGrounding, |
| target?: EventGrounding, |
| ): EventGrounding { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EventGrounding(); |
| instance.transportProtocols = __getCopyArrayFn( |
| TransportProtocol.fromDataUnion, |
| )(data.transportProtocols); |
| return instance; |
| } |
| } |
| |
| export class EventProperty { |
| '@class': |
| | 'org.apache.streampipes.model.schema.EventPropertyList' |
| | 'org.apache.streampipes.model.schema.EventPropertyNested' |
| | 'org.apache.streampipes.model.schema.EventPropertyPrimitive'; |
| 'additionalMetadata': { [index: string]: any }; |
| 'description': string; |
| 'elementId': string; |
| 'label': string; |
| 'propertyScope': string; |
| 'runtimeId': string; |
| 'runtimeName': string; |
| 'semanticType': string; |
| |
| static 'fromData'( |
| data: EventProperty, |
| target?: EventProperty, |
| ): EventProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EventProperty(); |
| instance['@class'] = data['@class']; |
| instance.additionalMetadata = __getCopyObjectFn(__identity<any>())( |
| data.additionalMetadata, |
| ); |
| instance.description = data.description; |
| instance.elementId = data.elementId; |
| instance.label = data.label; |
| instance.propertyScope = data.propertyScope; |
| instance.runtimeId = data.runtimeId; |
| instance.runtimeName = data.runtimeName; |
| instance.semanticType = data.semanticType; |
| return instance; |
| } |
| |
| static 'fromDataUnion'(data: EventPropertyUnion): EventPropertyUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.schema.EventPropertyList': |
| return EventPropertyList.fromData(data); |
| case 'org.apache.streampipes.model.schema.EventPropertyNested': |
| return EventPropertyNested.fromData(data); |
| case 'org.apache.streampipes.model.schema.EventPropertyPrimitive': |
| return EventPropertyPrimitive.fromData(data); |
| } |
| } |
| } |
| |
| export class EventPropertyList extends EventProperty { |
| '@class': 'org.apache.streampipes.model.schema.EventPropertyList'; |
| 'eventProperty': EventPropertyUnion; |
| |
| static 'fromData'( |
| data: EventPropertyList, |
| target?: EventPropertyList, |
| ): EventPropertyList { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EventPropertyList(); |
| super.fromData(data, instance); |
| instance.eventProperty = EventProperty.fromDataUnion( |
| data.eventProperty, |
| ); |
| return instance; |
| } |
| } |
| |
| export class EventPropertyNested extends EventProperty { |
| '@class': 'org.apache.streampipes.model.schema.EventPropertyNested'; |
| 'eventProperties': EventPropertyUnion[]; |
| |
| static 'fromData'( |
| data: EventPropertyNested, |
| target?: EventPropertyNested, |
| ): EventPropertyNested { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EventPropertyNested(); |
| super.fromData(data, instance); |
| instance.eventProperties = __getCopyArrayFn( |
| EventProperty.fromDataUnion, |
| )(data.eventProperties); |
| return instance; |
| } |
| } |
| |
| export class EventPropertyPrimitive extends EventProperty { |
| '@class': 'org.apache.streampipes.model.schema.EventPropertyPrimitive'; |
| 'measurementUnit': string; |
| 'runtimeType': string; |
| 'valueSpecification': ValueSpecificationUnion; |
| |
| static 'fromData'( |
| data: EventPropertyPrimitive, |
| target?: EventPropertyPrimitive, |
| ): EventPropertyPrimitive { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EventPropertyPrimitive(); |
| super.fromData(data, instance); |
| instance.measurementUnit = data.measurementUnit; |
| instance.runtimeType = data.runtimeType; |
| instance.valueSpecification = ValueSpecification.fromDataUnion( |
| data.valueSpecification, |
| ); |
| return instance; |
| } |
| } |
| |
| export class StreamTransformationRuleDescription extends TransformationRuleDescription { |
| '@class': |
| | 'org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription' |
| | 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription'; |
| |
| static 'fromData'( |
| data: StreamTransformationRuleDescription, |
| target?: StreamTransformationRuleDescription, |
| ): StreamTransformationRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new StreamTransformationRuleDescription(); |
| super.fromData(data, instance); |
| return instance; |
| } |
| |
| static 'fromDataUnion'( |
| data: StreamTransformationRuleDescriptionUnion, |
| ): StreamTransformationRuleDescriptionUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription': |
| return EventRateTransformationRuleDescription.fromData(data); |
| case 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription': |
| return RemoveDuplicatesTransformationRuleDescription.fromData( |
| data, |
| ); |
| } |
| } |
| } |
| |
| export class EventRateTransformationRuleDescription extends StreamTransformationRuleDescription { |
| '@class': 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription'; |
| 'aggregationTimeWindow': number; |
| 'aggregationType': string; |
| |
| static 'fromData'( |
| data: EventRateTransformationRuleDescription, |
| target?: EventRateTransformationRuleDescription, |
| ): EventRateTransformationRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EventRateTransformationRuleDescription(); |
| super.fromData(data, instance); |
| instance.aggregationTimeWindow = data.aggregationTimeWindow; |
| instance.aggregationType = data.aggregationType; |
| return instance; |
| } |
| } |
| |
| export class EventSchema { |
| eventProperties: EventPropertyUnion[]; |
| |
| static fromData(data: EventSchema, target?: EventSchema): EventSchema { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new EventSchema(); |
| instance.eventProperties = __getCopyArrayFn( |
| EventProperty.fromDataUnion, |
| )(data.eventProperties); |
| return instance; |
| } |
| } |
| |
| export class ExportConfiguration { |
| assetExportConfiguration: AssetExportConfiguration[]; |
| |
| static fromData( |
| data: ExportConfiguration, |
| target?: ExportConfiguration, |
| ): ExportConfiguration { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ExportConfiguration(); |
| instance.assetExportConfiguration = __getCopyArrayFn( |
| AssetExportConfiguration.fromData, |
| )(data.assetExportConfiguration); |
| return instance; |
| } |
| } |
| |
| export class ExportItem { |
| label: string; |
| resourceId: string; |
| selected: boolean; |
| |
| static fromData(data: ExportItem, target?: ExportItem): ExportItem { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ExportItem(); |
| instance.label = data.label; |
| instance.resourceId = data.resourceId; |
| instance.selected = data.selected; |
| return instance; |
| } |
| } |
| |
| export class ExtensionDeploymentConfiguration { |
| desiredServiceTags: SpServiceTag[]; |
| selectedEndpointUrl: string; |
| |
| static fromData( |
| data: ExtensionDeploymentConfiguration, |
| target?: ExtensionDeploymentConfiguration, |
| ): ExtensionDeploymentConfiguration { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ExtensionDeploymentConfiguration(); |
| instance.desiredServiceTags = __getCopyArrayFn(SpServiceTag.fromData)( |
| data.desiredServiceTags, |
| ); |
| instance.selectedEndpointUrl = data.selectedEndpointUrl; |
| return instance; |
| } |
| } |
| |
| export class ExtensionItemDescription { |
| appId: string; |
| available: boolean; |
| description: string; |
| editable: boolean; |
| elementId: string; |
| includesDocs: boolean; |
| includesIcon: boolean; |
| installed: boolean; |
| name: string; |
| serviceTagPrefix: SpServiceTagPrefix; |
| |
| static fromData( |
| data: ExtensionItemDescription, |
| target?: ExtensionItemDescription, |
| ): ExtensionItemDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ExtensionItemDescription(); |
| instance.appId = data.appId; |
| instance.available = data.available; |
| instance.description = data.description; |
| instance.editable = data.editable; |
| instance.elementId = data.elementId; |
| instance.includesDocs = data.includesDocs; |
| instance.includesIcon = data.includesIcon; |
| instance.installed = data.installed; |
| instance.name = data.name; |
| instance.serviceTagPrefix = data.serviceTagPrefix; |
| return instance; |
| } |
| } |
| |
| export class ExtensionItemInstallationRequest { |
| appId: string; |
| publicElement: boolean; |
| serviceTagPrefix: SpServiceTagPrefix; |
| |
| static fromData( |
| data: ExtensionItemInstallationRequest, |
| target?: ExtensionItemInstallationRequest, |
| ): ExtensionItemInstallationRequest { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ExtensionItemInstallationRequest(); |
| instance.appId = data.appId; |
| instance.publicElement = data.publicElement; |
| instance.serviceTagPrefix = data.serviceTagPrefix; |
| return instance; |
| } |
| } |
| |
| export class FieldStatusInfo { |
| additionalInfo: string; |
| changesRequired: boolean; |
| fieldStatus: FieldStatus; |
| |
| static fromData( |
| data: FieldStatusInfo, |
| target?: FieldStatusInfo, |
| ): FieldStatusInfo { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new FieldStatusInfo(); |
| instance.additionalInfo = data.additionalInfo; |
| instance.changesRequired = data.changesRequired; |
| instance.fieldStatus = data.fieldStatus; |
| return instance; |
| } |
| } |
| |
| export class FileMetadata implements Storable { |
| createdAt: number; |
| createdByUser: string; |
| elementId: string; |
| fileId: string; |
| filename: string; |
| filetype: string; |
| lastModified: number; |
| rev: string; |
| |
| static fromData(data: FileMetadata, target?: FileMetadata): FileMetadata { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new FileMetadata(); |
| instance.createdAt = data.createdAt; |
| instance.createdByUser = data.createdByUser; |
| instance.elementId = data.elementId; |
| instance.fileId = data.fileId; |
| instance.filename = data.filename; |
| instance.filetype = data.filetype; |
| instance.lastModified = data.lastModified; |
| instance.rev = data.rev; |
| return instance; |
| } |
| } |
| |
| export class FileStaticProperty extends StaticProperty { |
| '@class': 'org.apache.streampipes.model.staticproperty.FileStaticProperty'; |
| 'endpointUrl': string; |
| 'locationPath': string; |
| 'requiredFiletypes': string[]; |
| |
| static 'fromData'( |
| data: FileStaticProperty, |
| target?: FileStaticProperty, |
| ): FileStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new FileStaticProperty(); |
| super.fromData(data, instance); |
| instance.endpointUrl = data.endpointUrl; |
| instance.locationPath = data.locationPath; |
| instance.requiredFiletypes = __getCopyArrayFn(__identity<string>())( |
| data.requiredFiletypes, |
| ); |
| return instance; |
| } |
| } |
| |
| export class FixedOutputStrategy extends OutputStrategy { |
| '@class': 'org.apache.streampipes.model.output.FixedOutputStrategy'; |
| 'eventProperties': EventPropertyUnion[]; |
| |
| static 'fromData'( |
| data: FixedOutputStrategy, |
| target?: FixedOutputStrategy, |
| ): FixedOutputStrategy { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new FixedOutputStrategy(); |
| super.fromData(data, instance); |
| instance.eventProperties = __getCopyArrayFn( |
| EventProperty.fromDataUnion, |
| )(data.eventProperties); |
| return instance; |
| } |
| } |
| |
| export class FreeTextStaticProperty extends StaticProperty { |
| '@class': 'org.apache.streampipes.model.staticproperty.FreeTextStaticProperty'; |
| 'htmlAllowed': boolean; |
| 'htmlFontFormat': boolean; |
| 'mapsTo': string; |
| 'multiLine': boolean; |
| 'placeholdersSupported': boolean; |
| 'requiredDatatype': string; |
| 'requiredDomainProperty': string; |
| 'value': string; |
| 'valueSpecification': PropertyValueSpecification; |
| |
| static 'fromData'( |
| data: FreeTextStaticProperty, |
| target?: FreeTextStaticProperty, |
| ): FreeTextStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new FreeTextStaticProperty(); |
| super.fromData(data, instance); |
| instance.htmlAllowed = data.htmlAllowed; |
| instance.htmlFontFormat = data.htmlFontFormat; |
| instance.mapsTo = data.mapsTo; |
| instance.multiLine = data.multiLine; |
| instance.placeholdersSupported = data.placeholdersSupported; |
| instance.requiredDatatype = data.requiredDatatype; |
| instance.requiredDomainProperty = data.requiredDomainProperty; |
| instance.value = data.value; |
| instance.valueSpecification = PropertyValueSpecification.fromData( |
| data.valueSpecification, |
| ); |
| return instance; |
| } |
| } |
| |
| export class FunctionDefinition { |
| consumedStreams: string[]; |
| functionId: FunctionId; |
| |
| static fromData( |
| data: FunctionDefinition, |
| target?: FunctionDefinition, |
| ): FunctionDefinition { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new FunctionDefinition(); |
| instance.consumedStreams = __getCopyArrayFn(__identity<string>())( |
| data.consumedStreams, |
| ); |
| instance.functionId = FunctionId.fromData(data.functionId); |
| return instance; |
| } |
| } |
| |
| export class FunctionId { |
| id: string; |
| version: number; |
| |
| static fromData(data: FunctionId, target?: FunctionId): FunctionId { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new FunctionId(); |
| instance.id = data.id; |
| instance.version = data.version; |
| return instance; |
| } |
| } |
| |
| export class GuessSchema { |
| '@class': 'org.apache.streampipes.model.connect.guess.GuessSchema'; |
| 'eventPreview': string[]; |
| 'eventSchema': EventSchema; |
| 'fieldStatusInfo': { [index: string]: FieldStatusInfo }; |
| 'modifiedRules': TransformationRuleDescriptionUnion[]; |
| 'removedProperties': EventPropertyUnion[]; |
| 'targetSchema': EventSchema; |
| 'updateNotifications': Notification[]; |
| |
| static 'fromData'(data: GuessSchema, target?: GuessSchema): GuessSchema { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new GuessSchema(); |
| instance['@class'] = data['@class']; |
| instance.eventPreview = __getCopyArrayFn(__identity<string>())( |
| data.eventPreview, |
| ); |
| instance.eventSchema = EventSchema.fromData(data.eventSchema); |
| instance.fieldStatusInfo = __getCopyObjectFn(FieldStatusInfo.fromData)( |
| data.fieldStatusInfo, |
| ); |
| instance.modifiedRules = __getCopyArrayFn( |
| TransformationRuleDescription.fromDataUnion, |
| )(data.modifiedRules); |
| instance.removedProperties = __getCopyArrayFn( |
| EventProperty.fromDataUnion, |
| )(data.removedProperties); |
| instance.targetSchema = EventSchema.fromData(data.targetSchema); |
| instance.updateNotifications = __getCopyArrayFn(Notification.fromData)( |
| data.updateNotifications, |
| ); |
| return instance; |
| } |
| } |
| |
| export class TransportProtocol { |
| '@class': |
| | 'org.apache.streampipes.model.grounding.JmsTransportProtocol' |
| | 'org.apache.streampipes.model.grounding.KafkaTransportProtocol' |
| | 'org.apache.streampipes.model.grounding.MqttTransportProtocol' |
| | 'org.apache.streampipes.model.grounding.NatsTransportProtocol' |
| | 'org.apache.streampipes.model.grounding.PulsarTransportProtocol'; |
| 'brokerHostname': string; |
| 'elementId': string; |
| 'topicDefinition': TopicDefinitionUnion; |
| |
| static 'fromData'( |
| data: TransportProtocol, |
| target?: TransportProtocol, |
| ): TransportProtocol { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new TransportProtocol(); |
| instance['@class'] = data['@class']; |
| instance.brokerHostname = data.brokerHostname; |
| instance.elementId = data.elementId; |
| instance.topicDefinition = TopicDefinition.fromDataUnion( |
| data.topicDefinition, |
| ); |
| return instance; |
| } |
| |
| static 'fromDataUnion'( |
| data: TransportProtocolUnion, |
| ): TransportProtocolUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.grounding.JmsTransportProtocol': |
| return JmsTransportProtocol.fromData(data); |
| case 'org.apache.streampipes.model.grounding.KafkaTransportProtocol': |
| return KafkaTransportProtocol.fromData(data); |
| case 'org.apache.streampipes.model.grounding.MqttTransportProtocol': |
| return MqttTransportProtocol.fromData(data); |
| case 'org.apache.streampipes.model.grounding.NatsTransportProtocol': |
| return NatsTransportProtocol.fromData(data); |
| case 'org.apache.streampipes.model.grounding.PulsarTransportProtocol': |
| return PulsarTransportProtocol.fromData(data); |
| } |
| } |
| } |
| |
| export class JmsTransportProtocol extends TransportProtocol { |
| '@class': 'org.apache.streampipes.model.grounding.JmsTransportProtocol'; |
| 'port': number; |
| |
| static 'fromData'( |
| data: JmsTransportProtocol, |
| target?: JmsTransportProtocol, |
| ): JmsTransportProtocol { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new JmsTransportProtocol(); |
| super.fromData(data, instance); |
| instance.port = data.port; |
| return instance; |
| } |
| } |
| |
| export class KafkaTransportProtocol extends TransportProtocol { |
| '@class': 'org.apache.streampipes.model.grounding.KafkaTransportProtocol'; |
| 'acks': string; |
| 'batchSize': string; |
| 'groupId': string; |
| 'kafkaPort': number; |
| 'lingerMs': number; |
| 'maxRequestSize': string; |
| 'messageMaxBytes': string; |
| 'offset': string; |
| 'zookeeperHost': string; |
| 'zookeeperPort': number; |
| |
| static 'fromData'( |
| data: KafkaTransportProtocol, |
| target?: KafkaTransportProtocol, |
| ): KafkaTransportProtocol { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new KafkaTransportProtocol(); |
| super.fromData(data, instance); |
| instance.acks = data.acks; |
| instance.batchSize = data.batchSize; |
| instance.groupId = data.groupId; |
| instance.kafkaPort = data.kafkaPort; |
| instance.lingerMs = data.lingerMs; |
| instance.maxRequestSize = data.maxRequestSize; |
| instance.messageMaxBytes = data.messageMaxBytes; |
| instance.offset = data.offset; |
| instance.zookeeperHost = data.zookeeperHost; |
| instance.zookeeperPort = data.zookeeperPort; |
| return instance; |
| } |
| } |
| |
| export class KeepOutputStrategy extends OutputStrategy { |
| '@class': 'org.apache.streampipes.model.output.KeepOutputStrategy'; |
| 'eventName': string; |
| 'keepBoth': boolean; |
| |
| static 'fromData'( |
| data: KeepOutputStrategy, |
| target?: KeepOutputStrategy, |
| ): KeepOutputStrategy { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new KeepOutputStrategy(); |
| super.fromData(data, instance); |
| instance.eventName = data.eventName; |
| instance.keepBoth = data.keepBoth; |
| return instance; |
| } |
| } |
| |
| export class LinkSettings { |
| documentationUrl: string; |
| showApiDocumentationLinkOnStartScreen: boolean; |
| showDocumentationLinkInProfileMenu: boolean; |
| showDocumentationLinkOnStartScreen: boolean; |
| showSupportUrlOnStartScreen: boolean; |
| supportUrl: string; |
| |
| static fromData(data: LinkSettings, target?: LinkSettings): LinkSettings { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new LinkSettings(); |
| instance.documentationUrl = data.documentationUrl; |
| instance.showApiDocumentationLinkOnStartScreen = |
| data.showApiDocumentationLinkOnStartScreen; |
| instance.showDocumentationLinkInProfileMenu = |
| data.showDocumentationLinkInProfileMenu; |
| instance.showDocumentationLinkOnStartScreen = |
| data.showDocumentationLinkOnStartScreen; |
| instance.showSupportUrlOnStartScreen = data.showSupportUrlOnStartScreen; |
| instance.supportUrl = data.supportUrl; |
| return instance; |
| } |
| } |
| |
| export class ListOutputStrategy extends OutputStrategy { |
| '@class': 'org.apache.streampipes.model.output.ListOutputStrategy'; |
| 'propertyName': string; |
| |
| static 'fromData'( |
| data: ListOutputStrategy, |
| target?: ListOutputStrategy, |
| ): ListOutputStrategy { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new ListOutputStrategy(); |
| super.fromData(data, instance); |
| instance.propertyName = data.propertyName; |
| return instance; |
| } |
| } |
| |
| export class LocationConfig { |
| attributionText: string; |
| locationEnabled: boolean; |
| tileServerUrl: string; |
| |
| static fromData( |
| data: LocationConfig, |
| target?: LocationConfig, |
| ): LocationConfig { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new LocationConfig(); |
| instance.attributionText = data.attributionText; |
| instance.locationEnabled = data.locationEnabled; |
| instance.tileServerUrl = data.tileServerUrl; |
| return instance; |
| } |
| } |
| |
| export class MappingProperty extends StaticProperty { |
| '@class': |
| | 'org.apache.streampipes.model.staticproperty.MappingProperty' |
| | 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary' |
| | 'org.apache.streampipes.model.staticproperty.MappingPropertyNary'; |
| 'mapsFromOptions': string[]; |
| 'propertyScope': string; |
| 'requirementSelector': string; |
| |
| static 'fromData'( |
| data: MappingProperty, |
| target?: MappingProperty, |
| ): MappingProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MappingProperty(); |
| super.fromData(data, instance); |
| instance.mapsFromOptions = __getCopyArrayFn(__identity<string>())( |
| data.mapsFromOptions, |
| ); |
| instance.propertyScope = data.propertyScope; |
| instance.requirementSelector = data.requirementSelector; |
| return instance; |
| } |
| |
| static 'fromDataUnion'(data: MappingPropertyUnion): MappingPropertyUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.staticproperty.MappingPropertyNary': |
| return MappingPropertyNary.fromData(data); |
| case 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary': |
| return MappingPropertyUnary.fromData(data); |
| } |
| } |
| } |
| |
| export class MappingPropertyNary extends MappingProperty { |
| '@class': 'org.apache.streampipes.model.staticproperty.MappingPropertyNary'; |
| 'selectedProperties': string[]; |
| |
| static 'fromData'( |
| data: MappingPropertyNary, |
| target?: MappingPropertyNary, |
| ): MappingPropertyNary { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MappingPropertyNary(); |
| super.fromData(data, instance); |
| instance.selectedProperties = __getCopyArrayFn(__identity<string>())( |
| data.selectedProperties, |
| ); |
| return instance; |
| } |
| } |
| |
| export class MappingPropertyUnary extends MappingProperty { |
| '@class': 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary'; |
| 'selectedProperty': string; |
| |
| static 'fromData'( |
| data: MappingPropertyUnary, |
| target?: MappingPropertyUnary, |
| ): MappingPropertyUnary { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MappingPropertyUnary(); |
| super.fromData(data, instance); |
| instance.selectedProperty = data.selectedProperty; |
| return instance; |
| } |
| } |
| |
| export class MatchingStaticProperty extends StaticProperty { |
| '@class': 'org.apache.streampipes.model.staticproperty.MatchingStaticProperty'; |
| 'matchLeft': string; |
| 'matchRight': string; |
| |
| static 'fromData'( |
| data: MatchingStaticProperty, |
| target?: MatchingStaticProperty, |
| ): MatchingStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MatchingStaticProperty(); |
| super.fromData(data, instance); |
| instance.matchLeft = data.matchLeft; |
| instance.matchRight = data.matchRight; |
| return instance; |
| } |
| } |
| |
| export class MessageCounter { |
| counter: number; |
| lastTimestamp: number; |
| |
| static fromData( |
| data: MessageCounter, |
| target?: MessageCounter, |
| ): MessageCounter { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MessageCounter(); |
| instance.counter = data.counter; |
| instance.lastTimestamp = data.lastTimestamp; |
| return instance; |
| } |
| } |
| |
| export class MessagingSettings { |
| acks: number; |
| batchSize: number; |
| jmsHost: string; |
| jmsPort: number; |
| kafkaHost: string; |
| kafkaPort: number; |
| lingerMs: number; |
| messageMaxBytes: number; |
| mqttHost: string; |
| mqttPort: number; |
| natsHost: string; |
| natsPort: number; |
| prioritizedProtocols: SpProtocol[]; |
| pulsarUrl: string; |
| supportedProtocols: string[]; |
| zookeeperHost: string; |
| zookeeperPort: number; |
| |
| static fromData( |
| data: MessagingSettings, |
| target?: MessagingSettings, |
| ): MessagingSettings { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MessagingSettings(); |
| instance.acks = data.acks; |
| instance.batchSize = data.batchSize; |
| instance.jmsHost = data.jmsHost; |
| instance.jmsPort = data.jmsPort; |
| instance.kafkaHost = data.kafkaHost; |
| instance.kafkaPort = data.kafkaPort; |
| instance.lingerMs = data.lingerMs; |
| instance.messageMaxBytes = data.messageMaxBytes; |
| instance.mqttHost = data.mqttHost; |
| instance.mqttPort = data.mqttPort; |
| instance.natsHost = data.natsHost; |
| instance.natsPort = data.natsPort; |
| instance.prioritizedProtocols = __getCopyArrayFn( |
| __identity<SpProtocol>(), |
| )(data.prioritizedProtocols); |
| instance.pulsarUrl = data.pulsarUrl; |
| instance.supportedProtocols = __getCopyArrayFn(__identity<string>())( |
| data.supportedProtocols, |
| ); |
| instance.zookeeperHost = data.zookeeperHost; |
| instance.zookeeperPort = data.zookeeperPort; |
| return instance; |
| } |
| } |
| |
| export class MoveRuleDescription extends SchemaTransformationRuleDescription { |
| '@class': 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription'; |
| 'newRuntimeKey': string; |
| 'oldRuntimeKey': string; |
| |
| static 'fromData'( |
| data: MoveRuleDescription, |
| target?: MoveRuleDescription, |
| ): MoveRuleDescription { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MoveRuleDescription(); |
| super.fromData(data, instance); |
| instance.newRuntimeKey = data.newRuntimeKey; |
| instance.oldRuntimeKey = data.oldRuntimeKey; |
| return instance; |
| } |
| } |
| |
| export class MqttTransportProtocol extends TransportProtocol { |
| '@class': 'org.apache.streampipes.model.grounding.MqttTransportProtocol'; |
| 'port': number; |
| |
| static 'fromData'( |
| data: MqttTransportProtocol, |
| target?: MqttTransportProtocol, |
| ): MqttTransportProtocol { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new MqttTransportProtocol(); |
| super.fromData(data, instance); |
| instance.port = data.port; |
| return instance; |
| } |
| } |
| |
| export class NatsTransportProtocol extends TransportProtocol { |
| '@class': 'org.apache.streampipes.model.grounding.NatsTransportProtocol'; |
| 'port': number; |
| |
| static 'fromData'( |
| data: NatsTransportProtocol, |
| target?: NatsTransportProtocol, |
| ): NatsTransportProtocol { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new NatsTransportProtocol(); |
| super.fromData(data, instance); |
| instance.port = data.port; |
| return instance; |
| } |
| } |
| |
| export class Notification { |
| additionalInformation: string; |
| description: string; |
| title: string; |
| |
| static fromData(data: Notification, target?: Notification): Notification { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new Notification(); |
| instance.additionalInformation = data.additionalInformation; |
| instance.description = data.description; |
| instance.title = data.title; |
| return instance; |
| } |
| } |
| |
| export class OneOfStaticProperty extends SelectionStaticProperty { |
| '@class': |
| | 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty' |
| | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty'; |
| |
| static 'fromData'( |
| data: OneOfStaticProperty, |
| target?: OneOfStaticProperty, |
| ): OneOfStaticProperty { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new OneOfStaticProperty(); |
| super.fromData(data, instance); |
| return instance; |
| } |
| |
| static 'fromDataUnion'( |
| data: OneOfStaticPropertyUnion, |
| ): OneOfStaticPropertyUnion { |
| if (!data) { |
| return data; |
| } |
| switch (data['@class']) { |
| case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty': |
| return RuntimeResolvableOneOfStaticProperty.fromData(data); |
| } |
| } |
| } |
| |
| export class Option { |
| elementId: string; |
| internalName: string; |
| name: string; |
| selected: boolean; |
| |
| static fromData(data: Option, target?: Option): Option { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new Option(); |
| instance.elementId = data.elementId; |
| instance.internalName = data.internalName; |
| instance.name = data.name; |
| instance.selected = data.selected; |
| return instance; |
| } |
| } |
| |
| export class OutputConfiguration { |
| keep: string[]; |
| userDefined: UserDefinedOutput[]; |
| |
| static fromData( |
| data: OutputConfiguration, |
| target?: OutputConfiguration, |
| ): OutputConfiguration { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new OutputConfiguration(); |
| instance.keep = __getCopyArrayFn(__identity<string>())(data.keep); |
| instance.userDefined = __getCopyArrayFn(UserDefinedOutput.fromData)( |
| data.userDefined, |
| ); |
| return instance; |
| } |
| } |
| |
| export class Pipeline implements Storable { |
| _id: string; |
| _rev: string; |
| actions: DataSinkInvocation[]; |
| createdAt: number; |
| createdByUser: string; |
| description: string; |
| elementId: string; |
| healthStatus: PipelineHealthStatus; |
| name: string; |
| pipelineNotifications: string[]; |
| publicElement: boolean; |
| restartOnSystemReboot: boolean; |
| rev: string; |
| running: boolean; |
| sepas: DataProcessorInvocation[]; |
| startedAt: number; |
| streams: SpDataStream[]; |
| valid: boolean; |
| |
| static fromData(data: Pipeline, target?: Pipeline): Pipeline { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new Pipeline(); |
| instance._id = data._id; |
| instance._rev = data._rev; |
| instance.actions = __getCopyArrayFn(DataSinkInvocation.fromData)( |
| data.actions, |
| ); |
| instance.createdAt = data.createdAt; |
| instance.createdByUser = data.createdByUser; |
| instance.description = data.description; |
| instance.elementId = data.elementId; |
| instance.healthStatus = data.healthStatus; |
| instance.name = data.name; |
| instance.pipelineNotifications = __getCopyArrayFn(__identity<string>())( |
| data.pipelineNotifications, |
| ); |
| instance.publicElement = data.publicElement; |
| instance.restartOnSystemReboot = data.restartOnSystemReboot; |
| instance.rev = data.rev; |
| instance.running = data.running; |
| instance.sepas = __getCopyArrayFn(DataProcessorInvocation.fromData)( |
| data.sepas, |
| ); |
| instance.startedAt = data.startedAt; |
| instance.streams = __getCopyArrayFn(SpDataStream.fromData)( |
| data.streams, |
| ); |
| instance.valid = data.valid; |
| return instance; |
| } |
| } |
| |
| export class PipelineCanvasComment { |
| comment: string; |
| position: CanvasPosition; |
| |
| static fromData( |
| data: PipelineCanvasComment, |
| target?: PipelineCanvasComment, |
| ): PipelineCanvasComment { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineCanvasComment(); |
| instance.comment = data.comment; |
| instance.position = CanvasPosition.fromData(data.position); |
| return instance; |
| } |
| } |
| |
| export class PipelineCanvasMetadata { |
| _id: string; |
| _rev: string; |
| comments: PipelineCanvasComment[]; |
| pipelineElementMetadata: { [index: string]: PipelineElementMetadata }; |
| pipelineId: string; |
| |
| static fromData( |
| data: PipelineCanvasMetadata, |
| target?: PipelineCanvasMetadata, |
| ): PipelineCanvasMetadata { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineCanvasMetadata(); |
| instance._id = data._id; |
| instance._rev = data._rev; |
| instance.comments = __getCopyArrayFn(PipelineCanvasComment.fromData)( |
| data.comments, |
| ); |
| instance.pipelineElementMetadata = __getCopyObjectFn( |
| PipelineElementMetadata.fromData, |
| )(data.pipelineElementMetadata); |
| instance.pipelineId = data.pipelineId; |
| return instance; |
| } |
| } |
| |
| export class PipelineEdgeValidation { |
| sourceId: string; |
| status: EdgeValidationStatus; |
| targetId: string; |
| |
| static fromData( |
| data: PipelineEdgeValidation, |
| target?: PipelineEdgeValidation, |
| ): PipelineEdgeValidation { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineEdgeValidation(); |
| instance.sourceId = data.sourceId; |
| instance.status = EdgeValidationStatus.fromData(data.status); |
| instance.targetId = data.targetId; |
| return instance; |
| } |
| } |
| |
| export class PipelineElementMetadata { |
| customName: string; |
| position: CanvasPosition; |
| |
| static fromData( |
| data: PipelineElementMetadata, |
| target?: PipelineElementMetadata, |
| ): PipelineElementMetadata { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineElementMetadata(); |
| instance.customName = data.customName; |
| instance.position = CanvasPosition.fromData(data.position); |
| return instance; |
| } |
| } |
| |
| export class PipelineElementMonitoringInfo { |
| consumedMessageInfoExists: boolean; |
| consumedMessagesInfos: ConsumedMessagesInfo[]; |
| pipelineElementId: string; |
| pipelineElementName: string; |
| producedMessageInfoExists: boolean; |
| producedMessagesInfo: ProducedMessagesInfo; |
| |
| static fromData( |
| data: PipelineElementMonitoringInfo, |
| target?: PipelineElementMonitoringInfo, |
| ): PipelineElementMonitoringInfo { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineElementMonitoringInfo(); |
| instance.consumedMessageInfoExists = data.consumedMessageInfoExists; |
| instance.consumedMessagesInfos = __getCopyArrayFn( |
| ConsumedMessagesInfo.fromData, |
| )(data.consumedMessagesInfos); |
| instance.pipelineElementId = data.pipelineElementId; |
| instance.pipelineElementName = data.pipelineElementName; |
| instance.producedMessageInfoExists = data.producedMessageInfoExists; |
| instance.producedMessagesInfo = ProducedMessagesInfo.fromData( |
| data.producedMessagesInfo, |
| ); |
| return instance; |
| } |
| } |
| |
| export class PipelineElementRecommendation { |
| description: string; |
| elementId: string; |
| name: string; |
| |
| static fromData( |
| data: PipelineElementRecommendation, |
| target?: PipelineElementRecommendation, |
| ): PipelineElementRecommendation { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineElementRecommendation(); |
| instance.description = data.description; |
| instance.elementId = data.elementId; |
| instance.name = data.name; |
| return instance; |
| } |
| } |
| |
| export class PipelineElementRecommendationMessage { |
| possibleElements: PipelineElementRecommendation[]; |
| success: boolean; |
| |
| static fromData( |
| data: PipelineElementRecommendationMessage, |
| target?: PipelineElementRecommendationMessage, |
| ): PipelineElementRecommendationMessage { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineElementRecommendationMessage(); |
| instance.possibleElements = __getCopyArrayFn( |
| PipelineElementRecommendation.fromData, |
| )(data.possibleElements); |
| instance.success = data.success; |
| return instance; |
| } |
| } |
| |
| export class PipelineElementStatus { |
| elementId: string; |
| elementName: string; |
| optionalMessage: string; |
| success: boolean; |
| |
| static fromData( |
| data: PipelineElementStatus, |
| target?: PipelineElementStatus, |
| ): PipelineElementStatus { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineElementStatus(); |
| instance.elementId = data.elementId; |
| instance.elementName = data.elementName; |
| instance.optionalMessage = data.optionalMessage; |
| instance.success = data.success; |
| return instance; |
| } |
| } |
| |
| export class PipelineElementTemplate implements Storable { |
| basePipelineElementAppId: string; |
| couchDbId: string; |
| couchDbRev: string; |
| elementId: string; |
| rev: string; |
| templateConfigs: { [index: string]: any }[]; |
| templateDescription: string; |
| templateName: string; |
| |
| static fromData( |
| data: PipelineElementTemplate, |
| target?: PipelineElementTemplate, |
| ): PipelineElementTemplate { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineElementTemplate(); |
| instance.basePipelineElementAppId = data.basePipelineElementAppId; |
| instance.couchDbId = data.couchDbId; |
| instance.couchDbRev = data.couchDbRev; |
| instance.elementId = data.elementId; |
| instance.rev = data.rev; |
| instance.templateConfigs = __getCopyArrayFn( |
| __getCopyObjectFn(__identity<any>()), |
| )(data.templateConfigs); |
| instance.templateDescription = data.templateDescription; |
| instance.templateName = data.templateName; |
| return instance; |
| } |
| } |
| |
| export class PipelineElementValidationInfo { |
| level: ValidationInfoLevel; |
| message: string; |
| |
| static fromData( |
| data: PipelineElementValidationInfo, |
| target?: PipelineElementValidationInfo, |
| ): PipelineElementValidationInfo { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineElementValidationInfo(); |
| instance.level = data.level; |
| instance.message = data.message; |
| return instance; |
| } |
| } |
| |
| export class PipelineModification { |
| domId: string; |
| elementId: string; |
| inputStreams: SpDataStream[]; |
| outputStrategies: OutputStrategyUnion[]; |
| outputStream: SpDataStream; |
| pipelineElementValid: boolean; |
| staticProperties: StaticPropertyUnion[]; |
| validationInfos: PipelineElementValidationInfo[]; |
| |
| static fromData( |
| data: PipelineModification, |
| target?: PipelineModification, |
| ): PipelineModification { |
| if (!data) { |
| return data; |
| } |
| const instance = target || new PipelineModification(); |
| instance.domId = data.domId; |
| instance.elementId = data.elementId; |
| instance.inputStreams = __getCopyArrayFn(SpDataStream.fromData)( |
| data.inputStreams, |
| ); |
| instance.outputStrategies = __getCopyArrayFn( |
| OutputStrategy.fromDataUnion, |
| )(data.outputStrategies); |
| instance.outputStream = SpDataStream.fromData(data.outputStream); |
|