SystemScheduleModifyEventRequest
Bases: OCIRequest
Modify an event of a 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):
new_event_name (Optional[str]):
start_date (Optional[int]):
all_day_event (Optional[bool]):
start_time (Optional[HourMinute]):
end_time (Optional[HourMinute]):
end_date (Optional[int]):
recurrence (Optional[Nillable[Recurrence]]):
Source code in src/mercury_ocip/commands/commands.py
| @dataclass(kw_only=True)
class SystemScheduleModifyEventRequest(OCIRequest):
"""Modify an event of a 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):
new_event_name (Optional[str]):
start_date (Optional[int]):
all_day_event (Optional[bool]):
start_time (Optional[HourMinute]):
end_time (Optional[HourMinute]):
end_date (Optional[int]):
recurrence (Optional[Nillable[Recurrence]]):
"""
schedule_key: ScheduleKey = field(metadata={"alias": "scheduleKey"})
event_name: str = field(metadata={"alias": "eventName"})
new_event_name: Optional[str] = field(
default=None, metadata={"alias": "newEventName"}
)
start_date: Optional[int] = field(default=None, 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: Optional[int] = field(default=None, metadata={"alias": "endDate"})
recurrence: Optional[Nillable[Recurrence]] = field(
default=None, metadata={"alias": "recurrence"}
)
def __post_init__(self):
nillable_fields = ["recurrence"]
for field_name in nillable_fields:
value = getattr(self, field_name)
if value == "" or value == "None":
object.__setattr__(self, field_name, OCINil)
|
Responses
Bases: OCIResponseSource code in src/mercury_ocip/commands/base_command.py
| class SuccessResponse(OCIResponse):
pass
|
Bases: OCIResponseSource code in src/mercury_ocip/commands/base_command.py
| class ErrorResponse(OCIResponse):
errorCode: Optional[int] = None
summary: str
summaryEnglish: str
detail: Optional[str] = None
|
Example Usage
from mercury_ocip.client import Client
from mercury_ocip.commands import SystemScheduleModifyEventRequest
client = Client()
command = SystemScheduleModifyEventRequest(
schedule_key=...,
event_name=...,
new_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.client import Client
client = Client()
response = client.raw_command("SystemScheduleModifyEventRequest",
schedule_key=...,
event_name=...,
new_event_name=...,
start_date=...,
all_day_event=...,
start_time=...,
end_time=...,
end_date=...,
recurrence=...,
)
print(response)