Required role: | REGISUserRole |
POST | /Academic/{uuid}/RegentDegrees |
---|
import 'package:servicestack/servicestack.dart';
class RegentDegreeResponse implements IConvertible
{
int? id;
String? program_code;
String? program_name;
String? concentration_code;
String? concentration_name;
DateTime? graduation_month;
DateTime? start_date;
DateTime? end_date;
double? gpa;
String? academic_level;
DateTime? commencement_date;
DateTime? added_date;
String? added_by;
DateTime? changed_date;
String? changed_by;
DateTime? timestamp;
RegentDegreeResponse({this.id,this.program_code,this.program_name,this.concentration_code,this.concentration_name,this.graduation_month,this.start_date,this.end_date,this.gpa,this.academic_level,this.commencement_date,this.added_date,this.added_by,this.changed_date,this.changed_by,this.timestamp});
RegentDegreeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
program_code = json['program_code'];
program_name = json['program_name'];
concentration_code = json['concentration_code'];
concentration_name = json['concentration_name'];
graduation_month = JsonConverters.fromJson(json['graduation_month'],'DateTime',context!);
start_date = JsonConverters.fromJson(json['start_date'],'DateTime',context!);
end_date = JsonConverters.fromJson(json['end_date'],'DateTime',context!);
gpa = JsonConverters.toDouble(json['gpa']);
academic_level = json['academic_level'];
commencement_date = JsonConverters.fromJson(json['commencement_date'],'DateTime',context!);
added_date = JsonConverters.fromJson(json['added_date'],'DateTime',context!);
added_by = json['added_by'];
changed_date = JsonConverters.fromJson(json['changed_date'],'DateTime',context!);
changed_by = json['changed_by'];
timestamp = JsonConverters.fromJson(json['timestamp'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'program_code': program_code,
'program_name': program_name,
'concentration_code': concentration_code,
'concentration_name': concentration_name,
'graduation_month': JsonConverters.toJson(graduation_month,'DateTime',context!),
'start_date': JsonConverters.toJson(start_date,'DateTime',context!),
'end_date': JsonConverters.toJson(end_date,'DateTime',context!),
'gpa': gpa,
'academic_level': academic_level,
'commencement_date': JsonConverters.toJson(commencement_date,'DateTime',context!),
'added_date': JsonConverters.toJson(added_date,'DateTime',context!),
'added_by': added_by,
'changed_date': JsonConverters.toJson(changed_date,'DateTime',context!),
'changed_by': changed_by,
'timestamp': JsonConverters.toJson(timestamp,'DateTime',context!)
};
getTypeName() => "RegentDegreeResponse";
TypeContext? context = _ctx;
}
class ProgramResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? id;
String? program_code;
String? program_pretty_code;
String? program_long_name;
String? available_concentrations;
bool? is_active;
DateTime? timestamp;
ProgramResponse({this.responseStatus,this.id,this.program_code,this.program_pretty_code,this.program_long_name,this.available_concentrations,this.is_active,this.timestamp});
ProgramResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
id = json['id'];
program_code = json['program_code'];
program_pretty_code = json['program_pretty_code'];
program_long_name = json['program_long_name'];
available_concentrations = json['available_concentrations'];
is_active = json['is_active'];
timestamp = JsonConverters.fromJson(json['timestamp'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'id': id,
'program_code': program_code,
'program_pretty_code': program_pretty_code,
'program_long_name': program_long_name,
'available_concentrations': available_concentrations,
'is_active': is_active,
'timestamp': JsonConverters.toJson(timestamp,'DateTime',context!)
};
getTypeName() => "ProgramResponse";
TypeContext? context = _ctx;
}
class ConcentrationResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? id;
String? concentration_code;
String? concentration_name;
bool? is_active;
ConcentrationResponse({this.responseStatus,this.id,this.concentration_code,this.concentration_name,this.is_active});
ConcentrationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
id = json['id'];
concentration_code = json['concentration_code'];
concentration_name = json['concentration_name'];
is_active = json['is_active'];
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'id': id,
'concentration_code': concentration_code,
'concentration_name': concentration_name,
'is_active': is_active
};
getTypeName() => "ConcentrationResponse";
TypeContext? context = _ctx;
}
class CatalogResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? id;
String? catalog_code;
CatalogResponse({this.responseStatus,this.id,this.catalog_code});
CatalogResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
id = json['id'];
catalog_code = json['catalog_code'];
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'id': id,
'catalog_code': catalog_code
};
getTypeName() => "CatalogResponse";
TypeContext? context = _ctx;
}
class RegentDegreesResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? regent_id;
String? uuid;
List<RegentDegreeResponse>? regent_degrees;
List<ProgramResponse>? valid_programs;
List<ConcentrationResponse>? valid_concentrations;
List<CatalogResponse>? valid_catalogs;
RegentDegreesResponse({this.responseStatus,this.regent_id,this.uuid,this.regent_degrees,this.valid_programs,this.valid_concentrations,this.valid_catalogs});
RegentDegreesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
regent_id = json['regent_id'];
uuid = json['uuid'];
regent_degrees = JsonConverters.fromJson(json['regent_degrees'],'List<RegentDegreeResponse>',context!);
valid_programs = JsonConverters.fromJson(json['valid_programs'],'List<ProgramResponse>',context!);
valid_concentrations = JsonConverters.fromJson(json['valid_concentrations'],'List<ConcentrationResponse>',context!);
valid_catalogs = JsonConverters.fromJson(json['valid_catalogs'],'List<CatalogResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'regent_id': regent_id,
'uuid': uuid,
'regent_degrees': JsonConverters.toJson(regent_degrees,'List<RegentDegreeResponse>',context!),
'valid_programs': JsonConverters.toJson(valid_programs,'List<ProgramResponse>',context!),
'valid_concentrations': JsonConverters.toJson(valid_concentrations,'List<ConcentrationResponse>',context!),
'valid_catalogs': JsonConverters.toJson(valid_catalogs,'List<CatalogResponse>',context!)
};
getTypeName() => "RegentDegreesResponse";
TypeContext? context = _ctx;
}
class RegentDegreesRequest implements IConvertible
{
String? uuid;
RegentDegreesRequest({this.uuid});
RegentDegreesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
uuid = json['uuid'];
return this;
}
Map<String, dynamic> toJson() => {
'uuid': uuid
};
getTypeName() => "RegentDegreesRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'RegentDegreeResponse': TypeInfo(TypeOf.Class, create:() => RegentDegreeResponse()),
'ProgramResponse': TypeInfo(TypeOf.Class, create:() => ProgramResponse()),
'ConcentrationResponse': TypeInfo(TypeOf.Class, create:() => ConcentrationResponse()),
'CatalogResponse': TypeInfo(TypeOf.Class, create:() => CatalogResponse()),
'RegentDegreesResponse': TypeInfo(TypeOf.Class, create:() => RegentDegreesResponse()),
'List<RegentDegreeResponse>': TypeInfo(TypeOf.Class, create:() => <RegentDegreeResponse>[]),
'List<ProgramResponse>': TypeInfo(TypeOf.Class, create:() => <ProgramResponse>[]),
'List<ConcentrationResponse>': TypeInfo(TypeOf.Class, create:() => <ConcentrationResponse>[]),
'List<CatalogResponse>': TypeInfo(TypeOf.Class, create:() => <CatalogResponse>[]),
'RegentDegreesRequest': TypeInfo(TypeOf.Class, create:() => RegentDegreesRequest()),
});
Dart RegentDegreesRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Academic/{uuid}/RegentDegrees HTTP/1.1
Host: data.regent-college.edu
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<RegentDegreesRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Requests">
<uuid>String</uuid>
</RegentDegreesRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <RegentDegreesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/regis.ClassLibrary.Responses"> <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types"> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:Message>String</d2p1:Message> <d2p1:StackTrace>String</d2p1:StackTrace> <d2p1:Errors> <d2p1:ResponseError> <d2p1:ErrorCode>String</d2p1:ErrorCode> <d2p1:FieldName>String</d2p1:FieldName> <d2p1:Message>String</d2p1:Message> <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d2p1:Meta> </d2p1:ResponseError> </d2p1:Errors> <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>String</d3p1:Key> <d3p1:Value>String</d3p1:Value> </d3p1:KeyValueOfstringstring> </d2p1:Meta> </ResponseStatus> <regent_degrees> <RegentDegreeResponse> <academic_level>String</academic_level> <added_by>String</added_by> <added_date>0001-01-01T00:00:00</added_date> <changed_by>String</changed_by> <changed_date>0001-01-01T00:00:00</changed_date> <commencement_date>0001-01-01T00:00:00</commencement_date> <concentration_code>String</concentration_code> <concentration_name>String</concentration_name> <end_date>0001-01-01T00:00:00</end_date> <gpa>0</gpa> <graduation_month>0001-01-01T00:00:00</graduation_month> <id>0</id> <program_code>String</program_code> <program_name>String</program_name> <start_date>0001-01-01T00:00:00</start_date> <timestamp>0001-01-01T00:00:00</timestamp> </RegentDegreeResponse> </regent_degrees> <regent_id>0</regent_id> <uuid>String</uuid> <valid_catalogs> <CatalogResponse> <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types"> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:Message>String</d4p1:Message> <d4p1:StackTrace>String</d4p1:StackTrace> <d4p1:Errors> <d4p1:ResponseError> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:FieldName>String</d4p1:FieldName> <d4p1:Message>String</d4p1:Message> <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d4p1:Meta> </d4p1:ResponseError> </d4p1:Errors> <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d4p1:Meta> </ResponseStatus> <catalog_code>String</catalog_code> <id>0</id> </CatalogResponse> </valid_catalogs> <valid_concentrations> <ConcentrationResponse> <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types"> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:Message>String</d4p1:Message> <d4p1:StackTrace>String</d4p1:StackTrace> <d4p1:Errors> <d4p1:ResponseError> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:FieldName>String</d4p1:FieldName> <d4p1:Message>String</d4p1:Message> <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d4p1:Meta> </d4p1:ResponseError> </d4p1:Errors> <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d4p1:Meta> </ResponseStatus> <concentration_code>String</concentration_code> <concentration_name>String</concentration_name> <id>0</id> <is_active>false</is_active> </ConcentrationResponse> </valid_concentrations> <valid_programs> <ProgramResponse> <ResponseStatus xmlns:d4p1="http://schemas.servicestack.net/types"> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:Message>String</d4p1:Message> <d4p1:StackTrace>String</d4p1:StackTrace> <d4p1:Errors> <d4p1:ResponseError> <d4p1:ErrorCode>String</d4p1:ErrorCode> <d4p1:FieldName>String</d4p1:FieldName> <d4p1:Message>String</d4p1:Message> <d4p1:Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d7p1:KeyValueOfstringstring> <d7p1:Key>String</d7p1:Key> <d7p1:Value>String</d7p1:Value> </d7p1:KeyValueOfstringstring> </d4p1:Meta> </d4p1:ResponseError> </d4p1:Errors> <d4p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d5p1:KeyValueOfstringstring> <d5p1:Key>String</d5p1:Key> <d5p1:Value>String</d5p1:Value> </d5p1:KeyValueOfstringstring> </d4p1:Meta> </ResponseStatus> <available_concentrations>String</available_concentrations> <id>0</id> <is_active>false</is_active> <program_code>String</program_code> <program_long_name>String</program_long_name> <program_pretty_code>String</program_pretty_code> <timestamp>0001-01-01T00:00:00</timestamp> </ProgramResponse> </valid_programs> </RegentDegreesResponse>