Method: Azure::Storage::Common::Service::Serialization::ClassMethods#service_properties_from_xml

Defined in:
lib/azure/storage/common/service/serialization.rb

#service_properties_from_xml(xml) ⇒ Object


290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/azure/storage/common/service/serialization.rb', line 290

def service_properties_from_xml(xml)
  xml = slopify(xml)
  expect_node("StorageServiceProperties", xml)

  StorageServiceProperties.new do |props|
    props.default_service_version = xml.DefaultServiceVersion.text if (xml > "DefaultServiceVersion").any?
    props.logging = logging_from_xml(xml.Logging) if (xml > "Logging").any?
    props.hour_metrics = metrics_from_xml(xml.HourMetrics) if (xml > "HourMetrics").any?
    props.minute_metrics = metrics_from_xml(xml.MinuteMetrics) if (xml > "MinuteMetrics").any?
    props.cors = cors_from_xml(xml.Cors) if (xml > "Cors").any?
  end
end