Class: MicrosoftGraph::Models::AdministrativeUnit

Inherits:
DirectoryObject show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/administrative_unit.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DirectoryObject

#deleted_date_time, #deleted_date_time=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new administrativeUnit and sets the default values.



31
32
33
34
# File 'lib/models/administrative_unit.rb', line 31

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#descriptionObject

Gets the description property value. An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search.

Returns:

  • a string



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

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



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

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Display name for the administrative unit. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy.

Returns:

  • a string



63
64
65
# File 'lib/models/administrative_unit.rb', line 63

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name for the administrative unit. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



71
72
73
# File 'lib/models/administrative_unit.rb', line 71

def display_name=(value)
    @display_name = value
end

#extensionsObject

Gets the extensions property value. The collection of open extensions defined for this administrative unit. Nullable.

Returns:

  • a extension



78
79
80
# File 'lib/models/administrative_unit.rb', line 78

def extensions
    return @extensions
end

#extensions=(value) ⇒ Object

Sets the extensions property value. The collection of open extensions defined for this administrative unit. Nullable.

Parameters:

  • value

    Value to set for the extensions property.

Returns:

  • a void



86
87
88
# File 'lib/models/administrative_unit.rb', line 86

def extensions=(value)
    @extensions = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



93
94
95
96
97
98
99
100
101
102
# File 'lib/models/administrative_unit.rb', line 93

def get_field_deserializers()
    return super.merge({
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "extensions" => lambda {|n| @extensions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Extension.create_from_discriminator_value(pn) }) },
        "members" => lambda {|n| @members = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::DirectoryObject.create_from_discriminator_value(pn) }) },
        "scopedRoleMembers" => lambda {|n| @scoped_role_members = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ScopedRoleMembership.create_from_discriminator_value(pn) }) },
        "visibility" => lambda {|n| @visibility = n.get_string_value() },
    })
end

#membersObject

Gets the members property value. Users and groups that are members of this administrative unit. Supports $expand.

Returns:

  • a directory_object



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

def members
    return @members
end

#members=(value) ⇒ Object

Sets the members property value. Users and groups that are members of this administrative unit. Supports $expand.

Parameters:

  • value

    Value to set for the members property.

Returns:

  • a void



115
116
117
# File 'lib/models/administrative_unit.rb', line 115

def members=(value)
    @members = value
end

#scoped_role_membersObject

Gets the scopedRoleMembers property value. Scoped-role members of this administrative unit.

Returns:

  • a scoped_role_membership



122
123
124
# File 'lib/models/administrative_unit.rb', line 122

def scoped_role_members
    return @scoped_role_members
end

#scoped_role_members=(value) ⇒ Object

Sets the scopedRoleMembers property value. Scoped-role members of this administrative unit.

Parameters:

  • value

    Value to set for the scopedRoleMembers property.

Returns:

  • a void



130
131
132
# File 'lib/models/administrative_unit.rb', line 130

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


138
139
140
141
142
143
144
145
146
147
# File 'lib/models/administrative_unit.rb', line 138

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_collection_of_object_values("extensions", @extensions)
    writer.write_collection_of_object_values("members", @members)
    writer.write_collection_of_object_values("scopedRoleMembers", @scoped_role_members)
    writer.write_string_value("visibility", @visibility)
end

#visibilityObject

Gets the visibility property value. Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership. If not set (value is null), the default behavior is public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit.

Returns:

  • a string



152
153
154
# File 'lib/models/administrative_unit.rb', line 152

def visibility
    return @visibility
end

#visibility=(value) ⇒ Object

Sets the visibility property value. Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership. If not set (value is null), the default behavior is public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit.

Parameters:

  • value

    Value to set for the visibility property.

Returns:

  • a void



160
161
162
# File 'lib/models/administrative_unit.rb', line 160

def visibility=(value)
    @visibility = value
end