Class: MicrosoftGraph::Models::SecurityDataSource

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/security_data_source.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 securityDataSource and sets the default values.



26
27
28
# File 'lib/models/security_data_source.rb', line 26

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 security_data_source

Raises:

  • (StandardError)


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/models/security_data_source.rb', line 64

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.security.siteSource"
                return SecuritySiteSource.new
            when "#microsoft.graph.security.unifiedGroupSource"
                return SecurityUnifiedGroupSource.new
            when "#microsoft.graph.security.userSource"
                return SecurityUserSource.new
        end
    end
    return SecurityDataSource.new
end

Instance Method Details

#created_byObject

Gets the createdBy property value. The user who created the dataSource.

Returns:

  • a identity_set



33
34
35
# File 'lib/models/security_data_source.rb', line 33

def created_by
    return @created_by
end

#created_by=(value) ⇒ Object

Sets the createdBy property value. The user who created the dataSource.

Parameters:

  • value

    Value to set for the createdBy property.

Returns:

  • a void



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

def created_by=(value)
    @created_by = value
end

#created_date_timeObject

Gets the createdDateTime property value. The date and time the dataSource was created.

Returns:

  • a date_time



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

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. The date and time the dataSource was created.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



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

def created_date_time=(value)
    @created_date_time = value
end

#display_nameObject

Gets the displayName property value. The display name of the dataSource. This will be the name of the SharePoint site.

Returns:

  • a string



84
85
86
# File 'lib/models/security_data_source.rb', line 84

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The display name of the dataSource. This will be the name of the SharePoint site.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



99
100
101
102
103
104
105
106
# File 'lib/models/security_data_source.rb', line 99

def get_field_deserializers()
    return super.merge({
        "createdBy" => lambda {|n| @created_by = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::IdentitySet.create_from_discriminator_value(pn) }) },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "holdStatus" => lambda {|n| @hold_status = n.get_enum_value(MicrosoftGraph::Models::SecurityDataSourceHoldStatus) },
    })
end

#hold_statusObject

Gets the holdStatus property value. The hold status of the dataSource.The possible values are: notApplied, applied, applying, removing, partial

Returns:

  • a security_data_source_hold_status



111
112
113
# File 'lib/models/security_data_source.rb', line 111

def hold_status
    return @hold_status
end

#hold_status=(value) ⇒ Object

Sets the holdStatus property value. The hold status of the dataSource.The possible values are: notApplied, applied, applying, removing, partial

Parameters:

  • value

    Value to set for the holdStatus property.

Returns:

  • a void



119
120
121
# File 'lib/models/security_data_source.rb', line 119

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


127
128
129
130
131
132
133
134
# File 'lib/models/security_data_source.rb', line 127

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("createdBy", @created_by)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("displayName", @display_name)
    writer.write_enum_value("holdStatus", @hold_status)
end