Class: MicrosoftGraph::Models::NetworkConnection

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/network_connection.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new networkConnection and sets the default values.



110
111
112
# File 'lib/models/network_connection.rb', line 110

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a network_connection

Raises:

  • (StandardError)


118
119
120
121
# File 'lib/models/network_connection.rb', line 118

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return NetworkConnection.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



80
81
82
# File 'lib/models/network_connection.rb', line 80

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



88
89
90
# File 'lib/models/network_connection.rb', line 88

def additional_data=(value)
    @additional_data = value
end

#application_nameObject

Gets the applicationName property value. Name of the application managing the network connection (for example, Facebook or SMTP).

Returns:

  • a string



95
96
97
# File 'lib/models/network_connection.rb', line 95

def application_name
    return @application_name
end

#application_name=(value) ⇒ Object

Sets the applicationName property value. Name of the application managing the network connection (for example, Facebook or SMTP).

Parameters:

  • value

    Value to set for the applicationName property.

Returns:

  • a void



103
104
105
# File 'lib/models/network_connection.rb', line 103

def application_name=(value)
    @application_name = value
end

#destination_addressObject

Gets the destinationAddress property value. Destination IP address (of the network connection).

Returns:

  • a string



126
127
128
# File 'lib/models/network_connection.rb', line 126

def destination_address
    return @destination_address
end

#destination_address=(value) ⇒ Object

Sets the destinationAddress property value. Destination IP address (of the network connection).

Parameters:

  • value

    Value to set for the destinationAddress property.

Returns:

  • a void



134
135
136
# File 'lib/models/network_connection.rb', line 134

def destination_address=(value)
    @destination_address = value
end

#destination_domainObject

Gets the destinationDomain property value. Destination domain portion of the destination URL. (for example ‘www.contoso.com’).

Returns:

  • a string



141
142
143
# File 'lib/models/network_connection.rb', line 141

def destination_domain
    return @destination_domain
end

#destination_domain=(value) ⇒ Object

Sets the destinationDomain property value. Destination domain portion of the destination URL. (for example ‘www.contoso.com’).

Parameters:

  • value

    Value to set for the destinationDomain property.

Returns:

  • a void



149
150
151
# File 'lib/models/network_connection.rb', line 149

def destination_domain=(value)
    @destination_domain = value
end

#destination_locationObject

Gets the destinationLocation property value. Location (by IP address mapping) associated with the destination of a network connection.

Returns:

  • a string



156
157
158
# File 'lib/models/network_connection.rb', line 156

def destination_location
    return @destination_location
end

#destination_location=(value) ⇒ Object

Sets the destinationLocation property value. Location (by IP address mapping) associated with the destination of a network connection.

Parameters:

  • value

    Value to set for the destinationLocation property.

Returns:

  • a void



164
165
166
# File 'lib/models/network_connection.rb', line 164

def destination_location=(value)
    @destination_location = value
end

#destination_portObject

Gets the destinationPort property value. Destination port (of the network connection).

Returns:

  • a string



171
172
173
# File 'lib/models/network_connection.rb', line 171

def destination_port
    return @destination_port
end

#destination_port=(value) ⇒ Object

Sets the destinationPort property value. Destination port (of the network connection).

Parameters:

  • value

    Value to set for the destinationPort property.

Returns:

  • a void



179
180
181
# File 'lib/models/network_connection.rb', line 179

def destination_port=(value)
    @destination_port = value
end

#destination_urlObject

Gets the destinationUrl property value. Network connection URL/URI string - excluding parameters. (for example ‘www.contoso.com/products/default.html’)

Returns:

  • a string



186
187
188
# File 'lib/models/network_connection.rb', line 186

def destination_url
    return @destination_url
end

#destination_url=(value) ⇒ Object

Sets the destinationUrl property value. Network connection URL/URI string - excluding parameters. (for example ‘www.contoso.com/products/default.html’)

Parameters:

  • value

    Value to set for the destinationUrl property.

Returns:

  • a void



194
195
196
# File 'lib/models/network_connection.rb', line 194

