Class: TelestreamCloud::Flip::Factory
- Inherits:
-
Object
- Object
- TelestreamCloud::Flip::Factory
- Defined in:
- lib/telestream_cloud_flip/models/factory.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#acl ⇒ Object
Specify if your files are public or private (private files need authorization url to access).
-
#created_at ⇒ Object
A date and time when a Factory has been created.
-
#factory_region ⇒ Object
A region where the factory is located.
-
#id ⇒ Object
A unique identifier of a Factory.
-
#input_bucket_file_pattern ⇒ Object
A pattern that will be used to locate files in the input bucket.
-
#input_bucket_files_map ⇒ Object
Returns the value of attribute input_bucket_files_map.
-
#input_bucket_name ⇒ Object
A name of an input bucket.
-
#input_bucket_recursive ⇒ Object
Returns the value of attribute input_bucket_recursive.
-
#input_bucket_sync_every_n_min ⇒ Object
Determines how often the input bucket is synchronised.
-
#input_bucket_watch ⇒ Object
Determines whether the Factory should be notified about new files added to the input bucket.
-
#name ⇒ Object
Human-readable identifier of a Factory.
-
#output_bucket_name ⇒ Object
A bucket where processed files will be stored.
-
#outputs_path_format ⇒ Object
Returns the value of attribute outputs_path_format.
-
#provider_specific_settings ⇒ Object
Returns the value of attribute provider_specific_settings.
-
#server_side_encryption ⇒ Object
Specify if you want to use multi-factor server-side 256-bit AES-256 data encryption with Amazon S3-managed encryption keys (SSE-S3).
-
#storage_provider ⇒ Object
Specifies which storage provider the factory should use.
-
#updated_at ⇒ Object
A date and time when a Factory has been updated last time.
-
#url ⇒ Object
An URL pointing to the output_bucket_name.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Factory
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Factory
Initializes the object
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 140 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'factory_region') self.factory_region = attributes[:'factory_region'] end if attributes.has_key?(:'output_bucket_name') self.output_bucket_name = attributes[:'output_bucket_name'] end if attributes.has_key?(:'acl') self.acl = attributes[:'acl'] end if attributes.has_key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.has_key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.has_key?(:'url') self.url = attributes[:'url'] end if attributes.has_key?(:'server_side_encryption') self.server_side_encryption = attributes[:'server_side_encryption'] end if attributes.has_key?(:'input_bucket_name') self.input_bucket_name = attributes[:'input_bucket_name'] end if attributes.has_key?(:'input_bucket_watch') self.input_bucket_watch = attributes[:'input_bucket_watch'] end if attributes.has_key?(:'input_bucket_files_map') self.input_bucket_files_map = attributes[:'input_bucket_files_map'] end if attributes.has_key?(:'input_bucket_sync_every_n_min') self.input_bucket_sync_every_n_min = attributes[:'input_bucket_sync_every_n_min'] end if attributes.has_key?(:'input_bucket_recursive') self.input_bucket_recursive = attributes[:'input_bucket_recursive'] end if attributes.has_key?(:'input_bucket_file_pattern') self.input_bucket_file_pattern = attributes[:'input_bucket_file_pattern'] end if attributes.has_key?(:'outputs_path_format') self.outputs_path_format = attributes[:'outputs_path_format'] end if attributes.has_key?(:'storage_provider') self.storage_provider = attributes[:'storage_provider'] end if attributes.has_key?(:'provider_specific_settings') self.provider_specific_settings = attributes[:'provider_specific_settings'] end end |
Instance Attribute Details
#acl ⇒ Object
Specify if your files are public or private (private files need authorization url to access). By default this is not set.
31 32 33 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 31 def acl @acl end |
#created_at ⇒ Object
A date and time when a Factory has been created.
34 35 36 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 34 def created_at @created_at end |
#factory_region ⇒ Object
A region where the factory is located.
25 26 27 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 25 def factory_region @factory_region end |
#id ⇒ Object
A unique identifier of a Factory.
19 20 21 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 19 def id @id end |
#input_bucket_file_pattern ⇒ Object
A pattern that will be used to locate files in the input bucket. Valid wildcards might be used.
59 60 61 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 59 def input_bucket_file_pattern @input_bucket_file_pattern end |
#input_bucket_files_map ⇒ Object
Returns the value of attribute input_bucket_files_map.
51 52 53 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 51 def input_bucket_files_map @input_bucket_files_map end |
#input_bucket_name ⇒ Object
A name of an input bucket.
46 47 48 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 46 def input_bucket_name @input_bucket_name end |
#input_bucket_recursive ⇒ Object
Returns the value of attribute input_bucket_recursive.
56 57 58 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 56 def input_bucket_recursive @input_bucket_recursive end |
#input_bucket_sync_every_n_min ⇒ Object
Determines how often the input bucket is synchronised.
54 55 56 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 54 def input_bucket_sync_every_n_min @input_bucket_sync_every_n_min end |
#input_bucket_watch ⇒ Object
Determines whether the Factory should be notified about new files added to the input bucket.
49 50 51 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 49 def input_bucket_watch @input_bucket_watch end |
#name ⇒ Object
Human-readable identifier of a Factory.
22 23 24 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 22 def name @name end |
#output_bucket_name ⇒ Object
A bucket where processed files will be stored.
28 29 30 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 28 def output_bucket_name @output_bucket_name end |
#outputs_path_format ⇒ Object
Returns the value of attribute outputs_path_format.
61 62 63 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 61 def outputs_path_format @outputs_path_format end |
#provider_specific_settings ⇒ Object
Returns the value of attribute provider_specific_settings.
66 67 68 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 66 def provider_specific_settings @provider_specific_settings end |
#server_side_encryption ⇒ Object
Specify if you want to use multi-factor server-side 256-bit AES-256 data encryption with Amazon S3-managed encryption keys (SSE-S3). Each object is encrypted using a unique key which as an additional safeguard is encrypted itself with a master key that S3 regularly rotates. By default this is not set.
43 44 45 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 43 def server_side_encryption @server_side_encryption end |
#storage_provider ⇒ Object
Specifies which storage provider the factory should use. Available options: S3: 0, Google Cloud Storage: 1, FTP storage: 2, Google Cloud Interoperability Storage: 5, Flip storage: 7, FASP storage: 8, Azure Blob Storage: 9
64 65 66 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 64 def storage_provider @storage_provider end |
#updated_at ⇒ Object
A date and time when a Factory has been updated last time.
37 38 39 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 37 def updated_at @updated_at end |
#url ⇒ Object
An URL pointing to the output_bucket_name.
40 41 42 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 40 def url @url end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 91 def self.attribute_map { :'id' => :'id', :'name' => :'name', :'factory_region' => :'factory_region', :'output_bucket_name' => :'output_bucket_name', :'acl' => :'acl', :'created_at' => :'created_at', :'updated_at' => :'updated_at', :'url' => :'url', :'server_side_encryption' => :'server_side_encryption', :'input_bucket_name' => :'input_bucket_name', :'input_bucket_watch' => :'input_bucket_watch', :'input_bucket_files_map' => :'input_bucket_files_map', :'input_bucket_sync_every_n_min' => :'input_bucket_sync_every_n_min', :'input_bucket_recursive' => :'input_bucket_recursive', :'input_bucket_file_pattern' => :'input_bucket_file_pattern', :'outputs_path_format' => :'outputs_path_format', :'storage_provider' => :'storage_provider', :'provider_specific_settings' => :'provider_specific_settings' } end |
.swagger_types ⇒ Object
Attribute type mapping.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 115 def self.swagger_types { :'id' => :'String', :'name' => :'String', :'factory_region' => :'String', :'output_bucket_name' => :'String', :'acl' => :'String', :'created_at' => :'String', :'updated_at' => :'String', :'url' => :'String', :'server_side_encryption' => :'BOOLEAN', :'input_bucket_name' => :'String', :'input_bucket_watch' => :'BOOLEAN', :'input_bucket_files_map' => :'String', :'input_bucket_sync_every_n_min' => :'String', :'input_bucket_recursive' => :'String', :'input_bucket_file_pattern' => :'String', :'outputs_path_format' => :'String', :'storage_provider' => :'Integer', :'provider_specific_settings' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 247 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && factory_region == o.factory_region && output_bucket_name == o.output_bucket_name && acl == o.acl && created_at == o.created_at && updated_at == o.updated_at && url == o.url && server_side_encryption == o.server_side_encryption && input_bucket_name == o.input_bucket_name && input_bucket_watch == o.input_bucket_watch && input_bucket_files_map == o.input_bucket_files_map && input_bucket_sync_every_n_min == o.input_bucket_sync_every_n_min && input_bucket_recursive == o.input_bucket_recursive && input_bucket_file_pattern == o.input_bucket_file_pattern && outputs_path_format == o.outputs_path_format && storage_provider == o.storage_provider && provider_specific_settings == o.provider_specific_settings end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 306 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = TelestreamCloud::Flip.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 372 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 285 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
272 273 274 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 272 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
278 279 280 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 278 def hash [id, name, factory_region, output_bucket_name, acl, created_at, updated_at, url, server_side_encryption, input_bucket_name, input_bucket_watch, input_bucket_files_map, input_bucket_sync_every_n_min, input_bucket_recursive, input_bucket_file_pattern, outputs_path_format, storage_provider, provider_specific_settings].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
222 223 224 225 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 222 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
352 353 354 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 352 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
358 359 360 361 362 363 364 365 366 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 358 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
346 347 348 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 346 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
229 230 231 232 233 |
# File 'lib/telestream_cloud_flip/models/factory.rb', line 229 def valid? acl_validator = EnumAttributeValidator.new('String', ["public", "private"]) return false unless acl_validator.valid?(@acl) return true end |