CoreService

<back to all web services

SearchActionAssignments

ActionAssignment - CRUD

Returns a list of actionassignments

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/action-assignments/searchReturns a list of actionassignments
GET/action-assignments/searchReturns a list of actionassignments
import 'package:servicestack/servicestack.dart';

// @DataContract
abstract class QueryBase
{
    // @DataMember(Order=1)
    int? skip;

    // @DataMember(Order=2)
    int? take;

    // @DataMember(Order=3)
    String? orderBy;

    // @DataMember(Order=4)
    String? orderByDesc;

    // @DataMember(Order=5)
    String? include;

    // @DataMember(Order=6)
    String? fields;

    // @DataMember(Order=7)
    Map<String,String?>? meta;

    QueryBase({this.skip,this.take,this.orderBy,this.orderByDesc,this.include,this.fields,this.meta});
    QueryBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        skip = json['skip'];
        take = json['take'];
        orderBy = json['orderBy'];
        orderByDesc = json['orderByDesc'];
        include = json['include'];
        fields = json['fields'];
        meta = JsonConverters.toStringMap(json['meta']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'skip': skip,
        'take': take,
        'orderBy': orderBy,
        'orderByDesc': orderByDesc,
        'include': include,
        'fields': fields,
        'meta': meta
    };

    getTypeName() => "QueryBase";
    TypeContext? context = _ctx;
}

abstract class QueryDb<T> extends QueryBase
{
    QueryDb();
    QueryDb.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "QueryDb<$T>";
    TypeContext? context = _ctx;
}

enum ObjectTypes
{
    None,
    ConfigItem,
    Tenant,
    Collection,
    Resource,
    ComputeNode,
    VirtualMachine,
    PhysicalMachine,
    Disk,
    Subnet,
    IPAddress,
    Job,
    JobEvent,
    FreezePeriod,
    ResourceGroup,
    Deployment,
    ResourceGroupTemplate,
    DeploymentTemplate,
    ResourceProvider,
    GenericResource,
    Role,
    Permission,
    User,
    PatchingWindow,
    Update,
    ReportDefinition,
    TimeSeries,
    DataPoint,
    Action,
    ActionAssignment,
    UserNote,
}

class ScheduledTaskAssignment implements INotSoftDeletable, IConvertible
{
    String id = "";
    String configItemId = "";
    ObjectTypes objectType;
    String displayName = "";
    int taskId = 0;
    String taskName = "";
    String cronExpression = "";

    ScheduledTaskAssignment({this.id,this.configItemId,this.objectType,this.displayName,this.taskId,this.taskName,this.cronExpression});
    ScheduledTaskAssignment.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        configItemId = json['configItemId'];
        objectType = JsonConverters.fromJson(json['objectType'],'ObjectTypes',context!);
        displayName = json['displayName'];
        taskId = json['taskId'];
        taskName = json['taskName'];
        cronExpression = json['cronExpression'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'configItemId': configItemId,
        'objectType': JsonConverters.toJson(objectType,'ObjectTypes',context!),
        'displayName': displayName,
        'taskId': taskId,
        'taskName': taskName,
        'cronExpression': cronExpression
    };

    getTypeName() => "ScheduledTaskAssignment";
    TypeContext? context = _ctx;
}

class Auditable implements IAuditable, IConvertible
{
    // @required()
    DateTime created = DateTime(0);

    // @required()
    String createUser = "";

    // @required()
    String createUserId = "";

    // @required()
    DateTime modified = DateTime(0);

    // @required()
    String modifyUser = "";

    // @required()
    String modifyUserId = "";

    // @required()
    bool isDeleted;

    DateTime? deleted;
    String? deleteUser;
    String? deleteUserId;

    Auditable({this.created,this.createUser,this.createUserId,this.modified,this.modifyUser,this.modifyUserId,this.isDeleted,this.deleted,this.deleteUser,this.deleteUserId});
    Auditable.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        created = JsonConverters.fromJson(json['created'],'DateTime',context!);
        createUser = json['createUser'];
        createUserId = json['createUserId'];
        modified = JsonConverters.fromJson(json['modified'],'DateTime',context!);
        modifyUser = json['modifyUser'];
        modifyUserId = json['modifyUserId'];
        isDeleted = json['isDeleted'];
        deleted = JsonConverters.fromJson(json['deleted'],'DateTime',context!);
        deleteUser = json['deleteUser'];
        deleteUserId = json['deleteUserId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'created': JsonConverters.toJson(created,'DateTime',context!),
        'createUser': createUser,
        'createUserId': createUserId,
        'modified': JsonConverters.toJson(modified,'DateTime',context!),
        'modifyUser': modifyUser,
        'modifyUserId': modifyUserId,
        'isDeleted': isDeleted,
        'deleted': JsonConverters.toJson(deleted,'DateTime',context!),
        'deleteUser': deleteUser,
        'deleteUserId': deleteUserId
    };

