SystemScheduleAddEventRequest
Bases: OCIRequest
Add an event to system schedule. The response is either a SuccessResponse or an ErrorResponse. The startDate element is adjusted to the first occurrence of the recurrent schedule that comes at or after the startDate. The endDate element is set to the sum of the adjusted starDate element value and the event duration.
Attributes:
schedule_key (ScheduleKey):
event_name (str):
start_date (int):
all_day_event (Optional[bool]):
start_time (Optional[HourMinute]):
end_time (Optional[HourMinute]):
end_date (int):
recurrence (Optional[Recurrence]):
Source code in src/mercury_ocip_fast/commands/commands.py
| @dataclass(kw_only=True)
class SystemScheduleAddEventRequest(OCIRequest):
"""Add an event to system schedule.
The response is either a SuccessResponse or an ErrorResponse.
The startDate element is adjusted to the first occurrence of the recurrent schedule that comes at or after the startDate.
The endDate element is set to the sum of the adjusted starDate element value and the event duration.
Attributes:
schedule_key (ScheduleKey):
event_name (str):
start_date (int):
all_day_event (Optional[bool]):
start_time (Optional[HourMinute]):
end_time (Optional[HourMinute]):
end_date (int):
recurrence (Optional[Recurrence]):
"""
schedule_key: ScheduleKey = field(metadata={"alias": "scheduleKey"})
event_name: str = field(metadata={"alias": "eventName"})
start_date: int = field(metadata={"alias": "startDate"})
all_day_event: Optional[bool] = field(
default=None, metadata={"alias": "allDayEvent"}
)
start_time: Optional[HourMinute] = field(
default=None, metadata={"alias": "startTime"}
)
end_time: Optional[HourMinute] = field(default=None, metadata={"alias": "endTime"})
end_date: int = field(metadata={"alias": "endDate"})
recurrence: Optional[Recurrence] = field(
default=None, metadata={"alias": "recurrence"}
)
|
Responses
Bases: OCIResponseSource code in src/mercury_ocip_fast/commands/base_command.py
| class SuccessResponse(OCIResponse):
pass
|
Bases: OCIResponseSource code in src/mercury_ocip_fast/commands/base_command.py
| class ErrorResponse(OCIResponse):
errorCode: Optional[int] = None
summary: str
summaryEnglish: str
detail: Optional[str] = None
|
Example Usage
from mercury_ocip_fast.client import Client
from mercury_ocip_fast.commands import SystemScheduleAddEventRequest
client = Client()
command = SystemScheduleAddEventRequest(
schedule_key=...,
event_name=...,
start_date=...,
all_day_event=...,
start_time=...,
end_time=...,
end_date=...,
recurrence=...,
)
response = client.command(command)
print(response)
Example 2 with Raw Command
from mercury_ocip_fast.client import Client
client = Client()
response = client.raw_command("SystemScheduleAddEventRequest",
schedule_key=...,
event_name=...,
start_date=...,
all_day_event=...,
start_time=...,
end_time=...,
end_date=...,
recurrence=...,
)
print(response)