def destination_url=(value)
    @destination_url = value
end

#directionObject

Gets the direction property value. Network connection direction. Possible values are: unknown, inbound, outbound.

Returns:

  • a connection_direction



201
202
203
# File 'lib/models/network_connection.rb', line 201

def direction
    return @direction
end

#direction=(value) ⇒ Object

Sets the direction property value. Network connection direction. Possible values are: unknown, inbound, outbound.

Parameters:

  • value

    Value to set for the direction property.

Returns:

  • a void



209
210
211
# File 'lib/models/network_connection.rb', line 209

def direction=(value)
    @direction = value
end

#domain_registered_date_timeObject

Gets the domainRegisteredDateTime property value. Date when the destination domain was registered. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

Returns:

  • a date_time



216
217
218
# File 'lib/models/network_connection.rb', line 216

def domain_registered_date_time
    return @domain_registered_date_time
end

#domain_registered_date_time=(value) ⇒ Object

Sets the domainRegisteredDateTime property value. Date when the destination domain was registered. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

Parameters:

  • value

    Value to set for the domainRegisteredDateTime property.

Returns:

  • a void



224
225
226
# File 'lib/models/network_connection.rb', line 224

def domain_registered_date_time=(value)
    @domain_registered_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/models/network_connection.rb', line 231

def get_field_deserializers()
    return {
        "applicationName" => lambda {|n| @application_name = n.get_string_value() },
        "destinationAddress" => lambda {|n| @destination_address = n.get_string_value() },
        "destinationDomain" => lambda {|n| @destination_domain = n.get_string_value() },
        "destinationLocation" => lambda {|n| @destination_location = n.get_string_value() },
        "destinationPort" => lambda {|n| @destination_port = n.get_string_value() },
        "destinationUrl" => lambda {|n| @destination_url = n.get_string_value() },
        "direction" => lambda {|n| @direction = n.get_enum_value(MicrosoftGraph::Models::ConnectionDirection) },
        "domainRegisteredDateTime" => lambda {|n| @domain_registered_date_time = n.get_date_time_value() },
        "localDnsName" => lambda {|n| @local_dns_name = n.get_string_value() },
        "natDestinationAddress" => lambda {|n| @nat_destination_address = n.get_string_value() },
        "natDestinationPort" => lambda {|n| @nat_destination_port = n.get_string_value() },
        "natSourceAddress" => lambda {|n| @nat_source_address = n.get_string_value() },
        "natSourcePort" => lambda {|n| @nat_source_port = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "protocol" => lambda {|n| @protocol = n.get_enum_value(MicrosoftGraph::Models::SecurityNetworkProtocol) },
        "riskScore" => lambda {|n| @risk_score = n.get_string_value() },
        "sourceAddress" => lambda {|n| @source_address = n.get_string_value() },
        "sourceLocation" => lambda {|n| @source_location = n.get_string_value() },
        "sourcePort" => lambda {|n| @source_port = n.get_string_value() },
        "status" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::ConnectionStatus) },
        "urlParameters" => lambda {|n| @url_parameters = n.get_string_value() },
    }
end

#local_dns_nameObject

Gets the localDnsName property value. The local DNS name resolution as it appears in the host’s local DNS cache (for example, in case the ‘hosts’ file was tampered with).

Returns:

  • a string



260
261
262
# File 'lib/models/network_connection.rb', line 260

def local_dns_name
    return @local_dns_name
end

#local_dns_name=(value) ⇒ Object

Sets the localDnsName property value. The local DNS name resolution as it appears in the host’s local DNS cache (for example, in case the ‘hosts’ file was tampered with).

Parameters:

  • value

    Value to set for the localDnsName property.

Returns:

  • a void



268
269
270
# File 'lib/models/network_connection.rb', line 268

def local_dns_name=(value)
    @local_dns_name = value
end

#nat_destination_addressObject

Gets the natDestinationAddress property value. Network Address Translation destination IP address.

Returns:

  • a string



275
276
277
# File 'lib/models/network_connection.rb', line 275

def nat_destination_address
    return @nat_destination_address
end

