Class: MicrosoftGraph::Models::CountryNamedLocation

Inherits:
NamedLocation show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/country_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 countryNamedLocation and sets the default values.



22
23
24
# File 'lib/models/country_named_location.rb', line 22

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 country_named_location

Raises:

  • (StandardError)


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

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

Instance Method Details

#countries_and_regionsObject

Gets the countriesAndRegions property value. List of countries and/or regions in two-letter format specified by ISO 3166-2. Required.

Returns:

  • a string



29
30
31
# File 'lib/models/country_named_location.rb', line 29

def countries_and_regions
    return @countries_and_regions
end

#countries_and_regions=(value) ⇒ Object

Sets the countriesAndRegions property value. List of countries and/or regions in two-letter format specified by ISO 3166-2. Required.

Parameters:

  • value

    Value to set for the countriesAndRegions property.

Returns:

  • a void



37
38
39
# File 'lib/models/country_named_location.rb', line 37

def countries_and_regions=(value)
    @countries_and_regions = value
end

#country_lookup_methodObject

Gets the countryLookupMethod property value. Determines what method is used to decide which country the user is located in. Possible values are clientIpAddress(default) and authenticatorAppGps. Note: authenticatorAppGps is not yet supported in the Microsoft Cloud for US Government.

Returns:

  • a country_lookup_method_type



44
45
46
# File 'lib/models/country_named_location.rb', line 44

def country_lookup_method
    return @country_lookup_method
end

#country_lookup_method=(value) ⇒ Object

Sets the countryLookupMethod property value. Determines what method is used to decide which country the user is located in. Possible values are clientIpAddress(default) and authenticatorAppGps. Note: authenticatorAppGps is not yet supported in the Microsoft Cloud for US Government.

Parameters:

  • value

    Value to set for the countryLookupMethod property.

Returns:

  • a void



52
53
54
# File 'lib/models/country_named_location.rb', line 52

def country_lookup_method=(value)
    @country_lookup_method = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



68
69
70
71
72
73
74
# File 'lib/models/country_named_location.rb', line 68

def get_field_deserializers()
    return super.merge({
        "countriesAndRegions" => lambda {|n| @countries_and_regions = n.get_collection_of_primitive_values(String) },
        "countryLookupMethod" => lambda {|n| @country_lookup_method = n.get_enum_value(MicrosoftGraph::Models::CountryLookupMethodType) },
        "includeUnknownCountriesAndRegions" => lambda {|n| @include_unknown_countries_and_regions = n.get_boolean_value() },
    })
end

#include_unknown_countries_and_regionsObject

Gets the includeUnknownCountriesAndRegions property value. true if IP addresses that don’t map to a country or region should be included in the named location. Optional. Default value is false.

Returns:

  • a boolean



79
80
81
# File 'lib/models/country_named_location.rb', line 79

def include_unknown_countries_and_regions
    return @include_unknown_countries_and_regions
end

#include_unknown_countries_and_regions=(value) ⇒ Object

Sets the includeUnknownCountriesAndRegions property value. true if IP addresses that don’t map to a country or region should be included in the named location. Optional. Default value is false.

Parameters:

  • value

    Value to set for the includeUnknownCountriesAndRegions property.

Returns:

  • a void



87
88
89
# File 'lib/models/country_named_location.rb', line 87

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


95
96
97
98
99
100
101
# File 'lib/models/country_named_location.rb', line 95

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_primitive_values("countriesAndRegions", @countries_and_regions)
    writer.write_enum_value("countryLookupMethod", @country_lookup_method)
    writer.write_boolean_value("includeUnknownCountriesAndRegions", @include_unknown_countries_and_regions)
end