Class: OCI::Bds::Models::CreateNodeDetails
- Inherits:
-
Object
- Object
- OCI::Bds::Models::CreateNodeDetails
- Defined in:
- lib/oci/bds/models/create_node_details.rb
Overview
The information about the new node.
Instance Attribute Summary collapse
-
#block_volume_size_in_gbs ⇒ Integer
[Required] The size of block volume in GB to be attached to a given node.
-
#node_type ⇒ String
[Required] The Big Data Service cluster node type.
-
#shape ⇒ String
[Required] Shape of the node.
- #shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
-
#subnet_id ⇒ String
[Required] The OCID of the subnet in which the node will be created.
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 = {}) ⇒ CreateNodeDetails
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 = {}) ⇒ CreateNodeDetails
Initializes the object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/bds/models/create_node_details.rb', line 69 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.node_type = attributes[:'nodeType'] if attributes[:'nodeType'] raise 'You cannot provide both :nodeType and :node_type' if attributes.key?(:'nodeType') && attributes.key?(:'node_type') self.node_type = attributes[:'node_type'] if attributes[:'node_type'] self.shape = attributes[:'shape'] if attributes[:'shape'] self.block_volume_size_in_gbs = attributes[:'blockVolumeSizeInGBs'] if attributes[:'blockVolumeSizeInGBs'] raise 'You cannot provide both :blockVolumeSizeInGBs and :block_volume_size_in_gbs' if attributes.key?(:'blockVolumeSizeInGBs') && attributes.key?(:'block_volume_size_in_gbs') self.block_volume_size_in_gbs = attributes[:'block_volume_size_in_gbs'] if attributes[:'block_volume_size_in_gbs'] self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId'] raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id') self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id'] self.shape_config = attributes[:'shapeConfig'] if attributes[:'shapeConfig'] raise 'You cannot provide both :shapeConfig and :shape_config' if attributes.key?(:'shapeConfig') && attributes.key?(:'shape_config') self.shape_config = attributes[:'shape_config'] if attributes[:'shape_config'] end |
Instance Attribute Details
#block_volume_size_in_gbs ⇒ Integer
[Required] The size of block volume in GB to be attached to a given node. All the details needed for attaching the block volume are managed by service itself.
23 24 25 |
# File 'lib/oci/bds/models/create_node_details.rb', line 23 def block_volume_size_in_gbs @block_volume_size_in_gbs end |
#node_type ⇒ String
[Required] The Big Data Service cluster node type.
13 14 15 |
# File 'lib/oci/bds/models/create_node_details.rb', line 13 def node_type @node_type end |
#shape ⇒ String
[Required] Shape of the node.
17 18 19 |
# File 'lib/oci/bds/models/create_node_details.rb', line 17 def shape @shape end |
#shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
30 31 32 |
# File 'lib/oci/bds/models/create_node_details.rb', line 30 def shape_config @shape_config end |
#subnet_id ⇒ String
[Required] The OCID of the subnet in which the node will be created.
27 28 29 |
# File 'lib/oci/bds/models/create_node_details.rb', line 27 def subnet_id @subnet_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/oci/bds/models/create_node_details.rb', line 33 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'node_type': :'nodeType', 'shape': :'shape', 'block_volume_size_in_gbs': :'blockVolumeSizeInGBs', 'subnet_id': :'subnetId', 'shape_config': :'shapeConfig' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/bds/models/create_node_details.rb', line 46 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'node_type': :'String', 'shape': :'String', 'block_volume_size_in_gbs': :'Integer', 'subnet_id': :'String', 'shape_config': :'OCI::Bds::Models::ShapeConfigDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
109 110 111 112 113 114 115 116 117 118 |
# File 'lib/oci/bds/models/create_node_details.rb', line 109 def ==(other) return true if equal?(other) self.class == other.class && node_type == other.node_type && shape == other.shape && block_volume_size_in_gbs == other.block_volume_size_in_gbs && subnet_id == other.subnet_id && shape_config == other.shape_config end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/oci/bds/models/create_node_details.rb', line 143 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
123 124 125 |
# File 'lib/oci/bds/models/create_node_details.rb', line 123 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
132 133 134 |
# File 'lib/oci/bds/models/create_node_details.rb', line 132 def hash [node_type, shape, block_volume_size_in_gbs, subnet_id, shape_config].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
176 177 178 179 180 181 182 183 184 185 |
# File 'lib/oci/bds/models/create_node_details.rb', line 176 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
170 171 172 |
# File 'lib/oci/bds/models/create_node_details.rb', line 170 def to_s to_hash.to_s end |