    getTypeName() => "Auditable";
    TypeContext? context = _ctx;
}

class Tag implements IConvertible
{
    String name = "";
    String? value;
    bool isProtected;

    Tag({this.name,this.value,this.isProtected});
    Tag.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        value = json['value'];
        isProtected = json['isProtected'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'value': value,
        'isProtected': isProtected
    };

    getTypeName() => "Tag";
    TypeContext? context = _ctx;
}

class PathItem implements IConvertible
{
    String label = "";
    String link = "";
    ObjectTypes objectType;
    String objectId = "";

    PathItem({this.label,this.link,this.objectType,this.objectId});
    PathItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        label = json['label'];
        link = json['link'];
        objectType = JsonConverters.fromJson(json['objectType'],'ObjectTypes',context!);
        objectId = json['objectId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'label': label,
        'link': link,
        'objectType': JsonConverters.toJson(objectType,'ObjectTypes',context!),
        'objectId': objectId
    };

    getTypeName() => "PathItem";
    TypeContext? context = _ctx;
}

class ConfigItem extends Auditable implements IConfigItem, IConvertible
{
    String id = "";
    // @required()
    String name = "";

    // @required()
    // @StringLength(250)
    String displayName = "";

    // @StringLength(8000)
    String? description;

    ObjectTypes objectType;
    // @ignore()
    String selfLink = "";

    // @required()
    List<Tag>? tags;

    // @required()
    List<PathItem>? path;

    ConfigItem({this.id,this.name,this.displayName,this.description,this.objectType,this.selfLink,this.tags,this.path});
    ConfigItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        id = json['id'];
        name = json['name'];
        displayName = json['displayName'];
        description = json['description'];
        objectType = JsonConverters.fromJson(json['objectType'],'ObjectTypes',context!);
        selfLink = json['selfLink'];
        tags = JsonConverters.fromJson(json['tags'],'List<Tag>',context!);
        path = JsonConverters.fromJson(json['path'],'List<PathItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'id': id,
        'name': name,
        'displayName': displayName,
        'description': description,
        'objectType': JsonConverters.toJson(objectType,'ObjectTypes',context!),
        'selfLink': selfLink,
        'tags': JsonConverters.toJson(tags,'List<Tag>',context!),
        'path': JsonConverters.toJson(path,'List<PathItem>',context!)
    });

    getTypeName() => "ConfigItem";
    TypeContext? context = _ctx;
}

enum ParameterValueType
{
    String,
    Number,
    Boolean,
    SecureString,
}

class Parameter implements IConvertible
{
    String name = "";
    String? description;
    String? value;
    String? Default;
    bool optional;
    ParameterValueType type;
    String? validation;

    Parameter({this.name,this.description,this.value,this.Default,this.optional,this.type,this.validation});
    Parameter.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        description = json['description'];
        value = json['value'];
        Default = json['default'];
        optional = json['optional'];
        type = JsonConverters.fromJson(json['type'],'ParameterValueType',context!);
        validation = json['validation'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'description': description,
        'value': value,
        'default': Default,
        'optional': optional,
        'type': JsonConverters.toJson(type,'ParameterValueType',context!),
        'validation': validation
    };

    getTypeName() => "Parameter";
    TypeContext? context = _ctx;
}

enum ActionScopes
{
    Deployment,
    ResourceGroup,
    Resource,
}

class ActionStep implements IConvertible
{
    String name = "";
    String? displayName;
    Map<String,dynamic?> variables = {};
    String? credential;
    String? limit;
    String? type;
    String? module;
    String? executionEnvironment;
    String? inventory;

