telestream_cloud_qc 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
 - data/Gemfile +7 -0
 - data/README.md +58 -0
 - data/Rakefile +8 -0
 - data/docs/Alert.md +13 -0
 - data/docs/AudioStream.md +13 -0
 - data/docs/Container.md +9 -0
 - data/docs/Data.md +10 -0
 - data/docs/Data1.md +9 -0
 - data/docs/ExtraFile.md +10 -0
 - data/docs/Job.md +12 -0
 - data/docs/JobData.md +9 -0
 - data/docs/JobDetails.md +9 -0
 - data/docs/JobDetailsResult.md +8 -0
 - data/docs/JobsCollection.md +12 -0
 - data/docs/Media.md +10 -0
 - data/docs/Options.md +7 -0
 - data/docs/Project.md +12 -0
 - data/docs/Proxy.md +12 -0
 - data/docs/QcApi.md +719 -0
 - data/docs/UploadSession.md +13 -0
 - data/docs/VideoStream.md +13 -0
 - data/docs/VideoUploadBody.md +12 -0
 - data/git_push.sh +55 -0
 - data/lib/telestream_cloud_qc/api/qc_api.rb +781 -0
 - data/lib/telestream_cloud_qc/api_client.rb +389 -0
 - data/lib/telestream_cloud_qc/api_error.rb +38 -0
 - data/lib/telestream_cloud_qc/configuration.rb +209 -0
 - data/lib/telestream_cloud_qc/models/alert.rb +236 -0
 - data/lib/telestream_cloud_qc/models/audio_stream.rb +238 -0
 - data/lib/telestream_cloud_qc/models/container.rb +198 -0
 - data/lib/telestream_cloud_qc/models/data.rb +208 -0
 - data/lib/telestream_cloud_qc/models/data_1.rb +197 -0
 - data/lib/telestream_cloud_qc/models/extra_file.rb +221 -0
 - data/lib/telestream_cloud_qc/models/job.rb +269 -0
 - data/lib/telestream_cloud_qc/models/job_data.rb +197 -0
 - data/lib/telestream_cloud_qc/models/job_details.rb +199 -0
 - data/lib/telestream_cloud_qc/models/job_details_result.rb +190 -0
 - data/lib/telestream_cloud_qc/models/jobs_collection.rb +230 -0
 - data/lib/telestream_cloud_qc/models/media.rb +210 -0
 - data/lib/telestream_cloud_qc/models/options.rb +179 -0
 - data/lib/telestream_cloud_qc/models/project.rb +262 -0
 - data/lib/telestream_cloud_qc/models/proxy.rb +224 -0
 - data/lib/telestream_cloud_qc/models/upload_session.rb +249 -0
 - data/lib/telestream_cloud_qc/models/video_stream.rb +235 -0
 - data/lib/telestream_cloud_qc/models/video_upload_body.rb +242 -0
 - data/lib/telestream_cloud_qc/uploader.rb +244 -0
 - data/lib/telestream_cloud_qc/version.rb +18 -0
 - data/lib/telestream_cloud_qc.rb +64 -0
 - data/spec/api/qc_api_spec.rb +202 -0
 - data/spec/api_client_spec.rb +226 -0
 - data/spec/configuration_spec.rb +42 -0
 - data/spec/models/alert_spec.rb +72 -0
 - data/spec/models/audio_stream_spec.rb +72 -0
 - data/spec/models/container_spec.rb +48 -0
 - data/spec/models/data_1_spec.rb +48 -0
 - data/spec/models/data_spec.rb +54 -0
 - data/spec/models/extra_file_spec.rb +54 -0
 - data/spec/models/job_data_spec.rb +48 -0
 - data/spec/models/job_details_result_spec.rb +42 -0
 - data/spec/models/job_details_spec.rb +48 -0
 - data/spec/models/job_spec.rb +74 -0
 - data/spec/models/jobs_collection_spec.rb +66 -0
 - data/spec/models/media_spec.rb +54 -0
 - data/spec/models/options_spec.rb +36 -0
 - data/spec/models/project_spec.rb +70 -0
 - data/spec/models/proxy_spec.rb +66 -0
 - data/spec/models/upload_session_spec.rb +72 -0
 - data/spec/models/video_stream_spec.rb +72 -0
 - data/spec/models/video_upload_body_spec.rb +66 -0
 - data/spec/spec_helper.rb +111 -0
 - data/telestream_cloud_qc.gemspec +47 -0
 - metadata +336 -0
 
| 
         @@ -0,0 +1,269 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #Qc API
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #QC API
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            OpenAPI spec version: 2.0.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            Contact: cloudsupport@telestream.net
         
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         
     | 
| 
      
 9 
     | 
    
         
            +
            Swagger Codegen version: 2.3.0
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            module TelestreamCloud::Qc
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              class Job
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :id
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                attr_accessor :status
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                attr_accessor :duration
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                attr_accessor :type
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                attr_accessor :details
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                class EnumAttributeValidator
         
     | 
| 
      
 29 
     | 
    
         
            +
                  attr_reader :datatype
         
     | 
| 
      
 30 
     | 
    
         
            +
                  attr_reader :allowable_values
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                  def initialize(datatype, allowable_values)
         
     | 
| 
      
 33 
     | 
    
         
            +
                    @allowable_values = allowable_values.map do |value|
         
     | 
| 
      
 34 
     | 
    
         
            +
                      case datatype.to_s
         
     | 
| 
      
 35 
     | 
    
         
            +
                      when /Integer/i
         
     | 
| 
      
 36 
     | 
    
         
            +
                        value.to_i
         
     | 
| 
      
 37 
     | 
    
         
            +
                      when /Float/i
         
     | 
| 
      
 38 
     | 
    
         
            +
                        value.to_f
         
     | 
| 
      
 39 
     | 
    
         
            +
                      else
         
     | 
| 
      
 40 
     | 
    
         
            +
                        value
         
     | 
| 
      
 41 
     | 
    
         
            +
                      end
         
     | 
