# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Subscriptions module Models # # Location information. # class Location include MsRestAzure # @return [String] Gets or sets the ID of the resource # (/subscriptions/SubscriptionId). attr_accessor :id # @return [String] Gets or sets the subscription Id. attr_accessor :subscription_id # @return [String] Gets or sets the location name attr_accessor :name # @return [String] Gets or sets the display name of the location attr_accessor :display_name # @return [String] Gets or sets the latitude of the location attr_accessor :latitude # @return [String] Gets or sets the longitude of the location attr_accessor :longitude # # Validate the object. Throws ValidationError if validation fails. # def validate # Nothing to validate end # # Serializes given Model object into Ruby Hash. # @param object Model object to serialize. # @return [Hash] Serialized object in form of Ruby Hash. # def self.serialize_object(object) object.validate output_object = {} serialized_property = object.id output_object['id'] = serialized_property unless serialized_property.nil? serialized_property = object.subscription_id output_object['subscriptionId'] = serialized_property unless serialized_property.nil? serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.display_name output_object['displayName'] = serialized_property unless serialized_property.nil? serialized_property = object.latitude output_object['latitude'] = serialized_property unless serialized_property.nil? serialized_property = object.longitude output_object['longitude'] = serialized_property unless serialized_property.nil? output_object end # # Deserializes given Ruby Hash into Model object. # @param object [Hash] Ruby Hash object to deserialize. # @return [Location] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = Location.new deserialized_property = object['id'] output_object.id = deserialized_property deserialized_property = object['subscriptionId'] output_object.subscription_id = deserialized_property deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['displayName'] output_object.display_name = deserialized_property deserialized_property = object['latitude'] output_object.latitude = deserialized_property deserialized_property = object['longitude'] output_object.longitude = deserialized_property output_object end end end end