    ActionStep({this.name,this.displayName,this.variables,this.credential,this.limit,this.type,this.module,this.executionEnvironment,this.inventory});
    ActionStep.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        displayName = json['displayName'];
        variables = JsonConverters.fromJson(json['variables'],'Map<String,dynamic?>',context!);
        credential = json['credential'];
        limit = json['limit'];
        type = json['type'];
        module = json['module'];
        executionEnvironment = json['executionEnvironment'];
        inventory = json['inventory'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'displayName': displayName,
        'variables': JsonConverters.toJson(variables,'Map<String,dynamic?>',context!),
        'credential': credential,
        'limit': limit,
        'type': type,
        'module': module,
        'executionEnvironment': executionEnvironment,
        'inventory': inventory
    };

    getTypeName() => "ActionStep";
    TypeContext? context = _ctx;
}

class Action extends ConfigItem implements IHasTenantId, IConvertible
{
    String tenantId = "";
    int schemaVersion = 0;
    String definitionJson = "";
    String definitionYaml = "";
    List<Parameter>? parameters;
    bool isDisabled;
    ObjectTypes objectType;
    ActionScopes scope;
    // @ignore()
    String selfLink = "";

    List<ActionStep> steps = [];

    Action({this.tenantId,this.schemaVersion,this.definitionJson,this.definitionYaml,this.parameters,this.isDisabled,this.objectType,this.scope,this.selfLink,this.steps});
    Action.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        tenantId = json['tenantId'];
        schemaVersion = json['schemaVersion'];
        definitionJson = json['definitionJson'];
        definitionYaml = json['definitionYaml'];
        parameters = JsonConverters.fromJson(json['parameters'],'List<Parameter>',context!);
        isDisabled = json['isDisabled'];
        objectType = JsonConverters.fromJson(json['objectType'],'ObjectTypes',context!);
        scope = JsonConverters.fromJson(json['scope'],'ActionScopes',context!);
        selfLink = json['selfLink'];
        steps = JsonConverters.fromJson(json['steps'],'List<ActionStep>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'tenantId': tenantId,
        'schemaVersion': schemaVersion,
        'definitionJson': definitionJson,
        'definitionYaml': definitionYaml,
        'parameters': JsonConverters.toJson(parameters,'List<Parameter>',context!),
        'isDisabled': isDisabled,
        'objectType': JsonConverters.toJson(objectType,'ObjectTypes',context!),
        'scope': JsonConverters.toJson(scope,'ActionScopes',context!),
        'selfLink': selfLink,
        'steps': JsonConverters.toJson(steps,'List<ActionStep>',context!)
    });

    getTypeName() => "Action";
    TypeContext? context = _ctx;
}

class ActionAssignment implements INotSoftDeletable, IHasIdName, IHasObjectType, IConvertible
{
    String id = "";
    String name = "";
    String configItemId = "";
    String configItemName = "";
    ObjectTypes configItemType;
    // @References(typeof(Action))
    String actionId = "";

    // @References(typeof(ScheduledTaskAssignment))
    String? scheduledTaskAssignmentId;

    ScheduledTaskAssignment? scheduledTaskAssignment;
    Action? action;
    // @ignore()
    ObjectTypes objectType;

    // @ignore()
    String selfLink = "";

    List<Parameter> parameters = [];
    ActionScopes scope;
    String? cronExpression;

    ActionAssignment({this.id,this.name,this.configItemId,this.configItemName,this.configItemType,this.actionId,this.scheduledTaskAssignmentId,this.scheduledTaskAssignment,this.action,this.objectType,this.selfLink,this.parameters,this.scope,this.cronExpression});
    ActionAssignment.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        configItemId = json['configItemId'];
        configItemName = json['configItemName'];
        configItemType = JsonConverters.fromJson(json['configItemType'],'ObjectTypes',context!);
        actionId = json['actionId'];
        scheduledTaskAssignmentId = json['scheduledTaskAssignmentId'];
        scheduledTaskAssignment = JsonConverters.fromJson(json['scheduledTaskAssignment'],'ScheduledTaskAssignment',context!);
        action = JsonConverters.fromJson(json['action'],'Action',context!);
        objectType = JsonConverters.fromJson(json['objectType'],'ObjectTypes',context!);
        selfLink = json['selfLink'];
        parameters = JsonConverters.fromJson(json['parameters'],'List<Parameter>',context!);
        scope = JsonConverters.fromJson(json['scope'],'ActionScopes',context!);
        cronExpression = json['cronExpression'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'configItemId': configItemId,
        'configItemName': configItemName,
        'configItemType': JsonConverters.toJson(configItemType,'ObjectTypes',context!),
        'actionId': actionId,
        'scheduledTaskAssignmentId': scheduledTaskAssignmentId,
        'scheduledTaskAssignment': JsonConverters.toJson(scheduledTaskAssignment,'ScheduledTaskAssignment',context!),
        'action': JsonConverters.toJson(action,'Action',context!),
        'objectType': JsonConverters.toJson(objectType,'ObjectTypes',context!),
        'selfLink': selfLink,
        'parameters': JsonConverters.toJson(parameters,'List<Parameter>',context!),
        'scope': JsonConverters.toJson(scope,'ActionScopes',context!),
        'cronExpression': cronExpression
    };

