in lib/model/shape.js [17:63]
function Shape(shape, options, memberName) {
options = options || {};
property(this, 'shape', shape.shape);
property(this, 'api', options.api, false);
property(this, 'type', shape.type);
property(this, 'enum', shape.enum);
property(this, 'min', shape.min);
property(this, 'max', shape.max);
property(this, 'pattern', shape.pattern);
property(this, 'location', shape.location || this.location || 'body');
property(this, 'name', this.name || shape.xmlName || shape.queryName ||
shape.locationName || memberName);
property(this, 'isStreaming', shape.streaming || this.isStreaming || false);
property(this, 'requiresLength', shape.requiresLength, false);
property(this, 'isComposite', shape.isComposite || false);
property(this, 'isShape', true, false);
property(this, 'isQueryName', Boolean(shape.queryName), false);
property(this, 'isLocationName', Boolean(shape.locationName), false);
property(this, 'isIdempotent', shape.idempotencyToken === true);
property(this, 'isJsonValue', shape.jsonvalue === true);
property(this, 'isSensitive', shape.sensitive === true || shape.prototype && shape.prototype.sensitive === true);
property(this, 'isEventStream', Boolean(shape.eventstream), false);
property(this, 'isEvent', Boolean(shape.event), false);
property(this, 'isEventPayload', Boolean(shape.eventpayload), false);
property(this, 'isEventHeader', Boolean(shape.eventheader), false);
property(this, 'isTimestampFormatSet', Boolean(shape.timestampFormat) || shape.prototype && shape.prototype.isTimestampFormatSet === true, false);
property(this, 'endpointDiscoveryId', Boolean(shape.endpointdiscoveryid), false);
property(this, 'hostLabel', Boolean(shape.hostLabel), false);
if (options.documentation) {
property(this, 'documentation', shape.documentation);
property(this, 'documentationUrl', shape.documentationUrl);
}
if (shape.xmlAttribute) {
property(this, 'isXmlAttribute', shape.xmlAttribute || false);
}
// type conversion and parsing
property(this, 'defaultValue', null);
this.toWireFormat = function(value) {
if (value === null || value === undefined) return '';
return value;
};
this.toType = function(value) { return value; };
}