Class: MailSlurpClient::TenantReputationStatusRowDto
- Inherits:
-
Object
- Object
- MailSlurpClient::TenantReputationStatusRowDto
- Defined in:
- lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_region ⇒ Object
Returns the value of attribute account_region.
-
#aws_managed_sending_status ⇒ Object
Returns the value of attribute aws_managed_sending_status.
-
#bounce_rate ⇒ Object
Returns the value of attribute bounce_rate.
-
#complaint_rate ⇒ Object
Returns the value of attribute complaint_rate.
-
#customer_managed_sending_status ⇒ Object
Returns the value of attribute customer_managed_sending_status.
-
#error ⇒ Object
Returns the value of attribute error.
-
#finding_count ⇒ Object
Returns the value of attribute finding_count.
-
#metric_timestamp ⇒ Object
Returns the value of attribute metric_timestamp.
-
#reputation_policy ⇒ Object
Returns the value of attribute reputation_policy.
-
#reputation_status ⇒ Object
Returns the value of attribute reputation_status.
-
#send_last_hour ⇒ Object
Returns the value of attribute send_last_hour.
-
#sending_status ⇒ Object
Returns the value of attribute sending_status.
-
#tenant_arn ⇒ Object
Returns the value of attribute tenant_arn.
-
#tenant_name ⇒ Object
Returns the value of attribute tenant_name.
Class Method Summary collapse
-
.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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ TenantReputationStatusRowDto
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ TenantReputationStatusRowDto
Initializes the object
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 183 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 115 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::TenantReputationStatusRowDto` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::TenantReputationStatusRowDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'account_region') self.account_region = attributes[:'account_region'] end if attributes.key?(:'tenant_name') self.tenant_name = attributes[:'tenant_name'] end if attributes.key?(:'tenant_arn') self.tenant_arn = attributes[:'tenant_arn'] end if attributes.key?(:'sending_status') self.sending_status = attributes[:'sending_status'] end if attributes.key?(:'reputation_status') self.reputation_status = attributes[:'reputation_status'] end if attributes.key?(:'reputation_policy') self.reputation_policy = attributes[:'reputation_policy'] end if attributes.key?(:'customer_managed_sending_status') self.customer_managed_sending_status = attributes[:'customer_managed_sending_status'] end if attributes.key?(:'aws_managed_sending_status') self.aws_managed_sending_status = attributes[:'aws_managed_sending_status'] end if attributes.key?(:'finding_count') self.finding_count = attributes[:'finding_count'] end if attributes.key?(:'bounce_rate') self.bounce_rate = attributes[:'bounce_rate'] end if attributes.key?(:'complaint_rate') self.complaint_rate = attributes[:'complaint_rate'] end if attributes.key?(:'send_last_hour') self.send_last_hour = attributes[:'send_last_hour'] end if attributes.key?(:'metric_timestamp') self. = attributes[:'metric_timestamp'] end if attributes.key?(:'error') self.error = attributes[:'error'] end end |
Instance Attribute Details
#account_region ⇒ Object
Returns the value of attribute account_region.
17 18 19 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 17 def account_region @account_region end |
#aws_managed_sending_status ⇒ Object
Returns the value of attribute aws_managed_sending_status.
31 32 33 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 31 def aws_managed_sending_status @aws_managed_sending_status end |
#bounce_rate ⇒ Object
Returns the value of attribute bounce_rate.
35 36 37 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 35 def bounce_rate @bounce_rate end |
#complaint_rate ⇒ Object
Returns the value of attribute complaint_rate.
37 38 39 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 37 def complaint_rate @complaint_rate end |
#customer_managed_sending_status ⇒ Object
Returns the value of attribute customer_managed_sending_status.
29 30 31 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 29 def customer_managed_sending_status @customer_managed_sending_status end |
#error ⇒ Object
Returns the value of attribute error.
43 44 45 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 43 def error @error end |
#finding_count ⇒ Object
Returns the value of attribute finding_count.
33 34 35 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 33 def finding_count @finding_count end |
#metric_timestamp ⇒ Object
Returns the value of attribute metric_timestamp.
41 42 43 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 41 def @metric_timestamp end |
#reputation_policy ⇒ Object
Returns the value of attribute reputation_policy.
27 28 29 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 27 def reputation_policy @reputation_policy end |
#reputation_status ⇒ Object
Returns the value of attribute reputation_status.
25 26 27 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 25 def reputation_status @reputation_status end |
#send_last_hour ⇒ Object
Returns the value of attribute send_last_hour.
39 40 41 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 39 def send_last_hour @send_last_hour end |
#sending_status ⇒ Object
Returns the value of attribute sending_status.
23 24 25 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 23 def sending_status @sending_status end |
#tenant_arn ⇒ Object
Returns the value of attribute tenant_arn.
21 22 23 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 21 def tenant_arn @tenant_arn end |
#tenant_name ⇒ Object
Returns the value of attribute tenant_name.
19 20 21 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 19 def tenant_name @tenant_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 68 def self.attribute_map { :'account_region' => :'accountRegion', :'tenant_name' => :'tenantName', :'tenant_arn' => :'tenantArn', :'sending_status' => :'sendingStatus', :'reputation_status' => :'reputationStatus', :'reputation_policy' => :'reputationPolicy', :'customer_managed_sending_status' => :'customerManagedSendingStatus', :'aws_managed_sending_status' => :'awsManagedSendingStatus', :'finding_count' => :'findingCount', :'bounce_rate' => :'bounceRate', :'complaint_rate' => :'complaintRate', :'send_last_hour' => :'sendLastHour', :'metric_timestamp' => :'metricTimestamp', :'error' => :'error' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
261 262 263 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 261 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
108 109 110 111 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 108 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 88 def self.openapi_types { :'account_region' => :'String', :'tenant_name' => :'String', :'tenant_arn' => :'String', :'sending_status' => :'String', :'reputation_status' => :'String', :'reputation_policy' => :'String', :'customer_managed_sending_status' => :'String', :'aws_managed_sending_status' => :'String', :'finding_count' => :'Integer', :'bounce_rate' => :'Float', :'complaint_rate' => :'Float', :'send_last_hour' => :'Float', :'metric_timestamp' => :'DateTime', :'error' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 227 def ==(o) return true if self.equal?(o) self.class == o.class && account_region == o.account_region && tenant_name == o.tenant_name && tenant_arn == o.tenant_arn && sending_status == o.sending_status && reputation_status == o.reputation_status && reputation_policy == o.reputation_policy && customer_managed_sending_status == o.customer_managed_sending_status && aws_managed_sending_status == o.aws_managed_sending_status && finding_count == o.finding_count && bounce_rate == o.bounce_rate && complaint_rate == o.complaint_rate && send_last_hour == o.send_last_hour && == o. && error == o.error end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 289 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model MailSlurpClient.const_get(type).build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 358 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 268 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if 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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
248 249 250 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 248 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
254 255 256 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 254 def hash [account_region, tenant_name, tenant_arn, sending_status, reputation_status, reputation_policy, customer_managed_sending_status, aws_managed_sending_status, finding_count, bounce_rate, complaint_rate, send_last_hour, , error].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 187 def list_invalid_properties invalid_properties = Array.new if @account_region.nil? invalid_properties.push('invalid value for "account_region", account_region cannot be nil.') end if @tenant_name.nil? invalid_properties.push('invalid value for "tenant_name", tenant_name cannot be nil.') end if @finding_count.nil? invalid_properties.push('invalid value for "finding_count", finding_count cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
334 335 336 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 334 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
340 341 342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 340 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 |
#to_s ⇒ String
Returns the string representation of the object
328 329 330 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 328 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
206 207 208 209 210 211 212 213 |
# File 'lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb', line 206 def valid? return false if @account_region.nil? account_region_validator = EnumAttributeValidator.new('String', ["US_WEST_2_ACCOUNT_STAGING", "US_EAST_1_ACCOUNT_STAGING", "EU_WEST_1_ACCOUNT_STAGING", "US_WEST_2_ACCOUNT_SES_1", "EU_WEST_1_ACCOUNT_SES_1", "US_WEST_2_ACCOUNT_SES_2", "EU_WEST_1_ACCOUNT_SES_2", "US_WEST_2_ACCOUNT_BYTEWISE", "EU_WEST_1_ACCOUNT_BYTEWISE", "US_WEST_2", "EU_WEST_1", "US_EAST_1"]) return false unless account_region_validator.valid?(@account_region) return false if @tenant_name.nil? return false if @finding_count.nil? true end |