    getTypeName() => "ActionAssignment";
    TypeContext? context = _ctx;
}

enum Aggregations
{
    None,
    Count,
    DistinctCount,
    Sum,
    Min,
    Max,
    Avg,
    First,
}

/**
* Returns a list of actionassignments
*/
// @Api(Description="Returns a list of actionassignments")
// @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof(0, Culture=neutral, PublicKeyToken=null]]), StatusCode=200)
class SearchActionAssignments extends QueryDb<ActionAssignment> implements IGetMultipleRequest, IHasTenantName, IGet, IGroupable, IConvertible
{
    // @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
    // @Validate(Validator="NotEmpty")
    String tenantName = "";

    /**
    * Searches for name or displayname containing the value
    */
    // @ApiMember(DataType="string", Description="Searches for name or displayname containing the value", ParameterType="query")
    // @Validate(Validator="MinimumLength(3)")
    String? identity;

    // @Validate(Validator="MinimumLength(3)")
    String? actionAssignmentName;

    // @Validate(Validator="MinimumLength(3)")
    String? actionName;

    // @Validate(Validator="MinimumLength(3)")
    String? actionDisplayName;

    /**
    * If true, also soft deleted items will be returned
    */
    // @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
    bool? includeDeleted;

    /**
    * The property, the data will be grouped on
    */
    // @ApiMember(Description="The property, the data will be grouped on", ParameterType="query")
    String? groupBy;

    /**
    * The property, used for aggregation
    */
    // @ApiMember(Description="The property, used for aggregation", ParameterType="query")
    String? aggregateOn;

    /**
    * The aggregation function to use
    */
    // @ApiMember(Description="The aggregation function to use", ParameterType="query")
    Aggregations? aggregation;

    /**
    * Returns all referenced object
    */
    // @ApiMember(Description="Returns all referenced object", ParameterType="query")
    bool? includeReferencedObjects;

    SearchActionAssignments({this.tenantName,this.identity,this.actionAssignmentName,this.actionName,this.actionDisplayName,this.includeDeleted,this.groupBy,this.aggregateOn,this.aggregation,this.includeReferencedObjects});
    SearchActionAssignments.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        tenantName = json['tenantName'];
        identity = json['identity'];
        actionAssignmentName = json['actionAssignmentName'];
        actionName = json['actionName'];
        actionDisplayName = json['actionDisplayName'];
        includeDeleted = json['includeDeleted'];
        groupBy = json['groupBy'];
        aggregateOn = json['aggregateOn'];
        aggregation = JsonConverters.fromJson(json['aggregation'],'Aggregations',context!);
        includeReferencedObjects = json['includeReferencedObjects'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'tenantName': tenantName,
        'identity': identity,
        'actionAssignmentName': actionAssignmentName,
        'actionName': actionName,
        'actionDisplayName': actionDisplayName,
        'includeDeleted': includeDeleted,
        'groupBy': groupBy,
        'aggregateOn': aggregateOn,
        'aggregation': JsonConverters.toJson(aggregation,'Aggregations',context!),
        'includeReferencedObjects': includeReferencedObjects
    });

    getTypeName() => "SearchActionAssignments";
    TypeContext? context = _ctx;
}

enum ValueDataType
{
    String,
    Number,
    Boolean,
    List,
}

enum Environments
{
    Lab,
    Poc,
    Dev,
    Test,
    Int,
    Uat,
    Prod,
}

class Variable implements IConvertible
{
    String name = "";
    String value = "";
    ValueDataType type;
    String? description;
    bool isInherited;
    Environments? environment;