#nat_destination_address=(value) ⇒ Object

Sets the natDestinationAddress property value. Network Address Translation destination IP address.

Parameters:

  • value

    Value to set for the natDestinationAddress property.

Returns:

  • a void



283
284
285
# File 'lib/models/network_connection.rb', line 283

def nat_destination_address=(value)
    @nat_destination_address = value
end

#nat_destination_portObject

Gets the natDestinationPort property value. Network Address Translation destination port.

Returns:

  • a string



290
291
292
# File 'lib/models/network_connection.rb', line 290

def nat_destination_port
    return @nat_destination_port
end

#nat_destination_port=(value) ⇒ Object

Sets the natDestinationPort property value. Network Address Translation destination port.

Parameters:

  • value

    Value to set for the natDestinationPort property.

Returns:

  • a void



298
299
300
# File 'lib/models/network_connection.rb', line 298

def nat_destination_port=(value)
    @nat_destination_port = value
end

#nat_source_addressObject

Gets the natSourceAddress property value. Network Address Translation source IP address.

Returns:

  • a string



305
306
307
# File 'lib/models/network_connection.rb', line 305

def nat_source_address
    return @nat_source_address
end

#nat_source_address=(value) ⇒ Object

Sets the natSourceAddress property value. Network Address Translation source IP address.

Parameters:

  • value

    Value to set for the natSourceAddress property.

Returns:

  • a void



313
314
315
# File 'lib/models/network_connection.rb', line 313

def nat_source_address=(value)
    @nat_source_address = value
end

#nat_source_portObject

Gets the natSourcePort property value. Network Address Translation source port.

Returns:

  • a string



320
321
322
# File 'lib/models/network_connection.rb', line 320

def nat_source_port
    return @nat_source_port
end

#nat_source_port=(value) ⇒ Object

Sets the natSourcePort property value. Network Address Translation source port.

Parameters:

  • value

    Value to set for the natSourcePort property.

Returns:

  • a void



328
329
330
# File 'lib/models/network_connection.rb', line 328

def nat_source_port=(value)
    @nat_source_port = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



335
336
337
# File 'lib/models/network_connection.rb', line 335

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



343
344
345
# File 'lib/models/network_connection.rb', line 343

def odata_type=(value)
    @odata_type = value
end

#protocolObject

Gets the protocol property value. Network protocol. Possible values are: unknown, ip, icmp, igmp, ggp, ipv4, tcp, pup, udp, idp, ipv6, ipv6RoutingHeader, ipv6FragmentHeader, ipSecEncapsulatingSecurityPayload, ipSecAuthenticationHeader, icmpV6, ipv6NoNextHeader, ipv6DestinationOptions, nd, raw, ipx, spx, spxII.

Returns:

  • a security_network_protocol



350
351
352
# File 'lib/models/network_connection.rb', line 350

def protocol
    return @protocol
end

#protocol=(value) ⇒ Object

Sets the protocol property value. Network protocol. Possible values are: unknown, ip, icmp, igmp, ggp, ipv4, tcp, pup, udp, idp, ipv6, ipv6RoutingHeader, ipv6FragmentHeader, ipSecEncapsulatingSecurityPayload, ipSecAuthenticationHeader, icmpV6, ipv6NoNextHeader, ipv6DestinationOptions, nd, raw, ipx, spx, spxII.

Parameters:

  • value

    Value to set for the protocol property.

Returns:

  • a void



358
359
360
# File 'lib/models/network_connection.rb', line 358

def protocol=(value)
    @protocol = value
end

#risk_scoreObject

Gets the riskScore property value. Provider generated/calculated risk score of the network connection. Recommended value range of 0-1, which equates to a percentage.

Returns:

  • a string



365
366
367
# File 'lib/models/network_connection.rb', line 365

def risk_score
    return @risk_score
end

#risk_score=(value) ⇒ Object

Sets the riskScore property value. Provider generated/calculated risk score of the network connection. Recommended value range of 0-1, which equates to a percentage.

Parameters:

  • value

    Value to set for the riskScore property.

Returns:

  • a void



