Class: GetStream::Generated::Models::BlendArrangeConfig
- Defined in:
- lib/getstream_ruby/generated/models/blend_arrange_config.rb
Instance Attribute Summary collapse
-
#default_min_gap ⇒ Integer
Minimum gap, 0 to 50, for every source without a min_gap entry.
-
#min_gap ⇒ Hash<String, Integer>
Minimum number of slots between two items of a source, per key value, 0 to 50.
-
#weights ⇒ Hash<String, Float>
Relative weight per key value, greater than 0, at most 8 entries.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ BlendArrangeConfig
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ BlendArrangeConfig
Initialize with attributes
23 24 25 26 27 28 |
# File 'lib/getstream_ruby/generated/models/blend_arrange_config.rb', line 23 def initialize(attributes = {}) super(attributes) @default_min_gap = attributes.fetch(:default_min_gap) { attributes.fetch('default_min_gap', nil) } @min_gap = attributes.fetch(:min_gap) { attributes.fetch('min_gap', nil) } @weights = attributes.fetch(:weights) { attributes.fetch('weights', nil) } end |
Instance Attribute Details
#default_min_gap ⇒ Integer
Returns Minimum gap, 0 to 50, for every source without a min_gap entry.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/blend_arrange_config.rb', line 14 def default_min_gap @default_min_gap end |
#min_gap ⇒ Hash<String, Integer>
Returns Minimum number of slots between two items of a source, per key value, 0 to 50. The key '*' requires weights. Combinations of weights and gaps that cannot be satisfied are rejected.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/blend_arrange_config.rb', line 17 def min_gap @min_gap end |
#weights ⇒ Hash<String, Float>
Returns Relative weight per key value, greater than 0, at most 8 entries. Weights are normalized, so 80/20 equals 4/1. The key '*' is the catch-all source for key values without their own weight; unweighted values are otherwise placed after the blended section.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/blend_arrange_config.rb', line 20 def weights @weights end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
31 32 33 34 35 36 37 |
# File 'lib/getstream_ruby/generated/models/blend_arrange_config.rb', line 31 def self.json_field_mappings { default_min_gap: 'default_min_gap', min_gap: 'min_gap', weights: 'weights' } end |