| Required role: | TenantReader |
| GET | /api/resourcegrouptemplates/{Id}/definition/ | Returns the template definition | |
|---|---|---|---|
| GET | /api/resourcegrouptemplates/{Name}/{Version}/definition | Returns the template definition | |
| GET | /resourcegrouptemplates/{Id}/definition/ | Returns the template definition | |
| GET | /resourcegrouptemplates/{Name}/{Version}/definition | Returns the template definition |
import 'package:servicestack/servicestack.dart';
class TemplateDefinitionDto implements IConvertible
{
/**
* The schema version of the attached definition
*/
int schemaVersion = 0;
/**
* The template definition/body either as json or yaml
*/
String definition = "";
TemplateDefinitionDto({this.schemaVersion,this.definition});
TemplateDefinitionDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
schemaVersion = json['schemaVersion'];
definition = json['definition'];
return this;
}
Map<String, dynamic> toJson() => {
'schemaVersion': schemaVersion,
'definition': definition
};
getTypeName() => "TemplateDefinitionDto";
TypeContext? context = _ctx;
}
enum TemplateLanguages
{
Json,
Yaml,
}
/**
* Returns the template definition
*/
// @Api(Description="Returns the template definition")
// @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof(TemplateDefinitionDto), StatusCode=200)
class GetResourceGroupTemplateDefinition implements IGetSingleRequest, IHasTenantName, IGet, IConvertible
{
// @ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
String id = "";
/**
* The templates name
*/
// @ApiMember(DataType="string", Description="The templates name", ParameterType="query")
String? name;
/**
* The templates version
*/
// @ApiMember(DataType="string", Description="The templates version", ParameterType="query")
String? version;
// @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
// @Validate(Validator="NotEmpty")
String tenantName = "";
// @ApiMember(IsRequired=true, ParameterType="query")
TemplateLanguages definitionFormat;
/**
* If true, also soft deleted items will be returned
*/
// @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
bool? includeDeleted;
// @ApiMember(ParameterType="query", Verb="GET")
bool? includeReferencedObjects;
GetResourceGroupTemplateDefinition({this.id,this.name,this.version,this.tenantName,this.definitionFormat,this.includeDeleted,this.includeReferencedObjects});
GetResourceGroupTemplateDefinition.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
version = json['version'];
tenantName = json['tenantName'];
definitionFormat = JsonConverters.fromJson(json['definitionFormat'],'TemplateLanguages',context!);
includeDeleted = json['includeDeleted'];
includeReferencedObjects = json['includeReferencedObjects'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'version': version,
'tenantName': tenantName,
'definitionFormat': JsonConverters.toJson(definitionFormat,'TemplateLanguages',context!),
'includeDeleted': includeDeleted,
'includeReferencedObjects': includeReferencedObjects
};
getTypeName() => "GetResourceGroupTemplateDefinition";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duneframework.com', types: <String, TypeInfo> {
'TemplateDefinitionDto': TypeInfo(TypeOf.Class, create:() => TemplateDefinitionDto()),
'TemplateLanguages': TypeInfo(TypeOf.Enum, enumValues:TemplateLanguages.values),
'GetResourceGroupTemplateDefinition': TypeInfo(TypeOf.Class, create:() => GetResourceGroupTemplateDefinition()),
});
Dart GetResourceGroupTemplateDefinition 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/resourcegrouptemplates/{Id}/definition/ HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"schemaVersion":0,"definition":"String"}