Class: Mudbase::AdminOrgLimitsPatchRequestBugAnalysis
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Mudbase::AdminOrgLimitsPatchRequestBugAnalysis
- Defined in:
- lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#log_retention_days ⇒ Object
Returns the value of attribute log_retention_days.
-
#max_runtime_minutes ⇒ Object
Returns the value of attribute max_runtime_minutes.
-
#max_upload_bytes ⇒ Object
Returns the value of attribute max_upload_bytes.
-
#queue_type ⇒ Object
Returns the value of attribute queue_type.
-
#scans_per_month ⇒ Object
Returns the value of attribute scans_per_month.
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 = {}) ⇒ AdminOrgLimitsPatchRequestBugAnalysis
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 = {}) ⇒ AdminOrgLimitsPatchRequestBugAnalysis
Initializes the object
94 95 96 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 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 94 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Mudbase::AdminOrgLimitsPatchRequestBugAnalysis` 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 `Mudbase::AdminOrgLimitsPatchRequestBugAnalysis`. 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?(:'scans_per_month') self.scans_per_month = attributes[:'scans_per_month'] end if attributes.key?(:'max_upload_bytes') self.max_upload_bytes = attributes[:'max_upload_bytes'] end if attributes.key?(:'max_runtime_minutes') self.max_runtime_minutes = attributes[:'max_runtime_minutes'] end if attributes.key?(:'queue_type') self.queue_type = attributes[:'queue_type'] end if attributes.key?(:'log_retention_days') self.log_retention_days = attributes[:'log_retention_days'] end end |
Instance Attribute Details
#log_retention_days ⇒ Object
Returns the value of attribute log_retention_days.
26 27 28 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 26 def log_retention_days @log_retention_days end |
#max_runtime_minutes ⇒ Object
Returns the value of attribute max_runtime_minutes.
22 23 24 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 22 def max_runtime_minutes @max_runtime_minutes end |
#max_upload_bytes ⇒ Object
Returns the value of attribute max_upload_bytes.
20 21 22 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 20 def max_upload_bytes @max_upload_bytes end |
#queue_type ⇒ Object
Returns the value of attribute queue_type.
24 25 26 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 24 def queue_type @queue_type end |
#scans_per_month ⇒ Object
Returns the value of attribute scans_per_month.
18 19 20 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 18 def scans_per_month @scans_per_month end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
62 63 64 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 62 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
67 68 69 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 67 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 51 def self.attribute_map { :'scans_per_month' => :'scansPerMonth', :'max_upload_bytes' => :'maxUploadBytes', :'max_runtime_minutes' => :'maxRuntimeMinutes', :'queue_type' => :'queueType', :'log_retention_days' => :'logRetentionDays' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 243 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
83 84 85 86 87 88 89 90 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 83 def self.openapi_nullable Set.new([ :'scans_per_month', :'max_upload_bytes', :'max_runtime_minutes', :'log_retention_days' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
72 73 74 75 76 77 78 79 80 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 72 def self.openapi_types { :'scans_per_month' => :'Integer', :'max_upload_bytes' => :'Integer', :'max_runtime_minutes' => :'Integer', :'queue_type' => :'String', :'log_retention_days' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
218 219 220 221 222 223 224 225 226 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 218 def ==(o) return true if self.equal?(o) self.class == o.class && scans_per_month == o.scans_per_month && max_upload_bytes == o.max_upload_bytes && max_runtime_minutes == o.max_runtime_minutes && queue_type == o.queue_type && log_retention_days == o.log_retention_days end |
#eql?(o) ⇒ Boolean
230 231 232 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 230 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
236 237 238 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 236 def hash [scans_per_month, max_upload_bytes, max_runtime_minutes, queue_type, log_retention_days].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 131 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@scans_per_month.nil? && @scans_per_month < 0 invalid_properties.push('invalid value for "scans_per_month", must be greater than or equal to 0.') end if !@max_upload_bytes.nil? && @max_upload_bytes < 0 invalid_properties.push('invalid value for "max_upload_bytes", must be greater than or equal to 0.') end if !@max_runtime_minutes.nil? && @max_runtime_minutes < 0 invalid_properties.push('invalid value for "max_runtime_minutes", must be greater than or equal to 0.') end if !@log_retention_days.nil? && @log_retention_days < 0 invalid_properties.push('invalid value for "log_retention_days", must be greater than or equal to 0.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 265 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
155 156 157 158 159 160 161 162 163 164 |
# File 'lib/mudbase/models/admin_org_limits_patch_request_bug_analysis.rb', line 155 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@scans_per_month.nil? && @scans_per_month < 0 return false if !@max_upload_bytes.nil? && @max_upload_bytes < 0 return false if !@max_runtime_minutes.nil? && @max_runtime_minutes < 0 queue_type_validator = EnumAttributeValidator.new('String', ["none", "standard", "priority", "dedicated"]) return false unless queue_type_validator.valid?(@queue_type) return false if !@log_retention_days.nil? && @log_retention_days < 0 true end |