toXml method
XmlElement
toXml(
- String elemName, {
- List<XmlAttribute>? attributes,
})
Implementation
_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
final forwardedValues = this.forwardedValues;
final minTTL = this.minTTL;
final pathPattern = this.pathPattern;
final targetOriginId = this.targetOriginId;
final trustedSigners = this.trustedSigners;
final viewerProtocolPolicy = this.viewerProtocolPolicy;
final allowedMethods = this.allowedMethods;
final compress = this.compress;
final defaultTTL = this.defaultTTL;
final fieldLevelEncryptionId = this.fieldLevelEncryptionId;
final lambdaFunctionAssociations = this.lambdaFunctionAssociations;
final maxTTL = this.maxTTL;
final smoothStreaming = this.smoothStreaming;
final $children = <_s.XmlNode>[
_s.encodeXmlStringValue('PathPattern', pathPattern),
_s.encodeXmlStringValue('TargetOriginId', targetOriginId),
forwardedValues.toXml('ForwardedValues'),
trustedSigners.toXml('TrustedSigners'),
_s.encodeXmlStringValue(
'ViewerProtocolPolicy', viewerProtocolPolicy.toValue()),
_s.encodeXmlIntValue('MinTTL', minTTL),
if (allowedMethods != null) allowedMethods.toXml('AllowedMethods'),
if (smoothStreaming != null)
_s.encodeXmlBoolValue('SmoothStreaming', smoothStreaming),
if (defaultTTL != null) _s.encodeXmlIntValue('DefaultTTL', defaultTTL),
if (maxTTL != null) _s.encodeXmlIntValue('MaxTTL', maxTTL),
if (compress != null) _s.encodeXmlBoolValue('Compress', compress),
if (lambdaFunctionAssociations != null)
lambdaFunctionAssociations.toXml('LambdaFunctionAssociations'),
if (fieldLevelEncryptionId != null)
_s.encodeXmlStringValue(
'FieldLevelEncryptionId', fieldLevelEncryptionId),
];
final $attributes = <_s.XmlAttribute>[
...?attributes,
];
return _s.XmlElement(
_s.XmlName(elemName),
$attributes,
$children,
);
}