Class: Sendmux::Mailbox::Generated::MailboxSessionCapabilitiesMessages
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Sendmux::Mailbox::Generated::MailboxSessionCapabilitiesMessages
- Defined in:
- lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#batch_get ⇒ Object
Returns the value of attribute batch_get.
-
#batch_update ⇒ Object
Returns the value of attribute batch_update.
-
#changes ⇒ Object
Returns the value of attribute changes.
-
#clean_content ⇒ Object
Returns the value of attribute clean_content.
-
#count ⇒ Object
Returns the value of attribute count.
-
#delete ⇒ Object
Returns the value of attribute delete.
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#keywords ⇒ Object
Returns the value of attribute keywords.
-
#list ⇒ Object
Returns the value of attribute list.
-
#permanent_delete ⇒ Object
Returns the value of attribute permanent_delete.
-
#query_changes ⇒ Object
Returns the value of attribute query_changes.
-
#raw_body ⇒ Object
Returns the value of attribute raw_body.
-
#search_snippets ⇒ Object
Returns the value of attribute search_snippets.
-
#update_fields ⇒ Object
Returns the value of attribute update_fields.
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 = {}) ⇒ MailboxSessionCapabilitiesMessages
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 = {}) ⇒ MailboxSessionCapabilitiesMessages
Initializes the object
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 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 126 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxSessionCapabilitiesMessages` 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 `Sendmux::Mailbox::Generated::MailboxSessionCapabilitiesMessages`. 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?(:'batch_get') self.batch_get = attributes[:'batch_get'] else self.batch_get = nil end if attributes.key?(:'batch_update') self.batch_update = attributes[:'batch_update'] else self.batch_update = nil end if attributes.key?(:'changes') self.changes = attributes[:'changes'] else self.changes = nil end if attributes.key?(:'clean_content') self.clean_content = attributes[:'clean_content'] else self.clean_content = nil end if attributes.key?(:'count') self.count = attributes[:'count'] else self.count = nil end if attributes.key?(:'delete') self.delete = attributes[:'delete'] else self.delete = nil end if attributes.key?(:'detail') self.detail = attributes[:'detail'] else self.detail = nil end if attributes.key?(:'keywords') self.keywords = attributes[:'keywords'] else self.keywords = nil end if attributes.key?(:'list') self.list = attributes[:'list'] else self.list = nil end if attributes.key?(:'permanent_delete') self.permanent_delete = attributes[:'permanent_delete'] else self.permanent_delete = nil end if attributes.key?(:'query_changes') self.query_changes = attributes[:'query_changes'] else self.query_changes = nil end if attributes.key?(:'raw_body') self.raw_body = attributes[:'raw_body'] else self.raw_body = nil end if attributes.key?(:'search_snippets') self.search_snippets = attributes[:'search_snippets'] else self.search_snippets = nil end if attributes.key?(:'update_fields') if (value = attributes[:'update_fields']).is_a?(Array) self.update_fields = value end else self.update_fields = nil end end |
Instance Attribute Details
#batch_get ⇒ Object
Returns the value of attribute batch_get.
18 19 20 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 18 def batch_get @batch_get end |
#batch_update ⇒ Object
Returns the value of attribute batch_update.
20 21 22 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 20 def batch_update @batch_update end |
#changes ⇒ Object
Returns the value of attribute changes.
22 23 24 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 22 def changes @changes end |
#clean_content ⇒ Object
Returns the value of attribute clean_content.
24 25 26 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 24 def clean_content @clean_content end |
#count ⇒ Object
Returns the value of attribute count.
26 27 28 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 26 def count @count end |
#delete ⇒ Object
Returns the value of attribute delete.
28 29 30 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 28 def delete @delete end |
#detail ⇒ Object
Returns the value of attribute detail.
30 31 32 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 30 def detail @detail end |
#keywords ⇒ Object
Returns the value of attribute keywords.
32 33 34 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 32 def keywords @keywords end |
#list ⇒ Object
Returns the value of attribute list.
34 35 36 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 34 def list @list end |
#permanent_delete ⇒ Object
Returns the value of attribute permanent_delete.
36 37 38 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 36 def permanent_delete @permanent_delete end |
#query_changes ⇒ Object
Returns the value of attribute query_changes.
38 39 40 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 38 def query_changes @query_changes end |
#raw_body ⇒ Object
Returns the value of attribute raw_body.
40 41 42 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 40 def raw_body @raw_body end |
#search_snippets ⇒ Object
Returns the value of attribute search_snippets.
42 43 44 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 42 def search_snippets @search_snippets end |
#update_fields ⇒ Object
Returns the value of attribute update_fields.
44 45 46 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 44 def update_fields @update_fields end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
89 90 91 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 89 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
94 95 96 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 94 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 69 def self.attribute_map { :'batch_get' => :'batch_get', :'batch_update' => :'batch_update', :'changes' => :'changes', :'clean_content' => :'clean_content', :'count' => :'count', :'delete' => :'delete', :'detail' => :'detail', :'keywords' => :'keywords', :'list' => :'list', :'permanent_delete' => :'permanent_delete', :'query_changes' => :'query_changes', :'raw_body' => :'raw_body', :'search_snippets' => :'search_snippets', :'update_fields' => :'update_fields' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 478 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
119 120 121 122 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 119 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 99 def self.openapi_types { :'batch_get' => :'Boolean', :'batch_update' => :'Boolean', :'changes' => :'Boolean', :'clean_content' => :'Boolean', :'count' => :'Boolean', :'delete' => :'Boolean', :'detail' => :'Boolean', :'keywords' => :'Boolean', :'list' => :'Boolean', :'permanent_delete' => :'Boolean', :'query_changes' => :'Boolean', :'raw_body' => :'Boolean', :'search_snippets' => :'Boolean', :'update_fields' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 444 def ==(o) return true if self.equal?(o) self.class == o.class && batch_get == o.batch_get && batch_update == o.batch_update && changes == o.changes && clean_content == o.clean_content && count == o.count && delete == o.delete && detail == o.detail && keywords == o.keywords && list == o.list && permanent_delete == o.permanent_delete && query_changes == o.query_changes && raw_body == o.raw_body && search_snippets == o.search_snippets && update_fields == o.update_fields end |
#eql?(o) ⇒ Boolean
465 466 467 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 465 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
471 472 473 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 471 def hash [batch_get, batch_update, changes, clean_content, count, delete, detail, keywords, list, permanent_delete, query_changes, raw_body, search_snippets, update_fields].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 229 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @batch_get.nil? invalid_properties.push('invalid value for "batch_get", batch_get cannot be nil.') end if @batch_update.nil? invalid_properties.push('invalid value for "batch_update", batch_update cannot be nil.') end if @changes.nil? invalid_properties.push('invalid value for "changes", changes cannot be nil.') end if @clean_content.nil? invalid_properties.push('invalid value for "clean_content", clean_content cannot be nil.') end if @count.nil? invalid_properties.push('invalid value for "count", count cannot be nil.') end if @delete.nil? invalid_properties.push('invalid value for "delete", delete cannot be nil.') end if @detail.nil? invalid_properties.push('invalid value for "detail", detail cannot be nil.') end if @keywords.nil? invalid_properties.push('invalid value for "keywords", keywords cannot be nil.') end if @list.nil? invalid_properties.push('invalid value for "list", list cannot be nil.') end if @permanent_delete.nil? invalid_properties.push('invalid value for "permanent_delete", permanent_delete cannot be nil.') end if @query_changes.nil? invalid_properties.push('invalid value for "query_changes", query_changes cannot be nil.') end if @raw_body.nil? invalid_properties.push('invalid value for "raw_body", raw_body cannot be nil.') end if @search_snippets.nil? invalid_properties.push('invalid value for "search_snippets", search_snippets cannot be nil.') end if @update_fields.nil? invalid_properties.push('invalid value for "update_fields", update_fields cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 500 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
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb', line 293 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @batch_get.nil? return false if @batch_update.nil? return false if @changes.nil? return false if @clean_content.nil? return false if @count.nil? return false if @delete.nil? return false if @detail.nil? return false if @keywords.nil? return false if @list.nil? return false if @permanent_delete.nil? return false if @query_changes.nil? return false if @raw_body.nil? return false if @search_snippets.nil? return false if @update_fields.nil? true end |