Sha256: 387a9b78d9413ffb6807b185a0b733ab1321e5b0f58a351860e2086c6b8a3683
Contents?: true
Size: 1.7 KB
Versions: 2
Compression:
Stored size: 1.7 KB
Contents
# frozen_string_literal: true module DjiMqttConnect module Thing::Product class FileUploadCallbackEventsMessage < EventsMessage attribute :_method, Types::String.enum("file_upload_callback") attribute :data do include Mixins::ResultMessage attribute :result, Types::ResultCode attribute :file do attribute :object_key, Types::String attribute :path, Types::String | Types::Nil attribute :name, Types::String attribute :ext do attribute :flight_id, Types::FlightID attribute :drone_model_key, Types::String attribute :payload_model_key, Types::String # {"0":"No","1":"Yes"} attribute :is_original, Types::Bool end attribute :metadata do attribute :gimbal_yaw_degree, Types::JSON::Decimal attribute :absolute_altitude, Types::JSON::Decimal attribute :relative_altitude, Types::JSON::Decimal attribute :created_time, Types::JSON::DateTime | Types::Nil attribute :shoot_position do include Mixins::LatitudeConditional include Mixins::LongitudeConditional attribute :lat, Types::Latitude attribute :lng, Types::Longitude alias_method :latitude, :lat alias_method :longitude, :lng end end end end def humanized_summary_interpolation super.merge( file_name: data.file.name, flight_id: data.file.ext.flight_id ) end # All the flight IDs in the message def flight_ids [data.file.ext.flight_id] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems