Class: MicrosoftGraph::Models::IpNamedLocation

Inherits:
NamedLocation show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/ip_named_location.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NamedLocation

#created_date_time, #created_date_time=, #display_name, #display_name=, #modified_date_time, #modified_date_time=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new ipNamedLocation and sets the default values.



19
20
21
# File 'lib/models/ip_named_location.rb', line 19

def initialize()
    super
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 ip_named_location

Raises:

  • (StandardError)


27
28
29
30
# File 'lib/models/ip_named_location.rb', line 27

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



35
36
37
38
39
40
# File 'lib/models/ip_named_location.rb', line 35

def get_field_deserializers()
    return super.merge({
        "ipRanges" => lambda {|n| @ip_ranges = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::IpRange.create_from_discriminator_value(pn) }) },
        "isTrusted" => lambda {|n| @is_trusted = n.get_boolean_value() },
    })
end

#ip_rangesObject

Gets the ipRanges property value. List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC5969. Required.

Returns:

  • a ip_range



45
46
47
# File 'lib/models/ip_named_location.rb', line 45

def ip_ranges
    return @ip_ranges
end

#ip_ranges=(value) ⇒ Object

Sets the ipRanges property value. List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC5969. Required.

Parameters:

  • value

    Value to set for the ipRanges property.

Returns:

  • a void



53
54
55
# File 'lib/models/ip_named_location.rb', line 53

def ip_ranges=(value)
    @ip_ranges = value
end

#is_trustedObject

Gets the isTrusted property value. true if this location is explicitly trusted. Optional. Default value is false.

Returns:

  • a boolean



60
61
62
# File 'lib/models/ip_named_location.rb', line 60

def is_trusted
    return @is_trusted
end

#is_trusted=(value) ⇒ Object

Sets the isTrusted property value. true if this location is explicitly trusted. Optional. Default value is false.

Parameters:

  • value

    Value to set for the isTrusted property.

Returns:

  • a void



68
69
70
# File 'lib/models/ip_named_location.rb', line 68

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


76
77
78
79
80
81
# File 'lib/models/ip_named_location.rb', line 76

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("ipRanges", @ip_ranges)
    writer.write_boolean_value("isTrusted", @is_trusted)
end