Class: Falcon::AssetGetAssetInventory
- Inherits:
-
Object
- Object
- Falcon::AssetGetAssetInventory
- Defined in:
- lib/crimson-falcon/models/asset_get_asset_inventory.rb
Instance Attribute Summary collapse
-
#access_level ⇒ Object
Returns the value of attribute access_level.
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#created ⇒ Object
Returns the value of attribute created.
-
#drive ⇒ Object
Returns the value of attribute drive.
-
#drive_id ⇒ Object
Returns the value of attribute drive_id.
-
#integration_alias ⇒ Object
Returns the value of attribute integration_alias.
-
#integration_id ⇒ Object
Returns the value of attribute integration_id.
-
#integration_name ⇒ Object
Returns the value of attribute integration_name.
-
#last_accessed ⇒ Object
Returns the value of attribute last_accessed.
-
#last_modified ⇒ Object
Returns the value of attribute last_modified.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#password_protected ⇒ Object
Returns the value of attribute password_protected.
-
#permission_id ⇒ Object
Returns the value of attribute permission_id.
-
#resource_id ⇒ Object
Returns the value of attribute resource_id.
-
#resource_name ⇒ Object
Returns the value of attribute resource_name.
-
#resource_owner ⇒ Object
Returns the value of attribute resource_owner.
-
#resource_owner_department ⇒ Object
Returns the value of attribute resource_owner_department.
-
#resource_owner_enabled ⇒ Object
Returns the value of attribute resource_owner_enabled.
-
#resource_type ⇒ Object
Returns the value of attribute resource_type.
-
#shared_with ⇒ Object
Returns the value of attribute shared_with.
Class Method Summary collapse
-
.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.
-
#_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 = {}) ⇒ AssetGetAssetInventory
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 = {}) ⇒ AssetGetAssetInventory
Initializes the object
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 226 227 228 229 230 231 232 233 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 139 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::AssetGetAssetInventory` 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 `Falcon::AssetGetAssetInventory`. 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?(:'access_level') self.access_level = attributes[:'access_level'] end if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] end if attributes.key?(:'created') self.created = attributes[:'created'] end if attributes.key?(:'drive') self.drive = attributes[:'drive'] end if attributes.key?(:'drive_id') self.drive_id = attributes[:'drive_id'] end if attributes.key?(:'integration_alias') self.integration_alias = attributes[:'integration_alias'] end if attributes.key?(:'integration_id') self.integration_id = attributes[:'integration_id'] end if attributes.key?(:'integration_name') self.integration_name = attributes[:'integration_name'] end if attributes.key?(:'last_accessed') self.last_accessed = attributes[:'last_accessed'] end if attributes.key?(:'last_modified') self.last_modified = attributes[:'last_modified'] end if attributes.key?(:'parent') self.parent = attributes[:'parent'] end if attributes.key?(:'password_protected') self.password_protected = attributes[:'password_protected'] end if attributes.key?(:'permission_id') self. = attributes[:'permission_id'] end if attributes.key?(:'resource_id') self.resource_id = attributes[:'resource_id'] end if attributes.key?(:'resource_name') self.resource_name = attributes[:'resource_name'] end if attributes.key?(:'resource_owner') self.resource_owner = attributes[:'resource_owner'] end if attributes.key?(:'resource_owner_department') self.resource_owner_department = attributes[:'resource_owner_department'] end if attributes.key?(:'resource_owner_enabled') self.resource_owner_enabled = attributes[:'resource_owner_enabled'] end if attributes.key?(:'resource_type') self.resource_type = attributes[:'resource_type'] end if attributes.key?(:'shared_with') if (value = attributes[:'shared_with']).is_a?(Array) self.shared_with = value end end end |
Instance Attribute Details
#access_level ⇒ Object
Returns the value of attribute access_level.
34 35 36 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 34 def access_level @access_level end |
#account_id ⇒ Object
Returns the value of attribute account_id.
36 37 38 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 36 def account_id @account_id end |
#created ⇒ Object
Returns the value of attribute created.
38 39 40 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 38 def created @created end |
#drive ⇒ Object
Returns the value of attribute drive.
40 41 42 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 40 def drive @drive end |
#drive_id ⇒ Object
Returns the value of attribute drive_id.
42 43 44 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 42 def drive_id @drive_id end |
#integration_alias ⇒ Object
Returns the value of attribute integration_alias.
44 45 46 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 44 def integration_alias @integration_alias end |
#integration_id ⇒ Object
Returns the value of attribute integration_id.
46 47 48 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 46 def integration_id @integration_id end |
#integration_name ⇒ Object
Returns the value of attribute integration_name.
48 49 50 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 48 def integration_name @integration_name end |
#last_accessed ⇒ Object
Returns the value of attribute last_accessed.
50 51 52 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 50 def last_accessed @last_accessed end |
#last_modified ⇒ Object
Returns the value of attribute last_modified.
52 53 54 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 52 def last_modified @last_modified end |
#parent ⇒ Object
Returns the value of attribute parent.
54 55 56 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 54 def parent @parent end |
#password_protected ⇒ Object
Returns the value of attribute password_protected.
56 57 58 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 56 def password_protected @password_protected end |
#permission_id ⇒ Object
Returns the value of attribute permission_id.
58 59 60 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 58 def @permission_id end |
#resource_id ⇒ Object
Returns the value of attribute resource_id.
60 61 62 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 60 def resource_id @resource_id end |
#resource_name ⇒ Object
Returns the value of attribute resource_name.
62 63 64 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 62 def resource_name @resource_name end |
#resource_owner ⇒ Object
Returns the value of attribute resource_owner.
64 65 66 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 64 def resource_owner @resource_owner end |
#resource_owner_department ⇒ Object
Returns the value of attribute resource_owner_department.
66 67 68 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 66 def resource_owner_department @resource_owner_department end |
#resource_owner_enabled ⇒ Object
Returns the value of attribute resource_owner_enabled.
68 69 70 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 68 def resource_owner_enabled @resource_owner_enabled end |
#resource_type ⇒ Object
Returns the value of attribute resource_type.
70 71 72 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 70 def resource_type @resource_type end |
#shared_with ⇒ Object
Returns the value of attribute shared_with.
72 73 74 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 72 def shared_with @shared_with end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
101 102 103 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 101 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 75 def self.attribute_map { :'access_level' => :'access_level', :'account_id' => :'account_id', :'created' => :'created', :'drive' => :'drive', :'drive_id' => :'drive_id', :'integration_alias' => :'integration_alias', :'integration_id' => :'integration_id', :'integration_name' => :'integration_name', :'last_accessed' => :'last_accessed', :'last_modified' => :'last_modified', :'parent' => :'parent', :'password_protected' => :'password_protected', :'permission_id' => :'permission_id', :'resource_id' => :'resource_id', :'resource_name' => :'resource_name', :'resource_owner' => :'resource_owner', :'resource_owner_department' => :'resource_owner_department', :'resource_owner_enabled' => :'resource_owner_enabled', :'resource_type' => :'resource_type', :'shared_with' => :'shared_with' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
639 640 641 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 639 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
132 133 134 135 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 132 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 106 def self.openapi_types { :'access_level' => :'String', :'account_id' => :'String', :'created' => :'String', :'drive' => :'String', :'drive_id' => :'String', :'integration_alias' => :'String', :'integration_id' => :'String', :'integration_name' => :'String', :'last_accessed' => :'String', :'last_modified' => :'String', :'parent' => :'String', :'password_protected' => :'Boolean', :'permission_id' => :'String', :'resource_id' => :'String', :'resource_name' => :'String', :'resource_owner' => :'String', :'resource_owner_department' => :'String', :'resource_owner_enabled' => :'Boolean', :'resource_type' => :'String', :'shared_with' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 599 def ==(o) return true if self.equal?(o) self.class == o.class && access_level == o.access_level && account_id == o.account_id && created == o.created && drive == o.drive && drive_id == o.drive_id && integration_alias == o.integration_alias && integration_id == o.integration_id && integration_name == o.integration_name && last_accessed == o.last_accessed && last_modified == o.last_modified && parent == o.parent && password_protected == o.password_protected && == o. && resource_id == o.resource_id && resource_name == o.resource_name && resource_owner == o.resource_owner && resource_owner_department == o.resource_owner_department && resource_owner_enabled == o.resource_owner_enabled && resource_type == o.resource_type && shared_with == o.shared_with end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 670 def _deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = Falcon.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
741 742 743 744 745 746 747 748 749 750 751 752 753 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 741 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
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 646 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[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 end self end |
#eql?(o) ⇒ Boolean
626 627 628 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 626 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
632 633 634 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 632 def hash [access_level, account_id, created, drive, drive_id, integration_alias, integration_id, integration_name, last_accessed, last_modified, parent, password_protected, , resource_id, resource_name, resource_owner, resource_owner_department, resource_owner_enabled, resource_type, shared_with].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 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 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 237 def list_invalid_properties invalid_properties = Array.new if !@access_level.nil? && @access_level.to_s.length < 1 invalid_properties.push('invalid value for "access_level", the character length must be great than or equal to 1.') end if @account_id.nil? invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') end if @created.nil? invalid_properties.push('invalid value for "created", created cannot be nil.') end if @created.to_s.length < 1 invalid_properties.push('invalid value for "created", the character length must be great than or equal to 1.') end if !@drive.nil? && @drive.to_s.length < 1 invalid_properties.push('invalid value for "drive", the character length must be great than or equal to 1.') end if !@drive_id.nil? && @drive_id.to_s.length < 1 invalid_properties.push('invalid value for "drive_id", the character length must be great than or equal to 1.') end if @integration_alias.nil? invalid_properties.push('invalid value for "integration_alias", integration_alias cannot be nil.') end if @integration_alias.to_s.length < 1 invalid_properties.push('invalid value for "integration_alias", the character length must be great than or equal to 1.') end if @integration_id.nil? invalid_properties.push('invalid value for "integration_id", integration_id cannot be nil.') end if @integration_id.to_s.length < 1 invalid_properties.push('invalid value for "integration_id", the character length must be great than or equal to 1.') end if @integration_name.nil? invalid_properties.push('invalid value for "integration_name", integration_name cannot be nil.') end if @integration_name.to_s.length < 1 invalid_properties.push('invalid value for "integration_name", the character length must be great than or equal to 1.') end if @last_accessed.nil? invalid_properties.push('invalid value for "last_accessed", last_accessed cannot be nil.') end if @last_accessed.to_s.length < 1 invalid_properties.push('invalid value for "last_accessed", the character length must be great than or equal to 1.') end if @last_modified.nil? invalid_properties.push('invalid value for "last_modified", last_modified cannot be nil.') end if @last_modified.to_s.length < 1 invalid_properties.push('invalid value for "last_modified", the character length must be great than or equal to 1.') end if !@parent.nil? && @parent.to_s.length < 1 invalid_properties.push('invalid value for "parent", the character length must be great than or equal to 1.') end if !@permission_id.nil? && @permission_id.to_s.length < 1 invalid_properties.push('invalid value for "permission_id", the character length must be great than or equal to 1.') end if @resource_id.nil? invalid_properties.push('invalid value for "resource_id", resource_id cannot be nil.') end if @resource_id.to_s.length < 1 invalid_properties.push('invalid value for "resource_id", the character length must be great than or equal to 1.') end if @resource_name.nil? invalid_properties.push('invalid value for "resource_name", resource_name cannot be nil.') end if @resource_name.to_s.length < 1 invalid_properties.push('invalid value for "resource_name", the character length must be great than or equal to 1.') end if @resource_owner.nil? invalid_properties.push('invalid value for "resource_owner", resource_owner cannot be nil.') end if @resource_owner.to_s.length < 1 invalid_properties.push('invalid value for "resource_owner", the character length must be great than or equal to 1.') end if @resource_owner_department.nil? invalid_properties.push('invalid value for "resource_owner_department", resource_owner_department cannot be nil.') end if @resource_owner_department.to_s.length < 1 invalid_properties.push('invalid value for "resource_owner_department", the character length must be great than or equal to 1.') end if @resource_owner_enabled.nil? invalid_properties.push('invalid value for "resource_owner_enabled", resource_owner_enabled cannot be nil.') end if @resource_type.nil? invalid_properties.push('invalid value for "resource_type", resource_type cannot be nil.') end if @resource_type.to_s.length < 1 invalid_properties.push('invalid value for "resource_type", the character length must be great than or equal to 1.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
717 718 719 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 717 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
723 724 725 726 727 728 729 730 731 732 733 734 735 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 723 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
711 712 713 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 711 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/crimson-falcon/models/asset_get_asset_inventory.rb', line 360 def valid? return false if !@access_level.nil? && @access_level.to_s.length < 1 return false if @account_id.nil? return false if @created.nil? return false if @created.to_s.length < 1 return false if !@drive.nil? && @drive.to_s.length < 1 return false if !@drive_id.nil? && @drive_id.to_s.length < 1 return false if @integration_alias.nil? return false if @integration_alias.to_s.length < 1 return false if @integration_id.nil? return false if @integration_id.to_s.length < 1 return false if @integration_name.nil? return false if @integration_name.to_s.length < 1 return false if @last_accessed.nil? return false if @last_accessed.to_s.length < 1 return false if @last_modified.nil? return false if @last_modified.to_s.length < 1 return false if !@parent.nil? && @parent.to_s.length < 1 return false if !@permission_id.nil? && @permission_id.to_s.length < 1 return false if @resource_id.nil? return false if @resource_id.to_s.length < 1 return false if @resource_name.nil? return false if @resource_name.to_s.length < 1 return false if @resource_owner.nil? return false if @resource_owner.to_s.length < 1 return false if @resource_owner_department.nil? return false if @resource_owner_department.to_s.length < 1 return false if @resource_owner_enabled.nil? return false if @resource_type.nil? return false if @resource_type.to_s.length < 1 true end |