"use strict";
/** @typedef {'Value1'|'Value2'|'Value3'} */
export var EnumType;
(function (EnumType) {
EnumType["Value1"] = "Value1"
EnumType["Value2"] = "Value2"
EnumType["Value3"] = "Value3"
})(EnumType || (EnumType = {}));
/** @typedef {'None'|'Member 1'|'Value2'} */
export var EnumWithValues;
(function (EnumWithValues) {
EnumWithValues["None"] = "None"
EnumWithValues["Value1"] = "Member 1"
EnumWithValues["Value2"] = "Value2"
})(EnumWithValues || (EnumWithValues = {}));
/** @typedef {number} */
export var EnumFlags;
(function (EnumFlags) {
EnumFlags[EnumFlags["Value0"] = 0] = "Value0"
EnumFlags[EnumFlags["Value1"] = 1] = "Value1"
EnumFlags[EnumFlags["Value2"] = 2] = "Value2"
EnumFlags[EnumFlags["Value3"] = 4] = "Value3"
EnumFlags[EnumFlags["Value123"] = 7] = "Value123"
})(EnumFlags || (EnumFlags = {}));
/** @typedef {'lower'|'UPPER'|'PascalCase'|'camelCase'|'camelUPPER'|'PascalUPPER'} */
export var EnumStyle;
(function (EnumStyle) {
EnumStyle["lower"] = "lower"
EnumStyle["UPPER"] = "UPPER"
EnumStyle["PascalCase"] = "PascalCase"
EnumStyle["camelCase"] = "camelCase"
EnumStyle["camelUPPER"] = "camelUPPER"
EnumStyle["PascalUPPER"] = "PascalUPPER"
})(EnumStyle || (EnumStyle = {}));
export class HelloWithEnumList {
/** @param {{enumProp?:EnumType[],enumWithValues?:EnumWithValues[],nullableEnumProp?:EnumType[],enumFlags?:EnumFlags[],enumStyle?:EnumStyle[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {EnumType[]} */
enumProp = [];
/** @type {EnumWithValues[]} */
enumWithValues = [];
/** @type {EnumType[]} */
nullableEnumProp = [];
/** @type {EnumFlags[]} */
enumFlags = [];
/** @type {EnumStyle[]} */
enumStyle = [];
}
JavaScript HelloWithEnumList 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 /xml/oneway/HelloWithEnumList HTTP/1.1
Host: test.servicestack.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<HelloWithEnumList xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Test.ServiceModel">
<EnumFlags>
<EnumFlags>Value0</EnumFlags>
</EnumFlags>
<EnumProp>
<EnumType>Value1</EnumType>
</EnumProp>
<EnumStyle>
<EnumStyle>lower</EnumStyle>
</EnumStyle>
<EnumWithValues>
<EnumWithValues>None</EnumWithValues>
</EnumWithValues>
<NullableEnumProp xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
<d2p1:EnumType>Value1</d2p1:EnumType>
</NullableEnumProp>
</HelloWithEnumList>