I have a GP service that requires a RasterData object as input. The RasterData object should hold a RasterDataSource object, but I'm not sure of the syntax to connect these two classes. The API reference has no examples. I have tried:
var dataSource = new RasterDataSource();
dataSource.workspaceId = "SharedData";
dataSource.dataSourceName = "raster.tif";
var rasterData = new RasterData();
rasterData = dataSource.toJson();
All properties of the RasterData object return "undefined". What is the correct syntax to do this?