Sha256: 3b6e2a8f6b7da5ac7e46cac33e76fff05bc43e4c07e8362d19f4537e7b72f9d2

Contents?: true

Size: 1.24 KB

Versions: 13

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

module Evostream
  # Concern all command sending to evoStream
  module Commands
    # Abstract class for create element
    class RemoveConfig < Command
      MANDATORY = %w[id].freeze

      def initialize(commands = { group_name: 'null', remove_hls_hds_files: 1 })
        super(commands)
      end

      def cmd
        super
        "removeConfig?params=#{encode_64}"
      end

      private

      attr_reader :command

      # The configId of the configuration that needs to be removed. ConfigIds
      # can be obtained from the listConfig interface. Removing an inbound
      # stream will also automatically remove all associated outbound streams.
      def id(param = 'null')
        "id=#{param}"
      end

      # The name of the group that needs to be removed (applicable to HLS, HDS
      # and external processes). *Mandatory only if the id parameter is not
      # specified.
      def group_name(param = 'null')
        "groupName=#{param}"
      end

      # If 1 (true) and the stream is HLS or HDS, the folder associated with it
      # will be removed
      def remove_hls_hds_files(param = 0)
        "removeHlsHdsFiles=#{param}"
      end
    end

    # Alias to Destroy class
    Destroy = RemoveConfig
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
evostream-event-1.0.3 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.3.pre.95 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.3.pre.93 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.3.pre.91 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.3.pre.83 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.2 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.2.pre.75 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.2.pre.74 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.1 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.1.pre.72 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.0 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.0.pre.69 lib/evostream/event/commands/destroy.rb
evostream-event-1.0.0.pre.65 lib/evostream/event/commands/destroy.rb