Class: GetStream::Generated::Models::CreateSegmentRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/create_segment_request.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ CreateSegmentRequest

Initialize with attributes



35
36
37
38
39
40
41
42
43
44
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 35

def initialize(attributes = {})
  super(attributes)
  @type = attributes[:type] || attributes['type']
  @all_sender_channels = attributes[:all_sender_channels] || attributes['all_sender_channels'] || nil
  @all_users = attributes[:all_users] || attributes['all_users'] || nil
  @description = attributes[:description] || attributes['description'] || nil
  @id = attributes[:id] || attributes['id'] || nil
  @name = attributes[:name] || attributes['name'] || nil
  @filter = attributes[:filter] || attributes['filter'] || nil
end

Instance Attribute Details

#all_sender_channelsBoolean

Returns If true, all sender channels are included in the segment.

Returns:

  • (Boolean)

    If true, all sender channels are included in the segment



17
18
19
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 17

def all_sender_channels
  @all_sender_channels
end

#all_usersBoolean

Returns If true, all users are included in the segment.

Returns:

  • (Boolean)

    If true, all users are included in the segment



20
21
22
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 20

def all_users
  @all_users
end

#descriptionString

Returns The description of the segment (max 256 characters).

Returns:

  • (String)

    The description of the segment (max 256 characters)



23
24
25
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 23

def description
  @description
end

#filterObject

Returns Filter to apply to the query.

Returns:

  • (Object)

    Filter to apply to the query



32
33
34
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 32

def filter
  @filter
end

#idString

Returns The ID of the segment.

Returns:

  • (String)

    The ID of the segment



26
27
28
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 26

def id
  @id
end

#nameString

Returns The name of the segment (max 128 characters).

Returns:

  • (String)

    The name of the segment (max 128 characters)



29
30
31
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 29

def name
  @name
end

#typeString

Returns The type of the segment.

Returns:

  • (String)

    The type of the segment



14
15
16
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 14

def type
  @type
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/getstream_ruby/generated/models/create_segment_request.rb', line 47

def self.json_field_mappings
  {
    type: 'type',
    all_sender_channels: 'all_sender_channels',
    all_users: 'all_users',
    description: 'description',
    id: 'id',
    name: 'name',
    filter: 'filter'
  }
end