Class: SlackWebApi::MigrationExchangeSuccessSchema
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- SlackWebApi::MigrationExchangeSuccessSchema
- Defined in:
- lib/slack_web_api/models/migration_exchange_success_schema.rb
Overview
Schema for successful response from migration.exchange method
Instance Attribute Summary collapse
-
#enterprise_id ⇒ String
TODO: Write general description for this method.
-
#invalid_user_ids ⇒ Array[String]
TODO: Write general description for this method.
-
#ok ⇒ String
readonly
TODO: Write general description for this method.
-
#team_id ⇒ String
TODO: Write general description for this method.
-
#user_id_map ⇒ Object
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(enterprise_id:, team_id:, invalid_user_ids: SKIP, user_id_map: SKIP, additional_properties: nil) ⇒ MigrationExchangeSuccessSchema
constructor
A new instance of MigrationExchangeSuccessSchema.
-
#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(enterprise_id:, team_id:, invalid_user_ids: SKIP, user_id_map: SKIP, additional_properties: nil) ⇒ MigrationExchangeSuccessSchema
Returns a new instance of MigrationExchangeSuccessSchema.
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 56 def initialize(enterprise_id:, team_id:, invalid_user_ids: SKIP, user_id_map: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @enterprise_id = enterprise_id @invalid_user_ids = invalid_user_ids unless invalid_user_ids == SKIP @ok = 'True' @team_id = team_id @user_id_map = user_id_map unless user_id_map == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#enterprise_id ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 14 def enterprise_id @enterprise_id end |
#invalid_user_ids ⇒ Array[String]
TODO: Write general description for this method
18 19 20 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 18 def invalid_user_ids @invalid_user_ids end |
#ok ⇒ String (readonly)
TODO: Write general description for this method
22 23 24 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 22 def ok @ok end |
#team_id ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 26 def team_id @team_id end |
#user_id_map ⇒ Object
TODO: Write general description for this method
30 31 32 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 30 def user_id_map @user_id_map end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 70 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. enterprise_id = hash.key?('enterprise_id') ? hash['enterprise_id'] : nil team_id = hash.key?('team_id') ? hash['team_id'] : nil invalid_user_ids = hash.key?('invalid_user_ids') ? hash['invalid_user_ids'] : SKIP user_id_map = hash.key?('user_id_map') ? hash['user_id_map'] : 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. MigrationExchangeSuccessSchema.new(enterprise_id: enterprise_id, team_id: team_id, invalid_user_ids: invalid_user_ids, user_id_map: user_id_map, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['enterprise_id'] = 'enterprise_id' @_hash['invalid_user_ids'] = 'invalid_user_ids' @_hash['ok'] = 'ok' @_hash['team_id'] = 'team_id' @_hash['user_id_map'] = 'user_id_map' @_hash end |
.nullables ⇒ Object
An array for nullable fields
52 53 54 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 52 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 44 def self.optionals %w[ invalid_user_ids user_id_map ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
104 105 106 107 108 109 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} enterprise_id: #{@enterprise_id.inspect}, invalid_user_ids:"\ " #{@invalid_user_ids.inspect}, ok: #{@ok.inspect}, team_id: #{@team_id.inspect},"\ " user_id_map: #{@user_id_map.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
96 97 98 99 100 101 |
# File 'lib/slack_web_api/models/migration_exchange_success_schema.rb', line 96 def to_s class_name = self.class.name.split('::').last "<#{class_name} enterprise_id: #{@enterprise_id}, invalid_user_ids: #{@invalid_user_ids},"\ " ok: #{@ok}, team_id: #{@team_id}, user_id_map: #{@user_id_map}, additional_properties:"\ " #{@additional_properties}>" end |