| 
      
 42 
     | 
    
         
            +
                    end
         
     | 
| 
      
 43 
     | 
    
         
            +
                  end
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                  def valid?(value)
         
     | 
| 
      
 46 
     | 
    
         
            +
                    !value || allowable_values.include?(value)
         
     | 
| 
      
 47 
     | 
    
         
            +
                  end
         
     | 
| 
      
 48 
     | 
    
         
            +
                end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
      
 51 
     | 
    
         
            +
                def self.attribute_map
         
     | 
| 
      
 52 
     | 
    
         
            +
                  {
         
     | 
| 
      
 53 
     | 
    
         
            +
                    :'id' => :'id',
         
     | 
| 
      
 54 
     | 
    
         
            +
                    :'status' => :'status',
         
     | 
| 
      
 55 
     | 
    
         
            +
                    :'duration' => :'duration',
         
     | 
| 
      
 56 
     | 
    
         
            +
                    :'type' => :'type',
         
     | 
| 
      
 57 
     | 
    
         
            +
                    :'details' => :'details'
         
     | 
| 
      
 58 
     | 
    
         
            +
                  }
         
     | 
| 
      
 59 
     | 
    
         
            +
                end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                # Attribute type mapping.
         
     | 
| 
      
 62 
     | 
    
         
            +
                def self.swagger_types
         
     | 
| 
      
 63 
     | 
    
         
            +
                  {
         
     | 
| 
      
 64 
     | 
    
         
            +
                    :'id' => :'String',
         
     | 
| 
      
 65 
     | 
    
         
            +
                    :'status' => :'String',
         
     | 
| 
      
 66 
     | 
    
         
            +
                    :'duration' => :'Integer',
         
     | 
| 
      
 67 
     | 
    
         
            +
                    :'type' => :'String',
         
     | 
| 
      
 68 
     | 
    
         
            +
                    :'details' => :'JobDetails'
         
     | 
| 
      
 69 
     | 
    
         
            +
                  }
         
     | 
| 
      
 70 
     | 
    
         
            +
                end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                # Initializes the object
         
     | 
| 
      
 73 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 74 
     | 
    
         
            +
                def initialize(attributes = {})
         
     | 
| 
      
 75 
     | 
    
         
            +
                  return unless attributes.is_a?(Hash)
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                  # convert string to symbol for hash key
         
     | 
| 
      
 78 
     | 
    
         
            +
                  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                  if attributes.has_key?(:'id')
         
     | 
| 
      
 81 
     | 
    
         
            +
                    self.id = attributes[:'id']
         
     | 
| 
      
 82 
     | 
    
         
            +
                  end
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
                  if attributes.has_key?(:'status')
         
     | 
| 
      
 85 
     | 
    
         
            +
                    self.status = attributes[:'status']
         
     | 
| 
      
 86 
     | 
    
         
            +
                  end
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                  if attributes.has_key?(:'duration')
         
     | 
| 
      
 89 
     | 
    
         
            +
                    self.duration = attributes[:'duration']
         
     | 
| 
      
 90 
     | 
    
         
            +
                  end
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
                  if attributes.has_key?(:'type')
         
     | 
| 
      
 93 
     | 
    
         
            +
                    self.type = attributes[:'type']
         
     | 
| 
      
 94 
     | 
    
         
            +
                  end
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
                  if attributes.has_key?(:'details')
         
     | 
| 
      
 97 
     | 
    
         
            +
                    self.details = attributes[:'details']
         
     | 
| 
      
 98 
     | 
    
         
            +
                  end
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
                end
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
      
 103 
     | 
    
         
            +
                # @return Array for valid properties with the reasons
         
     | 
| 
      
 104 
     | 
    
         
            +
                def list_invalid_properties
         
     | 
| 
      
 105 
     | 
    
         
            +
                  invalid_properties = Array.new
         
     | 
| 
      
 106 
     | 
    
         
            +
                  return invalid_properties
         
     | 
| 
      
 107 
     | 
    
         
            +
                end
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
                # Check to see if the all the properties in the model are valid
         
     | 
| 
      
 110 
     | 
    
         
            +
                # @return true if the model is valid
         
     | 
| 
      
 111 
     | 
    
         
            +
                def valid?
         
     | 
| 
      
 112 
     | 
    
         
            +
                  status_validator = EnumAttributeValidator.new('String', ["pending", "transfering", "queued", "downloading", "uploading", "processing", "success", "error"])
         
     | 
| 
      
 113 
     | 
    
         
            +
                  return false unless status_validator.valid?(@status)
         
     | 
| 
      
 114 
     | 
    
         
            +
                  type_validator = EnumAttributeValidator.new('String', ["vidchecker", "lipsync"])
         
     | 
| 
      
 115 
     | 
    
         
            +
                  return false unless type_validator.valid?(@type)
         
     | 
| 
      
 116 
     | 
    
         
            +
                  return true
         
     | 
| 
      
 117 
     | 
    
         
            +
                end
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
                # Custom attribute writer method checking allowed values (enum).
         
     | 
| 
      
 120 
     | 
    
         
            +
                # @param [Object] status Object to be assigned
         
     | 
| 
      
 121 
     | 
    
         
            +
                def status=(status)
         
     | 
| 
      
 122 
     | 
    
         
            +
                  validator = EnumAttributeValidator.new('String', ["pending", "transfering", "queued", "downloading", "uploading", "processing", "success", "error"])
         
     | 
| 
      
 123 
     | 
    
         
            +
                  unless validator.valid?(status)
         
     | 
| 
      
 124 
     | 
    
         
            +
                    fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
         
     | 
| 
      
 125 
     | 
    
         
            +
                  end
         
     | 
| 
      
 126 
     | 
    
         
            +
                  @status = status
         
     | 
| 
      
 127 
     | 
    
         
            +
                end
         
     | 
| 
      
 128 
     | 
    
         
            +
             
     | 