    Variable({this.name,this.value,this.type,this.description,this.isInherited,this.environment});
    Variable.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        value = json['value'];
        type = JsonConverters.fromJson(json['type'],'ValueDataType',context!);
        description = json['description'];
        isInherited = json['isInherited'];
        environment = JsonConverters.fromJson(json['environment'],'Environments',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'value': value,
        'type': JsonConverters.toJson(type,'ValueDataType',context!),
        'description': description,
        'isInherited': isInherited,
        'environment': JsonConverters.toJson(environment,'Environments',context!)
    };

    getTypeName() => "Variable";
    TypeContext? context = _ctx;
}

class Tenant extends ConfigItem implements IHasVariables, IConvertible
{
    // @required()
    // @StringLength(10)
    String name = "";

    // @required()
    ObjectTypes objectType;

    // @ignore()
    String selfLink = "";

    // @required()
    List<Variable>? variables;

    // @required()
    List<String>? allowedMailDomains;

    // @required()
    List<String>? licensedModules;

    // @required()
    int defaultDeploymentLifetimeDays = 0;

    // @required()
    int maxDeploymentLifetimeDays = 0;

    // @required()
    int systemUnpatchedWarningDays = 0;

    // @required()
    int systemBackupMissingWarningHours = 0;

    // @required()
    int stopVulnerableResourceAfterDays = 0;

    // @required()
    int deploymentExpirationWarningDays = 0;

    // @required()
    int patchNotificationDays = 0;

    // @required()
    bool useCustomHostnames;

    // @required()
    int removeInactiveVulnerabilitiesAfterDays = 0;

    Tenant({this.name,this.objectType,this.selfLink,this.variables,this.allowedMailDomains,this.licensedModules,this.defaultDeploymentLifetimeDays,this.maxDeploymentLifetimeDays,this.systemUnpatchedWarningDays,this.systemBackupMissingWarningHours,this.stopVulnerableResourceAfterDays,this.deploymentExpirationWarningDays,this.patchNotificationDays,this.useCustomHostnames,this.removeInactiveVulnerabilitiesAfterDays});
    Tenant.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        name = json['name'];
        objectType = JsonConverters.fromJson(json['objectType'],'ObjectTypes',context!);
        selfLink = json['selfLink'];
        variables = JsonConverters.fromJson(json['variables'],'List<Variable>',context!);
        allowedMailDomains = JsonConverters.fromJson(json['allowedMailDomains'],'List<String>',context!);
        licensedModules = JsonConverters.fromJson(json['licensedModules'],'List<String>',context!);
        defaultDeploymentLifetimeDays = json['defaultDeploymentLifetimeDays'];
        maxDeploymentLifetimeDays = json['maxDeploymentLifetimeDays'];
        systemUnpatchedWarningDays = json['systemUnpatchedWarningDays'];
        systemBackupMissingWarningHours = json['systemBackupMissingWarningHours'];
        stopVulnerableResourceAfterDays = json['stopVulnerableResourceAfterDays'];
        deploymentExpirationWarningDays = json['deploymentExpirationWarningDays'];
        patchNotificationDays = json['patchNotificationDays'];
        useCustomHostnames = json['useCustomHostnames'];
        removeInactiveVulnerabilitiesAfterDays = json['removeInactiveVulnerabilitiesAfterDays'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'name': name,
        'objectType': JsonConverters.toJson(objectType,'ObjectTypes',context!),
        'selfLink': selfLink,
        'variables': JsonConverters.toJson(variables,'List<Variable>',context!),
        'allowedMailDomains': JsonConverters.toJson(allowedMailDomains,'List<String>',context!),
        'licensedModules': JsonConverters.toJson(licensedModules,'List<String>',context!),
        'defaultDeploymentLifetimeDays': defaultDeploymentLifetimeDays,
        'maxDeploymentLifetimeDays': maxDeploymentLifetimeDays,
        'systemUnpatchedWarningDays': systemUnpatchedWarningDays,
        'systemBackupMissingWarningHours': systemBackupMissingWarningHours,
        'stopVulnerableResourceAfterDays': stopVulnerableResourceAfterDays,
        'deploymentExpirationWarningDays': deploymentExpirationWarningDays,
        'patchNotificationDays': patchNotificationDays,
        'useCustomHostnames': useCustomHostnames,
        'removeInactiveVulnerabilitiesAfterDays': removeInactiveVulnerabilitiesAfterDays
    });

    getTypeName() => "Tenant";
    TypeContext? context = _ctx;
}

