Class: MicrosoftGraph::Models::SecurityIpAddress

Inherits:
SecurityHost show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/security_ip_address.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SecurityHost

#components, #components=, #cookies, #cookies=, #first_seen_date_time, #first_seen_date_time=, #last_seen_date_time, #last_seen_date_time=, #passive_dns, #passive_dns=, #passive_dns_reverse, #passive_dns_reverse=, #reputation, #reputation=, #trackers, #trackers=

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new securityIpAddress and sets the default values.



40
41
42
43
# File 'lib/models/security_ip_address.rb', line 40

def initialize()
    super
    @odata_type = "#microsoft.graph.security.ipAddress"
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 security_ip_address

Raises:

  • (StandardError)


64
65
66
67
# File 'lib/models/security_ip_address.rb', line 64

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

Instance Method Details

#autonomous_systemObject

Gets the autonomousSystem property value. The details about the autonomous system to which this IP address belongs.

Returns:

  • a security_autonomous_system



25
26
27
# File 'lib/models/security_ip_address.rb', line 25

def autonomous_system
    return @autonomous_system
end

#autonomous_system=(value) ⇒ Object

Sets the autonomousSystem property value. The details about the autonomous system to which this IP address belongs.

Parameters:

  • value

    Value to set for the autonomousSystem property.

Returns:

  • a void



33
34
35
# File 'lib/models/security_ip_address.rb', line 33

def autonomous_system=(value)
    @autonomous_system = value
end

#country_or_regionObject

Gets the countryOrRegion property value. The country or region for this IP address.

Returns:

  • a string



48
49
50
# File 'lib/models/security_ip_address.rb', line 48

def country_or_region
    return @country_or_region
end

#country_or_region=(value) ⇒ Object

Sets the countryOrRegion property value. The country or region for this IP address.

Parameters:

  • value

    Value to set for the countryOrRegion property.

Returns:

  • a void



56
57
58
# File 'lib/models/security_ip_address.rb', line 56

def country_or_region=(value)
    @country_or_region = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



72
73
74
75
76
77
78
79
# File 'lib/models/security_ip_address.rb', line 72

def get_field_deserializers()
    return super.merge({
        "autonomousSystem" => lambda {|n| @autonomous_system = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SecurityAutonomousSystem.create_from_discriminator_value(pn) }) },
        "countryOrRegion" => lambda {|n| @country_or_region = n.get_string_value() },
        "hostingProvider" => lambda {|n| @hosting_provider = n.get_string_value() },
        "netblock" => lambda {|n| @netblock = n.get_string_value() },
    })
end

#hosting_providerObject

Gets the hostingProvider property value. The hosting company listed for this host.

Returns:

  • a string



84
85
86
# File 'lib/models/security_ip_address.rb', line 84

def hosting_provider
    return @hosting_provider
end

#hosting_provider=(value) ⇒ Object

Sets the hostingProvider property value. The hosting company listed for this host.

Parameters:

  • value

    Value to set for the hostingProvider property.

Returns:

  • a void



92
93
94
# File 'lib/models/security_ip_address.rb', line 92

def hosting_provider=(value)
    @hosting_provider = value
end

#netblockObject

Gets the netblock property value. The block of IP addresses this IP address belongs to.

Returns:

  • a string



99
100
101
# File 'lib/models/security_ip_address.rb', line 99

def netblock
    return @netblock
end

#netblock=(value) ⇒ Object

Sets the netblock property value. The block of IP addresses this IP address belongs to.

Parameters:

  • value

    Value to set for the netblock property.

Returns:

  • a void



107
108
109
# File 'lib/models/security_ip_address.rb', line 107

def netblock=(value)
    @netblock = 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)


115
116
117
118
119
120
121
122
# File 'lib/models/security_ip_address.rb', line 115

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("autonomousSystem", @autonomous_system)
    writer.write_string_value("countryOrRegion", @country_or_region)
    writer.write_string_value("hostingProvider", @hosting_provider)
    writer.write_string_value("netblock", @netblock)
end