self.parse

in codegen/projections/rails_json/lib/rails_json/parsers.rb [651:681]


      def self.parse(map)
        data = Types::KitchenSink.new
        data.blob = Base64::decode64(map['blob']) unless map['blob'].nil?
        data.boolean = map['boolean']
        data.double = Seahorse::NumberHelper.deserialize(map['double'])
        data.empty_struct = (Parsers::EmptyStruct.parse(map['empty_struct']) unless map['empty_struct'].nil?)
        data.float = Seahorse::NumberHelper.deserialize(map['float'])
        data.httpdate_timestamp = Time.parse(map['httpdate_timestamp']) if map['httpdate_timestamp']
        data.integer = map['integer']
        data.iso8601_timestamp = Time.parse(map['iso8601_timestamp']) if map['iso8601_timestamp']
        data.json_value = map['json_value']
        data.list_of_lists = (Parsers::ListOfListOfStrings.parse(map['list_of_lists']) unless map['list_of_lists'].nil?)
        data.list_of_maps_of_strings = (Parsers::ListOfMapsOfStrings.parse(map['list_of_maps_of_strings']) unless map['list_of_maps_of_strings'].nil?)
        data.list_of_strings = (Parsers::ListOfStrings.parse(map['list_of_strings']) unless map['list_of_strings'].nil?)
        data.list_of_structs = (Parsers::ListOfStructs.parse(map['list_of_structs']) unless map['list_of_structs'].nil?)
        data.long = map['long']
        data.map_of_lists_of_strings = (Parsers::MapOfListsOfStrings.parse(map['map_of_lists_of_strings']) unless map['map_of_lists_of_strings'].nil?)
        data.map_of_maps = (Parsers::MapOfMapOfStrings.parse(map['map_of_maps']) unless map['map_of_maps'].nil?)
        data.map_of_strings = (Parsers::MapOfStrings.parse(map['map_of_strings']) unless map['map_of_strings'].nil?)
        data.map_of_structs = (Parsers::MapOfStructs.parse(map['map_of_structs']) unless map['map_of_structs'].nil?)
        data.recursive_list = (Parsers::ListOfKitchenSinks.parse(map['recursive_list']) unless map['recursive_list'].nil?)
        data.recursive_map = (Parsers::MapOfKitchenSinks.parse(map['recursive_map']) unless map['recursive_map'].nil?)
        data.recursive_struct = (Parsers::KitchenSink.parse(map['recursive_struct']) unless map['recursive_struct'].nil?)
        data.simple_struct = (Parsers::SimpleStruct.parse(map['simple_struct']) unless map['simple_struct'].nil?)
        data.string = map['string']
        data.struct_with_location_name = (Parsers::StructWithLocationName.parse(map['struct_with_location_name']) unless map['struct_with_location_name'].nil?)
        data.timestamp = Time.parse(map['timestamp']) if map['timestamp']
        data.unix_timestamp = Time.at(map['unix_timestamp'].to_i) if map['unix_timestamp']
        return data
      end