Sha256: f097f87151b2cd141cf85c51d2562506eec11dd921178f8f9229cc01daf5cfa3

Contents?: true

Size: 907 Bytes

Versions: 2

Compression:

Stored size: 907 Bytes

Contents

# frozen_string_literal: true

module DjiMqttConnect
  module Thing::Product
    # Live Set Lens
    # https://developer.dji.com/doc/cloud-api-tutorial/en/api-reference/dock-to-cloud/mqtt/dock/dock1/live.html
    class LiveLensChangeServicesMessage < ServicesMessage
      def self.build(data:, bid: generate_bid, tid: generate_tid, timestamp: current_timestamp)
        new(
          bid: bid,
          tid: tid,
          data: data,
          timestamp: timestamp,
          _method: "live_lens_change"
        )
      end

      attribute :_method, Types::String.enum("live_lens_change")

      attribute :data do
        include Mixins::VideoType

        attribute :video_id, Types::String

        attribute :video_type, Types::VideoType
      end

      def humanized_summary_interpolation
        super.merge(
          video_type: data.humanized_video_type
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dji_mqtt_connect-0.1.25.1 lib/dji_mqtt_connect/messages/thing/product/services/live_lens_change.rb
dji_mqtt_connect-0.1.25 lib/dji_mqtt_connect/messages/thing/product/services/live_lens_change.rb