def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        writer.write_int_value("dayOfMonth", self.day_of_month)
        writer.write_collection_of_enum_values("daysOfWeek", self.days_of_week)
        writer.write_enum_value("firstDayOfWeek", self.first_day_of_week)
        writer.write_enum_value("index", self.index)
        writer.write_int_value("interval", self.interval)
        writer.write_int_value("month", self.month)
        writer.write_str_value("@odata.type", self.odata_type)
        writer.write_enum_value("type", self.type)
        writer.write_additional_data_value(self.additional_data)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/recurrence_pattern.py