def set_auto_reply(self, message, status=AutoReplyStatus.ALWAYS_ENABLED, start=None, end=None,<EOL>external_message=None, audience=AutoReplyAudience.ALL):<EOL>
start_is_none = start is None<EOL>end_is_none = end is None<EOL>if (not start_is_none and end_is_none) or (start_is_none and not end_is_none):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>start_is_datetime = isinstance(start, datetime)<EOL>end_is_datetime = isinstance(end, datetime)<EOL>if not start_is_datetime and not start_is_none or not end_is_datetime and not end_is_none:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>request_data = dict(Status=status, ExternalAudience=audience)<EOL>if external_message is None:<EOL><INDENT>external_message = message<EOL><DEDENT>request_data.update(InternalReplyMessage=message, ExternalReplyMessage=external_message)<EOL>if not start_is_none and not end_is_none:<EOL><INDENT>request_data.update(ScheduledStartDateTime=dict(DateTime=str(start)))<EOL>request_data.update(ScheduledEndDateTime=dict(DateTime=str(end)))<EOL><DEDENT>data = {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": request_data<EOL>}<EOL>requests.patch('<STR_LIT>',<EOL>headers=self._headers, data=json.dumps(data))<EOL>self._auto_reply = message<EOL>
Set an automatic reply for the account.
        Args:
            message (str): The message to be sent in replies. If external_message is provided this is the message sent
            to internal recipients
            status (OutlookAccount.AutoReplyStatus): Whether the auto-reply should be always enabled, scheduled, or
            disabled. You can use :class:`AutoReplyStatus <pyOutlook.core.main.OutlookAccount.AutoReplyStatus>` to
            provide the value. Defaults to ALWAYS_ENABLED.
            start (datetime): If status is set to SCHEDULED, this is when the replies will start being sent.
            end (datetime): If status is set to SCHEDULED, this is when the replies will stop being sent.
            external_message (str): If provided, this message will be sent to external recipients.
            audience (OutlookAccount.AutoReplyAudience): Whether replies should be sent to everyone, contacts only,
            or internal recipients only. You can use
            :class:`AutoReplyAudience <pyOutlook.core.main.OutlookAccount.AutoReplyAudience>` to provide the value.