| 
      
 129 
     | 
    
         
            +
                # Custom attribute writer method checking allowed values (enum).
         
     | 
| 
      
 130 
     | 
    
         
            +
                # @param [Object] type Object to be assigned
         
     | 
| 
      
 131 
     | 
    
         
            +
                def type=(type)
         
     | 
| 
      
 132 
     | 
    
         
            +
                  validator = EnumAttributeValidator.new('String', ["vidchecker", "lipsync"])
         
     | 
| 
      
 133 
     | 
    
         
            +
                  unless validator.valid?(type)
         
     | 
| 
      
 134 
     | 
    
         
            +
                    fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
         
     | 
| 
      
 135 
     | 
    
         
            +
                  end
         
     | 
| 
      
 136 
     | 
    
         
            +
                  @type = type
         
     | 
| 
      
 137 
     | 
    
         
            +
                end
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
                # Checks equality by comparing each attribute.
         
     | 
| 
      
 140 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 141 
     | 
    
         
            +
                def ==(o)
         
     | 
| 
      
 142 
     | 
    
         
            +
                  return true if self.equal?(o)
         
     | 
| 
      
 143 
     | 
    
         
            +
                  self.class == o.class &&
         
     | 
| 
      
 144 
     | 
    
         
            +
                      id == o.id &&
         
     | 
| 
      
 145 
     | 
    
         
            +
                      status == o.status &&
         
     | 
| 
      
 146 
     | 
    
         
            +
                      duration == o.duration &&
         
     | 
| 
      
 147 
     | 
    
         
            +
                      type == o.type &&
         
     | 
| 
      
 148 
     | 
    
         
            +
                      details == o.details
         
     | 
| 
      
 149 
     | 
    
         
            +
                end
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
                # @see the `==` method
         
     | 
| 
      
 152 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 153 
     | 
    
         
            +
                def eql?(o)
         
     | 
| 
      
 154 
     | 
    
         
            +
                  self == o
         
     | 
| 
      
 155 
     | 
    
         
            +
                end
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
      
 157 
     | 
    
         
            +
                # Calculates hash code according to all attributes.
         
     | 
| 
      
 158 
     | 
    
         
            +
                # @return [Fixnum] Hash code
         
     | 
| 
      
 159 
     | 
    
         
            +
                def hash
         
     | 
| 
      
 160 
     | 
    
         
            +
                  [id, status, duration, type, details].hash
         
     | 
| 
      
 161 
     | 
    
         
            +
                end
         
     | 
| 
      
 162 
     | 
    
         
            +
             
     | 
| 
      
 163 
     | 
    
         
            +
                # Builds the object from hash
         
     | 
| 
      
 164 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 165 
     | 
    
         
            +
                # @return [Object] Returns the model itself
         
     | 
| 
      
 166 
     | 
    
         
            +
                def build_from_hash(attributes)
         
     | 
| 
      
 167 
     | 
    
         
            +
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
      
 168 
     | 
    
         
            +
                  self.class.swagger_types.each_pair do |key, type|
         
     | 
| 
      
 169 
     | 
    
         
            +
                    if type =~ /\AArray<(.*)>/i
         
     | 
| 
      
 170 
     | 
    
         
            +
                      # check to ensure the input is an array given that the the attribute
         
     | 
| 
      
 171 
     | 
    
         
            +
                      # is documented as an array but the input is not
         
     | 
| 
      
 172 
     | 
    
         
            +
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
      
 173 
     | 
    
         
            +
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
         
     | 
| 
      
 174 
     | 
    
         
            +
                      end
         
     | 
| 
      
 175 
     | 
    
         
            +
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
      
 176 
     | 
    
         
            +
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
      
 177 
     | 
    
         
            +
                    end # or else data not found in attributes(hash), not an issue as the data can be optional
         
     | 
| 
      
 178 
     | 
    
         
            +
                  end
         
     | 
| 
      
 179 
     | 
    
         
            +
             
     | 
| 
      
 180 
     | 
    
         
            +
                  self
         
     | 
| 
      
 181 
     | 
    
         
            +
                end
         
     | 
| 
      
 182 
     | 
    
         
            +
             
     | 
| 
      
 183 
     | 
    
         
            +
                # Deserializes the data based on type
         
     | 
| 
      
 184 
     | 
    
         
            +
                # @param string type Data type
         
     | 
| 
      
 185 
     | 
    
         
            +
                # @param string value Value to be deserialized
         
     | 
| 
      
 186 
     | 
    
         
            +
                # @return [Object] Deserialized data
         
     | 
| 
      
 187 
     | 
    
         
            +
                def _deserialize(type, value)
         
     | 
| 
      
 188 
     | 
    
         
            +
                  case type.to_sym
         
     | 
| 
      
 189 
     | 
    
         
            +
                  when :DateTime
         
     | 
| 
      
 190 
     | 
    
         
            +
                    DateTime.parse(value)
         
     | 
| 
      
 191 
     | 
    
         
            +
                  when :Date
         
     | 
| 
      
 192 
     | 
    
         
            +
                    Date.parse(value)
         
     | 
| 
      
 193 
     | 
    
         
            +
                  when :String
         
     | 
| 
      
 194 
     | 
    
         
            +
                    value.to_s
         
     | 
| 
      
 195 
     | 
    
         
            +
                  when :Integer
         
     | 
| 
      
 196 
     | 
    
         
            +
                    value.to_i
         
     | 
| 
      
 197 
     | 
    
         
            +
                  when :Float
         
     | 
| 
      
 198 
     | 
    
         
            +
                    value.to_f
         
     | 
| 
      
 199 
     | 
    
         
            +
                  when :BOOLEAN
         
     | 
| 
      
 200 
     | 
    
         
            +
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
      
 201 
     | 
    
         
            +
                      true
         
     | 
| 
      
 202 
     | 
    
         
            +
                    else
         
     | 
| 
      
 203 
     | 
    
         
            +
                      false
         
     | 
