@microsoft.azure/autorest.incubator
Version:
AutoRest incubator project
45 lines • 2.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const expression_1 = require("../../csharp/code-dom/expression");
class Duration {
constructor(schema, isRequired) {
this.schema = schema;
this.isRequired = isRequired;
this.isXmlAttribute = false;
}
get declaration() {
return `System.TimeSpan${this.isRequired ? '' : '?'}`;
}
/** emits an expression to deserialize a property from a member inside a container */
deserializeFromContainerMember(mediaType, container, serializedName, defaultValue) {
return expression_1.toExpression(`null /* deserializeFromContainerMember doesn't support '${mediaType}' ${__filename}*/`);
}
/** emits an expression to deserialze a container as the value itself. */
deserializeFromNode(mediaType, node, defaultValue) {
return expression_1.toExpression(`null /* deserializeFromNode doesn't support '${mediaType}' ${__filename}*/`);
}
/** emits an expression serialize this to the value required by the container */
serializeToNode(mediaType, value, serializedName) {
return expression_1.toExpression(`null /* serializeToNode doesn't support '${mediaType}' ${__filename}*/`);
}
/** emits an expression serialize this to the value required by the container */
serializeToContent(mediaType, value) {
return expression_1.toExpression(`null /* serializeToContent doesn't support '${mediaType}' ${__filename}*/`);
}
/** emits an expression to deserialize content from a string */
deserializeFromString(mediaType, content, defaultValue) {
return expression_1.toExpression(``);
}
/** emits the code required to serialize this into a container */
serializeToContainerMember(mediaType, value, container, serializedName) {
return `/* serializeToContainerMember doesn't support '${mediaType}' ${__filename}*/`;
}
validateValue(property) {
return ``;
}
validatePresence(property) {
return ``;
}
}
exports.Duration = Duration;
//# sourceMappingURL=duration.js.map