373
374
375
# File 'lib/models/network_connection.rb', line 373

def risk_score=(value)
    @risk_score = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/models/network_connection.rb', line 381

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("applicationName", @application_name)
    writer.write_string_value("destinationAddress", @destination_address)
    writer.write_string_value("destinationDomain", @destination_domain)
    writer.write_string_value("destinationLocation", @destination_location)
    writer.write_string_value("destinationPort", @destination_port)
    writer.write_string_value("destinationUrl", @destination_url)
    writer.write_enum_value("direction", @direction)
    writer.write_date_time_value("domainRegisteredDateTime", @domain_registered_date_time)
    writer.write_string_value("localDnsName", @local_dns_name)
    writer.write_string_value("natDestinationAddress", @nat_destination_address)
    writer.write_string_value("natDestinationPort", @nat_destination_port)
    writer.write_string_value("natSourceAddress", @nat_source_address)
    writer.write_string_value("natSourcePort", @nat_source_port)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_enum_value("protocol", @protocol)
    writer.write_string_value("riskScore", @risk_score)
    writer.write_string_value("sourceAddress", @source_address)
    writer.write_string_value("sourceLocation", @source_location)
    writer.write_string_value("sourcePort", @source_port)
    writer.write_enum_value("status", @status)
    writer.write_string_value("urlParameters", @url_parameters)
    writer.write_additional_data(@additional_data)
end

#source_addressObject

Gets the sourceAddress property value. Source (i.e. origin) IP address (of the network connection).

Returns:

  • a string



410
411
412
# File 'lib/models/network_connection.rb', line 410

def source_address
    return @source_address
end

#source_address=(value) ⇒ Object

Sets the sourceAddress property value. Source (i.e. origin) IP address (of the network connection).

Parameters:

  • value

    Value to set for the sourceAddress property.

Returns:

  • a void



418
419
420
# File 'lib/models/network_connection.rb', line 418

def source_address=(value)
    @source_address = value
end

#source_locationObject

Gets the sourceLocation property value. Location (by IP address mapping) associated with the source of a network connection.

Returns:

  • a string



425
426
427
# File 'lib/models/network_connection.rb', line 425

def source_location
    return @source_location
end

#source_location=(value) ⇒ Object

Sets the sourceLocation property value. Location (by IP address mapping) associated with the source of a network connection.

Parameters:

  • value

    Value to set for the sourceLocation property.

Returns:

  • a void



433
434
435
# File 'lib/models/network_connection.rb', line 433

def source_location=(value)
    @source_location = value
end

#source_portObject

Gets the sourcePort property value. Source (i.e. origin) IP port (of the network connection).

Returns:

  • a string



440
441
442
# File 'lib/models/network_connection.rb', line 440

def source_port
    return @source_port
end

#source_port=(value) ⇒ Object

Sets the sourcePort property value. Source (i.e. origin) IP port (of the network connection).

Parameters:

  • value

    Value to set for the sourcePort property.

Returns:

  • a void



448
449
450
# File 'lib/models/network_connection.rb', line 448

def source_port=(value)
    @source_port = value
end

#statusObject

Gets the status property value. Network connection status. Possible values are: unknown, attempted, succeeded, blocked, failed.

Returns:

  • a connection_status



455
456
457
# File 'lib/models/network_connection.rb', line 455

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. Network connection status. Possible values are: unknown, attempted, succeeded, blocked, failed.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



463
464
465
# File 'lib/models/network_connection.rb', line 463

def status=(value)
    @status = value
end

#url_parametersObject

Gets the urlParameters property value. Parameters (suffix) of the destination URL.

Returns:

  • a string



470
471
472
# File 'lib/models/network_connection.rb', line 470

def url_parameters
    return @url_parameters
end

#url_parameters=(value) ⇒ Object

Sets the urlParameters property value. Parameters (suffix) of the destination URL.

Parameters:

  • value

    Value to set for the urlParameters property.

Returns:

  • a void



478
479
480
# File 'lib/models/network_connection.rb', line 478

def url_parameters=(value)
    @url_parameters = value
end