| 
      
 204 
     | 
    
         
            +
                    end
         
     | 
| 
      
 205 
     | 
    
         
            +
                  when :Object
         
     | 
| 
      
 206 
     | 
    
         
            +
                    # generic object (usually a Hash), return directly
         
     | 
| 
      
 207 
     | 
    
         
            +
                    value
         
     | 
| 
      
 208 
     | 
    
         
            +
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
      
 209 
     | 
    
         
            +
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
      
 210 
     | 
    
         
            +
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
      
 211 
     | 
    
         
            +
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
      
 212 
     | 
    
         
            +
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
      
 213 
     | 
    
         
            +
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
      
 214 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 215 
     | 
    
         
            +
                      value.each do |k, v|
         
     | 
| 
      
 216 
     | 
    
         
            +
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
      
 217 
     | 
    
         
            +
                      end
         
     | 
| 
      
 218 
     | 
    
         
            +
                    end
         
     | 
| 
      
 219 
     | 
    
         
            +
                  else # model
         
     | 
| 
      
 220 
     | 
    
         
            +
                    temp_model = TelestreamCloud::Qc.const_get(type).new
         
     | 
| 
      
 221 
     | 
    
         
            +
                    temp_model.build_from_hash(value)
         
     | 
| 
      
 222 
     | 
    
         
            +
                  end
         
     | 
| 
      
 223 
     | 
    
         
            +
                end
         
     | 
| 
      
 224 
     | 
    
         
            +
             
     | 
| 
      
 225 
     | 
    
         
            +
                # Returns the string representation of the object
         
     | 
| 
      
 226 
     | 
    
         
            +
                # @return [String] String presentation of the object
         
     | 
| 
      
 227 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 228 
     | 
    
         
            +
                  to_hash.to_s
         
     | 
| 
      
 229 
     | 
    
         
            +
                end
         
     | 
| 
      
 230 
     | 
    
         
            +
             
     | 
| 
      
 231 
     | 
    
         
            +
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
      
 232 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 233 
     | 
    
         
            +
                def to_body
         
     | 
| 
      
 234 
     | 
    
         
            +
                  to_hash
         
     | 
| 
      
 235 
     | 
    
         
            +
                end
         
     | 
| 
      
 236 
     | 
    
         
            +
             
     | 
| 
      
 237 
     | 
    
         
            +
                # Returns the object in the form of hash
         
     | 
| 
      
 238 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 239 
     | 
    
         
            +
                def to_hash
         
     | 
| 
      
 240 
     | 
    
         
            +
                  hash = {}
         
     | 
| 
      
 241 
     | 
    
         
            +
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
      
 242 
     | 
    
         
            +
                    value = self.send(attr)
         
     | 
| 
      
 243 
     | 
    
         
            +
                    next if value.nil?
         
     | 
| 
      
 244 
     | 
    
         
            +
                    hash[param] = _to_hash(value)
         
     | 
| 
      
 245 
     | 
    
         
            +
                  end
         
     | 
| 
      
 246 
     | 
    
         
            +
                  hash
         
     | 
| 
      
 247 
     | 
    
         
            +
                end
         
     | 
| 
      
 248 
     | 
    
         
            +
             
     | 
| 
      
 249 
     | 
    
         
            +
                # Outputs non-array value in the form of hash
         
     | 
| 
      
 250 
     | 
    
         
            +
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
      
 251 
     | 
    
         
            +
                # @param [Object] value Any valid value
         
     | 
| 
      
 252 
     | 
    
         
            +
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
      
 253 
     | 
    
         
            +
                def _to_hash(value)
         
     | 
| 
      
 254 
     | 
    
         
            +
                  if value.is_a?(Array)
         
     | 
| 
      
 255 
     | 
    
         
            +
                    value.compact.map{ |v| _to_hash(v) }
         
     | 
| 
      
 256 
     | 
    
         
            +
                  elsif value.is_a?(Hash)
         
     | 
| 
      
 257 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 258 
     | 
    
         
            +
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
      
 259 
     | 
    
         
            +
                    end
         
     | 
| 
      
 260 
     | 
    
         
            +
                  elsif value.respond_to? :to_hash
         
     | 
| 
      
 261 
     | 
    
         
            +
                    value.to_hash
         
     | 
| 
      
 262 
     | 
    
         
            +
                  else
         
     | 
| 
      
 263 
     | 
    
         
            +
                    value
         
     | 
| 
      
 264 
     | 
    
         
            +
                  end
         
     | 
| 
      
 265 
     | 
    
         
            +
                end
         
     | 
| 
      
 266 
     | 
    
         
            +
             
     | 
| 
      
 267 
     | 
    
         
            +
              end
         
     | 
| 
      
 268 
     | 
    
         
            +
             
     | 
| 
      
 269 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,197 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #Qc API
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #QC API
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            OpenAPI spec version: 2.0.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            Contact: cloudsupport@telestream.net
         
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         
     | 
| 
      
 9 
     | 
    
         
            +
            Swagger Codegen version: 2.3.0
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            module TelestreamCloud::Qc
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              class JobData
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :options
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                attr_accessor :url
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
      
 24 
     | 
    
         
            +
                def self.attribute_map
         
     | 
| 
      
 25 
     | 
    
         
            +
                  {
         
     | 
| 
      
 26 
     | 
    
         
            +
                    :'options' => :'options',
         
     | 
| 
      
 27 
     | 
    
         
            +
                    :'url' => :'url'
         
     | 
| 
      
 28 
     | 
    
         
            +
                  }
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                # Attribute type mapping.
         
     | 
| 
      
 32 
     | 
    
         
            +
                def self.swagger_types
         
     | 
| 
      
 33 
     | 
    
         
            +
                  {
         
     | 
| 
      
 34 
     | 
    
         
            +
                    :'options' => :'Options',
         
     | 
| 
      
 35 
     | 
    
         
            +
                    :'url' => :'String'
         
     | 
| 
      
 36 
     | 
    
         
            +
                  }
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                # Initializes the object
         
     | 
