Class: Sendmux::Mailbox::Generated::MailboxSessionGated

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb

Overview

Flags are true when a feature is intentionally unavailable through the mailbox API.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ MailboxSessionGated

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 97

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxSessionGated` 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::MailboxSessionGated`. 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?(:'attachment_parsing')
    self.attachment_parsing = attributes[:'attachment_parsing']
  else
    self.attachment_parsing = nil
  end

  if attributes.key?(:'blob_copy')
    self.blob_copy = attributes[:'blob_copy']
  else
    self.blob_copy = nil
  end

  if attributes.key?(:'blob_lookup')
    self.blob_lookup = attributes[:'blob_lookup']
  else
    self.blob_lookup = nil
  end

  if attributes.key?(:'events')
    self.events = attributes[:'events']
  else
    self.events = nil
  end

  if attributes.key?(:'filter_script_writes')
    self.filter_script_writes = attributes[:'filter_script_writes']
  else
    self.filter_script_writes = nil
  end

  if attributes.key?(:'identity_mutation')
    self.identity_mutation = attributes[:'identity_mutation']
  else
    self.identity_mutation = nil
  end

  if attributes.key?(:'message_copy')
    self.message_copy = attributes[:'message_copy']
  else
    self.message_copy = nil
  end

  if attributes.key?(:'message_import')
    self.message_import = attributes[:'message_import']
  else
    self.message_import = nil
  end

  if attributes.key?(:'message_parse')
    self.message_parse = attributes[:'message_parse']
  else
    self.message_parse = nil
  end

  if attributes.key?(:'quota_mutation')
    self.quota_mutation = attributes[:'quota_mutation']
  else
    self.quota_mutation = nil
  end

  if attributes.key?(:'raw_protocol')
    self.raw_protocol = attributes[:'raw_protocol']
  else
    self.raw_protocol = nil
  end

  if attributes.key?(:'vacation_response')
    self.vacation_response = attributes[:'vacation_response']
  else
    self.vacation_response = nil
  end
end

Instance Attribute Details

#attachment_parsingObject

Returns the value of attribute attachment_parsing.



19
20
21
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 19

def attachment_parsing
  @attachment_parsing
end

#blob_copyObject

Returns the value of attribute blob_copy.



21
22
23
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 21

def blob_copy
  @blob_copy
end

#blob_lookupObject

Returns the value of attribute blob_lookup.



23
24
25
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 23

def blob_lookup
  @blob_lookup
end

#eventsObject

Returns the value of attribute events.



25
26
27
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 25

def events
  @events
end

#filter_script_writesObject

Returns the value of attribute filter_script_writes.



27
28
29
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 27

def filter_script_writes
  @filter_script_writes
end

#identity_mutationObject

Returns the value of attribute identity_mutation.



29
30
31
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 29

def identity_mutation
  @identity_mutation
end

#message_copyObject

Returns the value of attribute message_copy.



31
32
33
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 31

def message_copy
  @message_copy
end

#message_importObject

Returns the value of attribute message_import.



33
34
35
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 33

def message_import
  @message_import
end

#message_parseObject

Returns the value of attribute message_parse.



35
36
37
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 35

def message_parse
  @message_parse
end

#quota_mutationObject

Returns the value of attribute quota_mutation.



37
38
39
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 37

def quota_mutation
  @quota_mutation
end

#raw_protocolObject

Returns the value of attribute raw_protocol.



39
40
41
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 39

def raw_protocol
  @raw_protocol
end

#vacation_responseObject

Returns the value of attribute vacation_response.



41
42
43
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 41

def vacation_response
  @vacation_response
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



62
63
64
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 62

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



67
68
69
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 67

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 44

