Class: GetStream::Generated::Models::UpdatePollRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/update_poll_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 = {}) ⇒ UpdatePollRequest

Initialize with attributes



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 59

def initialize(attributes = {})
  super(attributes)
  @id = attributes.fetch(:id) { attributes.fetch('id', nil) }
  @name = attributes.fetch(:name) { attributes.fetch('name', nil) }
  @allow_answers = attributes.fetch(:allow_answers) { attributes.fetch('allow_answers', nil) }
  @allow_user_suggested_options = attributes.fetch(:allow_user_suggested_options) { attributes.fetch('allow_user_suggested_options', nil) }
  @config_key = attributes.fetch(:config_key) { attributes.fetch('config_key', nil) }
  @config_team = attributes.fetch(:config_team) { attributes.fetch('config_team', nil) }
  @description = attributes.fetch(:description) { attributes.fetch('description', nil) }
  @enforce_unique_vote = attributes.fetch(:enforce_unique_vote) { attributes.fetch('enforce_unique_vote', nil) }
  @is_closed = attributes.fetch(:is_closed) { attributes.fetch('is_closed', nil) }
  @max_votes_allowed = attributes.fetch(:max_votes_allowed) { attributes.fetch('max_votes_allowed', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @voting_visibility = attributes.fetch(:voting_visibility) { attributes.fetch('voting_visibility', nil) }
  @options = attributes.fetch(:options) { attributes.fetch('options', nil) }
  @custom = attributes.fetch(:custom) { attributes.fetch('custom', nil) }
  @user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end

Instance Attribute Details

#allow_answers ⇒ Boolean

Returns Allow answers.

Returns:

  • (Boolean) —

    Allow answers



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

def allow_answers
  @allow_answers
end

#allow_user_suggested_options ⇒ Boolean

Returns Allow user suggested options.

Returns:

  • (Boolean) —

    Allow user suggested options



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

def allow_user_suggested_options
  @allow_user_suggested_options
end

#config_key ⇒ String

Returns Key of the moderation configuration to use. Server-side only.

Returns:

  • (String) —

    Key of the moderation configuration to use. Server-side only.



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

def config_key
  @config_key
end

#config_team ⇒ String

Returns Team associated with the configuration. Server-side only.

Returns:

  • (String) —

    Team associated with the configuration. Server-side only.



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

def config_team
  @config_team
end

#custom ⇒ Object

Returns Custom data for this object.

Returns:

  • (Object) —

    Custom data for this object



53
54
55
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 53

def custom
  @custom
end

#description ⇒ String

Returns Poll description.

Returns:

  • (String) —

    Poll description



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

def description
  @description
end

#enforce_unique_vote ⇒ Boolean

Returns Enforce unique vote.

Returns:

  • (Boolean) —

    Enforce unique vote



35
36
37
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 35

def enforce_unique_vote
  @enforce_unique_vote
end

#id ⇒ String

Returns Poll ID.

Returns:

  • (String) —

    Poll ID



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

def id
  @id
end

#is_closed ⇒ Boolean

Returns Is closed.

Returns:

  • (Boolean) —

    Is closed



38
39
40
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 38

def is_closed
  @is_closed
end

#max_votes_allowed ⇒ Integer

Returns Max votes allowed.

Returns:

  • (Integer) —

    Max votes allowed



41
42
43
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 41

def max_votes_allowed
  @max_votes_allowed
end

#name ⇒ String

Returns Poll name.

Returns:

  • (String) —

    Poll name



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

def name
  @name
end

#options ⇒ Array<PollOptionRequest>

Returns Poll options.

Returns:



50
51
52
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 50

def options
  @options
end

#user ⇒ UserRequest

Returns User request object.

Returns:



56
57
58
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 56

def user
  @user
end

#user_id ⇒ String

Returns:

  • (String)


44
45
46
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 44

def user_id
  @user_id
end

#voting_visibility ⇒ VotingVisibility

Returns Voting visibility.

Returns:



47
48
49
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 47

def voting_visibility
  @voting_visibility
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/getstream_ruby/generated/models/update_poll_request.rb', line 79

def self.json_field_mappings
  {
    id: 'id',
    name: 'name',
    allow_answers: 'allow_answers',
    allow_user_suggested_options: 'allow_user_suggested_options',
    config_key: 'config_key',
    config_team: 'config_team',
    description: 'description',
    enforce_unique_vote: 'enforce_unique_vote',
    is_closed: 'is_closed',
    max_votes_allowed: 'max_votes_allowed',
    user_id: 'user_id',
    voting_visibility: 'voting_visibility',
    options: 'options',
    custom: 'custom',
    user: 'user'
  }
end