| 
      
 40 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 41 
     | 
    
         
            +
                def initialize(attributes = {})
         
     | 
| 
      
 42 
     | 
    
         
            +
                  return unless attributes.is_a?(Hash)
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                  # convert string to symbol for hash key
         
     | 
| 
      
 45 
     | 
    
         
            +
                  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                  if attributes.has_key?(:'options')
         
     | 
| 
      
 48 
     | 
    
         
            +
                    self.options = attributes[:'options']
         
     | 
| 
      
 49 
     | 
    
         
            +
                  end
         
     | 
| 
      
 50 
     | 
    
         
            +
             
     | 
| 
      
 51 
     | 
    
         
            +
                  if attributes.has_key?(:'url')
         
     | 
| 
      
 52 
     | 
    
         
            +
                    self.url = attributes[:'url']
         
     | 
| 
      
 53 
     | 
    
         
            +
                  end
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
      
 58 
     | 
    
         
            +
                # @return Array for valid properties with the reasons
         
     | 
| 
      
 59 
     | 
    
         
            +
                def list_invalid_properties
         
     | 
| 
      
 60 
     | 
    
         
            +
                  invalid_properties = Array.new
         
     | 
| 
      
 61 
     | 
    
         
            +
                  return invalid_properties
         
     | 
| 
      
 62 
     | 
    
         
            +
                end
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                # Check to see if the all the properties in the model are valid
         
     | 
| 
      
 65 
     | 
    
         
            +
                # @return true if the model is valid
         
     | 
| 
      
 66 
     | 
    
         
            +
                def valid?
         
     | 
| 
      
 67 
     | 
    
         
            +
                  return true
         
     | 
| 
      
 68 
     | 
    
         
            +
                end
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                # Checks equality by comparing each attribute.
         
     | 
| 
      
 71 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 72 
     | 
    
         
            +
                def ==(o)
         
     | 
| 
      
 73 
     | 
    
         
            +
                  return true if self.equal?(o)
         
     | 
| 
      
 74 
     | 
    
         
            +
                  self.class == o.class &&
         
     | 
| 
      
 75 
     | 
    
         
            +
                      options == o.options &&
         
     | 
| 
      
 76 
     | 
    
         
            +
                      url == o.url
         
     | 
| 
      
 77 
     | 
    
         
            +
                end
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                # @see the `==` method
         
     | 
| 
      
 80 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 81 
     | 
    
         
            +
                def eql?(o)
         
     | 
| 
      
 82 
     | 
    
         
            +
                  self == o
         
     | 
| 
      
 83 
     | 
    
         
            +
                end
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
                # Calculates hash code according to all attributes.
         
     | 
| 
      
 86 
     | 
    
         
            +
                # @return [Fixnum] Hash code
         
     | 
| 
      
 87 
     | 
    
         
            +
                def hash
         
     | 
| 
      
 88 
     | 
    
         
            +
                  [options, url].hash
         
     | 
| 
      
 89 
     | 
    
         
            +
                end
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
                # Builds the object from hash
         
     | 
| 
      
 92 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 93 
     | 
    
         
            +
                # @return [Object] Returns the model itself
         
     | 
| 
      
 94 
     | 
    
         
            +
                def build_from_hash(attributes)
         
     | 
| 
      
 95 
     | 
    
         
            +
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
      
 96 
     | 
    
         
            +
                  self.class.swagger_types.each_pair do |key, type|
         
     | 
| 
      
 97 
     | 
    
         
            +
                    if type =~ /\AArray<(.*)>/i
         
     | 
| 
      
 98 
     | 
    
         
            +
                      # check to ensure the input is an array given that the the attribute
         
     | 
| 
      
 99 
     | 
    
         
            +
                      # is documented as an array but the input is not
         
     | 
| 
      
 100 
     | 
    
         
            +
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
      
 101 
     | 
    
         
            +
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
         
     | 
| 
      
 102 
     | 
    
         
            +
                      end
         
     | 
| 
      
 103 
     | 
    
         
            +
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
      
 104 
     | 
    
         
            +
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
      
 105 
     | 
    
         
            +
                    end # or else data not found in attributes(hash), not an issue as the data can be optional
         
     | 
| 
      
 106 
     | 
    
         
            +
                  end
         
     | 
| 
      
 107 
     | 
    
         
            +
             
     | 
| 
      
 108 
     | 
    
         
            +
                  self
         
     | 
| 
      
 109 
     | 
    
         
            +
                end
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
                # Deserializes the data based on type
         
     | 
| 
      
 112 
     | 
    
         
            +
                # @param string type Data type
         
     | 
| 
      
 113 
     | 
    
         
            +
                # @param string value Value to be deserialized
         
     | 
| 
      
 114 
     | 
    
         
            +
                # @return [Object] Deserialized data
         
     | 
| 
      
 115 
     | 
    
         
            +
                def _deserialize(type, value)
         
     | 
| 
      
 116 
     | 
    
         
            +
                  case type.to_sym
         
     | 
| 
      
 117 
     | 
    
         
            +
                  when :DateTime
         
     | 
| 
      
 118 
     | 
    
         
            +
                    DateTime.parse(value)
         
     | 
| 
      
 119 
     | 
    
         
            +
                  when :Date
         
     | 
| 
      
 120 
     | 
    
         
            +
                    Date.parse(value)
         
     | 
| 
      
 121 
     | 
    
         
            +
                  when :String
         
     | 
| 
      
 122 
     | 
    
         
            +
                    value.to_s
         
     | 
| 
      
 123 
     | 
    
         
            +
                  when :Integer
         
     | 
| 
      
 124 
     | 
    
         
            +
                    value.to_i
         
     | 
| 
      
 125 
     | 
    
         
            +
                  when :Float
         
     | 
| 
      
 126 
     | 
    
         
            +
                    value.to_f
         
     | 
| 
      
 127 
     | 
    
         
            +
                  when :BOOLEAN
         
     | 
