_propDict = $propDict; } /** * Gets the property dictionary of the MyRole * * @return array The list of properties */ public function getProperties() { return $this->_propDict; } /** * Gets the assignments * A collection of role assignments for the managed tenant. * * @return array|null The assignments */ public function getAssignments() { if (array_key_exists("assignments", $this->_propDict)) { return $this->_propDict["assignments"]; } else { return null; } } /** * Sets the assignments * A collection of role assignments for the managed tenant. * * @param RoleAssignment[] $val The assignments * * @return MyRole */ public function setAssignments($val) { $this->_propDict["assignments"] = $val; return $this; } /** * Gets the tenantId * The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. * * @return string|null The tenantId */ public function getTenantId() { if (array_key_exists("tenantId", $this->_propDict)) { return $this->_propDict["tenantId"]; } else { return null; } } /** * Sets the tenantId * The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. * * @param string $val The tenantId * * @return MyRole */ public function setTenantId($val) { $this->_propDict["tenantId"] = $val; return $this; } /** * Gets the ODataType * * @return string|null The ODataType */ public function getODataType() { if (array_key_exists('@odata.type', $this->_propDict)) { return $this->_propDict["@odata.type"]; } return null; } /** * Sets the ODataType * * @param string $val The ODataType * * @return MyRole */ public function setODataType($val) { $this->_propDict["@odata.type"] = $val; return $this; } /** * Serializes the object by property array * Manually serialize DateTime into RFC3339 format * * @return array The list of properties */ #[\ReturnTypeWillChange] public function jsonSerialize() { $serializableProperties = $this->getProperties(); foreach ($serializableProperties as $property => $val) { if (is_a($val, "\DateTime")) { $serializableProperties[$property] = $val->format(\DateTime::RFC3339); } else if (is_a($val, "\Microsoft\Graph\Core\Enum")) { $serializableProperties[$property] = $val->value(); } else if (is_a($val, "\Entity")) { $serializableProperties[$property] = $val->jsonSerialize(); } else if (is_a($val, "\GuzzleHttp\Psr7\Stream")) { $serializableProperties[$property] = (string) $val; } } return $serializableProperties; } }