Class: GetStream::Generated::Models::CreateUserGroupRequest

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

Overview

Request body for creating a user group

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 = {}) ⇒ CreateUserGroupRequest

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/create_user_group_request.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @name = attributes[:name] || attributes['name']
  @description = attributes[:description] || attributes['description'] || nil
  @id = attributes[:id] || attributes['id'] || nil
  @team_id = attributes[:team_id] || attributes['team_id'] || nil
  @member_ids = attributes[:member_ids] || attributes['member_ids'] || nil
end

Instance Attribute Details

#descriptionString

Returns An optional description for the group.

Returns:

  • An optional description for the group



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

def description
  @description
end

#idString

Returns Optional user group ID. If not provided, a UUID v7 will be generated.

Returns:

  • Optional user group ID. If not provided, a UUID v7 will be generated



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

def id
  @id
end

#member_idsArray<String>

Returns Optional initial list of user IDs to add as members.

Returns:

  • Optional initial list of user IDs to add as members



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

def member_ids
  @member_ids
end

#nameString

Returns The user friendly name of the user group.

Returns:

  • The user friendly name of the user group



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

def name
  @name
end

#team_idString

Returns Optional team ID to scope the group to a team.

Returns:

  • Optional team ID to scope the group to a team



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

def team_id
  @team_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/create_user_group_request.rb', line 39

def self.json_field_mappings
  {
    name: 'name',
    description: 'description',
    id: 'id',
    team_id: 'team_id',
    member_ids: 'member_ids'
  }
end