Class: Pingram::GetUsersResponseUsersInnerSlackToken
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Pingram::GetUsersResponseUsersInnerSlackToken
- Defined in:
- lib/pingram/models/get_users_response_users_inner_slack_token.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#authed_user ⇒ Object
Returns the value of attribute authed_user.
-
#bot_user_id ⇒ Object
Returns the value of attribute bot_user_id.
-
#enterprise ⇒ Object
Returns the value of attribute enterprise.
-
#error ⇒ Object
Returns the value of attribute error.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#incoming_webhook ⇒ Object
Returns the value of attribute incoming_webhook.
-
#is_enterprise_install ⇒ Object
Returns the value of attribute is_enterprise_install.
-
#needed ⇒ Object
Returns the value of attribute needed.
-
#ok ⇒ Object
Returns the value of attribute ok.
-
#provided ⇒ Object
Returns the value of attribute provided.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#response_metadata ⇒ Object
Returns the value of attribute response_metadata.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#team ⇒ Object
Returns the value of attribute team.
-
#token_type ⇒ Object
Returns the value of attribute token_type.
-
#warning ⇒ Object
Returns the value of attribute warning.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetUsersResponseUsersInnerSlackToken
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ GetUsersResponseUsersInnerSlackToken
Initializes the object
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 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 169 170 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 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 120 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsersResponseUsersInnerSlackToken` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsersResponseUsersInnerSlackToken`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'access_token') self.access_token = attributes[:'access_token'] end if attributes.key?(:'app_id') self.app_id = attributes[:'app_id'] end if attributes.key?(:'authed_user') self.authed_user = attributes[:'authed_user'] end if attributes.key?(:'bot_user_id') self.bot_user_id = attributes[:'bot_user_id'] end if attributes.key?(:'enterprise') self.enterprise = attributes[:'enterprise'] end if attributes.key?(:'error') self.error = attributes[:'error'] end if attributes.key?(:'expires_in') self.expires_in = attributes[:'expires_in'] end if attributes.key?(:'incoming_webhook') self.incoming_webhook = attributes[:'incoming_webhook'] end if attributes.key?(:'is_enterprise_install') self.is_enterprise_install = attributes[:'is_enterprise_install'] end if attributes.key?(:'needed') self.needed = attributes[:'needed'] end if attributes.key?(:'ok') self.ok = attributes[:'ok'] else self.ok = nil end if attributes.key?(:'provided') self.provided = attributes[:'provided'] end if attributes.key?(:'refresh_token') self.refresh_token = attributes[:'refresh_token'] end if attributes.key?(:'scope') self.scope = attributes[:'scope'] end if attributes.key?(:'team') self.team = attributes[:'team'] end if attributes.key?(:'token_type') self.token_type = attributes[:'token_type'] end if attributes.key?(:'warning') self.warning = attributes[:'warning'] end if attributes.key?(:'response_metadata') self. = attributes[:'response_metadata'] end end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
18 19 20 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 18 def access_token @access_token end |
#app_id ⇒ Object
Returns the value of attribute app_id.
20 21 22 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 20 def app_id @app_id end |
#authed_user ⇒ Object
Returns the value of attribute authed_user.
22 23 24 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 22 def authed_user @authed_user end |
#bot_user_id ⇒ Object
Returns the value of attribute bot_user_id.
24 25 26 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 24 def bot_user_id @bot_user_id end |
#enterprise ⇒ Object
Returns the value of attribute enterprise.
26 27 28 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 26 def enterprise @enterprise end |
#error ⇒ Object
Returns the value of attribute error.
28 29 30 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 28 def error @error end |
#expires_in ⇒ Object
Returns the value of attribute expires_in.
30 31 32 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 30 def expires_in @expires_in end |
#incoming_webhook ⇒ Object
Returns the value of attribute incoming_webhook.
32 33 34 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 32 def incoming_webhook @incoming_webhook end |
#is_enterprise_install ⇒ Object
Returns the value of attribute is_enterprise_install.
34 35 36 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 34 def is_enterprise_install @is_enterprise_install end |
#needed ⇒ Object
Returns the value of attribute needed.
36 37 38 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 36 def needed @needed end |
#ok ⇒ Object
Returns the value of attribute ok.
38 39 40 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 38 def ok @ok end |
#provided ⇒ Object
Returns the value of attribute provided.
40 41 42 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 40 def provided @provided end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
42 43 44 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 42 def refresh_token @refresh_token end |
#response_metadata ⇒ Object
Returns the value of attribute response_metadata.
52 53 54 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 52 def end |
#scope ⇒ Object
Returns the value of attribute scope.
44 45 46 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 44 def scope @scope end |
#team ⇒ Object
Returns the value of attribute team.
46 47 48 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 46 def team @team end |
#token_type ⇒ Object
Returns the value of attribute token_type.
48 49 50 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 48 def token_type @token_type end |
#warning ⇒ Object
Returns the value of attribute warning.
50 51 52 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 50 def warning @warning end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
79 80 81 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 79 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
84 85 86 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 84 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 55 def self.attribute_map { :'access_token' => :'access_token', :'app_id' => :'app_id', :'authed_user' => :'authed_user', :'bot_user_id' => :'bot_user_id', :'enterprise' => :'enterprise', :'error' => :'error', :'expires_in' => :'expires_in', :'incoming_webhook' => :'incoming_webhook', :'is_enterprise_install' => :'is_enterprise_install', :'needed' => :'needed', :'ok' => :'ok', :'provided' => :'provided', :'refresh_token' => :'refresh_token', :'scope' => :'scope', :'team' => :'team', :'token_type' => :'token_type', :'warning' => :'warning', :'response_metadata' => :'response_metadata' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 279 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
113 114 115 116 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 113 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 89 def self.openapi_types { :'access_token' => :'String', :'app_id' => :'String', :'authed_user' => :'GetUsersResponseUsersInnerSlackTokenAuthedUser', :'bot_user_id' => :'String', :'enterprise' => :'GetUsersResponseUsersInnerSlackTokenEnterprise', :'error' => :'String', :'expires_in' => :'Float', :'incoming_webhook' => :'GetUsersResponseUsersInnerSlackTokenIncomingWebhook', :'is_enterprise_install' => :'Boolean', :'needed' => :'String', :'ok' => :'Boolean', :'provided' => :'String', :'refresh_token' => :'String', :'scope' => :'String', :'team' => :'GetUsersResponseUsersInnerSlackTokenEnterprise', :'token_type' => :'String', :'warning' => :'String', :'response_metadata' => :'GetUsersResponseUsersInnerSlackTokenResponseMetadata' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 241 def ==(o) return true if self.equal?(o) self.class == o.class && access_token == o.access_token && app_id == o.app_id && authed_user == o.authed_user && bot_user_id == o.bot_user_id && enterprise == o.enterprise && error == o.error && expires_in == o.expires_in && incoming_webhook == o.incoming_webhook && is_enterprise_install == o.is_enterprise_install && needed == o.needed && ok == o.ok && provided == o.provided && refresh_token == o.refresh_token && scope == o.scope && team == o.team && token_type == o.token_type && warning == o.warning && == o. end |
#eql?(o) ⇒ Boolean
266 267 268 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 266 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
272 273 274 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 272 def hash [access_token, app_id, authed_user, bot_user_id, enterprise, error, expires_in, incoming_webhook, is_enterprise_install, needed, ok, provided, refresh_token, scope, team, token_type, warning, ].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
211 212 213 214 215 216 217 218 219 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 211 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @ok.nil? invalid_properties.push('invalid value for "ok", ok cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 301 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
223 224 225 226 227 |
# File 'lib/pingram/models/get_users_response_users_inner_slack_token.rb', line 223 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @ok.nil? true end |