| 
      
 128 
     | 
    
         
            +
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
      
 129 
     | 
    
         
            +
                      true
         
     | 
| 
      
 130 
     | 
    
         
            +
                    else
         
     | 
| 
      
 131 
     | 
    
         
            +
                      false
         
     | 
| 
      
 132 
     | 
    
         
            +
                    end
         
     | 
| 
      
 133 
     | 
    
         
            +
                  when :Object
         
     | 
| 
      
 134 
     | 
    
         
            +
                    # generic object (usually a Hash), return directly
         
     | 
| 
      
 135 
     | 
    
         
            +
                    value
         
     | 
| 
      
 136 
     | 
    
         
            +
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
      
 137 
     | 
    
         
            +
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
      
 138 
     | 
    
         
            +
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
      
 139 
     | 
    
         
            +
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
      
 140 
     | 
    
         
            +
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
      
 141 
     | 
    
         
            +
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
      
 142 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 143 
     | 
    
         
            +
                      value.each do |k, v|
         
     | 
| 
      
 144 
     | 
    
         
            +
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
      
 145 
     | 
    
         
            +
                      end
         
     | 
| 
      
 146 
     | 
    
         
            +
                    end
         
     | 
| 
      
 147 
     | 
    
         
            +
                  else # model
         
     | 
| 
      
 148 
     | 
    
         
            +
                    temp_model = TelestreamCloud::Qc.const_get(type).new
         
     | 
| 
      
 149 
     | 
    
         
            +
                    temp_model.build_from_hash(value)
         
     | 
| 
      
 150 
     | 
    
         
            +
                  end
         
     | 
| 
      
 151 
     | 
    
         
            +
                end
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
                # Returns the string representation of the object
         
     | 
| 
      
 154 
     | 
    
         
            +
                # @return [String] String presentation of the object
         
     | 
| 
      
 155 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 156 
     | 
    
         
            +
                  to_hash.to_s
         
     | 
| 
      
 157 
     | 
    
         
            +
                end
         
     | 
| 
      
 158 
     | 
    
         
            +
             
     | 
| 
      
 159 
     | 
    
         
            +
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
      
 160 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 161 
     | 
    
         
            +
                def to_body
         
     | 
| 
      
 162 
     | 
    
         
            +
                  to_hash
         
     | 
| 
      
 163 
     | 
    
         
            +
                end
         
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
      
 165 
     | 
    
         
            +
                # Returns the object in the form of hash
         
     | 
| 
      
 166 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 167 
     | 
    
         
            +
                def to_hash
         
     | 
| 
      
 168 
     | 
    
         
            +
                  hash = {}
         
     | 
| 
      
 169 
     | 
    
         
            +
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
      
 170 
     | 
    
         
            +
                    value = self.send(attr)
         
     | 
| 
      
 171 
     | 
    
         
            +
                    next if value.nil?
         
     | 
| 
      
 172 
     | 
    
         
            +
                    hash[param] = _to_hash(value)
         
     | 
| 
      
 173 
     | 
    
         
            +
                  end
         
     | 
| 
      
 174 
     | 
    
         
            +
                  hash
         
     | 
| 
      
 175 
     | 
    
         
            +
                end
         
     | 
| 
      
 176 
     | 
    
         
            +
             
     | 
| 
      
 177 
     | 
    
         
            +
                # Outputs non-array value in the form of hash
         
     | 
| 
      
 178 
     | 
    
         
            +
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
      
 179 
     | 
    
         
            +
                # @param [Object] value Any valid value
         
     | 
| 
      
 180 
     | 
    
         
            +
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
      
 181 
     | 
    
         
            +
                def _to_hash(value)
         
     | 
| 
      
 182 
     | 
    
         
            +
                  if value.is_a?(Array)
         
     | 
| 
      
 183 
     | 
    
         
            +
                    value.compact.map{ |v| _to_hash(v) }
         
     | 
| 
      
 184 
     | 
    
         
            +
                  elsif value.is_a?(Hash)
         
     | 
| 
      
 185 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 186 
     | 
    
         
            +
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
      
 187 
     | 
    
         
            +
                    end
         
     | 
| 
      
 188 
     | 
    
         
            +
                  elsif value.respond_to? :to_hash
         
     | 
| 
      
 189 
     | 
    
         
            +
                    value.to_hash
         
     | 
| 
      
 190 
     | 
    
         
            +
                  else
         
     | 
| 
      
 191 
     | 
    
         
            +
                    value
         
     | 
| 
      
 192 
     | 
    
         
            +
                  end
         
     | 
| 
      
 193 
     | 
    
         
            +
                end
         
     | 
| 
      
 194 
     | 
    
         
            +
             
     | 
| 
      
 195 
     | 
    
         
            +
              end
         
     | 
| 
      
 196 
     | 
    
         
            +
             
     | 
| 
      
 197 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,199 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            =begin
         
     | 
| 
      
 2 
     | 
    
         
            +
            #Qc API
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            #QC API
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            OpenAPI spec version: 2.0.0
         
     | 
| 
      
 7 
     | 
    
         
            +
            Contact: cloudsupport@telestream.net
         
     | 
| 
      
 8 
     | 
    
         
            +
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         
     | 
| 
      
 9 
     | 
    
         
            +
            Swagger Codegen version: 2.3.0
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            =end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            require 'date'
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            module TelestreamCloud::Qc
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              class JobDetails
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :media
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                attr_accessor :result
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
      
 24 
     | 
    
         
            +
                def self.attribute_map
         
     | 
| 
      
 25 
     | 
    
         
            +
                  {
         
     | 
| 
      
 26 
     | 
    
         
            +
                    :'media' => :'media',
         
     | 
| 
      
 27 
     | 
    
         
            +
                    :'result' => :'result'
         
     | 
| 
      
 28 
     | 
    
         
            +
                  }
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                # Attribute type mapping.
         
     | 
| 
      
 32 
     | 
    
         
            +
                def self.swagger_types
         
     | 
