toXml method

XmlElement toXml(
  1. String elemName, {
  2. List<XmlAttribute>? attributes,
})

Implementation

_s.XmlElement toXml(String elemName, {List<_s.XmlAttribute>? attributes}) {
  final aCMCertificateArn = this.aCMCertificateArn;
  final certificate = this.certificate;
  final certificateSource = this.certificateSource;
  final cloudFrontDefaultCertificate = this.cloudFrontDefaultCertificate;
  final iAMCertificateId = this.iAMCertificateId;
  final minimumProtocolVersion = this.minimumProtocolVersion;
  final sSLSupportMethod = this.sSLSupportMethod;
  final $children = <_s.XmlNode>[
    if (cloudFrontDefaultCertificate != null)
      _s.encodeXmlBoolValue(
          'CloudFrontDefaultCertificate', cloudFrontDefaultCertificate),
    if (iAMCertificateId != null)
      _s.encodeXmlStringValue('IAMCertificateId', iAMCertificateId),
    if (aCMCertificateArn != null)
      _s.encodeXmlStringValue('ACMCertificateArn', aCMCertificateArn),
    if (sSLSupportMethod != null)
      _s.encodeXmlStringValue('SSLSupportMethod', sSLSupportMethod.toValue()),
    if (minimumProtocolVersion != null)
      _s.encodeXmlStringValue(
          'MinimumProtocolVersion', minimumProtocolVersion.toValue()),
    if (certificate != null)
      _s.encodeXmlStringValue('Certificate', certificate),
    if (certificateSource != null)
      _s.encodeXmlStringValue(
          'CertificateSource', certificateSource.toValue()),
  ];
  final $attributes = <_s.XmlAttribute>[
    ...?attributes,
  ];
  return _s.XmlElement(
    _s.XmlName(elemName),
    $attributes,
    $children,
  );
}