Class: OCI::CloudBridge::Models::OlvmAgent
- Inherits:
-
Object
- Object
- OCI::CloudBridge::Models::OlvmAgent
- Defined in:
- lib/oci/cloud_bridge/models/olvm_agent.rb
Overview
Type representing a fence agent.
Instance Attribute Summary collapse
-
#address ⇒ String
Fence agent address.
-
#comment ⇒ String
Free text containing comments about this object.
-
#description ⇒ String
Free text containing comments about this object.
-
#id ⇒ String
A unique identifier.
-
#is_concurrent ⇒ BOOLEAN
Specified whether the agent should be used concurrently or sequentially.
-
#is_encrypt_options ⇒ BOOLEAN
Specifies whether the options should be encrypted.
-
#name ⇒ String
A human-readable name in plain text.
-
#order ⇒ Integer
The order of this agent if used with other agents.
-
#port ⇒ Integer
Fence agent port.
-
#type ⇒ String
Fence agent type.
-
#username ⇒ String
Fence agent user name.
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 = {}) ⇒ OlvmAgent
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 = {}) ⇒ OlvmAgent
Initializes the object
110 111 112 113 114 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 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 110 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.address = attributes[:'address'] if attributes[:'address'] self.comment = attributes[:'comment'] if attributes[:'comment'] self.is_concurrent = attributes[:'isConcurrent'] unless attributes[:'isConcurrent'].nil? raise 'You cannot provide both :isConcurrent and :is_concurrent' if attributes.key?(:'isConcurrent') && attributes.key?(:'is_concurrent') self.is_concurrent = attributes[:'is_concurrent'] unless attributes[:'is_concurrent'].nil? self.description = attributes[:'description'] if attributes[:'description'] self. = attributes[:'isEncryptOptions'] unless attributes[:'isEncryptOptions'].nil? raise 'You cannot provide both :isEncryptOptions and :is_encrypt_options' if attributes.key?(:'isEncryptOptions') && attributes.key?(:'is_encrypt_options') self. = attributes[:'is_encrypt_options'] unless attributes[:'is_encrypt_options'].nil? self.id = attributes[:'id'] if attributes[:'id'] self.name = attributes[:'name'] if attributes[:'name'] self.order = attributes[:'order'] if attributes[:'order'] self.port = attributes[:'port'] if attributes[:'port'] self.type = attributes[:'type'] if attributes[:'type'] self.username = attributes[:'username'] if attributes[:'username'] end |
Instance Attribute Details
#address ⇒ String
Fence agent address
13 14 15 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 13 def address @address end |
#comment ⇒ String
Free text containing comments about this object.
17 18 19 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 17 def comment @comment end |
#description ⇒ String
Free text containing comments about this object.
25 26 27 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 25 def description @description end |
#id ⇒ String
A unique identifier.
33 34 35 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 33 def id @id end |
#is_concurrent ⇒ BOOLEAN
Specified whether the agent should be used concurrently or sequentially
21 22 23 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 21 def is_concurrent @is_concurrent end |
#is_encrypt_options ⇒ BOOLEAN
Specifies whether the options should be encrypted.
29 30 31 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 29 def @is_encrypt_options end |
#name ⇒ String
A human-readable name in plain text
37 38 39 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 37 def name @name end |
#order ⇒ Integer
The order of this agent if used with other agents.
41 42 43 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 41 def order @order end |
#port ⇒ Integer
Fence agent port.
45 46 47 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 45 def port @port end |
#type ⇒ String
Fence agent type.
49 50 51 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 49 def type @type end |
#username ⇒ String
Fence agent user name.
53 54 55 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 53 def username @username end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'address': :'address', 'comment': :'comment', 'is_concurrent': :'isConcurrent', 'description': :'description', 'is_encrypt_options': :'isEncryptOptions', 'id': :'id', 'name': :'name', 'order': :'order', 'port': :'port', 'type': :'type', 'username': :'username' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 75 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'address': :'String', 'comment': :'String', 'is_concurrent': :'BOOLEAN', 'description': :'String', 'is_encrypt_options': :'BOOLEAN', 'id': :'String', 'name': :'String', 'order': :'Integer', 'port': :'Integer', 'type': :'String', 'username': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 154 def ==(other) return true if equal?(other) self.class == other.class && address == other.address && comment == other.comment && is_concurrent == other.is_concurrent && description == other.description && == other. && id == other.id && name == other.name && order == other.order && port == other.port && type == other.type && username == other.username end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 194 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
174 175 176 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 174 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
183 184 185 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 183 def hash [address, comment, is_concurrent, description, , id, name, order, port, type, username].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 227 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
221 222 223 |
# File 'lib/oci/cloud_bridge/models/olvm_agent.rb', line 221 def to_s to_hash.to_s end |