Class: MicrosoftGraph::Models::PrincipalResourceMembershipsScope

Inherits:
AccessReviewScope show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/principal_resource_memberships_scope.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AccessReviewScope

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

Constructor Details

#initializeObject

Instantiates a new principalResourceMembershipsScope and sets the default values.



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

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



36
37
38
39
40
41
# File 'lib/models/principal_resource_memberships_scope.rb', line 36

def get_field_deserializers()
    return super.merge({
        "principalScopes" => lambda {|n| @principal_scopes = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AccessReviewScope.create_from_discriminator_value(pn) }) },
        "resourceScopes" => lambda {|n| @resource_scopes = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AccessReviewScope.create_from_discriminator_value(pn) }) },
    })
end

#principal_scopesObject

Gets the principalScopes property value. Defines the scopes of the principals whose access to resources are reviewed in the access review.

Returns:

  • a access_review_scope



46
47
48
# File 'lib/models/principal_resource_memberships_scope.rb', line 46

def principal_scopes
    return @principal_scopes
end

#principal_scopes=(value) ⇒ Object

Sets the principalScopes property value. Defines the scopes of the principals whose access to resources are reviewed in the access review.

Parameters:

  • value

    Value to set for the principalScopes property.

Returns:

  • a void



54
55
56
# File 'lib/models/principal_resource_memberships_scope.rb', line 54

def principal_scopes=(value)
    @principal_scopes = value
end

#resource_scopesObject

Gets the resourceScopes property value. Defines the scopes of the resources for which access is reviewed.

Returns:

  • a access_review_scope



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

def resource_scopes
    return @resource_scopes
end

#resource_scopes=(value) ⇒ Object

Sets the resourceScopes property value. Defines the scopes of the resources for which access is reviewed.

Parameters:

  • value

    Value to set for the resourceScopes property.

Returns:

  • a void



69
70
71
# File 'lib/models/principal_resource_memberships_scope.rb', line 69

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


77
78
79
80
81
82
# File 'lib/models/principal_resource_memberships_scope.rb', line 77

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("principalScopes", @principal_scopes)
    writer.write_collection_of_object_values("resourceScopes", @resource_scopes)
end