def self.attribute_map
  {
    :'attachment_parsing' => :'attachment_parsing',
    :'blob_copy' => :'blob_copy',
    :'blob_lookup' => :'blob_lookup',
    :'events' => :'events',
    :'filter_script_writes' => :'filter_script_writes',
    :'identity_mutation' => :'identity_mutation',
    :'message_copy' => :'message_copy',
    :'message_import' => :'message_import',
    :'message_parse' => :'message_parse',
    :'quota_mutation' => :'quota_mutation',
    :'raw_protocol' => :'raw_protocol',
    :'vacation_response' => :'vacation_response'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 413

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_nullableObject

List of attributes with nullable: true



90
91
92
93
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 90

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 72

def self.openapi_types
  {
    :'attachment_parsing' => :'Boolean',
    :'blob_copy' => :'Boolean',
    :'blob_lookup' => :'Boolean',
    :'events' => :'Boolean',
    :'filter_script_writes' => :'Boolean',
    :'identity_mutation' => :'Boolean',
    :'message_copy' => :'Boolean',
    :'message_import' => :'Boolean',
    :'message_parse' => :'Boolean',
    :'quota_mutation' => :'Boolean',
    :'raw_protocol' => :'Boolean',
    :'vacation_response' => :'Boolean'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 381

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      attachment_parsing == o.attachment_parsing &&
      blob_copy == o.blob_copy &&
      blob_lookup == o.blob_lookup &&
      events == o.events &&
      filter_script_writes == o.filter_script_writes &&
      identity_mutation == o.identity_mutation &&
      message_copy == o.message_copy &&
      message_import == o.message_import &&
      message_parse == o.message_parse &&
      quota_mutation == o.quota_mutation &&
      raw_protocol == o.raw_protocol &&
      vacation_response == o.vacation_response
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


400
401
402
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 400

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



406
407
408
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 406

def hash
  [attachment_parsing, blob_copy, blob_lookup, events, filter_script_writes, identity_mutation, message_copy, message_import, message_parse, quota_mutation, raw_protocol, vacation_response].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
230
231
232
233
234
235
236
237
238
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 186

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @attachment_parsing.nil?
    invalid_properties.push('invalid value for "attachment_parsing", attachment_parsing cannot be nil.')
  end

  if @blob_copy.nil?
    invalid_properties.push('invalid value for "blob_copy", blob_copy cannot be nil.')
  end

  if @blob_lookup.nil?
    invalid_properties.push('invalid value for "blob_lookup", blob_lookup cannot be nil.')
  end

  if @events.nil?
    invalid_properties.push('invalid value for "events", events cannot be nil.')
  end

  if @filter_script_writes.nil?
    invalid_properties.push('invalid value for "filter_script_writes", filter_script_writes cannot be nil.')
  end

  if @identity_mutation.nil?
    invalid_properties.push('invalid value for "identity_mutation", identity_mutation cannot be nil.')
  end

  if @message_copy.nil?
    invalid_properties.push('invalid value for "message_copy", message_copy cannot be nil.')
  end

  if @message_import.nil?
    invalid_properties.push('invalid value for "message_import", message_import cannot be nil.')
  end

  if @message_parse.nil?
    invalid_properties.push('invalid value for "message_parse", message_parse cannot be nil.')
  end

  if @quota_mutation.nil?
    invalid_properties.push('invalid value for "quota_mutation", quota_mutation cannot be nil.')
  end

  if @raw_protocol.nil?
    invalid_properties.push('invalid value for "raw_protocol", raw_protocol cannot be nil.')
  end

  if @vacation_response.nil?
    invalid_properties.push('invalid value for "vacation_response", vacation_response cannot be nil.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



435
436
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 435

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

Returns:

  • (Boolean)

    true if the model is valid



242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb', line 242

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @attachment_parsing.nil?
  return false if @blob_copy.nil?
  return false if @blob_lookup.nil?
  return false if @events.nil?
  return false if @filter_script_writes.nil?
  return false if @identity_mutation.nil?
  return false if @message_copy.nil?
  return false if @message_import.nil?
  return false if @message_parse.nil?
  return false if @quota_mutation.nil?
  return false if @raw_protocol.nil?
  return false if @vacation_response.nil?
  true
end