Class: MicrosoftGraph::Models::HostSecurityState

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new hostSecurityState and sets the default values.



61
62
63
# File 'lib/models/host_security_state.rb', line 61

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 host_security_state

Raises:

  • (StandardError)


69
70
71
72
# File 'lib/models/host_security_state.rb', line 69

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return HostSecurityState.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



46
47
48
# File 'lib/models/host_security_state.rb', line 46

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



54
55
56
# File 'lib/models/host_security_state.rb', line 54

def additional_data=(value)
    @additional_data = value
end

#fqdnObject

Gets the fqdn property value. Host FQDN (Fully Qualified Domain Name) (for example, machine.company.com).

Returns:

  • a string



77
78
79
# File 'lib/models/host_security_state.rb', line 77

def fqdn
    return @fqdn
end

#fqdn=(value) ⇒ Object

Sets the fqdn property value. Host FQDN (Fully Qualified Domain Name) (for example, machine.company.com).

Parameters:

  • value

    Value to set for the fqdn property.

Returns:

  • a void



85
86
87
# File 'lib/models/host_security_state.rb', line 85

def fqdn=(value)
    @fqdn = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/models/host_security_state.rb', line 92

def get_field_deserializers()
    return {
        "fqdn" => lambda {|n| @fqdn = n.get_string_value() },
        "isAzureAdJoined" => lambda {|n| @is_azure_ad_joined = n.get_boolean_value() },
        "isAzureAdRegistered" => lambda {|n| @is_azure_ad_registered = n.get_boolean_value() },
        "isHybridAzureDomainJoined" => lambda {|n| @is_hybrid_azure_domain_joined = n.get_boolean_value() },
        "netBiosName" => lambda {|n| @net_bios_name = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "os" => lambda {|n| @os = n.get_string_value() },
        "privateIpAddress" => lambda {|n| @private_ip_address = n.get_string_value() },
        "publicIpAddress" => lambda {|n| @public_ip_address = n.get_string_value() },
        "riskScore" => lambda {|n| @risk_score = n.get_string_value() },
    }
end

#is_azure_ad_joinedObject

Gets the isAzureAdJoined property value. The isAzureAdJoined property

Returns:

  • a boolean



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

def is_azure_ad_joined
    return @is_azure_ad_joined
end

#is_azure_ad_joined=(value) ⇒ Object

Sets the isAzureAdJoined property value. The isAzureAdJoined property

Parameters:

  • value

    Value to set for the isAzureAdJoined property.

Returns:

  • a void



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

def is_azure_ad_joined=(value)
    @is_azure_ad_joined = value
end

#is_azure_ad_registeredObject

Gets the isAzureAdRegistered property value. The isAzureAdRegistered property

Returns:

  • a boolean



125
126
127
# File 'lib/models/host_security_state.rb', line 125

def is_azure_ad_registered
    return @is_azure_ad_registered
end

#is_azure_ad_registered=(value) ⇒ Object

Sets the isAzureAdRegistered property value. The isAzureAdRegistered property

Parameters:

  • value

    Value to set for the isAzureAdRegistered property.

Returns:

  • a void



133
134
135
# File 'lib/models/host_security_state.rb', line 133

def is_azure_ad_registered=(value)
    @is_azure_ad_registered = value
end

#is_hybrid_azure_domain_joinedObject

Gets the isHybridAzureDomainJoined property value. True if the host is domain joined to an on-premises Active Directory domain.

Returns:

  • a boolean



140
141
142
# File 'lib/models/host_security_state.rb', line 140

def is_hybrid_azure_domain_joined
    return @is_hybrid_azure_domain_joined
end

#is_hybrid_azure_domain_joined=(value) ⇒ Object

Sets the isHybridAzureDomainJoined property value. True if the host is domain joined to an on-premises Active Directory domain.

Parameters:

  • value

    Value to set for the isHybridAzureDomainJoined property.

Returns:

  • a void



148
149
150
# File 'lib/models/host_security_state.rb', line 148

def is_hybrid_azure_domain_joined=(value)
    @is_hybrid_azure_domain_joined = value
end

#net_bios_nameObject

Gets the netBiosName property value. The local host name, without the DNS domain name.

Returns:

  • a string



155
156
157
# File 'lib/models/host_security_state.rb', line 155

def net_bios_name
    return @net_bios_name
end

#net_bios_name=(value) ⇒ Object

Sets the netBiosName property value. The local host name, without the DNS domain name.

Parameters:

  • value

    Value to set for the netBiosName property.

Returns:

  • a void



163
164
165
# File 'lib/models/host_security_state.rb', line 163

def net_bios_name=(value)
    @net_bios_name = value
end

#odata_typeObject

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

Returns:

  • a string



170
171
172
# File 'lib/models/host_security_state.rb', line 170

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



178
179
180
# File 'lib/models/host_security_state.rb', line 178

def odata_type=(value)
    @odata_type = value
end

#osObject

Gets the os property value. Host Operating System. (For example, Windows10, MacOS, RHEL, etc.).

Returns:

  • a string



185
186
187
# File 'lib/models/host_security_state.rb', line 185

def os
    return @os
end

#os=(value) ⇒ Object

Sets the os property value. Host Operating System. (For example, Windows10, MacOS, RHEL, etc.).

Parameters:

  • value

    Value to set for the os property.

Returns:

  • a void



193
194
195
# File 'lib/models/host_security_state.rb', line 193

def os=(value)
    @os = value
end

#private_ip_addressObject

Gets the privateIpAddress property value. Private (not routable) IPv4 or IPv6 address (see RFC 1918) at the time of the alert.

Returns:

  • a string



200
201
202
# File 'lib/models/host_security_state.rb', line 200

def private_ip_address
    return @private_ip_address
end

#private_ip_address=(value) ⇒ Object

Sets the privateIpAddress property value. Private (not routable) IPv4 or IPv6 address (see RFC 1918) at the time of the alert.

Parameters:

  • value

    Value to set for the privateIpAddress property.

Returns:

  • a void



208
209
210
# File 'lib/models/host_security_state.rb', line 208

def private_ip_address=(value)
    @private_ip_address = value
end

#public_ip_addressObject

Gets the publicIpAddress property value. Publicly routable IPv4 or IPv6 address (see RFC 1918) at time of the alert.

Returns:

  • a string



215
216
217
# File 'lib/models/host_security_state.rb', line 215

def public_ip_address
    return @public_ip_address
end

#public_ip_address=(value) ⇒ Object

Sets the publicIpAddress property value. Publicly routable IPv4 or IPv6 address (see RFC 1918) at time of the alert.

Parameters:

  • value

    Value to set for the publicIpAddress property.

Returns:

  • a void



223
224
225
# File 'lib/models/host_security_state.rb', line 223

def public_ip_address=(value)
    @public_ip_address = value
end

#risk_scoreObject

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

Returns:

  • a string



230
231
232
# File 'lib/models/host_security_state.rb', line 230

def risk_score
    return @risk_score
end

#risk_score=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the riskScore property.

Returns:

  • a void



238
239
240
# File 'lib/models/host_security_state.rb', line 238

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)


246
247
248
249
250
251
252
253
254
255
256
257
258
259
# File 'lib/models/host_security_state.rb', line 246

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("fqdn", @fqdn)
    writer.write_boolean_value("isAzureAdJoined", @is_azure_ad_joined)
    writer.write_boolean_value("isAzureAdRegistered", @is_azure_ad_registered)
    writer.write_boolean_value("isHybridAzureDomainJoined", @is_hybrid_azure_domain_joined)
    writer.write_string_value("netBiosName", @net_bios_name)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("os", @os)
    writer.write_string_value("privateIpAddress", @private_ip_address)
    writer.write_string_value("publicIpAddress", @public_ip_address)
    writer.write_string_value("riskScore", @risk_score)
    writer.write_additional_data(@additional_data)
end