import * as tl from 'azure-pipelines-task-lib/task' ; export class OptimizelyTaskParameter { private endpointId : string ; private projectType : string ; private projectId : string ; private environmentName : string ; private type : string ; private featureId : string ; private featureState : boolean ; private featureVariables : string ; private experimentId : string ; private action : string ; private totalTraffic : string ; private trafficByVariation : string ; private audience : string ; constructor ( ) { try { this . endpointId = tl . getInput ( 'OptimizelyXEndpoint' , true ) ; this . projectId = tl . getInput ( 'Project' , true ) ; this . environmentName = tl . getInput ( "Environment" ) ; this . type = tl . getInput ( "Type" , true ) ; this . featureId = tl . getInput ( 'Feature' ) ; this . featureState = tl . getBoolInput ( 'FeatureState' ) ; this . featureVariables = tl . getInput ( 'FeatureVariables' ) ; this . experimentId = tl . getInput ( 'Experiment' ) ; this . action = tl . getInput ( 'Action' ) ; this . totalTraffic = tl . getInput ( 'Traffic' , true ) ; this . trafficByVariation = tl . getInput ( 'TrafficByVariation' ) ; this . audience = tl . getInput ( 'Audience' ) ; } catch ( error ) { throw new Error ( tl . loc ( "ConstructorFailed" , error . message ) ) ; } } public getEndpointId ( ) { return this . endpointId ; } public getAction ( ) { return this . action ; } public getEnvironmentName ( ) { return this . environmentName ; } public getType ( ) { return this . type ; } public getProjectId ( ) { return this . projectId ; } public getExperimentId ( ) { return this . experimentId ; } public getFeatureId ( ) { return this . featureId ; } public getFeatureState ( ) { return this . featureState ; } public getTotalTraffic ( ) { return this . totalTraffic ; } public getTrafficByVariation ( ) { return this . trafficByVariation ; } public getFeatureVariables ( ) { return this . featureVariables ; } public getAudience ( ) { return this . audience ; } public getProjectType ( ) { return this . projectType ; } public setProjectType ( projectType ) { this . projectType = projectType ; } public isWebProject ( ) { return this . projectType == "web" ; } }