Class: SwaggerClient::DiscoveryConnection
- Inherits:
-
Object
- Object
- SwaggerClient::DiscoveryConnection
- Defined in:
- lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
The AWS credential access key identifier (only used for the AWS connection).
-
#address ⇒ Object
The address used to connect to the discovery connection source.
-
#arn ⇒ Object
The AWS credential ARN (only used for the AWS connection).
-
#aws_session_name ⇒ Object
The AWS credential session name (only used for the AWS connection).
-
#connection_type ⇒ Object
The type of the discovery connection.
-
#event_source ⇒ Object
The event source type to use.
-
#exchange_server_hostname ⇒ Object
The hostname of the exchange server to connect to.
-
#exchange_user ⇒ Object
The username used to connect to the exchange server.
-
#folder_path ⇒ Object
The folder path to pull logs from.
-
#id ⇒ Object
The identifier of the discovery connection.
-
#ldap_server ⇒ Object
The LDAP server to connect to.
-
#links ⇒ Object
Hypermedia links to corresponding or related resources.
-
#name ⇒ Object
The discovery connection name.
-
#port ⇒ Object
The port used to connect to the discovery connection source.
-
#protocol ⇒ Object
The protocol used to connect to the discovery connection source.
-
#region ⇒ Object
The AWS region (only used for the AWS connection).
-
#scan_engine_is_inside_aws ⇒ Object
Flag denoting whether the scan engine is in AWS, this is used for AWS discovery connections for scanning purposes (only used for the AWS connection).
-
#secret_access_key ⇒ Object
The AWS credential secret access key (only used for the AWS connection).
-
#status ⇒ Object
The status of the discovery connection.
-
#username ⇒ Object
The username used to authenticate to the discovery connection source.
-
#win_rm_server ⇒ Object
The WinRM server to connect to.
Class Method Summary collapse
-
.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 = {}) ⇒ DiscoveryConnection
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 = {}) ⇒ DiscoveryConnection
Initializes the object
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 234 235 236 237 238 239 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 141 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::DiscoveryConnection` 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 `SwaggerClient::DiscoveryConnection`. 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_key_id') self.access_key_id = attributes[:'access_key_id'] end if attributes.key?(:'address') self.address = attributes[:'address'] end if attributes.key?(:'arn') self.arn = attributes[:'arn'] end if attributes.key?(:'aws_session_name') self.aws_session_name = attributes[:'aws_session_name'] end if attributes.key?(:'connection_type') self.connection_type = attributes[:'connection_type'] end if attributes.key?(:'event_source') self.event_source = attributes[:'event_source'] end if attributes.key?(:'exchange_server_hostname') self.exchange_server_hostname = attributes[:'exchange_server_hostname'] end if attributes.key?(:'exchange_user') self.exchange_user = attributes[:'exchange_user'] end if attributes.key?(:'folder_path') self.folder_path = attributes[:'folder_path'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'ldap_server') self.ldap_server = attributes[:'ldap_server'] end if attributes.key?(:'links') if (value = attributes[:'links']).is_a?(Array) self.links = value end end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'port') self.port = attributes[:'port'] end if attributes.key?(:'protocol') self.protocol = attributes[:'protocol'] end if attributes.key?(:'region') self.region = attributes[:'region'] end if attributes.key?(:'scan_engine_is_inside_aws') self.scan_engine_is_inside_aws = attributes[:'scan_engine_is_inside_aws'] end if attributes.key?(:'secret_access_key') self.secret_access_key = attributes[:'secret_access_key'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'username') self.username = attributes[:'username'] end if attributes.key?(:'win_rm_server') self.win_rm_server = attributes[:'win_rm_server'] end end |
Instance Attribute Details
#access_key_id ⇒ Object
The AWS credential access key identifier (only used for the AWS connection).
17 18 19 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 17 def access_key_id @access_key_id end |
#address ⇒ Object
The address used to connect to the discovery connection source.
20 21 22 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 20 def address @address end |
#arn ⇒ Object
The AWS credential ARN (only used for the AWS connection).
23 24 25 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 23 def arn @arn end |
#aws_session_name ⇒ Object
The AWS credential session name (only used for the AWS connection).
26 27 28 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 26 def aws_session_name @aws_session_name end |
#connection_type ⇒ Object
The type of the discovery connection.
29 30 31 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 29 def connection_type @connection_type end |
#event_source ⇒ Object
The event source type to use.
32 33 34 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 32 def event_source @event_source end |
#exchange_server_hostname ⇒ Object
The hostname of the exchange server to connect to.
35 36 37 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 35 def exchange_server_hostname @exchange_server_hostname end |
#exchange_user ⇒ Object
The username used to connect to the exchange server.
38 39 40 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 38 def exchange_user @exchange_user end |
#folder_path ⇒ Object
The folder path to pull logs from.
41 42 43 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 41 def folder_path @folder_path end |
#id ⇒ Object
The identifier of the discovery connection.
44 45 46 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 44 def id @id end |
#ldap_server ⇒ Object
The LDAP server to connect to.
47 48 49 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 47 def ldap_server @ldap_server end |
#links ⇒ Object
Hypermedia links to corresponding or related resources.
50 51 52 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 50 def links @links end |
#name ⇒ Object
The discovery connection name.
53 54 55 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 53 def name @name end |
#port ⇒ Object
The port used to connect to the discovery connection source.
56 57 58 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 56 def port @port end |
#protocol ⇒ Object
The protocol used to connect to the discovery connection source.
59 60 61 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 59 def protocol @protocol end |
#region ⇒ Object
The AWS region (only used for the AWS connection).
62 63 64 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 62 def region @region end |
#scan_engine_is_inside_aws ⇒ Object
Flag denoting whether the scan engine is in AWS, this is used for AWS discovery connections for scanning purposes (only used for the AWS connection).
65 66 67 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 65 def scan_engine_is_inside_aws @scan_engine_is_inside_aws end |
#secret_access_key ⇒ Object
The AWS credential secret access key (only used for the AWS connection).
68 69 70 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 68 def secret_access_key @secret_access_key end |
#status ⇒ Object
The status of the discovery connection.
71 72 73 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 71 def status @status end |
#username ⇒ Object
The username used to authenticate to the discovery connection source.
74 75 76 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 74 def username @username end |
#win_rm_server ⇒ Object
The WinRM server to connect to.
77 78 79 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 77 def win_rm_server @win_rm_server end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 80 def self.attribute_map { :'access_key_id' => :'accessKeyId', :'address' => :'address', :'arn' => :'arn', :'aws_session_name' => :'awsSessionName', :'connection_type' => :'connectionType', :'event_source' => :'eventSource', :'exchange_server_hostname' => :'exchangeServerHostname', :'exchange_user' => :'exchangeUser', :'folder_path' => :'folderPath', :'id' => :'id', :'ldap_server' => :'ldapServer', :'links' => :'links', :'name' => :'name', :'port' => :'port', :'protocol' => :'protocol', :'region' => :'region', :'scan_engine_is_inside_aws' => :'scanEngineIsInsideAWS', :'secret_access_key' => :'secretAccessKey', :'status' => :'status', :'username' => :'username', :'win_rm_server' => :'winRMServer' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
297 298 299 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 297 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
134 135 136 137 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 134 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 107 def self.openapi_types { :'access_key_id' => :'Object', :'address' => :'Object', :'arn' => :'Object', :'aws_session_name' => :'Object', :'connection_type' => :'Object', :'event_source' => :'Object', :'exchange_server_hostname' => :'Object', :'exchange_user' => :'Object', :'folder_path' => :'Object', :'id' => :'Object', :'ldap_server' => :'Object', :'links' => :'Object', :'name' => :'Object', :'port' => :'Object', :'protocol' => :'Object', :'region' => :'Object', :'scan_engine_is_inside_aws' => :'Object', :'secret_access_key' => :'Object', :'status' => :'Object', :'username' => :'Object', :'win_rm_server' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 256 def ==(o) return true if self.equal?(o) self.class == o.class && access_key_id == o.access_key_id && address == o.address && arn == o.arn && aws_session_name == o.aws_session_name && connection_type == o.connection_type && event_source == o.event_source && exchange_server_hostname == o.exchange_server_hostname && exchange_user == o.exchange_user && folder_path == o.folder_path && id == o.id && ldap_server == o.ldap_server && links == o.links && name == o.name && port == o.port && protocol == o.protocol && region == o.region && scan_engine_is_inside_aws == o.scan_engine_is_inside_aws && secret_access_key == o.secret_access_key && status == o.status && username == o.username && win_rm_server == o.win_rm_server end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 357 358 359 360 361 362 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 327 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.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 SwaggerClient.const_get(type).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
396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 396 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
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 304 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if 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]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
284 285 286 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 284 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
290 291 292 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 290 def hash [access_key_id, address, arn, aws_session_name, connection_type, event_source, exchange_server_hostname, exchange_user, folder_path, id, ldap_server, links, name, port, protocol, region, scan_engine_is_inside_aws, secret_access_key, status, username, win_rm_server].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
243 244 245 246 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 243 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
372 373 374 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 372 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 378 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
366 367 368 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 366 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
250 251 252 |
# File 'lib/service/api/rapid7_insightvm_client/lib/swagger_client/models/discovery_connection.rb', line 250 def valid? true end |