/// <summary> /// XML fragment representation of this object /// </summary> /// <returns>XML fragment for this object.</returns> /// <remarks> /// Name for outer tag expected to be set by calling method. /// This fragment returns inner properties representation only /// </remarks> protected internal String ToXMLFragment() { StringBuilder xml = new StringBuilder(); if (IsSetImageId()) { xml.Append("<ImageId>"); xml.Append(EscapeXML(this.ImageId)); xml.Append("</ImageId>"); } List <LaunchPermission> launchPermissionList = this.LaunchPermission; foreach (LaunchPermission launchPermission in launchPermissionList) { xml.Append("<LaunchPermission>"); xml.Append(launchPermission.ToXMLFragment()); xml.Append("</LaunchPermission>"); } List <String> productCodeList = this.ProductCode; foreach (String productCode in productCodeList) { xml.Append("<ProductCode>"); xml.Append(EscapeXML(productCode)); xml.Append("</ProductCode>"); } if (IsSetKernelId()) { xml.Append("<KernelId>"); xml.Append(EscapeXML(this.KernelId)); xml.Append("</KernelId>"); } if (IsSetRamdiskId()) { xml.Append("<RamdiskId>"); xml.Append(EscapeXML(this.RamdiskId)); xml.Append("</RamdiskId>"); } if (IsSetBlockDeviceMapping()) { BlockDeviceMapping blockDeviceMapping = this.BlockDeviceMapping; xml.Append("<BlockDeviceMapping>"); xml.Append(blockDeviceMapping.ToXMLFragment()); xml.Append("</BlockDeviceMapping>"); } return(xml.ToString()); }
/// <summary> /// Sets the BlockDeviceMapping property /// </summary> /// <param name="blockDeviceMapping">Block device mapping.</param> /// <returns>this instance</returns> public ImageAttribute WithBlockDeviceMapping(BlockDeviceMapping blockDeviceMapping) { this.blockDeviceMappingField = blockDeviceMapping; return(this); }
/// <summary> /// Sets the BlockDeviceMapping property /// </summary> /// <param name="blockDeviceMapping">BlockDeviceMapping property</param> /// <returns>this instance</returns> public ImageAttribute WithBlockDeviceMapping(BlockDeviceMapping blockDeviceMapping) { this.blockDeviceMappingField = blockDeviceMapping; return this; }