Sha256: 0b19f431cd7f220429166b29f37aa778cfd2f6318cc8ab20c33c8a5bff462201

Contents?: true

Size: 1.47 KB

Versions: 3

Compression:

Stored size: 1.47 KB

Contents

# frozen_string_literal: true

module DjiMqttConnect
  module Thing::Product
    class FileUploadCallbackEventsMessage < EventsMessage
      attribute :_method, Types::String.enum("file_upload_callback")

      # NOTE: Not documented, but appears in examples
      attribute? :need_reply, Types::Integer.enum(0, 1)

      attribute :data do
        attribute :file do
          attribute :object_key, Types::String

          attribute :path, Types::String

          attribute :name, Types::String

          attribute :ext do
            attribute :flight_id, Types::String

            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

            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

        attribute :result, Types::Integer
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dji_mqtt_connect-0.1.9 lib/dji_mqtt_connect/messages/thing/product/file_upload_callback_events_message.rb
dji_mqtt_connect-0.1.8 lib/dji_mqtt_connect/messages/thing/product/file_upload_callback_events_message.rb
dji_mqtt_connect-0.1.7 lib/dji_mqtt_connect/messages/thing/product/file_upload_callback_events_message.rb