enum IntervalUnits
{
    Second,
    Minute,
    Hour,
    Day,
    Week,
    Month,
    Year,
}

class TimeSeriesDefinition extends Auditable implements IHasIdName, IHasTenantId, IHasObjectType, IConvertible
{
    String id = "";
    // @References(typeof(Tenant))
    String tenantId = "";

    Tenant? tenant;
    String name = "";
    String? displayName;
    // @ignore()
    String selfLink = "";

    // @required()
    ObjectTypes objectType;

    String? description;
    ObjectTypes sourceType;
    bool autoCollection;
    String? autoCollectionQuery;
    int? autoCollectionInterval;
    IntervalUnits? autoCollectionIntervalUnit;
    Duration? autoCollectionTime;
    DateTime? lastAutoCollected;
    int retentionTimeMonths = 0;

    TimeSeriesDefinition({this.id,this.tenantId,this.tenant,this.name,this.displayName,this.selfLink,this.objectType,this.description,this.sourceType,this.autoCollection,this.autoCollectionQuery,this.autoCollectionInterval,this.autoCollectionIntervalUnit,this.autoCollectionTime,this.lastAutoCollected,this.retentionTimeMonths});
    TimeSeriesDefinition.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        id = json['id'];
        tenantId = json['tenantId'];
        tenant = JsonConverters.fromJson(json['tenant'],'Tenant',context!);
        name = json['name'];
        displayName = json['displayName'];
        selfLink = json['selfLink'];
        objectType = JsonConverters.fromJson(json['objectType'],'ObjectTypes',context!);
        description = json['description'];
        sourceType = JsonConverters.fromJson(json['sourceType'],'ObjectTypes',context!);
        autoCollection = json['autoCollection'];
        autoCollectionQuery = json['autoCollectionQuery'];
        autoCollectionInterval = json['autoCollectionInterval'];
        autoCollectionIntervalUnit = JsonConverters.fromJson(json['autoCollectionIntervalUnit'],'IntervalUnits',context!);
        autoCollectionTime = JsonConverters.fromJson(json['autoCollectionTime'],'Duration',context!);
        lastAutoCollected = JsonConverters.fromJson(json['lastAutoCollected'],'DateTime',context!);
        retentionTimeMonths = json['retentionTimeMonths'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'id': id,
        'tenantId': tenantId,
        'tenant': JsonConverters.toJson(tenant,'Tenant',context!),
        'name': name,
        'displayName': displayName,
        'selfLink': selfLink,
        'objectType': JsonConverters.toJson(objectType,'ObjectTypes',context!),
        'description': description,
        'sourceType': JsonConverters.toJson(sourceType,'ObjectTypes',context!),
        'autoCollection': autoCollection,
        'autoCollectionQuery': autoCollectionQuery,
        'autoCollectionInterval': autoCollectionInterval,
        'autoCollectionIntervalUnit': JsonConverters.toJson(autoCollectionIntervalUnit,'IntervalUnits',context!),
        'autoCollectionTime': JsonConverters.toJson(autoCollectionTime,'Duration',context!),
        'lastAutoCollected': JsonConverters.toJson(lastAutoCollected,'DateTime',context!),
        'retentionTimeMonths': retentionTimeMonths
    });

    getTypeName() => "TimeSeriesDefinition";
    TypeContext? context = _ctx;
}

// @DataContract
class QueryResponse<T> implements IConvertible
{
    // @DataMember(Order=1)
    int offset = 0;

    // @DataMember(Order=2)
    int total = 0;

    // @DataMember(Order=3)
    List<TimeSeriesDefinition> results = [];

    // @DataMember(Order=4)
    Map<String,String?>? meta;

    // @DataMember(Order=5)
    ResponseStatus? responseStatus;

