Class: SlackWebApi::SubteamUsergroupObject
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- SlackWebApi::SubteamUsergroupObject
- Defined in:
- lib/slack_web_api/models/subteam_usergroup_object.rb
Overview
SubteamUsergroupObject Model.
Instance Attribute Summary collapse
-
#auto_provision ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#auto_type ⇒ Object
TODO: Write general description for this method.
-
#channel_count ⇒ Integer
TODO: Write general description for this method.
-
#created_by ⇒ String
TODO: Write general description for this method.
-
#date_create ⇒ Integer
TODO: Write general description for this method.
-
#date_delete ⇒ Integer
TODO: Write general description for this method.
-
#date_update ⇒ Integer
TODO: Write general description for this method.
-
#deleted_by ⇒ Object
TODO: Write general description for this method.
-
#description ⇒ String
TODO: Write general description for this method.
-
#enterprise_subteam_id ⇒ String
TODO: Write general description for this method.
-
#handle ⇒ String
TODO: Write general description for this method.
-
#id ⇒ String
TODO: Write general description for this method.
-
#is_external ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#is_subteam ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#is_usergroup ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#prefs ⇒ Prefs
TODO: Write general description for this method.
-
#team_id ⇒ String
TODO: Write general description for this method.
-
#updated_by ⇒ String
TODO: Write general description for this method.
-
#user_count ⇒ Integer
TODO: Write general description for this method.
-
#users ⇒ Array[String]
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(auto_provision:, auto_type:, created_by:, date_create:, date_delete:, date_update:, deleted_by:, description:, enterprise_subteam_id:, handle:, id:, is_external:, is_subteam:, is_usergroup:, name:, prefs:, team_id:, updated_by:, channel_count: SKIP, user_count: SKIP, users: SKIP, additional_properties: nil) ⇒ SubteamUsergroupObject
constructor
A new instance of SubteamUsergroupObject.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(auto_provision:, auto_type:, created_by:, date_create:, date_delete:, date_update:, deleted_by:, description:, enterprise_subteam_id:, handle:, id:, is_external:, is_subteam:, is_usergroup:, name:, prefs:, team_id:, updated_by:, channel_count: SKIP, user_count: SKIP, users: SKIP, additional_properties: nil) ⇒ SubteamUsergroupObject
Returns a new instance of SubteamUsergroupObject.
137 138 139 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 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 137 def initialize(auto_provision:, auto_type:, created_by:, date_create:, date_delete:, date_update:, deleted_by:, description:, enterprise_subteam_id:, handle:, id:, is_external:, is_subteam:, is_usergroup:, name:, prefs:, team_id:, updated_by:, channel_count: SKIP, user_count: SKIP, users: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @auto_provision = auto_provision @auto_type = auto_type @channel_count = channel_count unless channel_count == SKIP @created_by = created_by @date_create = date_create @date_delete = date_delete @date_update = date_update @deleted_by = deleted_by @description = description @enterprise_subteam_id = enterprise_subteam_id @handle = handle @id = id @is_external = is_external @is_subteam = is_subteam @is_usergroup = is_usergroup @name = name @prefs = prefs @team_id = team_id @updated_by = updated_by @user_count = user_count unless user_count == SKIP @users = users unless users == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#auto_provision ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 14 def auto_provision @auto_provision end |
#auto_type ⇒ Object
TODO: Write general description for this method
18 19 20 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 18 def auto_type @auto_type end |
#channel_count ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 22 def channel_count @channel_count end |
#created_by ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 26 def created_by @created_by end |
#date_create ⇒ Integer
TODO: Write general description for this method
30 31 32 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 30 def date_create @date_create end |
#date_delete ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 34 def date_delete @date_delete end |
#date_update ⇒ Integer
TODO: Write general description for this method
38 39 40 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 38 def date_update @date_update end |
#deleted_by ⇒ Object
TODO: Write general description for this method
42 43 44 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 42 def deleted_by @deleted_by end |
#description ⇒ String
TODO: Write general description for this method
46 47 48 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 46 def description @description end |
#enterprise_subteam_id ⇒ String
TODO: Write general description for this method
50 51 52 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 50 def enterprise_subteam_id @enterprise_subteam_id end |
#handle ⇒ String
TODO: Write general description for this method
54 55 56 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 54 def handle @handle end |
#id ⇒ String
TODO: Write general description for this method
58 59 60 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 58 def id @id end |
#is_external ⇒ TrueClass | FalseClass
TODO: Write general description for this method
62 63 64 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 62 def is_external @is_external end |
#is_subteam ⇒ TrueClass | FalseClass
TODO: Write general description for this method
66 67 68 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 66 def is_subteam @is_subteam end |
#is_usergroup ⇒ TrueClass | FalseClass
TODO: Write general description for this method
70 71 72 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 70 def is_usergroup @is_usergroup end |
#name ⇒ String
TODO: Write general description for this method
74 75 76 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 74 def name @name end |
#prefs ⇒ Prefs
TODO: Write general description for this method
78 79 80 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 78 def prefs @prefs end |
#team_id ⇒ String
TODO: Write general description for this method
82 83 84 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 82 def team_id @team_id end |
#updated_by ⇒ String
TODO: Write general description for this method
86 87 88 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 86 def updated_by @updated_by end |
#user_count ⇒ Integer
TODO: Write general description for this method
90 91 92 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 90 def user_count @user_count end |
#users ⇒ Array[String]
TODO: Write general description for this method
94 95 96 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 94 def users @users end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 171 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auto_provision = hash.key?('auto_provision') ? hash['auto_provision'] : nil auto_type = hash.key?('auto_type') ? hash['auto_type'] : nil created_by = hash.key?('created_by') ? hash['created_by'] : nil date_create = hash.key?('date_create') ? hash['date_create'] : nil date_delete = hash.key?('date_delete') ? hash['date_delete'] : nil date_update = hash.key?('date_update') ? hash['date_update'] : nil deleted_by = hash.key?('deleted_by') ? hash['deleted_by'] : nil description = hash.key?('description') ? hash['description'] : nil enterprise_subteam_id = hash.key?('enterprise_subteam_id') ? hash['enterprise_subteam_id'] : nil handle = hash.key?('handle') ? hash['handle'] : nil id = hash.key?('id') ? hash['id'] : nil is_external = hash.key?('is_external') ? hash['is_external'] : nil is_subteam = hash.key?('is_subteam') ? hash['is_subteam'] : nil is_usergroup = hash.key?('is_usergroup') ? hash['is_usergroup'] : nil name = hash.key?('name') ? hash['name'] : nil prefs = Prefs.from_hash(hash['prefs']) if hash['prefs'] team_id = hash.key?('team_id') ? hash['team_id'] : nil updated_by = hash.key?('updated_by') ? hash['updated_by'] : nil channel_count = hash.key?('channel_count') ? hash['channel_count'] : SKIP user_count = hash.key?('user_count') ? hash['user_count'] : SKIP users = hash.key?('users') ? hash['users'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. SubteamUsergroupObject.new(auto_provision: auto_provision, auto_type: auto_type, created_by: created_by, date_create: date_create, date_delete: date_delete, date_update: date_update, deleted_by: deleted_by, description: description, enterprise_subteam_id: enterprise_subteam_id, handle: handle, id: id, is_external: is_external, is_subteam: is_subteam, is_usergroup: is_usergroup, name: name, prefs: prefs, team_id: team_id, updated_by: updated_by, channel_count: channel_count, user_count: user_count, users: users, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 97 def self.names @_hash = {} if @_hash.nil? @_hash['auto_provision'] = 'auto_provision' @_hash['auto_type'] = 'auto_type' @_hash['channel_count'] = 'channel_count' @_hash['created_by'] = 'created_by' @_hash['date_create'] = 'date_create' @_hash['date_delete'] = 'date_delete' @_hash['date_update'] = 'date_update' @_hash['deleted_by'] = 'deleted_by' @_hash['description'] = 'description' @_hash['enterprise_subteam_id'] = 'enterprise_subteam_id' @_hash['handle'] = 'handle' @_hash['id'] = 'id' @_hash['is_external'] = 'is_external' @_hash['is_subteam'] = 'is_subteam' @_hash['is_usergroup'] = 'is_usergroup' @_hash['name'] = 'name' @_hash['prefs'] = 'prefs' @_hash['team_id'] = 'team_id' @_hash['updated_by'] = 'updated_by' @_hash['user_count'] = 'user_count' @_hash['users'] = 'users' @_hash end |
.nullables ⇒ Object
An array for nullable fields
133 134 135 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 133 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
124 125 126 127 128 129 130 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 124 def self.optionals %w[ channel_count user_count users ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 245 def inspect class_name = self.class.name.split('::').last "<#{class_name} auto_provision: #{@auto_provision.inspect}, auto_type:"\ " #{@auto_type.inspect}, channel_count: #{@channel_count.inspect}, created_by:"\ " #{@created_by.inspect}, date_create: #{@date_create.inspect}, date_delete:"\ " #{@date_delete.inspect}, date_update: #{@date_update.inspect}, deleted_by:"\ " #{@deleted_by.inspect}, description: #{@description.inspect}, enterprise_subteam_id:"\ " #{@enterprise_subteam_id.inspect}, handle: #{@handle.inspect}, id: #{@id.inspect},"\ " is_external: #{@is_external.inspect}, is_subteam: #{@is_subteam.inspect}, is_usergroup:"\ " #{@is_usergroup.inspect}, name: #{@name.inspect}, prefs: #{@prefs.inspect}, team_id:"\ " #{@team_id.inspect}, updated_by: #{@updated_by.inspect}, user_count:"\ " #{@user_count.inspect}, users: #{@users.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/slack_web_api/models/subteam_usergroup_object.rb', line 232 def to_s class_name = self.class.name.split('::').last "<#{class_name} auto_provision: #{@auto_provision}, auto_type: #{@auto_type},"\ " channel_count: #{@channel_count}, created_by: #{@created_by}, date_create:"\ " #{@date_create}, date_delete: #{@date_delete}, date_update: #{@date_update}, deleted_by:"\ " #{@deleted_by}, description: #{@description}, enterprise_subteam_id:"\ " #{@enterprise_subteam_id}, handle: #{@handle}, id: #{@id}, is_external: #{@is_external},"\ " is_subteam: #{@is_subteam}, is_usergroup: #{@is_usergroup}, name: #{@name}, prefs:"\ " #{@prefs}, team_id: #{@team_id}, updated_by: #{@updated_by}, user_count: #{@user_count},"\ " users: #{@users}, additional_properties: #{@additional_properties}>" end |