Class: MicrosoftGraph::Models::AccessPackageSubject

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



49
50
51
# File 'lib/models/access_package_subject.rb', line 49

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 access_package_subject

Raises:

  • (StandardError)


57
58
59
60
# File 'lib/models/access_package_subject.rb', line 57

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

Instance Method Details

#connected_organizationObject

Gets the connectedOrganization property value. The connected organization of the subject. Read-only. Nullable.

Returns:

  • a connected_organization



34
35
36
# File 'lib/models/access_package_subject.rb', line 34

def connected_organization
    return @connected_organization
end

#connected_organization=(value) ⇒ Object

Sets the connectedOrganization property value. The connected organization of the subject. Read-only. Nullable.

Parameters:

  • value

    Value to set for the connectedOrganization property.

Returns:

  • a void



42
43
44
# File 'lib/models/access_package_subject.rb', line 42

def connected_organization=(value)
    @connected_organization = value
end

#display_nameObject

Gets the displayName property value. The display name of the subject.

Returns:

  • a string



65
66
67
# File 'lib/models/access_package_subject.rb', line 65

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The display name of the subject.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



73
74
75
# File 'lib/models/access_package_subject.rb', line 73

def display_name=(value)
    @display_name = value
end

#emailObject

Gets the email property value. The email address of the subject.

Returns:

  • a string



80
81
82
# File 'lib/models/access_package_subject.rb', line 80

def email
    return @email
end

#email=(value) ⇒ Object

Sets the email property value. The email address of the subject.

Parameters:

  • value

    Value to set for the email property.

Returns:

  • a void



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

def email=(value)
    @email = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



95
96
97
98
99
100
101
102
103
104
105
# File 'lib/models/access_package_subject.rb', line 95

def get_field_deserializers()
    return super.merge({
        "connectedOrganization" => lambda {|n| @connected_organization = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ConnectedOrganization.create_from_discriminator_value(pn) }) },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "email" => lambda {|n| @email = n.get_string_value() },
        "objectId" => lambda {|n| @object_id_escaped = n.get_string_value() },
        "onPremisesSecurityIdentifier" => lambda {|n| @on_premises_security_identifier = n.get_string_value() },
        "principalName" => lambda {|n| @principal_name = n.get_string_value() },
        "subjectType" => lambda {|n| @subject_type = n.get_enum_value(MicrosoftGraph::Models::AccessPackageSubjectType) },
    })
end

#object_id_escapedObject

Gets the objectId property value. The object identifier of the subject. null if the subject is not yet a user in the tenant.

Returns:

  • a string



110
111
112
# File 'lib/models/access_package_subject.rb', line 110

def object_id_escaped
    return @object_id_escaped
end

#object_id_escaped=(value) ⇒ Object

Sets the objectId property value. The object identifier of the subject. null if the subject is not yet a user in the tenant.

Parameters:

  • value

    Value to set for the objectId property.

Returns:

  • a void



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

def object_id_escaped=(value)
    @object_id_escaped = value
end

#on_premises_security_identifierObject

Gets the onPremisesSecurityIdentifier property value. A string representation of the principal’s security identifier, if known, or null if the subject does not have a security identifier.

Returns:

  • a string



125
126
127
# File 'lib/models/access_package_subject.rb', line 125

def on_premises_security_identifier
    return @on_premises_security_identifier
end

#on_premises_security_identifier=(value) ⇒ Object

Sets the onPremisesSecurityIdentifier property value. A string representation of the principal’s security identifier, if known, or null if the subject does not have a security identifier.

Parameters:

  • value

    Value to set for the onPremisesSecurityIdentifier property.

Returns:

  • a void



133
134
135
# File 'lib/models/access_package_subject.rb', line 133

def on_premises_security_identifier=(value)
    @on_premises_security_identifier = value
end

#principal_nameObject

Gets the principalName property value. The principal name, if known, of the subject.

Returns:

  • a string



140
141
142
# File 'lib/models/access_package_subject.rb', line 140

def principal_name
    return @principal_name
end

#principal_name=(value) ⇒ Object

Sets the principalName property value. The principal name, if known, of the subject.

Parameters:

  • value

    Value to set for the principalName property.

Returns:

  • a void



148
149
150
# File 'lib/models/access_package_subject.rb', line 148

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


156
157
158
159
160
161
162
163
164
165
166
# File 'lib/models/access_package_subject.rb', line 156

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("connectedOrganization", @connected_organization)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("email", @email)
    writer.write_string_value("objectId", @object_id_escaped)
    writer.write_string_value("onPremisesSecurityIdentifier", @on_premises_security_identifier)
    writer.write_string_value("principalName", @principal_name)
    writer.write_enum_value("subjectType", @subject_type)
end

#subject_typeObject

Gets the subjectType property value. The resource type of the subject. The possible values are: notSpecified, user, servicePrincipal, unknownFutureValue.

Returns:

  • a access_package_subject_type



171
172
173
# File 'lib/models/access_package_subject.rb', line 171

def subject_type
    return @subject_type
end

#subject_type=(value) ⇒ Object

Sets the subjectType property value. The resource type of the subject. The possible values are: notSpecified, user, servicePrincipal, unknownFutureValue.

Parameters:

  • value

    Value to set for the subjectType property.

Returns:

  • a void



179
180
181
# File 'lib/models/access_package_subject.rb', line 179

def subject_type=(value)
    @subject_type = value
end