    QueryResponse({this.offset,this.total,this.results,this.meta,this.responseStatus});
    QueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        offset = json['offset'];
        total = json['total'];
        results = JsonConverters.fromJson(json['results'],'List<TimeSeriesDefinition>',context!);
        meta = JsonConverters.toStringMap(json['meta']);
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'offset': offset,
        'total': total,
        'results': JsonConverters.toJson(results,'List<TimeSeriesDefinition>',context!),
        'meta': meta,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "QueryResponse<$T>";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'duneframework.com', types: <String, TypeInfo> {
    'ObjectTypes': TypeInfo(TypeOf.Enum, enumValues:ObjectTypes.values),
    'ScheduledTaskAssignment': TypeInfo(TypeOf.Class, create:() => ScheduledTaskAssignment()),
    'Auditable': TypeInfo(TypeOf.Class, create:() => Auditable()),
    'Tag': TypeInfo(TypeOf.Class, create:() => Tag()),
    'PathItem': TypeInfo(TypeOf.Class, create:() => PathItem()),
    'ConfigItem': TypeInfo(TypeOf.Class, create:() => ConfigItem()),
    'List<Tag>': TypeInfo(TypeOf.Class, create:() => <Tag>[]),
    'List<PathItem>': TypeInfo(TypeOf.Class, create:() => <PathItem>[]),
    'ParameterValueType': TypeInfo(TypeOf.Enum, enumValues:ParameterValueType.values),
    'Parameter': TypeInfo(TypeOf.Class, create:() => Parameter()),
    'ActionScopes': TypeInfo(TypeOf.Enum, enumValues:ActionScopes.values),
    'ActionStep': TypeInfo(TypeOf.Class, create:() => ActionStep()),
    'Map<String,dynamic?>': TypeInfo(TypeOf.Class, create:() => Map<String,dynamic?>()),
    'Action': TypeInfo(TypeOf.Class, create:() => Action()),
    'List<Parameter>': TypeInfo(TypeOf.Class, create:() => <Parameter>[]),
    'List<ActionStep>': TypeInfo(TypeOf.Class, create:() => <ActionStep>[]),
    'ActionAssignment': TypeInfo(TypeOf.Class, create:() => ActionAssignment()),
    'Aggregations': TypeInfo(TypeOf.Enum, enumValues:Aggregations.values),
    'SearchActionAssignments': TypeInfo(TypeOf.Class, create:() => SearchActionAssignments()),
    'List<ActionAssignment>': TypeInfo(TypeOf.Class, create:() => <ActionAssignment>[]),
    'ValueDataType': TypeInfo(TypeOf.Enum, enumValues:ValueDataType.values),
    'Environments': TypeInfo(TypeOf.Enum, enumValues:Environments.values),
    'Variable': TypeInfo(TypeOf.Class, create:() => Variable()),
    'Tenant': TypeInfo(TypeOf.Class, create:() => Tenant()),
    'List<Variable>': TypeInfo(TypeOf.Class, create:() => <Variable>[]),
    'IntervalUnits': TypeInfo(TypeOf.Enum, enumValues:IntervalUnits.values),
    'TimeSeriesDefinition': TypeInfo(TypeOf.Class, create:() => TimeSeriesDefinition()),
    'List<TimeSeriesDefinition>': TypeInfo(TypeOf.Class, create:() => <TimeSeriesDefinition>[]),
});

Dart SearchActionAssignments DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/action-assignments/search HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"offset":0,"total":0,"results":[{"id":"00000000-0000-0000-0000-000000000000","name":"String","configItemId":"00000000-0000-0000-0000-000000000000","configItemName":"String","configItemType":"None","actionId":"00000000-0000-0000-0000-000000000000","scheduledTaskAssignmentId":"00000000-0000-0000-0000-000000000000","scheduledTaskAssignment":{"id":"00000000-0000-0000-0000-000000000000","configItemId":"00000000-0000-0000-0000-000000000000","objectType":"None","displayName":"String","taskId":0,"taskName":"String","cronExpression":"String"},"action":{"tenantId":"00000000-0000-0000-0000-000000000000","schemaVersion":0,"definitionJson":"String","definitionYaml":"String","parameters":null,"isDisabled":false,"objectType":"Action","scope":"Deployment","selfLink":"/actions/00000000-0000-0000-0000-000000000000","steps":[{"name":"String","displayName":"String","variables":{"String":{}},"credential":"String","limit":"String","type":"String","module":"String","executionEnvironment":"String","inventory":"String"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"},"objectType":"ActionAssignment","selfLink":"/action-assignments/00000000-0000-0000-0000-000000000000","parameters":[{"name":"String","description":"String","value":"String","default":"String","optional":false,"type":"String","validation":"String"}],"scope":"Deployment","cronExpression":"String"}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}