Class: OCI::ComputeCloudAtCustomer::Models::CccInfrastructureInventory
- Inherits:
- 
      Object
      
        - Object
- OCI::ComputeCloudAtCustomer::Models::CccInfrastructureInventory
 
- Defined in:
- lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb
Overview
Inventory for a Compute Cloud@Customer infrastructure. This information cannot be updated and is from the infrastructure. The information will only be available after the connectionState is transitioned to CONNECTED.
Instance Attribute Summary collapse
- 
  
    
      #capacity_storage_tray_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The number of storage trays in the Compute Cloud@Customer infrastructure rack that are designated for capacity storage. 
- 
  
    
      #compute_node_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The number of compute nodes that are available and usable on the Compute Cloud@Customer infrastructure rack. 
- 
  
    
      #management_node_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The number of management nodes that are available and in active use on the Compute Cloud@Customer infrastructure rack. 
- 
  
    
      #performance_storage_tray_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The number of storage trays in the Compute Cloud@Customer infrastructure rack that are designated for performance storage. 
- 
  
    
      #serial_number  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The serial number of the Compute Cloud@Customer infrastructure rack. 
Class Method Summary collapse
- 
  
    
      .attribute_map  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute mapping from ruby-style variable name to JSON key. 
- 
  
    
      .swagger_types  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute type mapping. 
Instance Method Summary collapse
- 
  
    
      #==(other)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Checks equality by comparing each attribute. 
- 
  
    
      #build_from_hash(attributes)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Builds the object from hash. 
- #eql?(other) ⇒ Boolean
- 
  
    
      #hash  ⇒ Fixnum 
    
    
  
  
  
  
  
  
  
  
  
    Calculates hash code according to all attributes. 
- 
  
    
      #initialize(attributes = {})  ⇒ CccInfrastructureInventory 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initializes the object. 
- 
  
    
      #to_hash  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    Returns the object in the form of hash. 
- 
  
    
      #to_s  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Returns the string representation of the object. 
Constructor Details
#initialize(attributes = {}) ⇒ CccInfrastructureInventory
Initializes the object
| 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 77 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.serial_number = attributes[:'serialNumber'] if attributes[:'serialNumber'] raise 'You cannot provide both :serialNumber and :serial_number' if attributes.key?(:'serialNumber') && attributes.key?(:'serial_number') self.serial_number = attributes[:'serial_number'] if attributes[:'serial_number'] self.management_node_count = attributes[:'managementNodeCount'] if attributes[:'managementNodeCount'] raise 'You cannot provide both :managementNodeCount and :management_node_count' if attributes.key?(:'managementNodeCount') && attributes.key?(:'management_node_count') self.management_node_count = attributes[:'management_node_count'] if attributes[:'management_node_count'] self.compute_node_count = attributes[:'computeNodeCount'] if attributes[:'computeNodeCount'] raise 'You cannot provide both :computeNodeCount and :compute_node_count' if attributes.key?(:'computeNodeCount') && attributes.key?(:'compute_node_count') self.compute_node_count = attributes[:'compute_node_count'] if attributes[:'compute_node_count'] self.capacity_storage_tray_count = attributes[:'capacityStorageTrayCount'] if attributes[:'capacityStorageTrayCount'] raise 'You cannot provide both :capacityStorageTrayCount and :capacity_storage_tray_count' if attributes.key?(:'capacityStorageTrayCount') && attributes.key?(:'capacity_storage_tray_count') self.capacity_storage_tray_count = attributes[:'capacity_storage_tray_count'] if attributes[:'capacity_storage_tray_count'] self.performance_storage_tray_count = attributes[:'performanceStorageTrayCount'] if attributes[:'performanceStorageTrayCount'] raise 'You cannot provide both :performanceStorageTrayCount and :performance_storage_tray_count' if attributes.key?(:'performanceStorageTrayCount') && attributes.key?(:'performance_storage_tray_count') self.performance_storage_tray_count = attributes[:'performance_storage_tray_count'] if attributes[:'performance_storage_tray_count'] end | 
Instance Attribute Details
#capacity_storage_tray_count ⇒ Integer
The number of storage trays in the Compute Cloud@Customer infrastructure rack that are designated for capacity storage.
| 34 35 36 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 34 def capacity_storage_tray_count @capacity_storage_tray_count end | 
#compute_node_count ⇒ Integer
The number of compute nodes that are available and usable on the Compute Cloud@Customer infrastructure rack. There is no distinction of compute node type in this information.
| 30 31 32 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 30 def compute_node_count @compute_node_count end | 
#management_node_count ⇒ Integer
The number of management nodes that are available and in active use on the Compute Cloud@Customer infrastructure rack.
| 23 24 25 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 23 def management_node_count @management_node_count end | 
#performance_storage_tray_count ⇒ Integer
The number of storage trays in the Compute Cloud@Customer infrastructure rack that are designated for performance storage.
| 38 39 40 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 38 def performance_storage_tray_count @performance_storage_tray_count end | 
#serial_number ⇒ String
The serial number of the Compute Cloud@Customer infrastructure rack.
| 17 18 19 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 17 def serial_number @serial_number end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 41 42 43 44 45 46 47 48 49 50 51 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'serial_number': :'serialNumber', 'management_node_count': :'managementNodeCount', 'compute_node_count': :'computeNodeCount', 'capacity_storage_tray_count': :'capacityStorageTrayCount', 'performance_storage_tray_count': :'performanceStorageTrayCount' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 54 55 56 57 58 59 60 61 62 63 64 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 54 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'serial_number': :'String', 'management_node_count': :'Integer', 'compute_node_count': :'Integer', 'capacity_storage_tray_count': :'Integer', 'performance_storage_tray_count': :'Integer' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 121 122 123 124 125 126 127 128 129 130 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 121 def ==(other) return true if equal?(other) self.class == other.class && serial_number == other.serial_number && management_node_count == other.management_node_count && compute_node_count == other.compute_node_count && capacity_storage_tray_count == other.capacity_storage_tray_count && performance_storage_tray_count == other.performance_storage_tray_count end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 155 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(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?(other) ⇒ Boolean
| 135 136 137 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 135 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 144 145 146 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 144 def hash [serial_number, management_node_count, compute_node_count, capacity_storage_tray_count, performance_storage_tray_count].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 188 189 190 191 192 193 194 195 196 197 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 188 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end | 
#to_s ⇒ String
Returns the string representation of the object
| 182 183 184 | # File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure_inventory.rb', line 182 def to_s to_hash.to_s end |