| 
      
 33 
     | 
    
         
            +
                  {
         
     | 
| 
      
 34 
     | 
    
         
            +
                    :'media' => :'Array<Media>',
         
     | 
| 
      
 35 
     | 
    
         
            +
                    :'result' => :'JobDetailsResult'
         
     | 
| 
      
 36 
     | 
    
         
            +
                  }
         
     | 
| 
      
 37 
     | 
    
         
            +
                end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                # Initializes the object
         
     | 
| 
      
 40 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 41 
     | 
    
         
            +
                def initialize(attributes = {})
         
     | 
| 
      
 42 
     | 
    
         
            +
                  return unless attributes.is_a?(Hash)
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                  # convert string to symbol for hash key
         
     | 
| 
      
 45 
     | 
    
         
            +
                  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                  if attributes.has_key?(:'media')
         
     | 
| 
      
 48 
     | 
    
         
            +
                    if (value = attributes[:'media']).is_a?(Array)
         
     | 
| 
      
 49 
     | 
    
         
            +
                      self.media = value
         
     | 
| 
      
 50 
     | 
    
         
            +
                    end
         
     | 
| 
      
 51 
     | 
    
         
            +
                  end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
                  if attributes.has_key?(:'result')
         
     | 
| 
      
 54 
     | 
    
         
            +
                    self.result = attributes[:'result']
         
     | 
| 
      
 55 
     | 
    
         
            +
                  end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                end
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
      
 60 
     | 
    
         
            +
                # @return Array for valid properties with the reasons
         
     | 
| 
      
 61 
     | 
    
         
            +
                def list_invalid_properties
         
     | 
| 
      
 62 
     | 
    
         
            +
                  invalid_properties = Array.new
         
     | 
| 
      
 63 
     | 
    
         
            +
                  return invalid_properties
         
     | 
| 
      
 64 
     | 
    
         
            +
                end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                # Check to see if the all the properties in the model are valid
         
     | 
| 
      
 67 
     | 
    
         
            +
                # @return true if the model is valid
         
     | 
| 
      
 68 
     | 
    
         
            +
                def valid?
         
     | 
| 
      
 69 
     | 
    
         
            +
                  return true
         
     | 
| 
      
 70 
     | 
    
         
            +
                end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                # Checks equality by comparing each attribute.
         
     | 
| 
      
 73 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 74 
     | 
    
         
            +
                def ==(o)
         
     | 
| 
      
 75 
     | 
    
         
            +
                  return true if self.equal?(o)
         
     | 
| 
      
 76 
     | 
    
         
            +
                  self.class == o.class &&
         
     | 
| 
      
 77 
     | 
    
         
            +
                      media == o.media &&
         
     | 
| 
      
 78 
     | 
    
         
            +
                      result == o.result
         
     | 
| 
      
 79 
     | 
    
         
            +
                end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
                # @see the `==` method
         
     | 
| 
      
 82 
     | 
    
         
            +
                # @param [Object] Object to be compared
         
     | 
| 
      
 83 
     | 
    
         
            +
                def eql?(o)
         
     | 
| 
      
 84 
     | 
    
         
            +
                  self == o
         
     | 
| 
      
 85 
     | 
    
         
            +
                end
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
                # Calculates hash code according to all attributes.
         
     | 
| 
      
 88 
     | 
    
         
            +
                # @return [Fixnum] Hash code
         
     | 
| 
      
 89 
     | 
    
         
            +
                def hash
         
     | 
| 
      
 90 
     | 
    
         
            +
                  [media, result].hash
         
     | 
| 
      
 91 
     | 
    
         
            +
                end
         
     | 
| 
      
 92 
     | 
    
         
            +
             
     | 
| 
      
 93 
     | 
    
         
            +
                # Builds the object from hash
         
     | 
| 
      
 94 
     | 
    
         
            +
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
      
 95 
     | 
    
         
            +
                # @return [Object] Returns the model itself
         
     | 
| 
      
 96 
     | 
    
         
            +
                def build_from_hash(attributes)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
      
 98 
     | 
    
         
            +
                  self.class.swagger_types.each_pair do |key, type|
         
     | 
| 
      
 99 
     | 
    
         
            +
                    if type =~ /\AArray<(.*)>/i
         
     | 
| 
      
 100 
     | 
    
         
            +
                      # check to ensure the input is an array given that the the attribute
         
     | 
| 
      
 101 
     | 
    
         
            +
                      # is documented as an array but the input is not
         
     | 
| 
      
 102 
     | 
    
         
            +
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
      
 103 
     | 
    
         
            +
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
         
     | 
| 
      
 104 
     | 
    
         
            +
                      end
         
     | 
| 
      
 105 
     | 
    
         
            +
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
      
 106 
     | 
    
         
            +
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
      
 107 
     | 
    
         
            +
                    end # or else data not found in attributes(hash), not an issue as the data can be optional
         
     | 
| 
      
 108 
     | 
    
         
            +
                  end
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
      
 110 
     | 
    
         
            +
                  self
         
     | 
| 
      
 111 
     | 
    
         
            +
                end
         
     | 
| 
      
 112 
     | 
    
         
            +
             
     | 
| 
      
 113 
     | 
    
         
            +
                # Deserializes the data based on type
         
     | 
| 
      
 114 
     | 
    
         
            +
                # @param string type Data type
         
     | 
| 
      
 115 
     | 
    
         
            +
                # @param string value Value to be deserialized
         
     | 
| 
      
 116 
     | 
    
         
            +
                # @return [Object] Deserialized data
         
     | 
| 
      
 117 
     | 
    
         
            +
                def _deserialize(type, value)
         
     | 
| 
      
 118 
     | 
    
         
            +
                  case type.to_sym
         
     | 
| 
      
 119 
     | 
    
         
            +
                  when :DateTime
         
     | 
| 
      
 120 
     | 
    
         
            +
                    DateTime.parse(value)
         
     | 
