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