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