Halachah · Shulchan Aruch

Shulchan Arukh, Orach Chayim 384/שולחן ערוך·אורח חיים שפ״ד

אעכו"ם אכסנאי אם מעכב. ובו ב סעיפים:
עכו"ם הנכנס לשם אכסנאות אם נכנס שלא ברשות אינו אוסר לעולם ואם נכנס ברשות אם הוא רגיל לבא אוסר מיד ואם אינו רגיל אינו אוסר עד לאחר שלשים יום:
1A Non-Jewish Guest, Whether He Prevents [Carrying]. Containing 2 paragraphs: A non-Jew who enters as a guest: if he entered without permission, he never prevents [carrying]. If he entered with permission — if he regularly comes, he prevents [carrying] immediately. If he does not regularly come, he does not prevent [carrying] until after thirty days.
באנשי חיל המלך שנכנסו בבתי היהודים בין בחזקה בין ברצון אם יש לבעלי בתים באותם מקומות שנכנסו העכו"ם כלים שאסור לטלטלם בשבת אינם אוסרים עליהם:
2The king's soldiers who entered into the homes of Jews, whether by force or willingly — if the homeowners have in those places where the non-Jews entered utensils that are forbidden to move on Shabbat, [the non-Jews] do not prevent [carrying] upon them.