Class: MicrosoftGraph::Models::ResourceSpecificPermissionGrant

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



58
59
60
61
# File 'lib/models/resource_specific_permission_grant.rb', line 58

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

Raises:

  • (StandardError)


67
68
69
70
# File 'lib/models/resource_specific_permission_grant.rb', line 67

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

Instance Method Details

#client_app_idObject

Gets the clientAppId property value. ID of the service principal of the Azure AD app that has been granted access. Read-only.

Returns:

  • a string



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

def client_app_id
    return @client_app_id
end

#client_app_id=(value) ⇒ Object

Sets the clientAppId property value. ID of the service principal of the Azure AD app that has been granted access. Read-only.

Parameters:

  • value

    Value to set for the clientAppId property.

Returns:

  • a void



36
37
38
# File 'lib/models/resource_specific_permission_grant.rb', line 36

def client_app_id=(value)
    @client_app_id = value
end

#client_idObject

Gets the clientId property value. ID of the Azure AD app that has been granted access. Read-only.

Returns:

  • a string



43
44
45
# File 'lib/models/resource_specific_permission_grant.rb', line 43

def client_id
    return @client_id
end

#client_id=(value) ⇒ Object

Sets the clientId property value. ID of the Azure AD app that has been granted access. Read-only.

Parameters:

  • value

    Value to set for the clientId property.

Returns:

  • a void



51
52
53
# File 'lib/models/resource_specific_permission_grant.rb', line 51

def client_id=(value)
    @client_id = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



75
76
77
78
79
80
81
82
83
# File 'lib/models/resource_specific_permission_grant.rb', line 75

def get_field_deserializers()
    return super.merge({
        "clientAppId" => lambda {|n| @client_app_id = n.get_string_value() },
        "clientId" => lambda {|n| @client_id = n.get_string_value() },
        "permission" => lambda {|n| @permission = n.get_string_value() },
        "permissionType" => lambda {|n| @permission_type = n.get_string_value() },
        "resourceAppId" => lambda {|n| @resource_app_id = n.get_string_value() },
    })
end

#permissionObject

Gets the permission property value. The name of the resource-specific permission. Read-only.

Returns:

  • a string



88
89
90
# File 'lib/models/resource_specific_permission_grant.rb', line 88

def permission
    return @permission
end

#permission=(value) ⇒ Object

Sets the permission property value. The name of the resource-specific permission. Read-only.

Parameters:

  • value

    Value to set for the permission property.

Returns:

  • a void



96
97
98
# File 'lib/models/resource_specific_permission_grant.rb', line 96

def permission=(value)
    @permission = value
end

#permission_typeObject

Gets the permissionType property value. The type of permission. Possible values are: Application, Delegated. Read-only.

Returns:

  • a string



103
104
105
# File 'lib/models/resource_specific_permission_grant.rb', line 103

def permission_type
    return @permission_type
end

#permission_type=(value) ⇒ Object

Sets the permissionType property value. The type of permission. Possible values are: Application, Delegated. Read-only.

Parameters:

  • value

    Value to set for the permissionType property.

Returns:

  • a void



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

def permission_type=(value)
    @permission_type = value
end

#resource_app_idObject

Gets the resourceAppId property value. ID of the Azure AD app that is hosting the resource. Read-only.

Returns:

  • a string



118
119
120
# File 'lib/models/resource_specific_permission_grant.rb', line 118

def resource_app_id
    return @resource_app_id
end

#resource_app_id=(value) ⇒ Object

Sets the resourceAppId property value. ID of the Azure AD app that is hosting the resource. Read-only.

Parameters:

  • value

    Value to set for the resourceAppId property.

Returns:

  • a void



126
127
128
# File 'lib/models/resource_specific_permission_grant.rb', line 126

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


134
135
136
137
138
139
140
141
142
# File 'lib/models/resource_specific_permission_grant.rb', line 134

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("clientAppId", @client_app_id)
    writer.write_string_value("clientId", @client_id)
    writer.write_string_value("permission", @permission)
    writer.write_string_value("permissionType", @permission_type)
    writer.write_string_value("resourceAppId", @resource_app_id)
end