| 
      
 121 
     | 
    
         
            +
                  when :Date
         
     | 
| 
      
 122 
     | 
    
         
            +
                    Date.parse(value)
         
     | 
| 
      
 123 
     | 
    
         
            +
                  when :String
         
     | 
| 
      
 124 
     | 
    
         
            +
                    value.to_s
         
     | 
| 
      
 125 
     | 
    
         
            +
                  when :Integer
         
     | 
| 
      
 126 
     | 
    
         
            +
                    value.to_i
         
     | 
| 
      
 127 
     | 
    
         
            +
                  when :Float
         
     | 
| 
      
 128 
     | 
    
         
            +
                    value.to_f
         
     | 
| 
      
 129 
     | 
    
         
            +
                  when :BOOLEAN
         
     | 
| 
      
 130 
     | 
    
         
            +
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
      
 131 
     | 
    
         
            +
                      true
         
     | 
| 
      
 132 
     | 
    
         
            +
                    else
         
     | 
| 
      
 133 
     | 
    
         
            +
                      false
         
     | 
| 
      
 134 
     | 
    
         
            +
                    end
         
     | 
| 
      
 135 
     | 
    
         
            +
                  when :Object
         
     | 
| 
      
 136 
     | 
    
         
            +
                    # generic object (usually a Hash), return directly
         
     | 
| 
      
 137 
     | 
    
         
            +
                    value
         
     | 
| 
      
 138 
     | 
    
         
            +
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
      
 139 
     | 
    
         
            +
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
      
 140 
     | 
    
         
            +
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
      
 141 
     | 
    
         
            +
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
      
 142 
     | 
    
         
            +
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
      
 143 
     | 
    
         
            +
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
      
 144 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 145 
     | 
    
         
            +
                      value.each do |k, v|
         
     | 
| 
      
 146 
     | 
    
         
            +
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
      
 147 
     | 
    
         
            +
                      end
         
     | 
| 
      
 148 
     | 
    
         
            +
                    end
         
     | 
| 
      
 149 
     | 
    
         
            +
                  else # model
         
     | 
| 
      
 150 
     | 
    
         
            +
                    temp_model = TelestreamCloud::Qc.const_get(type).new
         
     | 
| 
      
 151 
     | 
    
         
            +
                    temp_model.build_from_hash(value)
         
     | 
| 
      
 152 
     | 
    
         
            +
                  end
         
     | 
| 
      
 153 
     | 
    
         
            +
                end
         
     | 
| 
      
 154 
     | 
    
         
            +
             
     | 
| 
      
 155 
     | 
    
         
            +
                # Returns the string representation of the object
         
     | 
| 
      
 156 
     | 
    
         
            +
                # @return [String] String presentation of the object
         
     | 
| 
      
 157 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 158 
     | 
    
         
            +
                  to_hash.to_s
         
     | 
| 
      
 159 
     | 
    
         
            +
                end
         
     | 
| 
      
 160 
     | 
    
         
            +
             
     | 
| 
      
 161 
     | 
    
         
            +
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
      
 162 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 163 
     | 
    
         
            +
                def to_body
         
     | 
| 
      
 164 
     | 
    
         
            +
                  to_hash
         
     | 
| 
      
 165 
     | 
    
         
            +
                end
         
     | 
| 
      
 166 
     | 
    
         
            +
             
     | 
| 
      
 167 
     | 
    
         
            +
                # Returns the object in the form of hash
         
     | 
| 
      
 168 
     | 
    
         
            +
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
      
 169 
     | 
    
         
            +
                def to_hash
         
     | 
| 
      
 170 
     | 
    
         
            +
                  hash = {}
         
     | 
| 
      
 171 
     | 
    
         
            +
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
      
 172 
     | 
    
         
            +
                    value = self.send(attr)
         
     | 
| 
      
 173 
     | 
    
         
            +
                    next if value.nil?
         
     | 
| 
      
 174 
     | 
    
         
            +
                    hash[param] = _to_hash(value)
         
     | 
| 
      
 175 
     | 
    
         
            +
                  end
         
     | 
| 
      
 176 
     | 
    
         
            +
                  hash
         
     | 
| 
      
 177 
     | 
    
         
            +
                end
         
     | 
| 
      
 178 
     | 
    
         
            +
             
     | 
| 
      
 179 
     | 
    
         
            +
                # Outputs non-array value in the form of hash
         
     | 
| 
      
 180 
     | 
    
         
            +
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
      
 181 
     | 
    
         
            +
                # @param [Object] value Any valid value
         
     | 
| 
      
 182 
     | 
    
         
            +
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
      
 183 
     | 
    
         
            +
                def _to_hash(value)
         
     | 
| 
      
 184 
     | 
    
         
            +
                  if value.is_a?(Array)
         
     | 
| 
      
 185 
     | 
    
         
            +
                    value.compact.map{ |v| _to_hash(v) }
         
     | 
| 
      
 186 
     | 
    
         
            +
                  elsif value.is_a?(Hash)
         
     | 
| 
      
 187 
     | 
    
         
            +
                    {}.tap do |hash|
         
     | 
| 
      
 188 
     | 
    
         
            +
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
      
 189 
     | 
    
         
            +
                    end
         
     | 
| 
      
 190 
     | 
    
         
            +
                  elsif value.respond_to? :to_hash
         
     | 
| 
      
 191 
     | 
    
         
            +
                    value.to_hash
         
     | 
| 
      
 192 
     | 
    
         
            +
                  else
         
     | 
| 
      
 193 
     | 
    
         
            +
                    value
         
     | 
| 
      
 194 
     | 
    
         
            +
                  end
         
     | 
| 
      
 195 
     | 
    
         
            +
                end
         
     | 
| 
      
 196 
     | 
    
         
            +
             
     | 
| 
      
 197 
     | 
    
         
            +
              end
         
     | 
| 
      
 198 
     | 
    
         
            +
             
     | 
| 
      
 199 
     | 
    
         
            +
            end
         
     |