Sha256: 0a1c1a32ca2cd4cdc30b12d5b4957006025950d90cf08e8b64ebfbeacde3b986

Contents?: true

Size: 1.93 KB

Versions: 1

Compression:

Stored size: 1.93 KB

Contents

# -----------------------------------------------------------------------
#  Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved.
# -----------------------------------------------------------------------

require 'App42Response.rb'

#
# An enum that defines the type of the file to be uploaded on cloud.
#

module App42
  module Upload
    class UploadFileType < App42Response
      unless (const_defined?(:AUDIO))
        AUDIO = "AUDIO"
      end
      unless (const_defined?(:VIDEO))
        VIDEO = "VIDEO"
      end
      unless (const_defined?(:IMAGE))
        IMAGE = "IMAGE"
      end
      unless (const_defined?(:BINARY))
        BINARY = "BINARY"
      end
      unless (const_defined?(:TXT))
        TXT = "TXT"
      end
      unless (const_defined?(:XML))
        XML = "XML"
      end
      unless (const_defined?(:CSV))
        CSV = "CSV"
      end
      unless (const_defined?(:JSON))
        JSON = "JSON"
      end
      unless (const_defined?(:OTHER))
        OTHER = "OTHER"
      end

      #
      # Sets the value of the UploadFileType.
      #
      # @param string
      #      - the string of UploadFileType.
      #
      def enum(string)
        return UploadFileType.const_get(string)
      end

      #
      # Returns the value of the UploadFileType.
      #
      # @return the value of UploadFileType.
      #

      def isAvailable(string)
        if(string == "AUDIO")
          return "AUDIO"
        elsif(string == "VIDEO")
          return "VIDEO"
        elsif(string == "IMAGE")
          return "IMAGE"
        elsif(string == "BINARY")
          return "BINARY"
        elsif(string == "TXT")
          return "TXT"
        elsif(string == "XML")
          return "XML"
        elsif(string == "CSV")
          return "CSV"
        elsif(string == "JSON")
          return "JSON"
        elsif(string == "OTHER")
          return "OTHER";
        else
          return nil
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
App42_RUBY_SDK-0.8.3 lib/upload/UploadFileType.rb