def api_serialize_impl(self, withClean=False):
        Util.validate_type(withClean, "bool")
        missing = []
        ret = {
            
        }
        if withClean or self.n_id:
            Util.set_by_path(ret, "ID", self.m_id)
        if withClean or self.n_name:
            Util.set_by_path(ret, "Name", self.m_name)
        else:
            if self.is_new:
                missing.append("name")
        if withClean or self.n_description:
            Util.set_by_path(ret, "Description", self.m_description)
        if withClean or self.n_network_mask_len:
            Util.set_by_path(ret, "NetworkMaskLen", self.m_network_mask_len)
        else:
            if self.is_new:
                missing.append("network_mask_len")
        if withClean or self.n_band_width_mbps:
            Util.set_by_path(ret, "BandWidthMbps", self.m_band_width_mbps)
        else:
            if self.is_new:
                missing.append("band_width_mbps")
        if withClean or self.n_swytch_id:
            Util.set_by_path(ret, "Switch.ID", self.m_swytch_id)
        if len(missing) > 0:
            raise SaklientException("required_field", "Required fields must be set before the Router creation: " + ", ".join(missing))
        return ret
dataset/ETHPy150Open sakura-internet/saklient.python/saklient/cloud/resources/router.py/Router.api_serialize_impl/original