CacheBehavior.fromXml constructor
CacheBehavior.fromXml(
- XmlElement elem
Implementation
factory CacheBehavior.fromXml(_s.XmlElement elem) {
return CacheBehavior(
forwardedValues:
ForwardedValues.fromXml(_s.extractXmlChild(elem, 'ForwardedValues')!),
minTTL: _s.extractXmlIntValue(elem, 'MinTTL')!,
pathPattern: _s.extractXmlStringValue(elem, 'PathPattern')!,
targetOriginId: _s.extractXmlStringValue(elem, 'TargetOriginId')!,
trustedSigners:
TrustedSigners.fromXml(_s.extractXmlChild(elem, 'TrustedSigners')!),
viewerProtocolPolicy: _s
.extractXmlStringValue(elem, 'ViewerProtocolPolicy')!
.toViewerProtocolPolicy(),
allowedMethods: _s
.extractXmlChild(elem, 'AllowedMethods')
?.let((e) => AllowedMethods.fromXml(e)),
compress: _s.extractXmlBoolValue(elem, 'Compress'),
defaultTTL: _s.extractXmlIntValue(elem, 'DefaultTTL'),
fieldLevelEncryptionId:
_s.extractXmlStringValue(elem, 'FieldLevelEncryptionId'),
lambdaFunctionAssociations: _s
.extractXmlChild(elem, 'LambdaFunctionAssociations')
?.let((e) => LambdaFunctionAssociations.fromXml(e)),
maxTTL: _s.extractXmlIntValue(elem, 'MaxTTL'),
smoothStreaming: _s.extractXmlBoolValue(elem, 'SmoothStreaming'),
);
}