Class: MicrosoftGraph::Models::DirectoryDefinition

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/directory_definition.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new directoryDefinition and sets the default values.



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

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 directory_definition

Raises:

  • (StandardError)


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

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

Instance Method Details

#discoverabilitiesObject

Gets the discoverabilities property value. The discoverabilities property

Returns:

  • a directory_definition_discoverabilities



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

def discoverabilities
    return @discoverabilities
end

#discoverabilities=(value) ⇒ Object

Sets the discoverabilities property value. The discoverabilities property

Parameters:

  • value

    Value to set for the discoverabilities property.

Returns:

  • a void



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

def discoverabilities=(value)
    @discoverabilities = value
end

#discovery_date_timeObject

Gets the discoveryDateTime property value. Represents the discovery date and time using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Returns:

  • a date_time



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

def discovery_date_time
    return @discovery_date_time
end

#discovery_date_time=(value) ⇒ Object

Sets the discoveryDateTime property value. Represents the discovery date and time using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.

Parameters:

  • value

    Value to set for the discoveryDateTime property.

Returns:

  • a void



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

def discovery_date_time=(value)
    @discovery_date_time = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



78
79
80
81
82
83
84
85
86
87
# File 'lib/models/directory_definition.rb', line 78

def get_field_deserializers()
    return super.merge({
        "discoverabilities" => lambda {|n| @discoverabilities = n.get_enum_value(MicrosoftGraph::Models::DirectoryDefinitionDiscoverabilities) },
        "discoveryDateTime" => lambda {|n| @discovery_date_time = n.get_date_time_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "objects" => lambda {|n| @objects = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ObjectDefinition.create_from_discriminator_value(pn) }) },
        "readOnly" => lambda {|n| @read_only = n.get_boolean_value() },
        "version" => lambda {|n| @version = n.get_string_value() },
    })
end

#nameObject

Gets the name property value. Name of the directory. Must be unique within the synchronization schema. Not nullable.

Returns:

  • a string



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

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. Name of the directory. Must be unique within the synchronization schema. Not nullable.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



100
101
102
# File 'lib/models/directory_definition.rb', line 100

def name=(value)
    @name = value
end

#objectsObject

Gets the objects property value. Collection of objects supported by the directory.

Returns:

  • a object_definition



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

def objects
    return @objects
end

#objects=(value) ⇒ Object

Sets the objects property value. Collection of objects supported by the directory.

Parameters:

  • value

    Value to set for the objects property.

Returns:

  • a void



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

def objects=(value)
    @objects = value
end

#read_onlyObject

Gets the readOnly property value. Whether this object is read-only.

Returns:

  • a boolean



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

def read_only
    return @read_only
end

#read_only=(value) ⇒ Object

Sets the readOnly property value. Whether this object is read-only.

Parameters:

  • value

    Value to set for the readOnly property.

Returns:

  • a void



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

def read_only=(value)
    @read_only = 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/directory_definition.rb', line 138

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_enum_value("discoverabilities", @discoverabilities)
    writer.write_date_time_value("discoveryDateTime", @discovery_date_time)
    writer.write_string_value("name", @name)
    writer.write_collection_of_object_values("objects", @objects)
    writer.write_boolean_value("readOnly", @read_only)
    writer.write_string_value("version", @version)
end

#versionObject

Gets the version property value. Read only value that indicates version discovered. null if discovery has not yet occurred.

Returns:

  • a string



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

def version
    return @version
end

#version=(value) ⇒ Object

Sets the version property value. Read only value that indicates version discovered. null if discovery has not yet occurred.

Parameters:

  • value

    Value to set for the version property.

Returns:

  • a void



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

def version=(value)
    @version = value
end